/*
 * Valet's landing page.
 *
 * Modelled on the structure a good app landing page uses — hero, feature
 * showcase, closing call to action — but in Valet's own palette rather than
 * the competitors'. The whole positioning of this product is that it does not
 * look like the cream-and-blush closet apps, and a site that did would be
 * arguing against the thing it is selling.
 *
 * Two families only, matching the app: Instrument Serif for headlines, Inter
 * for everything else. Loaded from Google Fonts with real fallbacks, so the
 * page is readable before they arrive.
 */

:root {
  /* Cutouts were shot for a dark ground. On cream a white tee has no edge
     at all, so light mode needs a heavier shadow to keep it on the page. */
  --lift: drop-shadow(0 20px 30px rgba(23, 21, 15, 0.24));
  --lift-sm: drop-shadow(0 10px 16px rgba(23, 21, 15, 0.18));
  --bg: #EFECE5;
  --raised: #FBFAF7;
  --surface: #EDE9E1;
  --edge: #D9D4CA;
  --ink: #17150F;
  --ash: #635E54;
  --mute: #7A746A;
  --brass: #9A7727;
  --brass-deep: #6B5218;
  --brass-wash: rgba(154, 119, 39, 0.10);
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, "Segoe UI", system-ui, sans-serif;
}

/*
 * The same room with the lights off.
 *
 * Three states, not two. An explicit choice stamps data-theme on <html>; the
 * default — no attribute — follows the system. So the dark values are written
 * twice: once under the media query, guarded against an explicit light choice
 * so the toggle can win, and once under the attribute so it wins in the other
 * direction too. Defining them only inside the media query would leave the
 * toggle unable to turn the lights on for someone whose system is dark.
 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08080A;
    --raised: #0F0F12;
    --surface: #131316;
    --edge: #232328;
    --ink: #F7F4ED;
    --ash: #9A958C;
    --mute: #7C776F;
    --brass: #C9A45C;
    --brass-deep: #8A6B2C;
    --brass-wash: rgba(201, 164, 92, 0.12);
    --lift: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.26));
    --lift-sm: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.30));
  }
}

:root[data-theme="dark"] {
  --bg: #08080A;
  --raised: #0F0F12;
  --surface: #131316;
  --edge: #232328;
  --ink: #F7F4ED;
  --ash: #9A958C;
  --mute: #7C776F;
  --brass: #C9A45C;
  --brass-deep: #8A6B2C;
  --brass-wash: rgba(201, 164, 92, 0.12);
  --lift: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.26));
  --lift-sm: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.30));
}

/* ── Theme toggle ─────────────────────────────────────────────────────── */
/*
 * Two glyphs stacked in one button, one hidden per theme. Swapping the text
 * in JS would leave the button blank until the script ran; doing it in CSS
 * means the right glyph is there in the first paint.
 */
.theme {
  background: none; border: 1px solid var(--edge); border-radius: 999px;
  width: 32px; height: 32px; flex: 0 0 auto; padding: 0; cursor: pointer; color: var(--mute);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1; transition: color .2s ease, border-color .2s ease;
}
.theme:hover { color: var(--brass); border-color: var(--brass-deep); }
.theme .moon { display: none; }
.theme .sun  { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .moon { display: inline; }
  :root:not([data-theme="light"]) .theme .sun  { display: none; }
}
:root[data-theme="dark"] .theme .moon { display: inline; }
:root[data-theme="dark"] .theme .sun  { display: none; }
:root[data-theme="light"] .theme .moon { display: none; }
:root[data-theme="light"] .theme .sun  { display: inline; }

