/* Nutri Naari — one static page.
   Visual language borrowed from Millet Khaas (colours, Rounded Khaas type,
   pop buttons, stickers, waves, textures) but copied as literal values:
   nothing here depends on the Millet Khaas codebase. */

/* ─── Fonts (self-hosted, SIL OFL — see fonts/OFL.txt) ─── */
@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/baloo2-latin.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;
}
@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/baloo2-devanagari.woff2") format("woff2");
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/nunito-latin.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;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/fraunces-italic-latin.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;
}

/* ─── Tokens ─── */
:root {
  --nn-deep: #274736;        /* hero, footer */
  --nn-forest: #3B7E5C;      /* large fills / line art on light only */
  --nn-forest-ink: #2F6348;  /* brand band; text-safe green */
  --nn-mint: #D8EDDF;
  --nn-linen: #FAF7F2;
  --nn-oat: #EBCFAE;         /* pop buttons, stickers, accents on dark */
  --nn-terracotta: #D4714E;  /* focus ring on light only */
  --nn-ink: #1A2421;
  --nn-muted: #48604F;

  --nn-display: "Baloo 2", "Trebuchet MS", sans-serif;
  --nn-text: "Nunito", system-ui, sans-serif;
  --nn-voice: "Fraunces", Georgia, serif; /* founders' own words only */

  --nn-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --nn-ease-pop: cubic-bezier(0.16, 1, 0.3, 1);

  --nn-gutter: clamp(20px, 5vw, 40px);
  --nn-pad: clamp(64px, 10vw, 128px);
}

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

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

body {
  margin: 0;
  background: var(--nn-linen);
  color: var(--nn-ink);
  font-family: var(--nn-text);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

figure,
blockquote {
  margin: 0;
}

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

a {
  color: inherit;
}

::selection {
  background: rgba(53, 109, 80, 0.18);
  color: var(--nn-ink);
}

:focus-visible {
  outline: 2px solid var(--nn-terracotta);
  outline-offset: 2px;
}

.nn-band--deep :focus-visible,
.nn-band--forest :focus-visible {
  outline-color: var(--nn-oat);
}

/* ─── Layout ─── */
.nn-wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--nn-gutter);
}

.nn-band {
  position: relative;
}

.nn-band--deep {
  background-color: var(--nn-deep);
  color: var(--nn-linen);
}

.nn-band--linen {
  background-color: var(--nn-linen);
}

.nn-band--mint {
  background-color: var(--nn-mint);
}

.nn-band--forest {
  background-color: var(--nn-forest-ink);
  color: var(--nn-linen);
}

/* Dot grid, as on the Millet Khaas footer */
.nn-dots {
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.035) 1px, transparent 0);
  background-size: 24px 24px;
}

/* 2.5% paper grain on light bands */
.nn-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.nn-paper > * {
  position: relative;
}

.nn-wave {
  display: block;
  width: 100%;
  height: clamp(40px, 5.5vw, 80px);
  margin-bottom: -1px;
}

/* ─── Type roles ─── */
.nn-wordmark {
  margin: 0;
  font-family: var(--nn-display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.nn-section {
  margin-bottom: 24px;
  font-family: var(--nn-display);
  font-weight: 700;
  font-size: clamp(1.89rem, 3.78vw, 2.96rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.nn-lead {
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.6;
}

.nn-body {
  font-size: 1.0625rem;
  line-height: 1.65;
}

.nn-small {
  font-size: 0.875rem;
  line-height: 1.6;
}

.nn-lead,
.nn-body {
  max-width: 62ch;
}

.nn-lead + .nn-body {
  margin-top: 16px;
}

/* ─── Pop button (Millet Khaas neo-brutalist) ─── */
.nn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid var(--nn-ink);
  border-radius: 12px;
  background: var(--nn-oat);
  color: var(--nn-ink);
  box-shadow: 2px 2px 0 var(--nn-ink);
  font-family: var(--nn-display);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 100ms var(--nn-ease-pop), box-shadow 100ms var(--nn-ease-pop);
}

.nn-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--nn-ink);
}

.nn-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--nn-ink);
}

