/* Ju Jitsufélag Reykjavíkur — gildi tekin úr hönnun (Forsíða – jujitsu.is) */
:root {
  --ink: #141414;
  --black: #0E0E0E;
  --red: #C8102E;
  --red-text: #B3121F;
  --red-hover: #7E0C16;
  --red-light: #FF5A6A;
  --sand: #F3F3F1;
  --line: #E2E2DE;
  --muted: #5C5C5C;
  --body: #4A4A4A;
  --body-strong: #2E2E2E;
  --grey-light: #BDBDBD;
  --grey-on-dark: #D6D6D6;

  --f-display: 'Barlow Condensed', sans-serif;
  --f-body: Inter, system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 96px);
  --max: 1920px;
}

body { margin: 0; font-family: var(--f-body); color: var(--ink); background: #FFFFFF; -webkit-font-smoothing: antialiased; }
a { color: var(--red-text); }
a:hover { color: var(--red-hover); }
:focus-visible { outline: 2px solid var(--red-light); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; color: var(--ink); padding: 8px 12px; z-index: 10; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: 96px; padding-bottom: 96px; }
.sand { background: var(--sand); }
.dark { background: var(--black); color: #FFFFFF; }

.eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red-text); }
.dark .eyebrow { color: var(--red-light); }
.h2 { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 52px; line-height: 1; text-transform: uppercase; }

.split { display: flex; flex-wrap: wrap; gap: 56px; }