* { box-sizing: border-box; }

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

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { --gutter: 24px; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

/* ── Chrome ───────────────────────────────────────────────────────────── */

/*
 * The header follows you down the page.
 *
 * It scrolled away with the hero, so past the first screen there was no
 * wordmark and — the part that matters — no way to install without scrolling
 * back up or all the way to the bottom. The one action the page exists for
 * should not be the one thing that leaves the screen.
 *
 * Sticky rather than fixed: it still occupies its place in the flow, so
 * nothing underneath needs a compensating offset.
 */
header.bar {
  position: sticky; top: 0; z-index: 20;
  display: block;
  padding: 14px 0;
  /* The page scrolls beneath it, so it needs a ground of its own. The blur is
     the flourish; the tinted background is what makes text legible over a
     photograph passing underneath. */
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
/* A hairline appears only once you have actually scrolled. */
header.bar.stuck { border-bottom-color: var(--edge); }

/* The bar spans the viewport; its contents keep the page's column. */
.barInner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 0; padding-bottom: 0;
}

/*
 * The install button: text, then the Apple mark, in a solid pill.
 *
 * Colour follows the theme rather than being pinned to black. On the light
 * page it is near-black with bone type, which is the familiar shape; on the
 * dark page that pill would vanish into the ground, so the two swap. The
 * contrast is what carries the design, not the particular colour.
 */
.getBtn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 22px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: 14.5px; font-weight: 700; letter-spacing: -.01em;
  text-decoration: none; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
/*
 * Hover lifts and casts, it does not brighten.
 *
 * `brightness()` on a bone pill pushed it to flat white and blew out the type
 * with it — the button looked broken rather than responsive. A shadow reads
 * as the same affordance on either theme and cannot wash anything out.
 */
.getBtn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--ink) 28%, transparent);
  /* Restated, not inherited: the pill keeps its own contrast in every state
     and in both themes. */
  color: var(--bg);
  background: var(--ink);
}
.getBtn:active { transform: translateY(0); box-shadow: none; opacity: .9; }
.getBtn svg { margin-top: -2px; }

/* The page's primary call, same button at a larger size. */
.getBtn.lg { padding: 16px 30px; font-size: 17px; gap: 11px; }
.getBtn.lg svg { width: 20px; height: 20px; }

/* "Download for" on a laptop, "Get" where the bar is tight. */
.getShort { display: none; }
@media (max-width: 720px) {
  .getLong { display: none; }
  .getShort { display: inline; }
  .getBtn { padding: 9px 16px; }
}
.wordmark {
  font-size: 13px; letter-spacing: .34em; text-transform: uppercase;
  font-weight: 600; color: var(--brass); text-decoration: none;
}
.nav { display: flex; align-items: center; gap: 22px; font-size: 14px; color: var(--ash); }
.nav a { text-decoration: none; }
.nav a:not(.getBtn):hover { color: var(--ink); }
/* ── The bar on a phone ───────────────────────────────────────────────── */
.burger {
  display: none;
  width: 40px; height: 40px; padding: 0;
  border-radius: 999px; border: 1px solid var(--edge);
  background: color-mix(in srgb, var(--raised) 70%, transparent);
  cursor: pointer;
  align-items: center; justify-content: center; gap: 5px; flex-direction: column;
}
.burger span {
  display: block; width: 16px; height: 1.5px; border-radius: 2px;
  background: var(--ink); transition: transform .2s ease, opacity .2s ease;
}
.burger[aria-expanded='true'] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.burger[aria-expanded='true'] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

@media (max-width: 720px) {
  .burger { display: flex; }
  /* The links become a panel under the bar rather than a row inside it. */
  .nav {
    position: absolute; top: 100%; right: var(--gutter, 24px); left: var(--gutter, 24px);
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px; margin-top: 8px;
    border-radius: 18px; border: 1px solid var(--edge);
    background: var(--raised);
    box-shadow: 0 18px 40px rgba(0,0,0,.34);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.getBtn) { padding: 12px 14px; border-radius: 12px; font-size: 15px; }
  .nav a:not(.getBtn):active { background: var(--surface); }
  .nav .theme { align-self: flex-start; margin: 6px 0 2px 14px; }
  .nav .getBtn { justify-content: center; margin-top: 6px; }
  .getLong { display: inline; }
  .getShort { display: none; }
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero { padding: 20px 0 32px; display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 1fr 1fr; padding: 32px 0 52px; } }

.eyebrow {
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--brass); font-weight: 600; margin: 0 0 18px;
}
h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(42px, 7vw, 72px); line-height: 1.04;
  letter-spacing: -0.015em; margin: 0 0 22px;
}
h1 em { font-style: italic; color: var(--brass); }
.lede { font-size: clamp(17px, 2vw, 19px); color: var(--ash); margin: 0 0 30px; max-width: 46ch; }

.cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.button {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--brass); color: var(--bg);
  text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 15px 26px; border-radius: 999px;
  transition: transform .18s ease, filter .18s ease;
}
.button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--edge); }
.note { font-size: 13px; color: var(--mute); margin: 16px 0 0; }

/* The hero: garments hung on a rail, which is what the app makes.
 *
 * Catalogue cutouts rather than screenshots or stock photography. They are
 * the one image nobody else can show — a competitor's app has no cutouts to
 * display — and they arrive on transparency, so they can be composed freely
 * against the page rather than boxed in a device frame. */
