/*
 * Velvet Hanger — marketing site.
 *
 * The same design system as the iOS app, so the two read as one product: white
 * ground, cream reserved for feature panels, border-radius 0 everywhere, and rules
 * instead of shadows. Values are lifted from the Claude Design source rather than
 * re-derived, so the site and the app cannot drift apart by approximation.
 *
 * The design ships as inline styles on every element. They are extracted here so the
 * four pages share one foundation — otherwise a change to the nav means editing it in
 * four files and getting it wrong in one.
 */

:root {
  --ink: #201E1D;
  --ink-soft: #4A4744;
  --ink-mute: #6B6763;
  --accent: #1A0089;
  --accent-dark: #0E0052;
  --cream: #EFE7D8;
  --orange: #FF5E33;
  --rule: #D8D4CF;
  --slot: #FAF8F4;

  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Space Grotesk', system-ui, sans-serif;
  --hand: 'Permanent Marker', cursive;

  --shell: 1160px;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  /* Oversized display type can exceed the viewport before it wraps. */
  overflow-x: hidden;
}

h1, h2, h3, p, dl, dd, dt { margin: 0; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: #E4E0F7; }

/* `.slot` sets `display: flex`, which would otherwise beat the `hidden` attribute.
   Stated once here so no component has to remember it. */
[hidden] { display: none !important; }

/* ------------------------------------------------------------ utilities --- */

/* Keyboard users land on this first; it stays out of the way until focused. */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  background: var(--accent);
  color: #FFFFFF;
  padding: 14px 20px;
  font: 700 12px/1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-120%);
}

.skip-link:focus { transform: translateY(0); color: #FFFFFF; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/*
 * The only sanctioned escape for content that cannot shrink — a wide table on Terms,
 * a long code line on Support. It scrolls itself so the page body never does; body
 * already carries `overflow-x: hidden`, which would otherwise clip such content
 * rather than let it be read.
 */
.scroll-x {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.scroll-x > * { min-width: max-content; }

/* ---------------------------------------------------------------- shell --- */

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* 2px is the design's structural rule; 1px is reserved for list separators. */
.site-header { border-bottom: 2px solid var(--ink); }

.site-header__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: baseline;
  justify-content: space-between;
}

.wordmark {
  font: 400 27px/1 var(--serif);
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 2.4vw, 30px);
}

.nav a {
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 4px;
}

/* `aria-current` carries the state, so the underline is a consequence of the
   markup being correct rather than a class someone has to remember to move. */
.nav a[aria-current='page'] { border-bottom: 2px solid var(--accent); }

/* ----------------------------------------------------------- typography --- */