/* Hnappar */
.btn { text-decoration: none; font-weight: 600; border-radius: 6px; text-align: center; }
.btn-red { background: var(--red); color: #FFFFFF; }
.btn-red:hover { background: var(--red-hover); color: #FFFFFF; }
.btn-dark { background: var(--ink); color: #FFFFFF; }
.btn-dark:hover { background: #333; color: #FFFFFF; }
.btn-outline { border: 1.5px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #FFFFFF; }

/* Fyrsti skjár: haus + hero fylla gluggann (--header-h sett með JS) */

/* Haus */
.topbar { flex: none; background: var(--black); color: #FFFFFF; }
.topbar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; color: #FFFFFF; text-decoration: none; }
.brand:hover { color: #FFFFFF; }
.brand-mark { width: 48px; height: 48px; border-radius: 50%; background: #FFFFFF; color: var(--black); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; line-height: 1; border: 3px solid #FFFFFF; box-shadow: 0 0 0 2px var(--black) inset; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--f-display); font-size: 22px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1; }
.brand-sub { font-size: 12px; color: var(--grey-light); margin-top: 3px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nav a { color: #FFFFFF; text-decoration: none; font-size: 15px; font-weight: 500; padding: 12px; }
.nav a:hover { color: var(--red-light); }
.nav .nav-login { color: var(--grey-light); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.nav .nav-cta { background: var(--red); color: #FFFFFF; font-weight: 600; padding: 12px 20px; border-radius: 6px; margin-left: 8px; }
.nav .nav-cta:hover { background: var(--red-hover); color: #FFFFFF; }

/* Hero */
.hero {
  min-height: calc(clamp(560px, 100svh, 1100px) - var(--header-h, 77px)); display: flex; color: #FFFFFF; border-top: 1px solid #262626;
  background-color: #000;
  background-image: linear-gradient(90deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.75) 40%, rgba(0,0,0,0) 58%), url(assets/hero.jpg);
  background-image: linear-gradient(90deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.75) 40%, rgba(0,0,0,0) 58%), image-set(url(assets/hero.webp) type("image/webp"), url(assets/hero.jpg) type("image/jpeg"));
  background-size: cover; background-position: 70% center; background-repeat: no-repeat;
}
.hero-inner { width: 100%; box-sizing: border-box; padding-top: clamp(24px, 5vh, 64px); padding-bottom: clamp(20px, 5vh, 64px); display: flex; flex-direction: column; justify-content: flex-start; gap: clamp(20px, 4.5vh, 48px); }
.hero-col { max-width: min(720px, 44vw); min-width: 0; }
.hero-kicker { margin: 0 0 clamp(10px, 2vh, 18px); font-size: 14px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red-light); }
.hero h1 { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: clamp(40px, min(8.5vh, 4.4vw), 84px); line-height: 0.95; text-transform: uppercase; letter-spacing: 0.005em; }
.hero h1 span { color: var(--red-light); }
.hero-lead { margin: clamp(12px, 2.6vh, 28px) 0 0; font-size: clamp(16px, 2vh, 19px); line-height: 1.55; color: var(--grey-on-dark); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(16px, 3.5vh, 36px); }
.hero-actions .btn { font-size: 17px; }
.hero-actions .btn-red { padding: 16px 28px; }
.hero-actions .btn-ghost { border: 1.5px solid #6B6B6B; color: #FFFFFF; padding: 15px 26px; }
.hero-actions .btn-ghost:hover { border-color: #FFFFFF; color: #FFFFFF; }
.hero-stats { margin-top: auto; display: grid; grid-template-columns: repeat(2, max-content); gap: 12px; }
.stat { background: rgba(20,20,20,0.72); border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; padding: 10px 16px; color: #FFFFFF; text-decoration: none; display: flex; align-items: baseline; gap: 8px; transition: transform .15s ease; }
.stat:hover { transform: translateY(-2px); color: #FFFFFF; }
.stat-value { font-family: var(--f-display); font-size: 24px; font-weight: 800; line-height: 1; white-space: nowrap; }
.stat-label { font-size: 14px; color: var(--grey-light); line-height: 1.35; white-space: nowrap; }
.stat-red { background: var(--red); border: 0; }
.stat-red .stat-label { color: #FFE3E6; }

/* Upplýsingarönd */
.quick { background: var(--sand); border-bottom: 1px solid var(--line); }
.quick-inner { padding-top: 28px; padding-bottom: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; }
.quick-item { display: flex; gap: 14px; align-items: flex-start; }
.quick-item svg { flex: none; }
.quick-title { font-weight: 600; font-size: 16px; }
.quick-sub { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* Um íþróttina */
.about { padding-bottom: 64px; }
.about > div:first-child { flex: 1 1 380px; min-width: 0; }
.about-text { flex: 999 1 520px; min-width: 0; font-size: 18px; line-height: 1.7; color: var(--body-strong); }
.about-text p { margin: 0 0 18px; }
.about-text p:last-child { margin: 0; }
.method { padding-bottom: 96px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 28px; }
.card-no { font-family: var(--f-display); font-size: 18px; font-weight: 700; color: var(--red-text); }
.card h3 { margin: 8px 0 10px; font-size: 21px; }
.card p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--body); }

/* Stundaskrá */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 36px; }
.section-head > a { font-weight: 600; font-size: 16px; padding: 12px 0; }
.table-wrap { overflow-x: auto; background: #FFFFFF; border-radius: 10px; border: 1px solid var(--line); }
.schedule { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 16px; }
.schedule thead tr { text-align: left; background: var(--black); color: #FFFFFF; }
.schedule thead th { padding: 16px 20px; font-weight: 600; }
.schedule tbody tr { border-bottom: 1px solid var(--line); }
.schedule tbody tr:last-child { border-bottom: 0; }
.schedule tbody th { padding: 18px 20px; text-align: left; font-weight: 600; }
.schedule td { padding: 18px 20px; }
.schedule td:last-child { color: var(--body); }
.note { margin: 16px 0 0; font-size: 15px; color: var(--muted); }

/* Verð */
#verd .h2 { margin-bottom: 36px; }
.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.price { border: 1px solid var(--line); border-radius: 12px; padding: 32px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.price-featured { border: 2px solid var(--red); }
.price-badge { position: absolute; top: -13px; left: 28px; background: var(--red); color: #FFFFFF; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; }
.price h3 { margin: 0; font-size: 20px; }
.price-amount { display: flex; align-items: baseline; gap: 8px; }
.price-value { font-family: var(--f-display); font-size: 56px; font-weight: 800; line-height: 1; }
.price-per { font-size: 16px; color: var(--muted); }
.price p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--body); }
.price .btn { margin-top: auto; padding: 14px; }
.price .btn-red { padding: 15px; }
.price-note { margin: 20px 0 0; font-size: 15px; color: var(--muted); max-width: 760px; line-height: 1.6; }

/* Börn */
#born .split > div:first-child { flex: 1 1 380px; min-width: 0; }
#born .h2 { margin-bottom: 20px; }
.kids-lead { margin: 0; font-size: 18px; line-height: 1.7; color: var(--grey-on-dark); }
.kids-cards { flex: 999 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.kids-card { background: #1A1A1A; border-radius: 10px; padding: 26px; }
.kids-card h3 { margin: 0 0 8px; font-size: 19px; }
.kids-card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--grey-light); }

/* Keppni */
.competition { align-items: flex-start; }
.competition-main { flex: 999 1 520px; min-width: 0; }
.competition-main .h2 { margin-bottom: 20px; }
.competition-lead { margin: 0 0 28px; font-size: 18px; line-height: 1.7; color: var(--body-strong); }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { padding: 0 0 24px 24px; position: relative; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: #9A9A9A; }
.timeline li.next::before { left: -8px; top: 5px; width: 14px; height: 14px; background: var(--red); }
.timeline-date { font-size: 14px; color: var(--muted); font-weight: 600; }
.timeline .next .timeline-date { color: var(--red-text); font-weight: 700; }
.timeline-event { font-size: 17px; margin-top: 2px; }
.fund { flex: 1 1 360px; min-width: 0; background: var(--sand); border-radius: 12px; padding: 32px; }
.fund h3 { margin: 0 0 10px; font-size: 22px; }
.fund > p { margin: 0 0 22px; font-size: 16px; line-height: 1.6; color: var(--body); }
.progress { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.progress > div { height: 100%; background: var(--red); }
.fund .progress-text { margin: 10px 0 22px; font-size: 14px; color: var(--muted); }
.fund .btn { display: block; padding: 15px; }

/* Spurt og svarað */
.faq-inner { max-width: 860px; margin: 0 auto; padding: 96px 20px; }
#spurt .h2 { margin-bottom: 32px; }
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: #FFFFFF; border-radius: 10px; padding: 20px 24px; }
.faq summary { cursor: pointer; list-style: none; font-size: 18px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 12px 0 0; font-size: 16px; line-height: 1.7; color: var(--body); }

/* Hafa samband */
#samband > div:first-child { flex: 1 1 360px; min-width: 0; }
#samband .h2 { margin-bottom: 24px; }
.contact-list { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 14px 20px; font-size: 17px; }
.contact-list dt { color: var(--muted); }
.contact-list dd { margin: 0; }
.contact-form { flex: 999 1 480px; min-width: 0; background: var(--sand); border-radius: 12px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; flex-wrap: wrap; gap: 16px; }
.field { flex: 1 1 200px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field textarea { font: inherit; font-size: 16px; padding: 13px 14px; border: 1px solid #C9C9C4; border-radius: 6px; background: #FFFFFF; }
.field textarea { resize: vertical; }
.contact-form button { align-self: flex-start; font: inherit; font-size: 16px; font-weight: 600; background: var(--ink); color: #FFFFFF; border: 0; border-radius: 6px; padding: 14px 28px; cursor: pointer; }
.contact-form button:hover { background: #333; }
.form-hint { margin: 0; font-size: 14px; color: var(--muted); }
.form-hint:empty { display: none; }
.contact-form button:disabled { opacity: .6; cursor: wait; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form { position: relative; }
.contact-form > .field { flex: none; } /* flex-basis 200px á aðeins við reiti í línu */

/* Fótur */
.footer { background: var(--black); color: var(--grey-light); }
.footer-inner { padding-top: 48px; padding-bottom: 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; font-size: 14px; line-height: 1.7; }
.footer-name { color: #FFFFFF; font-weight: 600; font-size: 15px; }
.footer-links { display: flex; flex-direction: column; }
.footer-links a { color: #FFFFFF; }
.footer-links a:hover { color: var(--red-light); }

/* Farsími */
@media (max-width: 760px) {
  .hero-col { max-width: 100%; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero {
    background-image: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.85) 55%, #000 100%), url(assets/hero-960.jpg);
    background-image: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.85) 55%, #000 100%), image-set(url(assets/hero-960.webp) type("image/webp"), url(assets/hero-960.jpg) type("image/jpeg"));
    background-position: 78% top; background-size: auto 520px;
  }
  .stat-label { white-space: normal; }
  .section { padding-top: 72px; padding-bottom: 72px; }
  .h2 { font-size: 44px; }
  .price-value { font-size: 48px; }
}

/* ---------- Hreyfingar ----------
   .js er sett á <html> í <head>, svo efni sést alltaf ef JavaScript keyrir ekki.
   Allt slökkt ef notandi biður um minni hreyfingu (neðst). */

:root { --ease-out: cubic-bezier(.2, .7, .2, 1); }

@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes unveil { from { opacity: 1; } to { opacity: 0; } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(200, 16, 46, .55); }
  70% { box-shadow: 0 0 0 12px rgba(200, 16, 46, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0); }
}

/* Hero: myndin kemur fram úr myrkri, textinn í skrefum */
.hero { position: relative; }
.hero-inner { position: relative; z-index: 1; }
.js .hero::after { content: ""; position: absolute; inset: 0; background: #000; pointer-events: none; animation: unveil 1.1s .1s var(--ease-out) both; }
.js .hero-kicker,
.js .hero h1,
.js .hero-lead,
.js .hero-actions { animation: fade-up .7s var(--ease-out) both; }
.js .hero-kicker { animation-delay: .25s; }
.js .hero h1 { animation-delay: .38s; }
.js .hero-lead { animation-delay: .55s; }
.js .hero-actions { animation-delay: .7s; }
.js .hero-stats .stat { animation: fade-up .6s var(--ease-out) both; }
.js .hero-stats .stat:nth-child(1) { animation-delay: .9s; }
.js .hero-stats .stat:nth-child(2) { animation-delay: .98s; }
.js .hero-stats .stat:nth-child(3) { animation-delay: 1.06s; }
.js .hero-stats .stat:nth-child(4) { animation-delay: 1.14s; }
.js .topbar { animation: fade-in .6s ease both; }

/* Birtist við skrun (JS bætir .is-visible við og setur --d fyrir töf) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); transition-delay: var(--d, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Lyfta spjöldum við mús */
.card, .price, .kids-card, .faq details, .quick-item svg { transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), border-color .25s ease, background-color .25s ease; }
.js .reveal.card, .js .reveal.price, .js .reveal.kids-card { transition: opacity .7s var(--ease-out) var(--d, 0s), transform .7s var(--ease-out) var(--d, 0s), box-shadow .25s var(--ease-out), border-color .25s ease, background-color .25s ease; }
@media (hover: hover) {
  .card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.08); border-color: #D0D0CB; }
  .price:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(0,0,0,.10); }
  .kids-card:hover { transform: translateY(-4px); background: #222; }
  .quick-item:hover svg { transform: scale(1.12); }
  .faq details:hover { box-shadow: 0 6px 18px rgba(0,0,0,.06); }
}
.js .reveal.card.is-visible:hover, .js .reveal.price.is-visible:hover, .js .reveal.kids-card.is-visible:hover { transition-delay: 0s; }

/* Hnappar og tenglar */
.btn { transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease; }
.btn:active { transform: translateY(1px); }
.hero-actions .btn-red svg { transition: transform .2s ease; }
.section-head > a { display: inline-block; transition: transform .2s ease; }
.section-head > a:hover { transform: translateX(4px); }

/* Næsta mót púlsar, framvindustika fyllist */
.timeline li.next::before { animation: pulse 2.2s ease-out infinite; }
.js .progress > div { transform-origin: left; transform: scaleX(0); transition: transform 1.4s var(--ease-out) .3s; }
.js .fund.is-visible .progress > div { transform: scaleX(1); }

/* Spurt og svarað: svarið rennur inn */
.faq details[open] p { animation: fade-up .35s var(--ease-out); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--red-text); transition: transform .25s var(--ease-out); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .progress > div { transform: none; }
}

/* ---------- Skilmálar (/skilmalar/) ---------- */
.legal { max-width: 820px; margin-left: auto; margin-right: auto; padding-top: 64px; line-height: 1.65; }
.legal h1 { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; margin: 0 0 32px; text-transform: uppercase; }
.legal h2 { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 26px; margin: 44px 0 12px; scroll-margin-top: 24px; }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal a { color: var(--red-text); }
.table-scroll { overflow-x: auto; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.legal-table th { background: var(--sand); font-weight: 600; }
.legal-date { margin-top: 48px; color: #555; font-size: 14px; }
