/* Agent Couture.
 *
 * The palette, type and layout are the approved design system from the brief: a warm
 * near-black canvas, hairline dividers, one restrained gold, generous space. The visual
 * identity is controlled on purpose; the copy is what disrupts.
 *
 * What is new here against the design handoff is the vote control — the counter, the
 * progress line and the three states a piece can be in (wanted, in production, buyable).
 * It is styled as catalog information rather than as a call to action, because that is what
 * it is: a piece at 12 of 25 is reporting a fact, not shouting for a click.
 */

:root {
  --bg: #0e0e0d;
  --surface: #151514;
  --raised: #1c1c1a;
  --border: #262624;
  --text: #f1ede4;
  --secondary: #a9a599;
  --gold: #d9b85a;
  --accent: #f7e7a0;
  /* The one non-brand hue in the system. Used for a piece that has passed the line and for
   * nothing else — not as decoration, and never as the only way a state is signalled. */
  --made: #8fbf8a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 95px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
img { max-width: 100%; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
}

/* The honeypot. Off-screen rather than display:none, because some bots skip what is not
 * rendered — and hidden from assistive technology by aria-hidden on the wrapper, so nobody
 * is ever asked to fill in a field that exists to be left empty. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

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

.announcement {
  padding: 13px 4%;
  background: #1c1b15;
  border-bottom: 1px solid #3a3423;
  display: flex; justify-content: space-between; gap: 15px;
  font: 10px monospace; letter-spacing: 1.3px;
}
.announcement span { color: var(--secondary); }
.announcement a { color: var(--accent); }

header {
  padding: 26px 4%;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 5;
}
header nav { display: flex; gap: 36px; font-size: 13px; }
header nav a { color: var(--secondary); }
header nav a:hover { color: var(--text); }

.couture-brand { display: flex; flex-direction: column; gap: 9px; }
.couture-brand strong { font-size: 21px; letter-spacing: 2px; font-weight: 500; }
.couture-brand > span {
  display: flex; align-items: center; gap: 7px;
  font: 7px monospace; letter-spacing: 1px; color: var(--secondary);
}
.couture-brand > span img { width: 85px; height: auto; display: block; }

.bag-button { background: none; border: 0; font-size: 13px; white-space: nowrap; }
.bag-button span {
  display: inline-grid; place-items: center;
  border: 1px solid #494535; border-radius: 50%;
  width: 25px; height: 25px; margin-left: 10px;
  color: var(--accent); font-size: 11px;
}

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

.hero { display: grid; grid-template-columns: 1fr 1.1fr; min-height: 650px; }
.hero-copy { padding: 64px 8% 24px; display: flex; flex-direction: column; align-items: flex-start; }

.eyebrow { font: 10px monospace; letter-spacing: 2px; color: var(--gold); margin: 0; }

h1 {
  font-size: clamp(47px, 5.9vw, 92px);
  font-weight: 500; letter-spacing: -3px; line-height: 1.02;
  margin: 40px 0 18px;
}
h1 em { font-size: .87em; letter-spacing: -3px; }
em { font-family: Georgia, serif; font-weight: 400; font-style: italic; color: var(--accent); }

.hero-positioning { font-size: 19px; color: var(--text); margin: 10px 0 0; }
.hero-reason { font-size: 14px; line-height: 1.8; color: var(--secondary); max-width: 300px; margin-top: 15px; }

.primary {
  background: var(--accent); color: #14130f;
  padding: 18px 23px; border: 0;
  display: flex; justify-content: space-between; align-items: center; gap: 45px;
  font-size: 13px;
}
.primary:hover { background: var(--gold); }
.primary:disabled { opacity: .45; cursor: default; }
.hero .primary { margin: 22px 0 48px; }

.hero-foot {
  border-top: 1px solid var(--border); padding-top: 20px; margin-top: auto; width: 100%;
  display: flex; justify-content: space-between; gap: 16px; line-height: 1.6;
  font: 9px monospace; letter-spacing: 1px; color: var(--secondary);
}
.hero-foot span:first-child { max-width: 260px; }

.hero-visual {
  position: relative; overflow: hidden; background: #151510;
  border-left: 1px solid var(--border); display: flex; align-items: center;
}
.hero-visual > img {
  width: 100%; height: 100%; object-fit: cover; object-position: 35% center;
  filter: brightness(1.1); transition: transform 1s;
}
.hero-visual:hover > img { transform: scale(1.035); }
.visual-label { position: absolute; bottom: 30px; left: 30px; right: 30px; display: flex; flex-direction: column; gap: 10px; }
.visual-label span:first-child { font: 9px monospace; letter-spacing: 2px; color: var(--gold); }
.visual-label span:last-child { font-size: 13px; }
.vertical {
  position: absolute; right: 18px; top: 30px; writing-mode: vertical-rl;
  font: 9px monospace; letter-spacing: 2px; color: var(--secondary);
}

.brand-strip {
  border-block: 1px solid var(--border); padding: 22px 4%;
  display: flex; justify-content: space-between; gap: 20px;
  color: var(--secondary); font: 10px monospace; letter-spacing: 1.5px;
}

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

.how, .collection { padding: 85px 4%; }
.how { border-bottom: 1px solid var(--border); }

.section-intro { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 45px; }
.section-intro p { color: var(--secondary); font-size: 13px; line-height: 1.7; margin: 0; }

h2 { font-size: clamp(32px, 4vw, 55px); font-weight: 400; letter-spacing: -2px; margin: 16px 0 0; }

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--border);
}
.steps li { padding: 35px 30px 40px; border-right: 1px solid var(--border); }
.steps li:first-child { padding-left: 0; }
.steps li:last-child { border-right: 0; }
.step-number { font: 9px monospace; letter-spacing: 2px; color: var(--gold); }
.steps h3 { font-size: 21px; font-weight: 400; margin: 22px 0 12px; letter-spacing: -.3px; }
.steps h3 strong { font-weight: 400; color: var(--accent); }
.steps p { color: var(--secondary); font-size: 13px; line-height: 1.8; margin: 0; }

.fine { color: var(--secondary); font-size: 12px; line-height: 1.8; margin: 25px 0 0; max-width: 60ch; }
.fine strong { font-weight: 400; color: var(--text); }

/* ── Filters ────────────────────────────────────────────────────────────────────────── */

.categories { display: flex; gap: 30px; border-bottom: 1px solid var(--border); overflow: auto; }
.categories button {
  white-space: nowrap; background: none; border: 0;
  border-bottom: 2px solid transparent; padding: 0 0 19px;
  font-size: 13px; color: var(--secondary);
}
.categories button.active { color: var(--accent); border-color: var(--accent); }

.toolbar { display: flex; align-items: center; gap: 15px; padding: 25px 0 30px; flex-wrap: wrap; }
.toolbar input, .toolbar select { color: var(--secondary); background: transparent; border: 0; font-size: 12px; padding: 8px; }
.toolbar select { border: 1px solid var(--border); max-width: 210px; }
.toolbar option { background: var(--surface); color: var(--text); }
.search { margin-right: auto; display: flex; align-items: center; border-bottom: 1px solid var(--border); }
.search span { font-size: 24px; color: var(--secondary); }
.search input { width: 180px; }
.toolbar > span { font: 10px monospace; color: var(--secondary); margin-left: 10px; }

.notice { font-size: 13px; color: var(--secondary); padding: 15px; border: 1px solid var(--border); line-height: 1.7; }

/* ── The grid ───────────────────────────────────────────────────────────────────────── */

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 22px; }

