/* NutriLife "coming soon" page.
   Colours come from the app's real tokens (app/lib/core/theme/app_tokens.dart):
   AppTokens.light / AppTokens.dark. Every colour is a token on :root, redefined for dark mode. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/BricolageGrotesque-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --font-display: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-ui: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --bg: #FFFFFF;          /* bg */
  --surf: #FFFFFF;        /* surf */
  --line: #E6E6EC;        /* line */
  --ink: #1B1A2E;         /* ink */
  --mute: #5F5B6E;        /* mute */
  --brand: #0F7A4F;       /* brand: pill fill */
  --on-brand: #FFFFFF;    /* AppTokens.onBrand: text on the pill */
  --soft: #DDF1E6;        /* brandSoft: tinted shapes and icon wells */
  --on-soft: #0A5537;     /* onBrandSoft: icons on the tint */
  --accent: #0F7A4F;      /* brand: focus ring */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0E1A;
    --surf: #1A1928;
    --line: #34324A;
    --ink: #F5F0E8;
    --mute: #B4AFC2;
    --brand: #3CC789;
    --on-brand: #16152A;  /* AppTokens.onBrandFill: the brand is light in dark mode */
    --soft: #173A2B;
    --on-soft: #8BE3BA;
    --accent: #3CC789;
  }
}

/* ---- layout ---- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  isolation: isolate;
}

/* Soft tinted shapes behind the hero: the tint fades out to the page background. */
.page::before,
.page::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--soft) 55%, transparent);
  pointer-events: none;
}

.page::before {
  width: min(60rem, 170vw);
  aspect-ratio: 1;
  top: -20rem;
  left: 50%;
  transform: translateX(-50%);
}

.page::after {
  width: 22rem;
  aspect-ratio: 1;
  top: 24rem;
  right: -11rem;
  opacity: 0.7;
}

.wrap {
  width: 100%;
  max-width: 64rem;
  margin-inline: auto;
  padding-inline: 16px;
}

/* ---- top bar ---- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-icon {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 22%;
  flex: none;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  line-height: 1;
}

.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surf);
}

.lang button {
  min-width: 44px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--mute);
  font: 600 0.875rem/1 var(--font-ui);
  letter-spacing: 0.04em;
  cursor: pointer;
}

.lang button[aria-pressed="true"] {
  background: var(--soft);
  color: var(--on-soft);
}

/* ---- hero ---- */

.hero {
  max-width: 46rem;
  margin-inline: auto;
  padding-block: 56px 48px;
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.4;
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 1.4rem + 4.6vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lead {
  max-width: 34rem;
  margin: 24px auto 0;
  color: var(--mute);
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.25rem);
  text-wrap: pretty;
}

/* ---- features ---- */

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 0;
  padding: 0 0 64px;
  list-style: none;
}

.feature {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surf);
}

.icon-well {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--soft);
  color: var(--on-soft);
}

.icon-well svg { width: 24px; height: 24px; }

.feature h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  color: var(--mute);
  font-size: 0.9375rem;
}

/* ---- footer ---- */

.foot {
  width: calc(100% - 32px);
  max-width: 64rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-block: 32px;
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 0.875rem;
  text-align: center;
}

.foot a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* ---- focus ---- */

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ---- motion ---- */

.reveal {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; }
}

/* ---- wider screens ---- */

@media (min-width: 48rem) {
  .wrap { padding-inline: 32px; }
  .foot { width: calc(100% - 64px); max-width: 60rem; }
  .hero { padding-block: 88px 72px; }
  .features { grid-template-columns: repeat(3, 1fr); gap: 20px; padding-bottom: 96px; }
  .foot { flex-direction: row; justify-content: space-between; text-align: left; }
}
