/* OrthoFocus Academy – teaser site
   Fonts are self-hosted (SIL Open Font License, see /assets/fonts/LICENSE-*.txt). */

@font-face {
  font-family: "Sora";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("../fonts/sora-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("../fonts/sora-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url("../fonts/source-sans-3-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url("../fonts/source-sans-3-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #14213a;          /* exact navy from the logo */
  --cobalt: #3458ed;       /* exact blue from the logo */
  --cobalt-dark: #2647cb;
  --mist: #f5f7fb;
  --slate: #536078;
  --line: #d9dfe9;
  --white: #ffffff;
  --error: #b42318;
  --success-bg: #eef2fe;

  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --radius: 6px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--cobalt);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--cobalt-dark); text-decoration-thickness: 2px; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  padding: 0.5rem 0.875rem;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
  z-index: 10;
}
.skip-link:focus-visible { top: 1rem; color: var(--white); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Top bar (language switch only) ---------- */
.topbar {
  display: flex;
  justify-content: flex-end;
  padding: 1.25rem var(--gutter) 0;
}
.lang-switch {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}
.lang-switch a,
.lang-switch span {
  display: inline-block;
  padding: 0.375rem 0.5rem;
  min-width: 2.75rem;
  min-height: 2.25rem;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius);
}
.lang-switch a { color: var(--slate); }
.lang-switch a:hover { color: var(--ink); background: var(--mist); }
.lang-switch [aria-current="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--cobalt); border-radius: 0; }

/* ---------- Teaser ---------- */
.teaser {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vh, 2.25rem) var(--gutter) clamp(2rem, 5vh, 3.5rem);
}
.teaser__inner {
  width: 100%;
  max-width: 40rem;
  text-align: center;
}

.brand {
  display: block;
  width: clamp(168px, 34vw, 200px);
  margin: 0 auto;
}
.brand img { width: 100%; }

.rule {
  width: 2.5rem;
  height: 2px;
  margin: clamp(1.25rem, 3vh, 2rem) auto clamp(1.25rem, 3vh, 1.75rem);
  background: var(--cobalt);
  border: 0;
}

.headline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.125rem, 1.4rem + 3.4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}

.lede {
  margin: 1.25rem auto 0;
  max-width: 32rem;
  font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink);
  text-wrap: pretty;
}

.support {
  margin: 0.75rem auto 0;
  max-width: 32rem;
  color: var(--slate);
  text-wrap: pretty;
}

/* ---------- Signup panel ---------- */
.signup {
  margin: clamp(1.5rem, 3.5vh, 2.25rem) auto 0;
  max-width: 37rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--mist);
  border-radius: 10px;
  text-align: left;
}

.field-label {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.field-row {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}
.field { flex: 1 1 auto; min-width: 0; }
.field .input { width: 100%; }

.input {
  flex: 1 1 auto;
  min-width: 0;
  height: 3rem;
  padding: 0 0.95rem;
  font: inherit;
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.input::placeholder { color: #7a859a; opacity: 1; }
.input:hover { border-color: #b9c3d4; }
.input:focus-visible {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(52, 88, 237, 0.22);
}
.input[aria-invalid="true"] { border-color: var(--error); }
.input[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.18); }

.button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 3rem;
  padding: 0 1.4rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--white);
  background: var(--cobalt);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 120ms ease;
}
.button:hover { background: var(--cobalt-dark); }
.button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.button[disabled] { cursor: progress; background: var(--cobalt-dark); }

.spinner {
  display: none;
  width: 1rem; height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: var(--white);
  border-radius: 50%;
}
.button[aria-busy="true"] .spinner { display: inline-block; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .button[aria-busy="true"] .spinner { animation: none; border-top-color: rgba(255,255,255,0.45); }
  .input, .button { transition: none; }
}

.field-error {
  margin: 0.45rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--error);
}
.field-error:empty { display: none; }

.consent {
  margin-top: 1.125rem;
}
.consent__label {
  display: grid;
  grid-template-columns: 1.375rem 1fr;
  gap: 0.75rem;
  align-items: start;
  cursor: pointer;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--slate);
}
.consent__box {
  appearance: none;
  -webkit-appearance: none;
  width: 1.375rem;
  height: 1.375rem;
  margin: 0.1rem 0 0;
  background: var(--white);
  border: 1.5px solid #9aa5b8;
  border-radius: 4px;
  cursor: pointer;
  display: grid;
  place-content: center;
}
.consent__box::after {
  content: "";
  width: 0.7rem;
  height: 0.38rem;
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: translateY(-1px) rotate(-45deg);
  opacity: 0;
}
.consent__box:checked { background: var(--cobalt); border-color: var(--cobalt); }
.consent__box:checked::after { opacity: 1; }
.consent__box:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.consent__box[aria-invalid="true"] { border-color: var(--error); }
.consent .field-error { margin-left: 2.125rem; }

