/*
 * GuideYouNeed coming-soon page. Styled with the GuideYouNeed Partners design system
 * (ts-gyn-supplier-portal/DESIGN.md), Kandyan Temple Mural theme. Token values are copied from
 * ts-gyn-supplier-portal/src/styles/tokens.css; change them there first, then here.
 *
 * The portal's own signature pictures (the cinnabar hero with lotus lattice and moonstone, the landing-page
 * guide drawing, the palapethi petal edge and the water lily) are deliberately NOT used here, so the real
 * designs stay unseen until release. This page has its own picture world: thin single-weight line art of a
 * beach at sunrise, with a small group of travellers seen from behind (no guide figure or faces, so it reads
 * differently from the real landing page's guide drawing).
 */

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/nunito-latin-ext-var.woff2') format('woff2');
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/nunito-latin-var.woff2') format('woff2');
  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;
}

/*
 * Sinhala (the /si/ page). Nunito has no Sinhala letters, so Noto Sans Sinhala draws them, scaled down
 * (size-adjust) to sit at the size of the Latin text around it. Same file and settings as the supplier portal.
 */
@font-face {
  font-family: 'Noto Sinhala Fit';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  size-adjust: 88%;
  src: url('fonts/noto-sans-sinhala-var.woff2') format('woff2');
  unicode-range: U+0964-0965, U+0D81-0DF4, U+1CF2, U+200C-200D, U+25CC, U+111E1-111F4;
}

:root {
  --surface: #ffffff;
  --surface-alt: #fbf7ee; /* lime plaster: page ground */
  --surface-tint: #f3e6dc;
  --ink: #3b2a20; /* umber; no black anywhere */
  --ink-muted: #6b5f52;
  --ink-faint: #9a8d7d;
  --line: #e6dccb;
  --control: #cfc3b0;
  --brand: #9a2b1e; /* cinnabar */
  --brand-strong: #6b2118;
  --gold-ink: #8a5a12;
  --paper: #f5ede4;
  --wm-guide: #c4361f;
  --wm-you: #e9a12a;
  --wm-need: #9a2b1e;

  --radius-panel: 28px;
  --gutter: 16px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

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

html {
  font-family: 'Nunito', 'Noto Sinhala Fit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  caret-color: var(--brand);
  scrollbar-color: var(--control) var(--surface-alt);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-alt);
  color: var(--ink);
  font-size: 0.875rem;
  line-height: 1.5;
}

::selection {
  background: var(--surface-tint);
  color: var(--ink);
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Wordmark ---------- */

.wordmark {
  font-weight: 900;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark .g { color: var(--wm-guide); }
.wordmark .y { color: var(--wm-you); }
.wordmark .n { color: var(--wm-need); }

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

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.header-end {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Language switch: two links in one pill. The current language is filled and marked aria-current. */
.lang-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--control);
  border-radius: 9999px;
  background: var(--surface);
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ink-muted);
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}
.lang-switch a:hover {
  color: var(--ink);
  background: var(--surface-alt);
}
.lang-switch a[aria-current='page'] {
  color: var(--brand-strong);
  background: var(--surface-tint);
}
.lang-switch a:focus-visible {
  outline-offset: 1px;
  border-radius: 9999px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  background: var(--surface-tint);
  color: var(--brand-strong);
}

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

