/* Trembo — brand tokens from the Brand Guide (v0.2, Oct 2026)
   Balance: Ground ~55%, Night ~25% (all type), Peach ~10% (accents only), Tide ~7%, Alert ~3% */
:root {
  --night: #2D3146;
  --peach: #F7DCCB;
  --ground: #F4EEE8;        /* warm off-white, toward the pillows in the photos (was #F3F2F2) */
  --tide: #2A7A74;
  --tide-light: #3A9C94;     /* Tide on Night: rings and rules (3.9:1, so not for small text) */
  --alert: #EC3013;

  --night-2: #383d55;        /* slightly lifted Night for fields on Night */
  --rule: rgba(45, 49, 70, .2);
  --rule-strong: rgba(45, 49, 70, .55);
  --rule-dark: rgba(244, 238, 232, .22);
  --card: #FBF8F5;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1.0625rem, .98rem + .3vw, 1.1875rem);
  line-height: 1.55;
  color: var(--night);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; font-weight: 900; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0 0 1em; }
ul, ol { list-style: none; margin: 0; padding: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(72px, 9vw, 128px) 0; }

.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--peach); color: var(--night); padding: 10px 16px; border-radius: 6px; font-weight: 700; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--tide); outline-offset: 3px; border-radius: 4px; }
.night :focus-visible { outline-color: var(--peach); }

/* Grounds */
.night  { background: var(--night);  color: var(--ground); }
.night h1, .night h2, .night h3 { color: var(--peach); }
.ground { background: var(--ground); color: var(--night); }

/* Type roles */
.eyebrow, .label {
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--tide);
}
.label { margin-bottom: 1rem; }
.night .label { color: var(--ground); opacity: .8; }
.section-head { text-align: center; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head .eyebrow { margin-bottom: 1rem; }
.title { font-size: clamp(1.85rem, 1.3rem + 1.9vw, 3rem); }
.section-head .title { max-width: 22ch; margin: 0 auto; }
.lede { font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); max-width: 40ch; }
.tag {
  display: inline-block; padding: .55em .85em; background: var(--peach); color: var(--night); border-radius: 4px;
  font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; line-height: 1;
}

/* Logo: master artwork (5j) as inline SVG. The ring color follows the guide:
   same as the letters on Peach and Night, Tide on Ground. Never Alert. */
.logo { display: block; width: 100%; height: auto; aspect-ratio: 545 / 122; overflow: visible; }
.ring { stroke: var(--ring, currentColor); }

/* Buttons: small, squared, uppercase (after the reference site) */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.5rem; border-radius: 4px;
  font: 700 .85rem/1 var(--font); letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent; white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-sm { min-height: 38px; padding: 0 1rem; font-size: .75rem; }