.form-status {
  margin: 1rem 0 0;
  padding: 0.75rem 0.95rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  border-radius: var(--radius);
}
.form-status:empty { display: none; }
.form-status--error { color: var(--error); background: #fdf1f0; border: 1px solid #f3c7c2; }

.success {
  padding: 0.5rem 0.25rem;
  text-align: center;
}
.success__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
.success:focus-visible { outline-offset: 6px; }

/* Honeypot: hidden from people and assistive tech, still present for bots */
.hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---------- Footer ---------- */
.site-footer {
  flex-shrink: 0;
  padding: 1.25rem var(--gutter) 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--slate);
}
.site-footer__inner {
  max-width: 60rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  align-items: center;
  justify-content: space-between;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer a {
  display: inline-block;
  padding: 0.35rem 0;
  color: var(--ink);
  text-decoration-color: var(--line);
}
.site-footer a:hover { color: var(--cobalt-dark); text-decoration-color: currentColor; }
.site-footer p { margin: 0; }

/* ---------- Privacy policy page ---------- */
.doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--gutter);
  border-bottom: 1px solid var(--line);
}
.doc-header .brand { width: 112px; margin: 0; }
.doc-header .topbar { padding: 0; }

.doc {
  flex: 1 0 auto;
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 3.5rem) var(--gutter) clamp(3rem, 8vw, 5rem);
}
.doc h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.doc .doc-sub {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
}
.doc .doc-meta { margin: 0 0 2rem; color: var(--slate); font-size: 0.9375rem; }
.doc h2 {
  margin: 2.75rem 0 0.875rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  scroll-margin-top: 1rem;
}
.doc h3 {
  margin: 2rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
}
.doc p, .doc li { line-height: 1.7; }
.doc p { margin: 0 0 1rem; }
.doc ul, .doc ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.doc li { margin-bottom: 0.5rem; }
.doc li::marker { color: var(--slate); }
.doc address { font-style: normal; margin: 0 0 1rem; line-height: 1.7; }
.placeholder {
  padding: 0.05em 0.35em;
  background: #fff4d6;
  border: 1px dashed #c9a227;
  border-radius: 3px;
  font-size: 0.95em;
  color: #5c4500;
}

.toc {
  margin: 0 0 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--mist);
  border-radius: 10px;
}
.toc h2 { margin: 0 0 0.5rem; padding: 0; border: 0; font-size: 0.9375rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--slate); }
.toc ol { margin: 0; columns: 2 16rem; column-gap: 2rem; }
.toc li { margin-bottom: 0.25rem; break-inside: avoid; }

/* Purpose table → stacked cards on small screens */
.purposes { width: 100%; margin: 0.5rem 0 1.5rem; border-collapse: collapse; font-size: 0.96875rem; }
.purposes th, .purposes td { padding: 0.8rem 0.75rem; vertical-align: top; text-align: left; border-bottom: 1px solid var(--line); line-height: 1.5; }
.purposes thead th { font-family: var(--font-display); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; color: var(--slate); background: var(--mist); border-bottom: 0; }
.purposes tbody th { font-weight: 600; color: var(--ink); }
@media (max-width: 720px) {
  .purposes thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .purposes, .purposes tbody, .purposes tr, .purposes th, .purposes td { display: block; width: 100%; }
  .purposes tr { margin-bottom: 1rem; padding: 1rem 1.1rem; background: var(--mist); border-radius: 10px; }
  .purposes th, .purposes td { padding: 0.25rem 0; border: 0; }
  .purposes tbody th { font-family: var(--font-display); font-size: 1rem; margin-bottom: 0.4rem; }
  .purposes td::before { content: attr(data-label); display: block; font-size: 0.8125rem; font-weight: 600; color: var(--slate); margin-top: 0.4rem; }
}

/* ---------- Mobile ---------- */
@media (max-width: 520px) {
  body { font-size: 1rem; }
  .field-row { flex-direction: column; align-items: stretch; }
  .button { width: 100%; height: 3.125rem; }
  .input { height: 3.125rem; }
  .signup { margin-left: calc(var(--gutter) * -0.4); margin-right: calc(var(--gutter) * -0.4); }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
  .doc-header .brand { width: 96px; }
}