/*
 * A flex row, not four absolutely-positioned pieces.
 *
 * Each garment was placed by a left percentage, which cannot know how wide
 * that garment renders — the thobe at 190px tall is 150px wide and the jeans
 * at 214px tall are 84px, so any spacing tuned for one viewport overlapped at
 * the next. Measured at 1470px the thobe and the shirt were overlapping by
 * 100px. Laying them out in a row means the browser does the spacing, and
 * overlap stops being possible at any width rather than being re-tuned at
 * each one.
 */
.stage {
  position: relative; min-height: 330px;
  display: flex; align-items: center; justify-content: center;
}
.heroShot {
  width: 100%; height: auto; max-height: 520px; object-fit: cover;
  border-radius: 18px; display: block;
}
@media (min-width: 900px) { .stage { min-height: 380px; } }

/* The rail they hang from. */
.rail {
  position: absolute; top: 26px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brass) 14%, var(--brass) 86%, transparent);
  opacity: .55;
}
.rail::before, .rail::after {
  content: ''; position: absolute; top: -4px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--brass); opacity: .8;
}
.rail::before { left: 10%; } .rail::after { right: 10%; }

.hang { display: flex; flex-direction: column; align-items: center; flex: 0 1 auto; min-width: 0; }
/* The hook: a short line from the rail down to the garment. */
.hang::before {
  content: ''; width: 1px; height: var(--drop, 26px);
  background: linear-gradient(180deg, var(--brass), transparent);
  opacity: .7;
}
.hang img {
  /* Height, not width. These are photographs of real garments and their
     aspect ratios are nothing alike — trousers are three times the height of
     a shoe at the same width. Constraining the width made the jeans enormous
     and pushed the last piece off the edge; constraining the height makes
     them hang like clothes on an actual rail. */
  height: var(--h, 190px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: var(--lift);
  animation: sway 7s ease-in-out infinite;
  transform-origin: top center;
}
@keyframes sway {
  0%, 100% { transform: rotate(-1.4deg); }
  50%      { transform: rotate(1.4deg); }
}
@media (prefers-reduced-motion: reduce) { .hang img { animation: none; } }

/*
 * Heights scale with the viewport so the rail shrinks on a phone instead of
 * running off the edge. Each piece keeps its own range — the jeans are meant
 * to hang lower than the tee, and one shared value would flatten the rail
 * into a row of same-sized shapes.
 */
.h1 { --h: clamp(92px,  9vw,    132px); --drop: 30px; }
.h2 { --h: clamp(88px,   8.5vw, 128px); --drop: 40px; }
.h3 { --h: clamp(112px,  11.5vw, 172px); --drop: 14px; }
.h4 { --h: clamp(84px,   8vw,   120px); --drop: 44px; }
.h1 img { animation-delay: -1.2s; }
.h2 img { animation-delay: -3.4s; }
.h3 img { animation-delay: -2.1s; }
.h4 img { animation-delay: -5s; }

@media (max-width: 720px) {
  .stage { min-height: 300px; }
  .h1 { --h: 116px; left: 2%; }
  .h2 { --h: 158px; left: 33%; }
  .h3 { --h: 110px; left: 66%; }
  .h4 { display: none; }
}

/* A composed outfit: pieces laid out as they would be worn. */
.outfit {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; align-items: center; justify-items: center;
}
.outfit img {
  height: clamp(150px, 20vw, 220px); width: auto; max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.20));
}

/* A single piece, large, for a section that needs one object. */
.solo { display: flex; justify-content: center; }
.solo img { width: min(300px, 74vw); filter: drop-shadow(0 26px 44px rgba(0,0,0,.24)); }

/* Two days side by side, each labelled. */
.days { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.day {
  background: var(--raised); border: 1px solid var(--edge); border-radius: 18px;
  padding: 22px 16px; text-align: center;
}
.day.today { border-color: var(--brass-deep); background: var(--brass-wash); }
.day img {
  height: 160px; width: auto; max-width: 84%; object-fit: contain;
  margin: 0 auto 14px;
  filter: drop-shadow(0 14px 22px rgba(0,0,0,.18));
}
.day span {
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--mute); font-weight: 600;
}
.day.today span { color: var(--brass); }

/* The reaction row, drawn rather than screenshotted. */
.reactions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.react {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--edge); background: var(--surface);
  border-radius: 999px; padding: 7px 13px; font-size: 14px; color: var(--ash);
}
.react.on { border-color: var(--brass); background: var(--brass-wash); color: var(--ink); }

