/* TKD Score — marketing site
   Palette taken from the mat: Chung blue, Hong red, referee ink, gym-floor grey. */
:root {
  --chung: #1e4fd6;
  --chung-deep: #163ca6;
  --hong: #d9231d;
  --hong-deep: #a91913;
  --ink: #0f1830;
  --ink-soft: #3a4560;
  --floor: #eef1f6;
  --paper: #ffffff;
  --gold: #f2b705;

  --display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --body: 'Instrument Sans', system-ui, sans-serif;

  --step-0: 1.0625rem;  /* 17px body */
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.2rem;
  --step-4: clamp(2.6rem, 5vw, 3.8rem);
  --step-5: clamp(4rem, 11vw, 10.5rem);

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --measure: 62ch;
}

:root:lang(ar) {
  --display: 'Readex Pro', system-ui, sans-serif;
  --body: 'Readex Pro', system-ui, sans-serif;
  --step-5: clamp(3rem, 8.5vw, 7.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}
:lang(ar) body { line-height: 1.75; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; line-height: 1; letter-spacing: 0.005em; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { font-weight: 700; line-height: 1.25; letter-spacing: 0; }
p { margin: 0; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 10;
  background: var(--paper); color: var(--ink); padding: .6rem 1rem; border-radius: 6px;
}
.skip:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0 1.4rem;
  font: 600 1rem/1 var(--body);
  border-radius: 10px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #000; }
.btn--ghost { color: var(--paper); border-color: rgba(255,255,255,.55); min-height: 2.6rem; padding: 0 1rem; }
.btn--ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: var(--gold); }
.btn[disabled] { opacity: .6; cursor: progress; }

.link {
  color: var(--paper); font-weight: 600; text-decoration: underline;
  text-decoration-thickness: 2px; text-underline-offset: .3em;
}

/* ---------- Hero: the mat ---------- */
.hero {
  position: relative;
  color: var(--paper);
  background: linear-gradient(90deg, var(--chung) 0 50%, var(--hong) 50% 100%);
  padding: 0 var(--gutter);
  overflow: hidden;
  isolation: isolate;
}
.seam {
  position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%;
  width: 10px; margin-left: -5px; background: var(--ink);
  transform-origin: top;
  animation: seam .8s cubic-bezier(.2,.7,.2,1) both;
}
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 0;
}
.mark {
  display: inline-flex; align-items: center; gap: .6rem;
  font: 900 1.7rem/1 'Big Shoulders Display', sans-serif;
  text-decoration: none; letter-spacing: .01em;
}
.mark__dot {
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: linear-gradient(90deg, var(--chung) 50%, var(--hong) 50%);
  box-shadow: 0 0 0 3px var(--paper);
}
.bar__end { display: flex; align-items: center; gap: .9rem; }
.langs { display: inline-flex; gap: .15rem; }
.langs a, .langs span {
  display: inline-grid; place-items: center; min-width: 2.2rem; height: 2.2rem; padding: 0 .4rem;
  font: 600 .9rem/1 var(--body); text-decoration: none; border-radius: 8px;
}
.langs [lang="ar"] { font-family: 'Readex Pro', sans-serif; font-size: 1rem; }
.hero .langs a:hover { background: rgba(255,255,255,.16); }
.hero .langs span { background: var(--paper); color: var(--ink); }
.hero .langs a { color: var(--paper); }

.hero__copy {
  max-width: 64rem; margin: clamp(2.5rem, 8vh, 6rem) auto 0;
  text-align: center;
}
.hero h1 {
  font-size: var(--step-5);
  font-weight: 900;
  line-height: .86;
  letter-spacing: -.005em;
  text-wrap: balance;
}
:lang(ar) .hero h1 { line-height: 1.2; }
:lang(ar) .hero__sub { margin-top: 2.4rem; }
.hero__sub {
  max-width: 50ch; margin: 1.6rem auto 0;
  font-size: var(--step-1); line-height: 1.5;
  color: rgba(255,255,255,.92);
  text-wrap: pretty;
}
.hero__actions {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 1rem 1.75rem; margin-top: 2rem;
}

