/* Sales site for prospective hat makers.
   Signage-style headlines (Big Shoulders), plain text (Public Sans), measurements in a mono face, a turquoise accent
   from western silverwork. The designer's own renders are the art: they sit on its studio grey (#dedad3), so a hat
   looks like it is standing in the page rather than in a screenshot. The one recurring device is the hat-box label:
   a small tag giving the hat's real spec, as the designer writes it. */
:root {
  --paper: #f4f5f6;
  --surface: #ffffff;
  --ink: #1b1e23;
  --muted: #565c66;
  --line: #d6d9de;
  --turquoise: #17766f;
  --turquoise-ink: #ffffff;
  --tint: #e3f0ee;
  --studio: #dedad3;      /* the designer's stage color; the same in both color schemes */
  --studio-ink: #1b1e23;
  --night: #1b1e23;
  --on-night: #eef0f2;
  --font-display: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
  --font-body: 'Public Sans', 'Segoe UI', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131518; --surface: #1c1f24; --ink: #eceef1; --muted: #a4aab3; --line: #2f343b;
    --turquoise: #4fbdb1; --turquoise-ink: #0b1514; --tint: #17302d; --night: #0c0d0f; --on-night: #eceef1;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--font-body); -webkit-text-size-adjust: 100%; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
p { margin: 0; }
.wrap { max-width: 1152px; margin: 0 auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 10; background: var(--ink); color: var(--paper); padding: 8px 12px; }
.skip:focus { top: 8px; }

/* Buttons: square-cornered, like a stamped tag. */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; font: 700 16px/1.2 var(--font-body); text-decoration: none; text-align: center; border: 2px solid currentColor; color: var(--ink); background: transparent; cursor: pointer; }
.btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.btn.primary { background: var(--turquoise); border-color: var(--turquoise); color: var(--turquoise-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--turquoise) 86%, var(--ink)); }
.btn.small { min-height: 40px; padding: 6px 14px; font-size: 15px; }
:focus-visible { outline: 3px solid var(--turquoise); outline-offset: 2px; }

h1, h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(34px, 5vw, 52px); line-height: 0.95; letter-spacing: 0.01em; }
h3 { margin: 0; }
.sub { color: var(--muted); max-width: 60ch; }
.head { display: grid; gap: 12px; max-width: 760px; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 22px var(--font-display); letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; }
nav { display: flex; align-items: center; gap: 20px; font-size: 15px; }
nav a:not(.btn) { text-decoration: none; color: var(--muted); }
nav a:not(.btn):hover { color: var(--ink); }
nav .btn + .btn { margin-left: -10px; }
@media (max-width: 900px) { nav a:not(.btn) { display: none; } }
@media (max-width: 560px) { nav .btn:not(.primary) { display: none; } .brand { font-size: 19px; } }

