/* ==========================================================================
   AMADIAG Medical — Landing v2
   Design tokens + layout. Matches the Claude Design handoff (AMADIAG Landing v2).
   ========================================================================== */

:root {
  --ink: #0A1F33;
  --ink-deep: #071624;
  --navy-glow: #0E2A44;
  --paper: #F7F6F2;
  --paper-warm: #EFECE4;
  --slate: #46586C;
  --accent: #5B7A99;
  --sky: #9FC1E0;
  --sky-muted: #9DB4CC;
  --sky-soft: #9DB0C2;
  --mist: #B9C7D6;
  --hero-fg: #F1F4F0;
  --hero-dim: #8FA6BC;
  --line: rgba(10, 31, 51, 0.14);
  --line-strong: rgba(10, 31, 51, 0.18);
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }

/* Keyboard focus — brand-tinted ring, visible on light and dark sections. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
.hero :focus-visible,
.expertise :focus-visible,
.final :focus-visible,
.footer :focus-visible,
.header:not(.scrolled) :focus-visible {
  outline-color: var(--sky);
}

/* Skip link — first tab stop, hidden until focused. */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; color: var(--paper); }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: 36px; padding-right: 36px; }

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

.fade-up { animation: fadeUp 0.9s cubic-bezier(0.2, 0.6, 0.2, 1) both; }
.fade-up.d1 { animation-delay: 0.05s; }
.fade-up.d2 { animation-delay: 0.15s; }
.fade-up.d3 { animation-delay: 0.28s; }
.fade-up.d4 { animation-delay: 0.4s; }
.fade-up.d5 { animation-delay: 0.52s; }
.fade-up.slow { animation-duration: 1.1s; animation-delay: 0.35s; }

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.6, 0.2, 1),
              transform 0.8s cubic-bezier(0.2, 0.6, 0.2, 1);
}
[data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { transition: none; opacity: 1; transform: none; }
  * { animation: none !important; }
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: transparent;
  color: var(--paper);
  transition: background 0.35s ease, box-shadow 0.35s ease, color 0.35s ease;
}
.header.scrolled {
  background: rgba(247, 246, 242, 0.95);
  box-shadow: 0 1px 0 rgba(10, 31, 51, 0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink);
}

.header__inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; color: inherit; }
.brand:hover { color: inherit; opacity: 0.85; }
.brand svg { display: block; }
.brand__text { display: flex; align-items: baseline; gap: 9px; }
.brand__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 0.08em;
}
.brand__tag {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.75;
}

.nav { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.nav a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
  color: inherit;
  padding: 10px 0;               /* taller hit area */
  transition: opacity 0.2s ease;
}
.nav a:hover { opacity: 0.7; }

.header__right { display: flex; align-items: center; gap: 22px; }

.lang { display: flex; align-items: center; gap: 4px; font-size: 12px; letter-spacing: 0.1em; }
.lang__sep { opacity: 0.45; }
.lang button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 11px 7px 9px;         /* ~40px tap target */
  line-height: 1;
  color: inherit;
  font-weight: 400;
  opacity: 0.55;
  border-bottom: 1px solid transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.lang button:hover { opacity: 0.85; }
.lang button.active { font-weight: 600; opacity: 1; border-bottom-color: var(--sky); }
.header.scrolled .lang button.active { border-bottom-color: var(--accent); }

/* Mobile menu toggle — hidden on desktop. */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.nav-toggle svg { display: block; }

.header__cta {
  font-size: 13px;
  font-weight: 500;
  padding: 12px 22px;            /* ~44px tap target */
  border: 1px solid currentColor;
  border-radius: 2px;
  color: inherit;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.header__cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  background: radial-gradient(1100px 780px at 72% 18%, var(--navy-glow) 0%, var(--ink) 58%);
  color: var(--hero-fg);
}
.hero__grid {
  padding-top: 170px;
  padding-bottom: 96px;
  min-height: 88vh;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
  gap: 56px;
  align-items: center;
}
.hero__kicker {
  margin: 0 0 26px;
  font-size: 11.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sky);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(42px, 4.8vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0 0 30px;
  text-wrap: balance;
}
.hero__sub {
  font-size: 17px;
  line-height: 1.7;
  color: var(--mist);
  max-width: 560px;
  margin: 0 0 40px;
}
.hero__ctas { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.btn-primary {
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  padding: 15px 30px;
  border-radius: 2px;
  letter-spacing: 0.02em;
  transition: background 0.25s ease;
}
.btn-primary:hover { background: var(--sky); color: var(--ink); }
.hero__cta-secondary {
  font-size: 14px;
  font-weight: 500;
  padding: 15px 6px;
  border-bottom: 1px solid rgba(159, 193, 224, 0.6);
  color: var(--hero-fg);
}
.hero__cta-secondary:hover { color: var(--sky); }
.hero__reassurance {
  margin: 46px 0 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hero-dim);
}
.hero__globe-box { max-width: 540px; width: 100%; margin: 0 auto; }
.hero__globe-caption {
  margin: 18px 0 0;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--hero-dim);
}
amadiag-globe { display: block; width: 100%; aspect-ratio: 1 / 1; }