.product { min-width: 0; display: flex; flex-direction: column; }

/* The heading carries no style of its own: it is here so the grid has a heading per piece
 * and the button is its content, which is the only way to have both and stay valid. */
.product-heading { margin: 0; font-weight: 400; font-size: inherit; }
.product-open { background: none; border: 0; text-align: left; padding: 0; display: block; width: 100%; }
/* display:block matters: this is a <span>, because it lives inside the button that opens
 * the piece and a button takes phrasing content only. Left inline, aspect-ratio does
 * nothing and the image collapses. */
.product-image {
  display: block; overflow: hidden; position: relative;
  background: var(--surface); aspect-ratio: 1.34;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
.product-open:hover img { transform: scale(1.04); }
.product-image .arrow {
  position: absolute; bottom: 15px; right: 15px;
  display: grid; place-items: center;
  background: #1c1c1acc; border: 1px solid #514b37;
  width: 33px; height: 33px; color: var(--accent);
}

.product-line {
  display: block; padding-top: 17px;
  font: 9px monospace; letter-spacing: 1.2px; color: var(--secondary);
}
.product-title { display: block; font-size: 16px; margin-top: 9px; line-height: 1.35; }

/* The vote control. Counter first, button second: the number is the information and the
 * button is the response to it. */
.want { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }

.tally { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font: 10px monospace; letter-spacing: 1px; }
.tally-count { color: var(--text); }
.tally-count b { font-weight: 400; color: var(--accent); font-size: 13px; }
.tally-state { color: var(--secondary); }
.made .tally-count b, .made .tally-state { color: var(--made); }

/* A meter, not a progress bar: this reports a measured value against a target. aria-hidden
 * because the same numbers are in .tally as text, and a bar read aloud adds nothing. */
.bar { height: 2px; background: var(--border); position: relative; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--gold); transition: width .4s; display: block; }
.made .bar i { background: var(--made); }