.eyebrow {
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.display {
  font: 400 clamp(58px, 11vw, 132px)/0.9 var(--serif);
  letter-spacing: -0.02em;
  margin-top: clamp(18px, 3vw, 28px);
}

.lede {
  font: 400 clamp(17px, 2vw, 22px)/1.45 var(--sans);
  max-width: 30ch;
  margin-top: clamp(20px, 3vw, 30px);
}

.section-title {
  font: 400 clamp(34px, 5vw, 58px)/1.02 var(--serif);
  letter-spacing: -0.01em;
  margin-top: 14px;
}

.body-copy {
  font: 400 16px/1.65 var(--sans);
  color: var(--ink-soft);
  max-width: 44ch;
  margin-top: 16px;
  text-wrap: pretty;
}

/*
 * The handwritten accent. Accent blue rather than orange: orange on white is 3.04:1,
 * which is fine for a large heading or a non-text mark but fails AA for a run of text
 * this size. Orange stays in the palette for the alert states the Support page needs.
 */
.hand { font-family: var(--hand); color: var(--accent); font-size: 17px; }

/* --------------------------------------------------------------- button --- */

.btn {
  display: inline-block;
  background: var(--accent);
  color: #FFFFFF;
  text-decoration: none;
  padding: 15px 26px;
  font: 700 12px/1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 0;
}

.btn:hover { background: var(--accent-dark); color: #FFFFFF; }

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

/* One split rule for every two-column band. `auto-fit` collapses to a single
   column below the minimum without a media query.

   The floor is wrapped in `min(…, 100%)` because a bare `minmax(300px, 1fr)` will
   not shrink below 300px — on a 320px screen the 288px of available track is
   narrower than that floor, and the column overflowed the viewport by 24px. Body
   carries `overflow-x: hidden`, so the symptom was silently clipped content rather
   than a scrollbar, which is the worse of the two failures. */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(44px, 7vw, 92px) 0;
}

.split--hero {
  align-items: start;
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(40px, 7vw, 88px) 0 clamp(36px, 5vw, 64px);
}

.split--ruled { border-top: 2px solid var(--ink); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  margin-top: clamp(24px, 3.5vw, 36px);
}

.hero-note { font: 400 12.5px/1.5 var(--sans); color: var(--ink-mute); }

/* --------------------------------------------------------------- pillars --- */

.pillars {
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
}

.pillar { padding: clamp(22px, 3vw, 32px) clamp(18px, 2.5vw, 32px); }
.pillar + .pillar { border-left: 1px solid var(--rule); }
.pillar:first-child { padding-left: 0; }
.pillar:last-child { padding-right: 0; }

.pillar h2 { font: 400 clamp(22px, 2.4vw, 29px)/1.15 var(--serif); }

.pillar p {
  font: 400 14.5px/1.6 var(--sans);
  color: var(--ink-soft);
  margin-top: 8px;
}

/* ---------------------------------------------------------------- panel --- */

/* The one place cream is allowed: a feature panel, never a page ground. */
.panel { background: var(--cream); padding: clamp(28px, 5vw, 64px); }
.panel .split { padding: 0; }
.panel .body-copy { color: #3A3835; }
.panel .frame { background: #FFFFFF; }

/* ---------------------------------------------------------------- media --- */

figure { margin: 0; }

.frame { border: 1px solid var(--ink); padding: 10px; }

.frame__inner { background: var(--slot); }

/*
 * Aspect ratios are declared rather than left to the image, so the layout does not
 * jump when a screenshot loads — and so an empty slot still occupies its final space.
 */
.frame__inner--phone { aspect-ratio: 390 / 770; max-height: clamp(420px, 60vh, 560px); }
.frame__inner--portrait { aspect-ratio: 4 / 5; }
.frame__inner--square { aspect-ratio: 1 / 1; }

.frame__inner img { width: 100%; height: 100%; object-fit: contain; }

/* Asset absent. The frame has already reserved its space, so swapping the image for
   its description changes what is drawn and nothing about the layout. */
.frame__inner.is-missing img { display: none; }

/*
 * Placeholder for a screenshot that does not exist yet. Deliberately legible rather
 * than a blank box: an empty frame reads as a broken image, and the design's own
 * slots carried their description as text.
 */
.slot {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  font: 600 10px/1.5 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.caption {
  font: 600 10px/1.4 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 10px;
}

.hero-figure { max-width: 330px; justify-self: end; }

/* ---------------------------------------------------------------- close --- */

.closing { border-top: 2px solid var(--ink); padding: clamp(48px, 8vw, 104px) 0 clamp(44px, 7vw, 88px); }

.closing h2 {
  font: 400 clamp(38px, 7vw, 84px)/1 var(--serif);
  letter-spacing: -0.02em;
  max-width: 22ch;
}

.closing p {
  font: 400 16px/1.65 var(--sans);
  color: var(--ink-soft);
  max-width: 46ch;
  margin-top: 20px;
}

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

.site-footer { border-top: 2px solid var(--ink); }

.site-footer__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 44px) var(--gutter) clamp(34px, 5vw, 56px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 28px 32px;
  align-items: start;
}

.site-footer__mark { font: 400 24px/1 var(--serif); }

.site-footer__blurb {
  font: 400 12.5px/1.6 var(--sans);
  color: var(--ink-mute);
  margin-top: 10px;
}

.site-footer__nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.site-footer__nav a {
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.site-footer__contact { font: 400 13.5px/1.6 var(--sans); margin-top: 10px; }
.site-footer__legal { font: 400 12px/1.6 var(--sans); color: var(--ink-mute); margin-top: 14px; }

/* ------------------------------------------------------------ long-form --- */

/* Support / Privacy / Terms share this measure. Prose is capped so a line never
   runs the full 1160px shell, which is unreadable. */
.prose { max-width: 68ch; padding-block: clamp(36px, 6vw, 72px); }
.prose h1 { font: 400 clamp(40px, 7vw, 76px)/1 var(--serif); letter-spacing: -0.02em; }
.prose h2 { font: 400 clamp(24px, 3vw, 34px)/1.15 var(--serif); margin-top: clamp(28px, 4vw, 44px); }
.prose p, .prose li { font: 400 16px/1.7 var(--sans); color: var(--ink-soft); margin-top: 14px; }
.prose dt { font: 600 15px/1.5 var(--sans); color: var(--ink); margin-top: 26px; }
.prose dd { font: 400 16px/1.7 var(--sans); color: var(--ink-soft); margin: 8px 0 0; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: clamp(28px, 4vw, 40px) 0 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* -------------------------------------------------- long-form, continued --- */

/*
 * What Support, Privacy and Terms needed that the foundation did not already cover.
 * Additive only — nothing above this line changes behaviour.
 */

/*
 * `.prose p` is (0,1,1) and `.eyebrow` is (0,1,0), so an eyebrow set on a paragraph
 * inside the prose measure loses and silently renders as body copy. The declarations
 * are restated at matching weight rather than reworked, so the two remain one style;
 * the margin is zeroed because an eyebrow sits directly above its own heading.
 */
.prose p.eyebrow {
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 0;
}

/*
 * The reset clears margins on p/dl/dd/dt but not on lists, so a list inherits the
 * browser's 1em block margin and 40px indent and reads at a different rhythm to the
 * paragraphs around it. Matched to the paragraph's 14px lead-in; the indent is enough
 * for the marker and no more, which matters at 320px. `.prose li` already sets type.
 */
.prose ul, .prose ol { margin: 14px 0 0; padding-left: 22px; }

/*
 * A literal the reader will see on their own device — a file name, a menu label.
 * Sized explicitly because a browser's default monospace renders around 13px against
 * the surrounding 16px sans, which reads as a mistake rather than a distinction.
 */
.prose code {
  font: 400 14.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink);
}

/*
 * `.scroll-x > *` sets `min-width: max-content`, which an inline box ignores — so a
 * code literal dropped straight into a scroller silently wraps instead, and at 320px
 * a file name broke across two lines at one of its own hyphens, which reads as though
 * the hyphen-newline were part of the name. Making the child a block box is what lets
 * the existing rule apply and the container actually scroll.
 */
.scroll-x > code { display: block; }