/*
 * Full-bleed picture with the text laid over the side where it fades into the page. Phones: text on top,
 * picture below, faded top-to-bottom. From 768px: text on the left, faded left-to-right. The picture is
 * anchored bottom-right (xMaxYMax slice) so the sun and hills stay in view at every width.
 */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
}
/* Phones: the picture is a band under the text; its top edge melts into the page. */
.hero-art {
  position: absolute;
  inset: auto 0 0 0;
  height: 320px;
  z-index: -1;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 38%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 38%);
}
.hero-art svg {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-inner {
  padding-top: 44px;
  padding-bottom: 290px;
}
/* Phones and tablets: text centred above the picture band. */
.hero-content {
  text-align: center;
}
.hero h1 {
  max-width: 16ch;
  margin-inline: auto;
  font-size: 2.375rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero-lede {
  margin: 16px auto 0;
  max-width: 52ch;
  text-wrap: pretty;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-muted);
}
.hero-lede .wm {
  font-weight: 900;
  letter-spacing: -0.02em;
}
.hero-lede .wm .g { color: var(--wm-guide); }
.hero-lede .wm .y { color: var(--gold-ink); } /* the wordmark's ochre is too light for body-size text */
.hero-lede .wm .n { color: var(--wm-need); }

main.container {
  flex: 1;
  padding-bottom: 48px;
}

/* ---------- Sunrise ----------
 * The page's one authored moment: on arrival the sun climbs over the sea horizon, its glow spreads, the
 * waves and shoreline are drawn in, the travellers' footprints appear and the birds glide into view. It
 * plays once, about 1.8s, and every element's resting state is the finished picture.
 */

.hero-art .sun,
.hero-art .halo,
.hero-art .birds {
  transform-box: fill-box;
  transform-origin: center;
}
.hero-art .sun {
  animation: sun-rise 1300ms var(--ease-out) 150ms both;
}
.hero-art .halo {
  animation: halo-bloom 1400ms var(--ease-out) 650ms both;
}
.hero-art .draw path {
  stroke-dasharray: 1;
  animation: line-draw 1200ms var(--ease-out) 450ms both;
}
.hero-art .draw path:nth-child(2) {
  animation-delay: 600ms;
}
.hero-art .draw path:nth-child(3) {
  animation-delay: 750ms;
}
.hero-art .steps {
  animation: steps-in 900ms ease-out 1000ms both;
}
.hero-art .birds {
  animation: birds-glide 1500ms var(--ease-out) 800ms both;
}

@keyframes sun-rise {
  from { transform: translateY(46%); }
  to { transform: none; }
}
@keyframes halo-bloom {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: none; }
}
@keyframes line-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes steps-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes birds-glide {
  from { opacity: 0; transform: translate(-28px, 12px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Open sections ---------- */

.section {
  margin-top: 48px;
}
.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.features {
  list-style: none;
  margin: 0;
  padding: 0;
}
.features li {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.icon-tile {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: var(--surface-tint);
  color: var(--brand);
}
.icon-tile svg {
  width: 22px;
  height: 22px;
}
.features h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}
.features p {
  margin-top: 2px;
  color: var(--ink-muted);
}
/* Partner points: a short checklist, each item with a drawn check in a soft tile. Two columns from 640px. */
.partners {
  list-style: none;
  margin: 0;
  padding: 16px 0 0;
  display: grid;
  gap: 12px 32px;
  max-width: 880px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
}
.partners li {
  position: relative;
  padding-left: 36px;
  min-height: 24px;
}
.partners li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background: var(--surface-tint);
}
.partners li::after {
  content: '';
  position: absolute;
  left: 9px;
  top: 5px;
  width: 6px;
  height: 11px;
  border: solid var(--brand);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---------- Closing ---------- */

.closing {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--ink-muted);
}
.closing-mark {
  width: 88px;
  height: 52px;
  margin-bottom: 12px;
}
.closing-greeting {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--brand);
}
.closing-greeting + p {
  margin-top: 4px;
}

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

.site-footer {
  background: var(--surface);
}
.hill-edge {
  display: block;
  width: 100%;
  height: 24px;
  background: var(--surface-alt);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 16px;
  padding-bottom: 24px;
  color: var(--ink-muted);
}
.site-footer .wordmark {
  font-size: 1.125rem;
}

/* ---------- Sinhala ----------
 * Sinhala letters carry marks above and below the line, so lines need more room, and the Latin display
 * tracking would crowd them. The headline also runs longer, so it is a step smaller.
 */
:lang(si) .hero h1 {
  max-width: 18ch;
  font-size: 2.125rem;
  line-height: 1.3;
  letter-spacing: 0;
}
:lang(si) .hero-lede,
:lang(si) .partners {
  line-height: 1.8;
}
:lang(si) .features p,
:lang(si) .features h3,
:lang(si) .section-title {
  line-height: 1.6;
}
:lang(si) .wm,
:lang(si) .wordmark {
  letter-spacing: -0.02em;
}
/* Small Sinhala text reads smaller than Latin at the same size; lift the small sizes one step. */
:lang(si) body {
  font-size: 0.9375rem;
}
:lang(si) .badge {
  font-size: 0.8125rem;
}

/* Small phones: the header holds the wordmark and language switch; "Coming soon" is in the hero copy. */
@media (max-width: 419px) {
  .badge {
    display: none;
  }
}

/* ---------- Wider screens ---------- */

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }
  .hero h1 {
    font-size: 3rem;
  }
  .hero-lede {
    font-size: 1.0625rem;
  }
  .hero-inner {
    padding-top: 64px;
    padding-bottom: 380px;
  }
  .hero-art {
    height: 420px;
  }
  :lang(si) .hero h1 {
    font-size: 2.625rem;
  }
  .partners {
    grid-template-columns: 1fr 1fr;
  }
  .features li {
    gap: 20px;
  }
}

@media (min-width: 1024px) {
  /*
   * From 1024px the picture sits on the right side only. The text column always ends at 50% of the viewport
   * (container left + half its width), so the picture takes the right 55% (never more than 1200px), fades in
   * over its first third, and only its faint leading edge meets the text. Capping it also keeps it from
   * ballooning on large screens, where a full-width picture outweighed the headline and cropped the sun.
   */
  .hero-art {
    inset: 0 0 0 auto;
    width: min(55%, 1200px);
    height: auto;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgb(0 0 0 / 0.35) 16%, #000 34%);
    mask-image: linear-gradient(90deg, transparent 0%, rgb(0 0 0 / 0.35) 16%, #000 34%);
  }
  .hero-inner {
    display: flex;
    align-items: center;
    min-height: clamp(500px, 38vw, 680px);
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .hero-content {
    max-width: 50%;
    text-align: left;
  }
  .hero h1 {
    max-width: none;
    margin-inline: 0;
    font-size: clamp(3rem, 0.5rem + 3.4vw, 3.5rem);
    line-height: 1.06;
  }
  :lang(si) .hero h1 {
    max-width: none;
    font-size: clamp(2.5rem, 0.25rem + 3vw, 3rem);
    line-height: 1.28;
  }
  .hero-lede {
    margin-inline: 0;
    font-size: 1.125rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 32px;
  }
  .section {
    margin-top: 64px;
  }
  .features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 32px;
  }
}

/* Reduced motion: nothing travels or grows; the picture simply fades up once. */
@media (prefers-reduced-motion: reduce) {
  .hero-art .sun,
  .hero-art .halo,
  .hero-art .birds,
  .hero-art .steps,
  .hero-art .draw path {
    animation: none;
  }
  .hero-art svg {
    animation: fade-in 400ms ease-out both;
  }
  @keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}