/* --------------------------------------------------------------------------
   Credibility strip
   -------------------------------------------------------------------------- */

.strip { border-bottom: 1px solid rgba(10, 31, 51, 0.12); }
.strip__inner {
  padding-top: 30px;
  padding-bottom: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 0;
  justify-content: space-between;
  align-items: center;
}
.strip__item {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
  padding: 2px 20px;
  border-left: 1px solid rgba(91, 122, 153, 0.45);
}

/* --------------------------------------------------------------------------
   Shared section furniture
   -------------------------------------------------------------------------- */

.kicker {
  margin: 0 0 20px;
  font-size: 11.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker--sky { color: var(--sky-muted); }

.h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

/* --------------------------------------------------------------------------
   Challenge
   -------------------------------------------------------------------------- */

.challenge { padding-top: 130px; padding-bottom: 110px; }
.challenge__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 64px;
}
.challenge__p { font-size: 17px; line-height: 1.8; color: var(--slate); margin: 6px 0 0; }

/* --------------------------------------------------------------------------
   Solutions
   -------------------------------------------------------------------------- */

.solutions { padding-bottom: 60px; }
.solutions__head { border-top: 1px solid var(--line); padding-top: 64px; }
.solutions__head .h2 { margin-bottom: 60px; max-width: 640px; }
.solutions__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 28px;
}
.sol-card {
  border: 1px solid var(--line-strong);
  padding: 44px 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 250px;
  box-sizing: border-box;
  background: var(--paper);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.sol-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(10, 31, 51, 0.07);
  border-color: rgba(10, 31, 51, 0.45);
}
.sol-card__num { font-family: var(--serif); font-size: 19px; font-style: italic; color: var(--accent); }
.sol-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 27px;
  margin: 0;
  line-height: 1.15;
  text-wrap: balance;
}
.sol-card p { font-size: 15px; line-height: 1.7; color: var(--slate); margin: 0; }

/* --------------------------------------------------------------------------
   Principle band
   -------------------------------------------------------------------------- */

.principle { padding-top: 60px; padding-bottom: 120px; }
.principle__band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 72px 24px;
  text-align: center;
}
.principle__quote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.3;
  margin: 0 auto 24px;
  max-width: 820px;
  text-wrap: balance;
}
.principle__p { font-size: 14.5px; line-height: 1.75; color: var(--slate); margin: 0 auto; max-width: 640px; }

/* --------------------------------------------------------------------------
   Expertise (dark)
   -------------------------------------------------------------------------- */

.expertise { background: var(--ink); color: var(--hero-fg); }
.expertise__inner { padding-top: 110px; padding-bottom: 120px; }
.expertise__inner .h2 { margin-bottom: 56px; max-width: 680px; }
.expertise__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 0 44px;
}
.exp-row {
  border-top: 1px solid rgba(159, 193, 224, 0.28);
  padding: 26px 0 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.exp-row h3 { font-family: var(--serif); font-weight: 500; font-size: 23px; margin: 0; }
.exp-row p { font-size: 14px; line-height: 1.6; color: var(--sky-soft); margin: 0; }

/* --------------------------------------------------------------------------
   How it works
   -------------------------------------------------------------------------- */

.how { padding-top: 130px; padding-bottom: 110px; }
.how .h2 { margin-bottom: 60px; }
.how__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 40px;
}
.how-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid rgba(10, 31, 51, 0.5);
  padding-top: 24px;
}
.how-step__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  font-weight: 400;
  color: var(--accent);
}
.how-step h3 { font-size: 16px; font-weight: 600; margin: 0; letter-spacing: 0.01em; }
.how-step p { font-size: 14.5px; line-height: 1.7; color: var(--slate); margin: 0; }
.how__note {
  margin: 56px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 23px;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Why AMADIAG
   -------------------------------------------------------------------------- */

.why { padding-bottom: 130px; }
.why__grid {
  border-top: 1px solid var(--line);
  padding-top: 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
  gap: 72px;
}
.why__h {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 3.6vw, 52px);
  line-height: 1.08;
  margin: 0 0 26px;
  text-wrap: balance;
}
.why__intro { font-size: 16px; line-height: 1.75; color: var(--slate); margin: 0; max-width: 460px; }
.why-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.why-item__num { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--accent); }
.why-item__body { display: flex; flex-direction: column; gap: 8px; }
.why-item h3 { font-size: 16.5px; font-weight: 600; margin: 0; }
.why-item p { font-size: 14.5px; line-height: 1.7; color: var(--slate); margin: 0; }