.nn-btn:focus-visible {
  outline-offset: 3px;
}

.nn-btn--sm {
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.875rem;
}

/* ─── Sticker chip ─── */
.nn-sticker {
  position: absolute;
  left: 16px;
  bottom: -16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 18px;
  border: 2px solid var(--nn-ink);
  border-radius: 12px;
  background: var(--nn-oat);
  color: var(--nn-ink);
  box-shadow: 3px 3px 0 var(--nn-ink);
}

.nn-sticker strong {
  font-family: var(--nn-display);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.1;
}

.nn-sticker span {
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1.2;
  color: rgba(26, 36, 33, 0.7);
}

/* ─── Photos ─── */
.nn-arch,
.nn-photo {
  position: relative;
  margin-bottom: 16px; /* room for the overlapping sticker */
}

.nn-arch {
  width: 100%;
  max-width: 340px;
}

.nn-arch__frame,
.nn-photo__frame {
  overflow: hidden;
  border-radius: 24px;
}

.nn-arch__frame {
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 24px 24px;
}

.nn-band--linen .nn-arch__frame,
.nn-band--mint .nn-arch__frame,
.nn-band--linen .nn-photo__frame {
  box-shadow: 0 18px 40px -12px rgba(26, 36, 33, 0.22);
}

.nn-arch__frame img,
.nn-photo__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

/* ─── Header ─── */
.nn-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}

/* ─── Hero ─── */
.nn-hero {
  padding-top: clamp(32px, 6vw, 80px);
  padding-bottom: clamp(24px, 4vw, 48px);
}