/* Hero: copy on the paper, the hat on its studio grey running out to the right edge of the screen. */
.hero { overflow-x: clip; border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(var(--gutter), 1fr) minmax(0, 460px) minmax(0, 660px) minmax(0, 1fr);
  column-gap: 0;
}
.hero-copy { grid-column: 2; display: flex; flex-direction: column; gap: 20px; padding: 44px 40px 44px 0; align-self: center; min-width: 0; }
h1 { font-size: clamp(46px, 5.2vw, 74px); line-height: 0.92; letter-spacing: 0.005em; }
.lede { font-size: 19px; color: var(--muted); max-width: 46ch; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.gains { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 15px; }
.gains li { display: grid; grid-template-columns: 22px minmax(0, 1fr); }
.gains li::before { content: ''; width: 12px; height: 2px; margin-top: 12px; background: var(--turquoise); }
.hero-media { grid-column: 3 / -1; margin: 0; background: var(--studio); color: var(--studio-ink); display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.studio { position: relative; background: var(--studio); }
.turntable { width: 92%; max-width: 820px; margin-inline: auto; aspect-ratio: 960 / 768; background: var(--studio);
  /* fade the video's edge into the studio grey, so no rectangle shows */
  -webkit-mask-image: radial-gradient(ellipse 80% 78% at 50% 50%, #000 82%, transparent 100%);
          mask-image: radial-gradient(ellipse 80% 78% at 50% 50%, #000 82%, transparent 100%); }
.hero-media figcaption { padding: 0 24px 22px; font-size: 14px; color: #4a4f57; }
.hero-media figcaption a { font-weight: 600; color: #0f5a54; }

/* The hat-box label. */
.hatbox { position: absolute; right: 24px; bottom: 18px; margin: 0; background: #fbfaf7; color: #1b1e23; border: 1px solid #1b1e23; padding: 10px 14px 10px 16px; display: grid; gap: 3px; min-width: 200px; box-shadow: 3px 3px 0 rgba(27, 30, 35, 0.18); }
.hatbox::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; border-left: 1px dashed #8b9098; }
.hatbox div { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.hatbox dt { font-size: 12px; color: #5b616b; }
.hatbox dd { margin: 0; font: 500 13px/1.35 var(--font-mono); }

/* Sections */
section.band { padding-block: clamp(56px, 8vw, 96px); }
.band .wrap { display: grid; gap: 32px; }

/* Close-ups: an uneven grid, like a contact sheet with the best frames printed larger. */
.closeups { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px 24px; align-items: start; }
.cu { margin: 0; display: grid; gap: 10px; min-width: 0; }
.cu img { background: var(--studio); width: 100%; }
.cu figcaption { font-size: 15px; color: var(--muted); max-width: 52ch; }
.cu figcaption b { color: var(--ink); }
.cu-band { grid-column: 1 / 8; }
.cu-crease { grid-column: 8 / 13; }
.cu-brand { grid-column: 1 / 6; }
.cu-bill { grid-column: 6 / 13; }
.open-hats { display: flex; flex-wrap: wrap; gap: 10px; }

/* Felt switcher */
.felts { background: var(--surface); border-block: 1px solid var(--line); }
.felt-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 40px !important; }
.felt-copy { display: grid; gap: 18px; }
.felt-copy p { color: var(--muted); max-width: 46ch; }
.felt-view { margin: 0; }
.felt-view img { width: 100%; }
.swatches { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 8px; }
.swatches button { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 14px 6px 8px; font: 600 15px var(--font-body); color: var(--ink); background: var(--paper); border: 1px solid var(--line); cursor: pointer; }
.swatches button::before { content: ''; width: 28px; height: 28px; border-radius: 50%; background: var(--felt); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25); }
.swatches button[aria-checked="true"] { border: 2px solid var(--ink); padding: 5px 13px 5px 7px; }

/* Comparison */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid var(--ink); }
.compare tbody th { font-weight: 700; width: 22%; }
.compare td:nth-child(2) { color: var(--muted); width: 33%; }
.compare td:nth-child(3), .compare thead th:nth-child(3) { background: var(--tint); }
.compare thead th:nth-child(3) { color: var(--ink); font-weight: 700; }
td.amt { white-space: nowrap; font-weight: 700; }

/* Walkthrough: the one dark section, like a screening. */
.band.dark { background: var(--night); color: var(--on-night); }
.band.dark .sub { color: color-mix(in srgb, var(--on-night) 72%, transparent); }
.walkthrough { margin: 0; }
.walkthrough video { width: 100%; aspect-ratio: 1280 / 800; background: var(--studio); }

/* What reaches the shop: the spec as a work ticket beside the saved picture. */
.inbox { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 48px !important; }
.inbox-copy { display: grid; gap: 18px; }
.inbox-copy > p { color: var(--muted); max-width: 48ch; }
.ticket { background: #fbfaf7; color: #1b1e23; border: 1px solid #1b1e23; padding: 18px 20px 16px 30px; position: relative; box-shadow: 4px 4px 0 rgba(27, 30, 35, 0.14); }
.ticket::before { content: ''; position: absolute; left: 12px; top: 10px; bottom: 10px; border-left: 1px dashed #8b9098; }
.ticket-head { display: flex; justify-content: space-between; align-items: baseline; font: 800 22px var(--font-display); text-transform: uppercase; letter-spacing: 0.03em; padding-bottom: 8px; border-bottom: 1px solid #1b1e23; margin-bottom: 10px; }
.ticket-head span { font: 500 13px var(--font-mono); text-transform: none; letter-spacing: 0; }
.ticket dl { margin: 0; display: grid; grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr); gap: 5px 14px; font-size: 14px; line-height: 1.45; }
.ticket dt { color: #5b616b; }
.ticket dd { margin: 0; font-family: var(--font-mono); font-size: 13.5px; }
.ticket-foot { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #8b9098; font-size: 14px; color: #3d424a; }
.saved { margin: 0; display: grid; gap: 10px; }
.saved img { border: 1px solid var(--line); }
.saved figcaption, .phones-band figcaption { font-size: 14px; color: var(--muted); }

/* Phones */
.phones-band { background: var(--surface); border-block: 1px solid var(--line); }
.phones-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 32px !important; }
.phones-copy { display: grid; gap: 18px; align-self: center; }
.phones-copy p:first-of-type { color: var(--muted); max-width: 40ch; }
.phone { margin: 0; }
.phone img { width: 100%; max-width: 300px; margin-inline: auto; border: 9px solid #15171a; border-radius: 34px; background: #15171a; }
.phone:last-child { transform: translateY(36px); }

/* Steps for the shop: a true sequence, so numbered. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 6px; align-content: start; padding-top: 14px; border-top: 2px solid var(--ink); }
.steps li::before { content: counter(step); font: 800 56px/0.9 var(--font-display); color: var(--turquoise); }
.steps b { font: 800 26px/1 var(--font-display); text-transform: uppercase; letter-spacing: 0.02em; }
.steps span { color: var(--muted); font-size: 16px; }

/* Plans */
.billing { display: inline-flex; border: 2px solid var(--ink); justify-self: start; }
.billing button { font: 700 15px var(--font-body); padding: 8px 16px; min-height: 44px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.billing button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.billing small { font-weight: 400; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); background: var(--surface); }
.plan { padding: 26px 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; border-left: 1px solid var(--line); }
.plan:first-child { border-left: 0; }
.plan.featured { box-shadow: inset 0 5px 0 var(--turquoise); }
.plan h3 { font: 800 30px/1 var(--font-display); text-transform: uppercase; letter-spacing: 0.03em; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pill { font: 600 12px var(--font-body); text-transform: none; letter-spacing: 0; padding: 3px 8px; background: var(--tint); color: var(--ink); white-space: nowrap; }
.for { color: var(--muted); font-size: 15px; min-height: 3em; }
.price { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.price b { font: 800 56px/1 var(--font-display); }
.price span { color: var(--muted); font-size: 15px; }
.founding { font-size: 14px; font-weight: 600; color: var(--turquoise); }
.plan ul { list-style: none; margin: 4px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 15px; flex: 1; align-content: start; }
.plan li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 6px; }
.plan li::before { content: ''; width: 9px; height: 9px; margin-top: 8px; background: var(--turquoise); }
.plan li.no { color: var(--muted); }
.plan li.no::before { background: transparent; border: 1.5px solid var(--muted); width: 7px; height: 7px; }
.setup { font-size: 14px; color: var(--muted); }
.extras summary { cursor: pointer; font-weight: 700; padding-block: 6px; }
.extras .table-wrap { margin-top: 10px; border: 1px solid var(--line); background: var(--surface); }
.extras th { font-size: 13px; }
.fine { font-size: 14px; color: var(--muted); max-width: 80ch; }

/* Quote (hidden until there is a real one) */
.quote { margin: 0; max-width: 760px; }
.quote blockquote { margin: 0; font: 700 clamp(24px, 3vw, 34px)/1.25 var(--font-body); }
.quote figcaption { margin-top: 12px; color: var(--muted); }

/* Trial */
.trial { background: var(--tint); border-block: 1px solid var(--line); }
.trial-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 48px !important; }
.trial-copy { display: grid; gap: 18px; }
.trial-copy > p:first-of-type { max-width: 48ch; }
.reply { display: grid; gap: 10px; }
.reply label { font-weight: 700; font-size: 15px; }
.reply textarea { width: 100%; font: 15px/1.7 var(--font-mono); color: var(--ink); background: var(--surface); border: 1px solid var(--ink); padding: 12px 14px; resize: vertical; }
.reply .btn { justify-self: start; }
.copied { font-size: 14px; color: var(--muted); min-height: 1.4em; }

/* Questions */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.faq details { border-bottom: 1px solid var(--line); padding-block: 14px; min-width: 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin-top: 8px; color: var(--muted); font-size: 16px; max-width: 60ch; }

footer .foot-row { padding-block: 28px calc(40px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* Tablet and phone */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { display: contents; }
  .hero-copy > * { margin-inline: var(--gutter); }
  .hero h1 { order: 1; margin-top: 32px; }
  .hero-media { order: 2; grid-column: 1; margin-block: 20px 4px; }
  /* On a phone the buttons come straight after the hat, so they are on the first screen. */
  .hero .ctas { order: 3; margin-bottom: 20px; }
  .lede { order: 4; margin-bottom: 18px; }
  .gains { order: 5; margin-bottom: 40px; }
  .felt-grid, .inbox, .trial-grid { grid-template-columns: minmax(0, 1fr); }
  .phones-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .phones-copy { grid-column: 1 / -1; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .plan { border-left: 0; border-top: 1px solid var(--line); }
  .plan:first-child { border-top: 0; }
  .for { min-height: 0; }
  .steps, .faq { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .lede { font-size: 17px; }
  .hero .ctas .btn { flex: 1 1 100%; }
  /* On a phone the label sits under the hat instead of over it. */
  .hatbox { position: relative; right: auto; bottom: auto; margin: 0 var(--gutter) 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; padding: 8px 10px 8px 16px; }
  .hatbox div { grid-template-columns: 34px minmax(0, 1fr); gap: 6px; }
  .hatbox { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .hatbox dd { font-size: 11px; white-space: nowrap; }
  .turntable { width: 100%; }
  .hero-media figcaption { padding: 0 var(--gutter) 16px; }
  .closeups { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .cu-band, .cu-crease, .cu-brand, .cu-bill { grid-column: 1; }
  .open-hats .btn { flex: 1 1 100%; }
  .phone:last-child { transform: none; }
  .ticket { padding-left: 26px; }
  .ticket { padding-right: 14px; }
  .ticket dl { grid-template-columns: minmax(0, 7.2em) minmax(0, 1fr); gap: 5px 10px; font-size: 13px; }
  .ticket dd { font-size: 12px; }
  /* The comparison as stacked rows, each with its two answers side by side. */
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr { display: block; }
  .compare tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid var(--line); padding-block: 12px; }
  .compare th[scope="row"] { grid-column: 1 / -1; width: auto; border: 0; padding: 0 0 6px; }
  .compare td { border: 0; padding: 8px 10px; width: auto !important; font-size: 15px; }
  .compare td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
}
/* Narrow phones: the hat label puts one value per line, so nothing is cut. */
@media (max-width: 420px) {
  .hatbox { grid-template-columns: minmax(0, 1fr); }
}