/* ── Sections ─────────────────────────────────────────────────────────── */

section { padding: 56px 0; }
.rule { border: 0; border-top: 1px solid var(--edge); margin: 0; }

h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1;
  letter-spacing: -0.01em; margin: 0 0 14px;
}
.sub { color: var(--ash); font-size: 17px; margin: 0 0 44px; max-width: 58ch; }

.steps { display: grid; gap: 28px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 34px; } }
.step-n {
  font-family: var(--serif); font-size: 34px; color: var(--brass); line-height: 1;
  margin-bottom: 10px;
}
.step h3 { font-size: 17px; margin: 0 0 6px; letter-spacing: -.01em; }
.step p { color: var(--ash); font-size: 15px; margin: 0; }

/* Feature rows: screenshot beside prose, alternating. */
.feature { display: grid; gap: 40px; align-items: center; padding: 44px 0; }
@media (min-width: 900px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 72px; }
  .feature.flip .shot { order: 2; }
}
.feature h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.12; margin: 0 0 14px; }
.feature p { color: var(--ash); font-size: 16px; margin: 0 0 10px; }
.tag {
  display: inline-block; font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--brass); font-weight: 600; margin-bottom: 14px;
}
.shot { display: flex; justify-content: center; }

/* ── Taxonomy strip ───────────────────────────────────────────────────── */

.kinds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.kind {
  font-size: 13px; color: var(--ash);
  border: 1px solid var(--edge); border-radius: 999px;
  padding: 7px 14px; background: var(--surface);
}

/* ── Privacy panel ────────────────────────────────────────────────────── */

.panel {
  background: var(--brass-wash); border: 1px solid var(--brass-deep);
  border-radius: 18px; padding: clamp(26px, 4vw, 44px);
}
.panel h2 { margin-bottom: 18px; }
.panel ul { margin: 0; padding-left: 20px; color: var(--ash); }
.panel li { margin-bottom: 8px; }

/* ── Close ────────────────────────────────────────────────────────────── */

.close { text-align: center; padding: 8px 0 72px; }
.close h2 { margin-bottom: 24px; }
.close .sub { margin: 0 auto 30px; }
.close .cta { justify-content: center; }

footer {
  border-top: 1px solid var(--edge);
  padding: 34px 0 60px;
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  color: var(--mute); font-size: 14px;
}
footer a { text-decoration: none; margin-left: 20px; }
footer a:hover { color: var(--ink); }
@media (max-width: 560px) { footer a { margin: 0 20px 0 0; } }

/* ── Feature grid ─────────────────────────────────────────────────────── */
/*
 * A bento, and every cell is a small working picture of the feature.
 *
 * It was eight identical tiles, each holding one garment on its own. Same
 * shape eight times, and the picture never showed the product — a photograph
 * of a jumper does not explain a wardrobe that files itself. These cells are
 * built from the same cutouts, arranged into the thing the app actually does:
 * a shelf, a planned pair of days, a composed look, a look with reactions on
 * it. Two of them run double width so the eye has somewhere to rest.
 */
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 620px)  { .grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 1040px) { .cell.wide { grid-column: span 2; } }

.cell {
  background: var(--raised); border: 1px solid var(--edge);
  border-radius: 20px; padding: 18px; overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}
.cell:hover { border-color: var(--brass-deep); transform: translateY(-2px); }
.cell h3 { font-size: 15px; margin: 14px 0 2px; font-weight: 500; letter-spacing: -.01em; }
.cell p  { font-size: 13.5px; margin: 0; color: var(--mute); }

/* The photograph each cell is built around. */
.shot {
  border-radius: 14px; overflow: hidden; background: var(--surface);
  aspect-ratio: 3 / 2;
}
.cell:not(.wide) .shot { aspect-ratio: 1 / 1; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── App Store badge ──────────────────────────────────────────────────── */

/* ── Testimonial ──────────────────────────────────────────────────────── */
.quote {
  max-width: 62ch; margin: 0 auto; text-align: center;
}
.quote .stars { color: var(--brass); letter-spacing: .28em; font-size: 15px; margin-bottom: 18px; }
.quote blockquote {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(22px, 3.2vw, 32px); line-height: 1.3;
  margin: 0 0 18px; letter-spacing: -.01em;
}
.quote cite { font-style: normal; font-size: 14px; color: var(--mute); }