.nn-hero__title {
  position: relative;
  max-width: 100%;
  padding-bottom: 0.1em;
  font-family: var(--nn-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 0.97; /* 0.92 + 0.05 for light type on dark */
  letter-spacing: -0.03em;
}

.nn-underline {
  position: absolute;
  left: 0;
  bottom: -0.14em;
  width: 100%;
  height: 0.24em;
  overflow: visible;
}

.nn-underline path {
  fill: none;
  stroke: var(--nn-oat);
  stroke-width: 2.5px;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.nn-hero__lead {
  max-width: 56ch;
  margin: clamp(28px, 4vw, 40px) 0 32px;
  line-height: 1.65;
  color: rgba(250, 247, 242, 0.85);
}

/* Millet field */
.nn-field {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
  max-width: 960px;
  margin: clamp(48px, 8vw, 96px) 0 0;
  padding: 0;
  list-style: none;
}

.nn-field li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nn-field svg {
  display: block;
  width: auto;
  height: calc(var(--h) * clamp(52px, 14vw, 160px));
  overflow: visible;
}

.nn-field path {
  fill: none;
  stroke: var(--nn-mint);
  stroke-width: 1.75px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.nn-field .nn-stem {
  stroke-width: 2.5px;
  opacity: 0.5;
}

.nn-field__name {
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1;
  color: rgba(216, 237, 223, 0.8);
}

/* ─── Chapters ─── */
.nn-band--linen,
.nn-band--mint {
  padding-block: var(--nn-pad);
}

.nn-chapter {
  display: grid;
  gap: clamp(40px, 6vw, 96px);
}

.nn-chapter .nn-arch {
  order: -1; /* photo first on mobile */
}

.nn-quote {
  margin-top: 32px;
}

.nn-quote blockquote p,
.nn-quote__translation,
.nn-tagline {
  font-family: var(--nn-voice);
  font-style: italic;
  font-weight: 400;
}

.nn-quote blockquote p {
  max-width: 24ch;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.3;
  text-wrap: balance;
}

.nn-quote .nn-quote-hi p {
  max-width: 30ch;
  font-family: var(--nn-display);
  font-style: normal;
  font-weight: 500;
  font-size: clamp(1.375rem, 2.6vw, 2rem);
  line-height: 1.5;
}

.nn-quote__translation {
  max-width: 44ch;
  margin-top: 12px;
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  line-height: 1.4;
  color: var(--nn-muted);
}

.nn-quote figcaption {
  margin-top: 14px;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--nn-muted);
}

/* ─── Today ─── */
.nn-today .nn-photo {
  margin-top: clamp(40px, 5vw, 64px);
}

.nn-photo--wide .nn-photo__frame {
  aspect-ratio: 4 / 3;
}

.nn-photo--wide img {
  object-position: 50% 35%;
}

/* ─── Brand ─── */
.nn-brand-band {
  overflow: hidden;
}

.nn-brand {
  position: relative;
  display: grid;
  gap: clamp(40px, 6vw, 96px);
  padding-block: var(--nn-pad);
}

.nn-watermark {
  position: absolute;
  top: 50%;
  right: -7rem;
  height: 85%;
  transform: translateY(-50%);
  fill: none;
  stroke: currentColor;
  color: var(--nn-linen);
  opacity: 0.06;
  pointer-events: none;
}

.nn-logo-disc {
  display: block;
  width: 96px;
  height: 96px;
  margin-bottom: 28px;
  overflow: hidden;
  border: 2px solid var(--nn-ink);
  border-radius: 50%;
  background: #fff;
  box-shadow: 3px 3px 0 var(--nn-ink);
}

.nn-logo-disc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nn-tagline {
  margin: 0 0 20px;
  font-size: clamp(1.375rem, 2.6vw, 2rem);
  line-height: 1.3;
  color: var(--nn-oat);
}

.nn-brand .nn-body {
  margin-bottom: 32px;
  color: rgba(250, 247, 242, 0.85);
}

.nn-photo--range {
  position: relative;
  width: 100%;
  max-width: 552px; /* Increased by 20% from 460px */
}

.nn-photo--range .nn-photo__frame {
  aspect-ratio: 4 / 5;
  box-shadow: 0 20px 48px -12px rgba(15, 28, 22, 0.45);
}

.nn-photo--range img {
  object-position: 50% 50%;
}

/* ─── Brand photo switcher (Pure CSS) ─── */
.nn-photo-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nn-photo__frame--stall {
  display: none;
}

#range-studio:checked ~ .nn-photo__frame--studio {
  display: block;
}

#range-studio:checked ~ .nn-photo__frame--stall {
  display: none;
}

#range-stall:checked ~ .nn-photo__frame--studio {
  display: none;
}

#range-stall:checked ~ .nn-photo__frame--stall {
  display: block;
}

.nn-photo-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 2px solid var(--nn-ink);
  border-radius: 999px;
  background: rgba(250, 247, 242, 0.95);
  box-shadow: 2px 2px 0 var(--nn-ink);
  z-index: 2;
}

.nn-photo-pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--nn-display);
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1.2;
  color: var(--nn-ink);
  cursor: pointer;
  user-select: none;
  transition: all 120ms var(--nn-ease-pop);
}

.nn-photo-pill:hover {
  background: rgba(235, 207, 174, 0.4);
}

#range-studio:checked ~ .nn-photo-controls .nn-photo-pill--studio,
#range-stall:checked ~ .nn-photo-controls .nn-photo-pill--stall {
  background: var(--nn-deep);
  color: var(--nn-linen);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.nn-sticker--range {
  bottom: -18px;
  left: 20px;
  z-index: 2;
}

/* ─── Footer ─── */
.nn-footer {
  overflow: hidden;
  padding-block: 48px 24px;
}