.btn-peach { background: var(--peach); color: var(--night); }
.btn-peach:hover { background: #fbe9de; }
.btn-solid { background: var(--night); color: var(--ground); }
.btn-solid:hover { background: #3a3f57; }
.btn-ghost { border-color: currentColor; background: transparent; }

/* ---------- Header: Night with Peach logo and links, matching the footer ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; background: var(--night); color: var(--peach);
  transition: box-shadow .25s ease;
}
.site-header :focus-visible { outline-color: var(--peach); }
.header-inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  height: var(--header-h); padding: 0 var(--gutter); max-width: 1440px; margin: 0 auto;
  border-bottom: 1px solid var(--rule-dark);
}
.nav-left { display: flex; gap: clamp(16px, 2vw, 32px); }
.nav-left a, .mobile-nav a {
  white-space: nowrap; font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
}
.nav-left a:hover { text-decoration: underline; text-underline-offset: 5px; }
.header-logo { display: block; width: 150px; color: var(--peach); }  /* Peach on Night, rings match the letters; guide minimum 120px */
.nav-right { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.site-header .btn-solid { background: var(--peach); color: var(--night); }
.site-header .btn-solid:hover { background: #fbe9de; }
/* A soft shadow once the page scrolls under it */
.site-header.scrolled { box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.site-header.scrolled .header-inner { border-bottom-color: transparent; }

.nav-toggle {
  display: none; place-items: center; width: 40px; height: 38px; padding: 0;
  background: transparent; color: inherit; border: 1.5px solid currentColor; border-radius: 4px; cursor: pointer;
}
.bars, .bars::before, .bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; } .bars::after { top: 6px; }
.mobile-nav { display: none; }

/* ---------- Hero: full-bleed photo, logo + headline on a soft Ground wash ---------- */
.hero {
  /* Height tracks the width so the photo always crops about halfway down the mattress (photo is ~0.557 × its width; 81% of that ≈ 45vw) */
  position: relative; min-height: min(calc(var(--header-h) + 45vw), 860px); display: flex; align-items: flex-start; overflow: hidden;
  /* Top padding places the logo in the wall strip between the window sill and the bed (both scale with the width) */
  padding: calc(var(--header-h) + 10.3vw) 0 clamp(56px, 7vw, 96px); background: var(--ground); color: var(--night);
}
/* The photo starts below the fixed Night header so none of it is hidden */
.hero-bg { position: absolute; top: var(--header-h); left: 0; width: 100%; height: calc(100% - var(--header-h)); object-fit: cover; object-position: 62% 75%; }
.hero::before {
  content: ""; position: absolute; inset: var(--header-h) 0 0; z-index: 1;
  background: linear-gradient(90deg, rgba(244, 238, 232, .9) 0%, rgba(244, 238, 232, .7) 30%, rgba(244, 238, 232, 0) 50%);
}
.hero > .wrap { position: relative; z-index: 2; width: 100%; }

/* Big logo (web version: Night + Tide rings) sized to the photo so it sits between the window and the bed,
   then the one-line headline over the bed. Both scale with the width, like the photo. */
.hero-copy { max-width: 48vw; container-type: inline-size; }
.hero-logo { margin: 0 0 2.5vw; color: var(--night); --ring: var(--tide); }
.logo-tm { display: flex; align-items: flex-start; gap: .4em; width: 34vw; }
.logo-tm .logo { flex: 1; min-width: 0; }
.logo-tm .tm { font-size: clamp(.75rem, .6rem + .5vw, 1.1rem); line-height: 1; margin-top: .1em; }
.hero h1.one-line { margin: 0; white-space: nowrap; font-size: min(4rem, 3vw); }

/* ---------- Statement ---------- */
.statement { padding: clamp(64px, 9vw, 120px) 0 clamp(48px, 6vw, 80px); }
.statement + .product { padding-top: clamp(16px, 2.5vw, 40px); }
.statement-line {
  margin: 0 auto; max-width: 26ch; text-align: center; text-wrap: balance;
  font-size: clamp(1.6rem, 1rem + 2.4vw, 3rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em;
}


/* ---------- Product ---------- */
.product-photo { margin: 0 auto clamp(36px, 5vw, 56px); max-width: 880px; }
.product-photo img { width: 100%; height: auto; border-radius: 20px; }
/* One centered paragraph under the product photo */
.product-copy { max-width: 760px; margin: 0 auto clamp(56px, 7vw, 96px); text-align: center; }
.product-copy .lede { margin: 0 auto; max-width: none; font-weight: 600; text-wrap: balance; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 40px); margin-bottom: clamp(56px, 7vw, 96px); }
.steps li { border-top: 1.5px solid var(--night); padding-top: 1.5rem; }
.step-num { display: block; font-weight: 800; font-size: .85rem; margin-bottom: 1rem; color: var(--tide); }
.steps h3 { font-size: clamp(1.35rem, 1.1rem + .7vw, 1.65rem); margin-bottom: .75rem; }
.steps p { margin: 0; }
.steps:last-child { margin-bottom: 0; }
@media (min-width: 861px) { .steps h3.one-line { white-space: nowrap; } }


/* ---------- Feel it demo (dark card on Ground) ---------- */
.feel { padding-top: 0; }
.feel-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center;
  border-radius: 20px; padding: clamp(32px, 6vw, 80px);
}
.feel-card .title { margin-bottom: 1.25rem; }
.pattern-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.5rem; }
.chip {
  min-height: 44px; padding: 0 1.1rem; border-radius: 4px;
  border: 1.5px solid rgba(244, 238, 232, .6); background: transparent; color: var(--ground);
  font: 700 .8rem/1 var(--font); letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
}
.chip:hover { border-color: var(--ground); }
.chip[aria-pressed="true"] { background: var(--peach); border-color: var(--peach); color: var(--night); }
.demo { display: grid; gap: 24px; justify-items: center; text-align: center; }
.demo-pad { position: relative; width: min(240px, 60vw); aspect-ratio: 1; display: grid; place-items: center; }
.demo-o { width: 72%; height: auto; aspect-ratio: 1; overflow: visible; color: var(--peach); transition: transform .12s ease; }
.demo-ring { position: absolute; inset: 14%; border-radius: 50%; border: 2px solid var(--peach); opacity: 0; }
.demo-pad.on .demo-o { transform: scale(1.08); }
.demo-pad.on .demo-ring { animation: ring .7s ease-out forwards; }
.demo-pad.on .demo-ring:nth-child(2) { animation-delay: .1s; }
.demo-pad.on .demo-ring:nth-child(3) { animation-delay: .2s; }
@keyframes ring { 0% { transform: scale(.9); opacity: .6; } 100% { transform: scale(1.35); opacity: 0; } }
.demo-bars { display: flex; align-items: center; gap: 4px; height: 28px; width: 100%; max-width: 320px; }
.demo-bars span { height: 100%; border-radius: 3px; background: var(--peach); opacity: .25; transition: opacity .15s ease; }
.demo-bars span.gap { background: transparent; }
.demo-bars span.played { opacity: 1; background: var(--tide-light); }
.demo-msg { margin: 0; min-height: 3.2em; font-weight: 700; max-width: 30ch; }


/* ---------- Meet the Founder ---------- */
.founder { border-top: 1px solid var(--rule); }
.founder-page { border-top: 0; padding-top: calc(var(--header-h) + clamp(40px, 6vw, 88px)); }
/* Founder page: the bio, signature and logos fit within the height of the photo (side-by-side layout only) */
@media (min-width: 861px) {
  .founder-page .founder-grid { align-items: start; }
  .founder-page .founder-copy { font-size: 12px; line-height: 1.5; }
  .founder-page .founder-copy .eyebrow { margin-bottom: .6em; }
  .founder-page .founder-copy .lede { font-size: 1.2em; line-height: 1.35; margin-bottom: .7em; }
  .founder-page .founder-copy p { margin-bottom: .7em; }
  .founder-page .founder-sign { margin-top: .9em; font-size: 1em; }
  .founder-page .founder-sign span { font-size: .9em; }
  .founder-page .affils { margin-top: .9em; gap: 8px; }
  .founder-page .affils li { height: clamp(48px, 4.2vw, 60px); padding: 6px 10px; }
  .founder-page .affils img { max-height: clamp(36px, 3.3vw, 48px); max-width: 110px; }
}
@media (min-width: 1150px) { .founder-page .founder-copy { font-size: 13.4px; } }
@media (min-width: 1360px) { .founder-page .founder-copy { font-size: 14.2px; } }
/* Narrow tablets: stack the photo above the bio so the text stays readable */
@media (min-width: 861px) and (max-width: 1023px) {
  .founder-page .founder-grid { grid-template-columns: 1fr; }
  .founder-page .founder-photo { max-width: 360px; }
  .founder-page .founder-copy { font-size: 15px; }
}
.nav-left a[aria-current="page"], .mobile-nav a[aria-current="page"], .footer-links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.founder-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.founder-copy .eyebrow { margin-bottom: 1rem; }
h1.eyebrow { font-weight: 600; line-height: 1.4; letter-spacing: .16em; }
.founder-copy .title { margin-bottom: 1.5rem; max-width: 18ch; }
.founder-copy .lede { font-weight: 600; }
.founder-sign { display: flex; flex-direction: column; margin-top: 1.5rem; }
.founder-sign span { color: var(--tide); font-weight: 700; font-size: .95rem; }

.photo { position: relative; width: 100%; aspect-ratio: 1; }
.founder-photo { aspect-ratio: 4 / 5; max-width: 460px; }
.photo .initials, .photo img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 16px; }
.photo .initials { display: grid; place-items: center; background: var(--night); color: var(--peach); font-weight: 800; font-size: 1.6rem; letter-spacing: .04em; }
.founder-photo .initials { font-size: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.photo img { object-fit: cover; object-position: 52% 30%; background: var(--night); }
.linkedin {
  position: absolute; top: -8px; right: -8px; width: 34px; height: 34px; border-radius: 6px;
  display: grid; place-items: center; background: #0A66C2; color: #fff; text-decoration: none;
  font: 800 18px/1 Arial, sans-serif; letter-spacing: -0.03em;
  box-shadow: 0 0 0 3px var(--ground); transition: transform .15s ease;
}
.linkedin:hover { transform: scale(1.08); }
.linkedin:focus-visible { outline-color: #0A66C2; }
.linkedin[href=""] { display: none; }

/* Affiliation logos on white tiles (the logo files have white backgrounds) */
.affils { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; margin-top: 1.5rem; }
.affils li { display: grid; place-items: center; height: 96px; padding: 10px 16px; background: #fff; border-radius: 10px; box-shadow: 0 0 0 1px var(--rule); }
.affils img { max-height: 76px; max-width: 150px; width: auto; height: auto; }
.affils span { font-size: .75rem; font-weight: 700; line-height: 1.1; max-width: 12ch; text-align: center; }

/* ---------- Footer: Shop + Stay in the loop ---------- */
.site-footer { padding: clamp(56px, 7vw, 96px) 0 24px; }
.site-footer .wrap { container-type: inline-size; }
.footer-cta { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: end; padding-bottom: clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--rule-dark); }
.footer-title { font-size: clamp(1.85rem, 1.3rem + 1.9vw, 3rem); margin-bottom: 1.5rem; max-width: 16ch; }
.subscribe-title { display: block; font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); font-weight: 900; letter-spacing: -0.02em; color: var(--peach); margin-bottom: 1rem; }
.subscribe-row { display: flex; gap: 10px; }
.subscribe-status { margin: .75rem 0 0; min-height: 1.4em; font-size: .95rem; color: var(--peach); font-weight: 600; }
.subscribe-status:empty { min-height: 0; margin: 0; }
.subscribe-contact { margin: 1rem 0 0; font-size: .95rem; opacity: .85; }
.footer-cta .subscribe-contact a { color: var(--peach); font-weight: 700; text-underline-offset: 3px; }
.subscribe input[type="email"] {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 1rem; border-radius: 4px;
  font: 400 1rem var(--font); color: var(--ground); background: var(--night-2);
  border: 1.5px solid rgba(244, 238, 232, .35);
}
.subscribe input[type="email"]::placeholder { color: rgba(244, 238, 232, .65); }
.subscribe input[type="email"]:focus-visible { outline: 3px solid var(--peach); outline-offset: 2px; border-color: var(--peach); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; padding: 28px 0; }
.footer-links nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.footer-links nav a { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.footer-links nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
/* Giant logo across the footer, Peach on Night with matching rings */
.footer-wordmark { margin: clamp(24px, 4vw, 56px) 0 clamp(16px, 2vw, 24px); color: var(--peach); }
.legal { margin: 0; font-size: .8rem; opacity: .7; }

/* ---------- Contact page ---------- */
.contact-page { padding-top: calc(var(--header-h) + clamp(40px, 6vw, 88px)); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.contact-copy .eyebrow { margin-bottom: 1rem; }
.contact-copy .title { margin-bottom: 1.25rem; }
.contact-copy .lede { margin: 0; }
.contact-form { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: clamp(22px, 3vw, 36px); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin: 0 0 1.1rem; display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--tide); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 1rem/1.4 var(--font); color: var(--night); background: #fff;
  border: 1.5px solid var(--rule-strong); border-radius: 8px; padding: .7rem .85rem;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--tide); outline-offset: 1px; border-color: var(--tide); }
.contact-form .btn { margin-top: .25rem; }
.contact-status { margin: 1rem 0 0; min-height: 1.4em; font-weight: 600; color: var(--tide); }
.contact-status:empty { margin: 0; min-height: 0; }
@media (max-width: 860px) { .contact-grid, .field-row { grid-template-columns: 1fr; } }

/* ---------- Shop page ---------- */
.shop { padding-top: calc(var(--header-h) + clamp(40px, 6vw, 88px)); }
.shop-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.shop-photo { margin: 0; }
.shop-photo img { width: 100%; height: auto; border-radius: 20px; }
.shop-copy .eyebrow { margin-bottom: 1rem; }
.shop-copy .title { margin-bottom: 1.25rem; }
.shop-price { display: flex; align-items: baseline; gap: .5rem; margin-bottom: 1.5rem; }
.shop-price strong { font-size: clamp(2.2rem, 1.6rem + 1.6vw, 3rem); font-weight: 900; letter-spacing: -0.02em; line-height: 1; }
.shop-price span { font-weight: 600; opacity: .75; }
.shop-details { border-top: 1px solid var(--rule); margin-bottom: 1.5rem; }
.shop-details li { display: flex; justify-content: space-between; gap: 16px; padding: .85rem 0; border-bottom: 1px solid var(--rule); }
.shop-details span { opacity: .75; }
.shop-copy > p:not(.eyebrow):not(.shop-price) { margin-bottom: 1.75rem; }
.shop-copy > p.shop-note { margin-top: -1rem; font-size: .95rem; opacity: .85; }
.shop-note a { font-weight: 700; text-underline-offset: 3px; }
.btn-block { width: 100%; }
.shop-secure { margin: .75rem 0 0; font-size: .85rem; opacity: .7; text-align: center; }

/* ---------- Responsive ---------- */
/* Header switches to the menu button before the two tabs would crowd the logo */
@media (max-width: 820px) {
  .nav-left { display: none; }
  .header-logo { grid-column: 2; }
  .nav-right { grid-column: 3; }
  .nav-toggle { display: grid; }
  .mobile-nav { padding: 8px var(--gutter) 20px; background: var(--night); color: var(--peach); border-bottom: 1px solid var(--rule-dark); }
  .mobile-nav.open { display: grid; }
  .mobile-nav a { padding: 16px 0; border-bottom: 1px solid var(--rule-dark); font-size: .85rem; }
}
@media (max-width: 860px) {
  /* Phones and tablets: text at the top, photo below it showing through */
  .hero { min-height: min(88vh, 760px); padding-top: calc(var(--header-h) + 40px); }
  .hero-copy { max-width: min(100%, 520px); }
  .hero-logo { margin-bottom: 1.5rem; }
  .logo-tm { width: 100%; }
  .hero h1.one-line { font-size: min(5.25rem, 10cqi); }
  .hero-bg { object-position: 64% 100%; }
  .hero::before { background: linear-gradient(180deg, rgba(244, 238, 232, .95) 0%, rgba(244, 238, 232, .85) 34%, rgba(244, 238, 232, 0) 62%); }
  .feel-card, .founder-grid, .footer-cta, .shop-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .founder-photo { max-width: 360px; }
}
@media (max-width: 600px) {
  .nav-right .btn-ghost { display: none; }
  .header-inner { grid-template-columns: auto 1fr; }
  .header-logo { grid-column: 1; justify-self: start; width: 128px; }
  .nav-right { grid-column: 2; }
  .subscribe-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .demo-pad.on .demo-ring { animation: none; opacity: .4; transform: scale(1.15); }
}