/* The scoreboard rises from the floor like a monitor on the jury table. */
.stage {
  perspective: 1800px;
  margin: clamp(3rem, 7vh, 5rem) auto 0;
  max-width: 68rem;
  height: clamp(14rem, 34vw, 27rem);
}
.screen {
  position: relative;
  border: clamp(6px, 1vw, 12px) solid var(--ink);
  border-bottom-width: 0;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  transform: rotateX(14deg) translateY(4%);
  transform-origin: bottom center;
  box-shadow: 0 -30px 80px rgba(15,24,48,.35);
  animation: rise 1s .35s cubic-bezier(.2,.7,.2,1) both;
}
.screen img { width: 100%; filter: saturate(.9) contrast(.95); }
/* Screen-door dots + glare: reads as a real monitor, keeps the details soft. */
.screen::before, .screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.screen::before {
  background: radial-gradient(rgba(15,24,48,.32) 0.9px, transparent 1.3px) 0 0 / 4px 4px;
  mix-blend-mode: multiply;
}
.screen::after {
  background:
    linear-gradient(115deg, rgba(255,255,255,.2) 0 18%, transparent 18% 100%),
    linear-gradient(180deg, transparent 30%, rgba(15,24,48,.6) 100%);
}

@keyframes seam { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes rise { from { transform: rotateX(24deg) translateY(22%); opacity: 0; } to { transform: rotateX(14deg) translateY(4%); opacity: 1; } }

/* ---------- Sections ---------- */
main > section { padding: clamp(4rem, 10vw, 8rem) var(--gutter); }
main h2 { font-size: var(--step-4); max-width: 18ch; text-wrap: balance; }

.hall {
  display: grid; gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  max-width: 76rem; margin: 0 auto;
}
.hall__text p { max-width: 46ch; margin-top: 1.25rem; font-size: var(--step-1); color: var(--ink-soft); }
.hall__text p:first-of-type { margin-top: 1.75rem; }
.hall__fig { margin: 0; }
.hall__fig img {
  width: 100%; max-width: 30rem; margin-inline: auto; border-radius: 22px;
  box-shadow: 0 0 0 10px var(--floor);
}

.feats { background: var(--floor); }
.feats > h2, .feats__grid { max-width: 76rem; margin-inline: auto; }
.feats__grid {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.feats__list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.75rem clamp(1.75rem, 3.5vw, 3rem);
}
.feat { padding-top: 1.1rem; position: relative; }
.feat::before {
  content: ""; position: absolute; top: 0; inset-inline-start: 0;
  width: 2.75rem; height: 5px; border-radius: 3px; background: var(--chung);
}
.feat--hong::before { background: var(--hong); }
.feat h3 { font-size: var(--step-3); font-weight: 800; }
:lang(ar) .feat h3 { font-size: var(--step-2); }
.feat p { margin-top: .7rem; color: var(--ink-soft); max-width: 40ch; }

.feats__figs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 1rem; align-items: start;
  position: sticky; top: 2rem;
}
.feats__figs .fig--wide { grid-column: 1 / -1; }
.feats__figs figure { margin: 0; }
.feats__figs img { width: 100%; border-radius: 14px; }
.feats__figs figcaption { margin-top: .7rem; font-size: .92rem; color: var(--ink-soft); }

.who { max-width: 76rem; margin: 0 auto; }
.who p {
  margin-top: 1.5rem; max-width: 34ch;
  font-size: clamp(1.4rem, 2.6vw, 2.05rem); line-height: 1.32;
  text-wrap: pretty;
}