.nn-footer__grains {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.nn-grain {
  position: absolute;
  bottom: -5%;
  width: auto;
}

.nn-grain--1 {
  left: -1%;
  height: clamp(160px, 28vw, 400px);
  color: rgba(250, 247, 242, 0.12);
  transform: rotate(-5deg);
}

.nn-grain--2 {
  left: 8%;
  height: clamp(180px, 30vw, 420px);
  color: rgba(250, 247, 242, 0.07);
  transform: rotate(8deg);
}

.nn-grain--3 {
  right: 8%;
  height: clamp(200px, 32vw, 460px);
  color: rgba(235, 207, 174, 0.1);
  transform: rotate(-4deg);
}

.nn-grain--4 {
  right: -1%;
  height: clamp(160px, 28vw, 380px);
  color: rgba(235, 207, 174, 0.08);
  transform: rotate(12deg);
}

.nn-footer__inner {
  position: relative;
}

.nn-footer__grid {
  display: grid;
  gap: 32px;
}

.nn-footer__about {
  margin-top: 12px;
  color: rgba(250, 247, 242, 0.85);
}

.nn-footer__heading {
  margin-bottom: 12px;
  font-family: var(--nn-display);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.2;
}

.nn-footer__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nn-footer address {
  max-width: 32ch;
  font-style: normal;
  color: rgba(250, 247, 242, 0.85);
}

/* Wavy underline — hand-drawn, precise on hover */
.nn-link {
  display: inline-block;
  padding: 2px 0 3px;
  text-decoration: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6'%3E%3Cpath d='M0 3 Q3 0 6 3 T12 3' fill='none' stroke='%23EBCFAE' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: 0 100%;
  background-size: 12px 6px;
}

.nn-link:hover {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1.5px;
}

.nn-footer__legal {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(250, 247, 242, 0.1);
  color: rgba(250, 247, 242, 0.7);
}

.nn-footer__legal p + p {
  margin-top: 4px;
}

/* ─── Responsive ─── */
@media (max-width: 719.98px) {
  .nn-br {
    display: none;
  }

  /* Names stay available to screen readers; the drawings carry it visually */
  .nn-field__name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  /* Keep the legal lines clear of the big silhouettes on phones */
  .nn-grain--2,
  .nn-grain--3 {
    display: none;
  }
}

@media (min-width: 720px) {
  /* Two set lines; box hugs them so the underline matches their length */
  .nn-hero__title {
    width: max-content;
  }

  .nn-arch {
    max-width: 440px;
  }
}

@media (min-width: 960px) {
  .nn-chapter {
    grid-template-columns: 7fr 5fr;
    align-items: center;
  }

  .nn-chapter .nn-arch {
    order: 0;
    justify-self: end;
  }

  .nn-chapter--flip {
    grid-template-columns: 5fr 7fr;
  }

  .nn-chapter--flip .nn-arch {
    order: -1;
    justify-self: start;
  }

  .nn-photo--wide .nn-photo__frame {
    aspect-ratio: 16 / 9;
  }

  .nn-brand {
    grid-template-columns: 1fr 1.15fr;
    align-items: center;
  }

  .nn-photo--range {
    justify-self: end;
  }

  .nn-footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
  }
}

/* ─── Motion: one load moment, decoration only ───
   Default state is the finished drawing; `backwards` fill means the dash
   setup only exists while animating. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes nn-draw {
    from {
      stroke-dasharray: 1;
      stroke-dashoffset: 1;
    }
    to {
      stroke-dasharray: 1;
      stroke-dashoffset: 0;
    }
  }

  @keyframes nn-grow {
    from {
      transform: scaleY(0);
    }
    to {
      transform: scaleY(1);
    }
  }

  .nn-underline path {
    animation: nn-draw 700ms var(--nn-ease-out) 200ms backwards;
  }

  .nn-field .nn-stem {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: nn-grow 450ms var(--nn-ease-out) calc(400ms + var(--i) * 60ms) backwards;
  }

  .nn-field .nn-head {
    animation: nn-draw 600ms var(--nn-ease-out) calc(600ms + var(--i) * 60ms) backwards;
  }
}