/* --------------------------------------------------------------------------
   International
   -------------------------------------------------------------------------- */

.intl { background: var(--paper-warm); border-top: 1px solid rgba(10, 31, 51, 0.08); }
.intl__inner { padding-top: 110px; padding-bottom: 120px; }
.intl__head { max-width: 760px; }
.intl__head .h2 { margin-bottom: 24px; }
.intl__p { font-size: 16.5px; line-height: 1.75; color: var(--slate); margin: 0; }
.intl__grid {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 44px;
}
.intl-col {
  border-top: 1px solid rgba(10, 31, 51, 0.4);
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.intl-col h3 { font-size: 15px; font-weight: 600; margin: 0; letter-spacing: 0.02em; }
.intl-col p { font-size: 14.5px; line-height: 1.7; color: var(--slate); margin: 0; }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about { padding-top: 130px; padding-bottom: 130px; }
.about__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
  gap: 64px;
  align-items: center;
}
.about__h { margin-bottom: 26px; }
.about__p { font-size: 16.5px; line-height: 1.8; color: var(--slate); margin: 0; max-width: 560px; }
.about__mark { display: flex; justify-content: center; }
.about__mark svg { display: block; color: var(--ink); opacity: 0.12; }

/* --------------------------------------------------------------------------
   Final CTA
   -------------------------------------------------------------------------- */

.final {
  background: radial-gradient(900px 600px at 50% 0%, var(--navy-glow) 0%, var(--ink) 60%);
  color: var(--hero-fg);
}
.final__inner { padding-top: 120px; padding-bottom: 120px; text-align: center; }
.final__kicker {
  margin: 0 0 22px;
  font-size: 11.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sky-muted);
}
.final h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.12;
  margin: 0 auto 24px;
  max-width: 840px;
  text-wrap: balance;
}
.final__p { font-size: 16px; line-height: 1.7; color: var(--mist); margin: 0 auto 44px; max-width: 520px; }
.final .btn-primary { display: inline-block; font-size: 14.5px; padding: 17px 36px; }
.final__email { margin: 26px 0 0; font-size: 12.5px; letter-spacing: 0.14em; color: var(--hero-dim); }
.final__email a { color: var(--sky-muted); }
.final__email a:hover { color: var(--hero-fg); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer { background: var(--ink-deep); color: var(--sky-muted); font-size: 13px; }
.footer__inner {
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 44px;
  align-items: center;
  justify-content: space-between;
}
.footer__brand { display: flex; align-items: center; gap: 11px; color: var(--hero-fg); }
.footer__brand svg { display: block; }
.footer__name { font-family: var(--serif); font-weight: 600; font-size: 16px; letter-spacing: 0.08em; }
.footer__tag { font-size: 9.5px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--sky-muted); }
.footer__country { margin-left: 10px; color: var(--sky-muted); }
.footer__links { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; }
.footer__links a { color: var(--sky-muted); }
.footer__links a:hover { color: var(--hero-fg); }
.footer__langs { letter-spacing: 0.1em; }

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  /* Desktop nav collapses into an accessible dropdown behind the toggle. */
  .nav-toggle { display: inline-flex; order: 3; }
  .nav {
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.32s ease, opacity 0.28s ease;
  }
  .header.nav-open .nav { max-height: 60vh; opacity: 1; }
  .nav a {
    padding: 15px 2px;
    font-size: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }
  .header.scrolled .nav a { border-top-color: rgba(10, 31, 51, 0.10); }
  /* When the dropdown is open over the hero, keep it readable. */
  .header.nav-open:not(.scrolled) {
    background: rgba(10, 31, 51, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  /* CTA already appears in the hero and the menu — drop the header copy. */
  .header__cta { display: none; }
  .header__right { gap: 4px; }
  /* Burger morphs into a close (X). */
  .nav-toggle line { transition: transform 0.25s ease, opacity 0.2s ease; transform-box: fill-box; transform-origin: center; }
  .header.nav-open .nav-toggle__top { transform: translateY(5px) rotate(45deg); }
  .header.nav-open .nav-toggle__mid { opacity: 0; }
  .header.nav-open .nav-toggle__bot { transform: translateY(-5px) rotate(-45deg); }
}

@media (prefers-reduced-motion: reduce) {
  .nav { transition: none; }
}

@media (max-width: 720px) {
  .wrap { padding-left: 22px; padding-right: 22px; }
  .hero__grid { padding-top: 150px; }
  .strip__item { border-left: none; padding: 2px 0; }
}