.want-button {
  background: transparent; border: 1px solid #4b483d; color: var(--text);
  padding: 12px 15px; font-size: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.want-button:hover { border-color: var(--accent); color: var(--accent); }
.want-button[aria-pressed="true"] { border-color: #3c4a39; color: var(--made); }
.want-button:disabled { opacity: .5; cursor: default; }
.want-button.buy { background: var(--accent); color: #14130f; border-color: var(--accent); }
.want-button.buy:hover { background: var(--gold); border-color: var(--gold); }

.price-was { color: #6f6b60; text-decoration: line-through; margin-right: 6px; }

.load-more { display: block; margin: 50px auto 0; background: transparent; border: 1px solid #4b483d; padding: 16px 35px; font-size: 12px; min-width: 240px; }
.load-more span { margin-left: 50px; }
.catalog-note { text-align: center; color: var(--secondary); font-size: 11px; margin-top: 25px; line-height: 1.7; }
.empty { padding: 60px; text-align: center; color: var(--secondary); }
.empty button { background: none; border: 0; text-decoration: underline; }

/* ── Campaign, story, closing ───────────────────────────────────────────────────────── */

.campaign { padding: 10px 4% 75px; }
.campaign-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--border); margin-top: 25px; }
.campaign-grid article { padding: 35px 25px 40px; border-right: 1px solid var(--border); }
.campaign-grid article:first-child { padding-left: 0; }
.campaign-grid article:last-child { border-right: 0; }
.campaign-grid article > span { font: 9px monospace; color: var(--secondary); letter-spacing: 1px; }
.campaign-grid h2 { font-size: clamp(24px, 3vw, 45px); letter-spacing: -1.5px; margin-top: 30px; line-height: 1.12; }
.campaign-grid p, .campaign-signature { color: var(--secondary); font-size: 13px; line-height: 1.8; }
.campaign-signature { margin-top: 25px; }

.story { margin: 0 4%; border-block: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; min-height: 480px; }
.story-mark { display: grid; place-items: center; align-content: center; gap: 30px; background: radial-gradient(ellipse, #242116, transparent 65%); }
.story-mark img { width: 45%; max-height: 240px; object-fit: contain; justify-self: center; }
.story-mark > span { font: 9px monospace; letter-spacing: 2px; color: var(--gold); text-align: center; }
.story-copy { padding: 65px 10%; border-left: 1px solid var(--border); }
.story-copy h2 { font-size: clamp(32px, 3.6vw, 52px); }
.story-copy p { color: var(--secondary); font-size: 13px; line-height: 1.9; max-width: 400px; }
.story-copy a { display: inline-block; font-size: 12px; margin-top: 20px; color: var(--accent); border-bottom: 1px solid #6c6036; padding-bottom: 8px; }

.closing { text-align: center; padding: 90px 20px; }
.closing-line { font-size: clamp(50px, 7vw, 100px); letter-spacing: -4px; line-height: 1.1; margin: 24px 0; }
.closing-signature { font: 11px monospace; letter-spacing: 1px; color: var(--secondary); margin-top: 35px; }

footer { padding: 35px 4%; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 35px; font: 9px monospace; color: var(--secondary); letter-spacing: 1px; }
footer img { width: 155px; height: auto; margin-right: auto; }

/* ── Dialogs ────────────────────────────────────────────────────────────────────────── */

dialog { background: var(--bg); color: var(--text); border: 1px solid #494638; padding: 0; max-height: 90vh; }
dialog::backdrop { background: #080807cc; backdrop-filter: blur(5px); }

.close { background: var(--raised); border: 1px solid #494638; width: 35px; height: 35px; font-size: 25px; line-height: 1; z-index: 2; }
.product-dialog { width: 1000px; max-width: 94vw; }
.product-dialog > .close { position: absolute; right: 15px; top: 15px; }

#productContent { display: grid; grid-template-columns: 1.1fr 1fr; }
#productContent > img { width: 100%; height: 100%; min-height: 430px; object-fit: contain; background: var(--surface); }
.detail-copy { padding: 60px 35px 35px; }
.detail-copy h2 { font-size: 36px; line-height: 1.1; margin: 20px 0; }
.detail-copy ul { list-style: none; padding: 0; margin: 25px 0; }
.detail-copy li { font-size: 12px; color: var(--secondary); line-height: 1.7; border-bottom: 1px solid var(--border); padding: 7px 0; }
.detail-copy .want { margin-top: 25px; }
.small { font-size: 11px; line-height: 1.7; color: var(--secondary); }

.vote-dialog { width: 440px; max-width: 94vw; padding: 35px; position: relative; }
.vote-dialog > .close { position: absolute; right: 15px; top: 15px; }
.vote-dialog h2 { font-size: 30px; margin: 16px 0 0; }
.vote-piece { font-size: 13px; color: var(--secondary); margin: 14px 0 25px; line-height: 1.6; }
.vote-dialog label { display: block; font: 9px monospace; letter-spacing: 1.5px; color: var(--secondary); margin-bottom: 9px; }
.vote-dialog input[type="email"] {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); padding: 14px; font-size: 14px;
}
.vote-dialog .primary { width: 100%; margin-top: 22px; }
.form-status { font-size: 12px; line-height: 1.7; margin: 18px 0 0; min-height: 1.2em; color: var(--secondary); }
.form-status[data-tone="ok"] { color: var(--made); }
.form-status[data-tone="bad"] { color: var(--accent); }

.bag-dialog { width: 490px; max-width: 94vw; margin-right: 0; margin-top: 0; max-height: 100vh; height: 100vh; padding: 35px; }
.bag-heading { display: flex; align-items: center; justify-content: space-between; }
.bag-heading h2 { font-size: 36px; }
.selection-note { font-size: 12px; line-height: 1.8; color: var(--secondary); padding: 20px 0; border-bottom: 1px solid var(--border); }
.bag-item { display: flex; gap: 15px; padding: 20px 0; border-bottom: 1px solid var(--border); align-items: center; }
.bag-item img { width: 90px; }
.bag-item div { flex: 1; }
.bag-item h3 { font-size: 13px; font-weight: 400; margin: 0 0 8px; }
.bag-item p { font: 9px monospace; color: var(--secondary); margin: 0; }

#toast {
  position: fixed; bottom: 25px; left: 50%; transform: translate(-50%, 20px);
  background: var(--accent); color: #14130f; font-size: 12px; padding: 15px 25px;
  opacity: 0; pointer-events: none; transition: .2s; z-index: 20; max-width: 90vw;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── The pages a link in an email lands on ──────────────────────────────────────────── */

.interstitial { display: grid; place-items: center; min-height: 100vh; padding: 30px; text-align: center; }
.interstitial main { max-width: 34em; }
.interstitial h1 { font-size: clamp(38px, 7vw, 68px); margin: 25px 0; letter-spacing: -2px; }
.interstitial p { color: var(--secondary); font-size: 14px; line-height: 1.8; }
.interstitial .primary { display: inline-flex; margin-top: 35px; }
.interstitial .signature { font: 10px monospace; letter-spacing: 1px; margin-top: 50px; }

/* ── Responsive ─────────────────────────────────────────────────────────────────────── */

@media (min-width: 1600px) {
  main, header, footer, .announcement { max-width: 1800px; margin-inline: auto; }
}

@media (min-width: 601px) and (max-width: 900px) {
  .hero h1 { font-size: clamp(40px, 6.2vw, 56px); letter-spacing: -2px; }
  .hero h1 em { letter-spacing: -2px; }
  .hero-copy { padding-top: 45px; }
  .hero .eyebrow { font-size: 8px; letter-spacing: 1.3px; }
  .hero-foot { font-size: 8px; }
}

@media (max-width: 900px) {
  .hero { min-height: 590px; }
  .hero-copy { padding: 45px 7% 24px; }
  .hero-visual img { object-position: 20% center; }
  .brand-strip span:nth-child(2), .brand-strip span:nth-child(3) { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li:first-child { padding: 30px 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .steps li:last-child { border-bottom: 0; }
  .categories { gap: 25px; }
  .story-copy { padding: 50px 8%; }
}

@media (max-width: 600px) {
  .announcement { font-size: 8px; padding: 12px 5%; letter-spacing: .7px; }
  .announcement .announcement-id { display: none; }
  header { padding: 20px 5%; }
  header nav { display: none; }
  .couture-brand strong { font-size: 18px; letter-spacing: 1.2px; }
  .couture-brand > span img { width: 75px; }

  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 40px 6% 25px; }
  h1 { font-size: clamp(43px, 11.7vw, 68px); letter-spacing: -2px; margin-top: 30px; }
  h1 em { letter-spacing: -2px; }
  .hero-positioning { font-size: 18px; }
  .hero-reason { max-width: 290px; font-size: 13px; }
  .hero .primary { margin-bottom: 30px; }
  .hero-visual { height: 340px; border-left: 0; border-top: 1px solid var(--border); }
  .hero-visual img { object-position: center; }
  .brand-strip { font-size: 8px; gap: 15px; letter-spacing: .7px; }

  .how, .collection { padding: 55px 5%; }
  .section-intro { display: block; }
  .section-intro p { font-size: 12px; margin-top: 20px; }
  .section-intro h2 { font-size: 37px; }

  .toolbar { gap: 10px; }
  .toolbar .search { width: 100%; margin-bottom: 5px; }
  .search input { width: 100%; }
  .toolbar select { max-width: 155px; font-size: 11px; }
  .toolbar > span { margin-left: auto; }
  .categories button { font-size: 12px; }

  .grid { gap: 30px 12px; }
  .product-image { aspect-ratio: 1.1; }
  .product-title { font-size: 14px; }
  .product-line { font-size: 8px; line-height: 1.5; }
  .product-image .arrow { width: 25px; height: 25px; bottom: 8px; right: 8px; }
  .want-button { padding: 11px 12px; font-size: 11px; }
  .tally { font-size: 9px; }

  .campaign { padding: 0 5% 50px; }
  .campaign-grid { grid-template-columns: 1fr; }
  .campaign-grid article, .campaign-grid article:first-child { padding: 30px 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .campaign-grid article:last-child { border-bottom: 0; }
  .campaign-grid h2 { font-size: 35px; margin-top: 22px; }

  .story { grid-template-columns: 1fr; }
  .story-mark { padding: 30px; }
  .story-mark img { width: 100px; }
  .story-mark > span { font-size: 8px; }
  .story-copy { border-left: 0; border-top: 1px solid var(--border); padding: 40px 6%; }

  .closing { padding: 65px 20px; }
  .closing-line { font-size: 56px; letter-spacing: -2px; }
  .closing-signature { font-size: 10px; }

  footer { flex-wrap: wrap; gap: 22px; padding: 30px 5%; }
  footer img { width: 140px; }
  footer span { font-size: 8px; }

  #productContent { grid-template-columns: 1fr; }
  #productContent > img { height: 280px; min-height: 0; }
  .detail-copy { padding: 30px; }
  .detail-copy h2 { font-size: 30px; }
  .bag-dialog, .vote-dialog { padding: 25px; }
}

/* Someone who has asked not to be moved is not asking for a slower version of the same
 * animation. Transform and opacity transitions go entirely. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .hero-visual:hover > img, .product-open:hover img { transform: none; }
}