.steps { max-width: 76rem; margin: 0 auto; padding-top: 0 !important; }
.steps ol {
  list-style: none; margin: clamp(2rem, 4vw, 3.25rem) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem;
  counter-reset: none;
}
.step { border-top: 2px solid var(--ink); padding-top: 1rem; }
.step__n {
  display: block;
  font: 900 4.5rem/1 'Big Shoulders Display', sans-serif;
  color: transparent; -webkit-text-stroke: 2px var(--chung);
}
.step:nth-child(n+3) .step__n { -webkit-text-stroke-color: var(--hong); }
.step h3 { margin-top: .9rem; font-size: var(--step-2); }
.step p { margin-top: .5rem; color: var(--ink-soft); }

.faq { background: var(--floor); }
.faq > h2, .faq__list { max-width: 52rem; margin-inline: auto; }
.faq__list { margin-top: 2rem; }
.faq details { border-bottom: 1px solid rgba(15,24,48,.18); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.2rem 0; font-weight: 600; font-size: var(--step-1);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 100% no-repeat;
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 1.4rem; max-width: var(--measure); color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact {
  background: var(--ink); color: var(--paper);
  display: grid; gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: start;
}
.contact > * { min-width: 0; }
.contact__head p { margin-top: 1.25rem; font-size: var(--step-1); color: rgba(255,255,255,.78); max-width: 32ch; }
.contact { padding-inline: max(var(--gutter), calc((100vw - 76rem) / 2)) !important; }

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 1.25rem; }
.f { display: grid; gap: .45rem; font-size: .95rem; font-weight: 500; grid-column: 1 / -1; align-content: start; }
.f--half { grid-column: span 1; }
.opt { font-weight: 400; color: rgba(255,255,255,.55); }
.f input, .f select, .f textarea {
  width: 100%; font: 400 1rem/1.4 var(--body); color: var(--paper);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.22); border-radius: 9px;
  padding: .8rem .9rem; min-height: 3rem;
}
.f select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--paper) 50%), linear-gradient(135deg, var(--paper) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
:lang(ar) .f select { background-position: 15px 55%, 20px 55%; }
.f select option { color: var(--ink); }
.f textarea { resize: vertical; min-height: 7rem; }
.f input::placeholder, .f textarea::placeholder { color: rgba(255,255,255,.4); }
.f input:focus, .f select:focus, .f textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.f input[aria-invalid="true"] { border-color: #ff8a80; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.form__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: .5rem; }
.form__privacy { font-size: .9rem; color: rgba(255,255,255,.6); }
.form__status { grid-column: 1 / -1; min-height: 1.5em; color: #ffb4ab; }
.form__ok { padding: 2rem 0; border-top: 5px solid var(--gold); }
.form__ok-h { font: 800 var(--step-3)/1.1 var(--display); }
.form__ok p + p { margin-top: .6rem; color: rgba(255,255,255,.8); }

/* ---------- Footer ---------- */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 2rem;
  padding: 2rem var(--gutter); font-size: .92rem; color: var(--ink-soft);
}
.foot__end { display: flex; align-items: center; gap: 1rem; }
.foot .langs a:hover { background: var(--floor); }
.foot .langs span { background: var(--ink); color: var(--paper); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .feats__grid { grid-template-columns: minmax(0, 1fr); }
  .feats__figs { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feats__figs .fig--wide { grid-column: auto; }
}
@media (max-width: 860px) {
  .hall, .contact { grid-template-columns: minmax(0, 1fr); }
  .steps ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .bar .btn--ghost { display: none; }
  .hero { background: linear-gradient(90deg, var(--chung) 0 50%, var(--hong) 50% 100%); }
  .feats__list, .steps ol, .form { grid-template-columns: minmax(0, 1fr); }
  .feats__figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feats__figs .fig--wide { grid-column: 1 / -1; }
  .f--half { grid-column: 1 / -1; }
  .stage { height: 12rem; }
  .screen { transform: rotateX(10deg); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .seam, .screen { animation: none; }
}
