@import url('../fonts/fonts.css');

/* ============================================================================
   THE LINEN PRESS — Edelweiss Embroidery, Prototype A
   Heirloom atelier / quiet luxury. Engraved-stationery discipline.
   Mobile-first: base styles target 375px; 768 + 1440 are enhancements.
   ========================================================================== */

:root {
  /* palette */
  --bone: #F7F4EE;
  --flax: #E9E2D4;
  --ink: #1E2A3A;
  --ink-soft: #2A3646;
  --brass: #A5804A;        /* jewelry: hairlines, cartouche, large accents */
  --brass-text: #8A6A34;   /* AA small brass text on light (4.56:1) */
  --brass-on-ink: #C6A56A; /* brass text/rules on the dark footer (6.21:1) */
  --porcelain: #9FB4C7;    /* sparing, decorative */
  --meta: #55606E;         /* muted labels on light (5.82:1) */
  --hair: rgba(30, 42, 58, 0.24);   /* ink hairline */
  --hair-strong: rgba(30, 42, 58, 0.55);
  --hair-onink: rgba(198, 165, 106, 0.42);

  /* type */
  --f-display: 'Cormorant', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --f-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  --step-eyebrow: 0.6875rem; /* 11px */
  --lh-body: 1.65;

  /* layout */
  --wrap: 1160px;
  --wrap-narrow: 760px;
  --gutter: 20px;
  --sect-y: 68px;
}

@media (min-width: 768px) {
  :root { --gutter: 40px; --sect-y: 104px; }
}
@media (min-width: 1440px) {
  :root { --sect-y: 128px; }
}

/* ── reset / base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;         /* 17px */
  line-height: var(--lh-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; }

::selection { background: rgba(165, 128, 74, 0.22); }

:focus-visible {
  outline: 2px solid var(--brass-text);
  outline-offset: 3px;
}
/* on the dark footer, brass-on-ink focus reads better */
.site-footer :focus-visible { outline-color: var(--brass-on-ink); }

/* ── layout primitives ────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: var(--wrap-narrow); }
.section { padding-block: var(--sect-y); }
.section--flax { background: var(--flax); }
.section--ink { background: var(--ink); color: var(--bone); }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

/* engraved hairline rules */
.rule { border: 0; border-top: 1px solid var(--hair); margin: 0; }
.rule--brass { border-top-color: var(--brass); }
.rule--short { width: 54px; margin-inline: auto; border-top-color: var(--brass); }

/* ── typography ───────────────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--f-body);
  font-size: var(--step-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--meta);
  margin: 0;
}
.eyebrow--brass { color: var(--brass-text); }
.eyebrow--onink { color: var(--brass-on-ink); }

.display {
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.section--ink .display { color: var(--bone); }

.d-hero  { font-size: clamp(2.25rem, 11.5vw, 6.5rem); font-weight: 500; letter-spacing: -0.025em; }
.d-1     { font-size: clamp(2.2rem, 8.5vw, 3.9rem); }
.d-2     { font-size: clamp(1.7rem, 6vw, 2.6rem); }
.d-3     { font-size: clamp(1.35rem, 4.5vw, 1.7rem); font-weight: 600; letter-spacing: -0.01em; }
.italic  { font-style: italic; font-weight: 500; }

.lede {
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 46ch;
}
.center .lede { margin-inline: auto; }
@media (min-width: 768px) { .lede { font-size: 1.3125rem; } }

.prose p { max-width: 62ch; }
.prose p + p { margin-top: 1.1em; }
.prose--center p { margin-inline: auto; }

.meta { color: var(--meta); font-size: 0.9375rem; }
.price {
  font-family: var(--f-body);
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-variant-numeric: lining-nums;
  color: var(--ink);
}
.price small { font-family: var(--f-body); font-size: 0.8125rem; font-weight: 400; color: var(--meta); letter-spacing: 0.02em; }

/* ── buttons: ghost / outline only, hard corners ──────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--f-body);
  font-size: var(--step-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.95em 1.9em;
  cursor: pointer;
  transition: background-color .28s ease, color .28s ease, border-color .28s ease;
}
.btn:hover { background: var(--ink); color: var(--bone); }
.btn--brass { border-color: var(--brass); color: var(--brass-text); }
.btn--brass:hover { background: var(--brass-text); color: var(--bone); border-color: var(--brass-text); } /* bone on brass-text #8A6A34 = 4.56:1 (AA) */
.btn--onink { border-color: var(--brass-on-ink); color: var(--bone); }
.btn--onink:hover { background: var(--brass-on-ink); color: var(--ink); }
.btn--block { width: 100%; }
.btn--sm { padding: 0.7em 1.3em; }

.link-quiet {
  font-size: var(--step-eyebrow);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--brass-text); text-decoration: none;
  border-bottom: 1px solid var(--brass);
  padding-bottom: 2px;
  transition: color .2s ease, border-color .2s ease;
}
.link-quiet:hover { color: var(--ink); border-color: var(--ink); }
.section--ink .link-quiet { color: var(--brass-on-ink); border-color: var(--hair-onink); }
.section--ink .link-quiet:hover { color: var(--bone); border-color: var(--bone); }

/* inline text link */
.tlink { color: var(--brass-text); text-decoration: none; border-bottom: 1px solid var(--hair-strong); padding-bottom: 1px; }
.tlink:hover { color: var(--ink); border-color: var(--ink); }

/* ── site header / nav (sticky, minimal) ──────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bone) 92%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hair);
}
.nav {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 8px; padding-block: 9px;
}
.nav__brand {
  grid-column: 2; justify-self: center;
  font-family: var(--f-display); font-weight: 600; font-size: 1.35rem;
  letter-spacing: 0.02em; color: var(--ink); text-decoration: none; text-align: center;
  line-height: 1;
}
.nav__brand span {
  display: block; font-family: var(--f-body); font-size: 0.5rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.34em; color: var(--brass-text);
  margin-top: 5px;
}
.nav__cart {
  grid-column: 3; justify-self: end; position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink); text-decoration: none; padding: 6px;
}
.nav__cart svg { width: 20px; height: 20px; display: block; }
.nav__cart-count {
  font-family: var(--f-body); font-size: 0.625rem; font-weight: 700;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 0;
  border: 1px solid var(--brass); color: var(--brass-text);
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.nav__links {
  grid-column: 1 / -1; grid-row: 2;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 18px;
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--hair);
  list-style: none; padding-inline: 0;
}
.nav__links a {
  font-size: 0.625rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--ink); text-decoration: none;
  padding-bottom: 3px; border-bottom: 1px solid transparent;
}
.nav__links a:hover { border-bottom-color: var(--brass); }
.nav__links a[aria-current="page"] { color: var(--brass-text); border-bottom-color: var(--brass); }

@media (min-width: 768px) {
  .nav { grid-template-columns: 1fr auto 1fr; padding-block: 18px; }
  .nav__brand { font-size: 1.6rem; }
}
/* inline nav only once the 1fr column can hold all four links on one line;
   below this the roomy centered stacked row is used (fixes the 768px wrap where
   "The Proof" dropped onto a second, left-aligned line). */
@media (min-width: 900px) {
  .nav__links {
    grid-column: auto; grid-row: auto; order: -1; justify-self: start;
    margin-top: 0; padding-top: 0; border-top: 0; gap: 26px; justify-content: flex-start;
  }
  .nav__links a { font-size: 0.6875rem; }
}

/* ── hero (home) ──────────────────────────────────────────────────────────── */
.hero { padding-block: 14px 44px; text-align: center; }
.hero__cartouche { margin: 0 auto 16px; width: min(116px, 32vw); }
.hero__eyebrow { margin-bottom: 12px; }
.hero__title { margin-bottom: 14px; }
.hero__lede { margin: 0 auto 22px; font-size: 1.0625rem; line-height: 1.55; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
@media (min-width: 768px) {
  .hero { padding-block: 56px 88px; }
  .hero__cartouche { width: 264px; margin-bottom: 26px; }
  .hero__eyebrow { margin-bottom: 20px; }
  .hero__title { margin-bottom: 18px; }
  .hero__lede { margin: 0 auto 30px; font-size: 1.3125rem; line-height: 1.6; }
}

/* ── the cartouche crest (SVG) ────────────────────────────────────────────── */
.cartouche { display: block; width: 100%; height: auto; overflow: visible; }
.cartouche .c-plate { fill: none; stroke: var(--hair-strong); stroke-width: 1; }
.cartouche .c-oval  { fill: none; stroke: var(--brass); stroke-width: 1.4; }
.cartouche .c-flourish { fill: none; stroke: var(--brass); stroke-width: 1.2; }
.cartouche .c-mono { fill: var(--ink); }
.cartouche .cipher-back { fill: var(--brass); opacity: 0.82; }
.cartouche .cipher-front { fill: var(--ink); }
.cartouche .c-tick { fill: var(--brass); }

/* draw + settle: default = complete/static (reduced-motion & no-JS safe) */
.cartouche .c-oval { stroke-dasharray: 1; stroke-dashoffset: 0; }
.cartouche .c-plate, .cartouche .c-flourish { stroke-dasharray: 1; stroke-dashoffset: 0; }
.cartouche .c-mono, .cartouche .c-tick { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .cartouche--animate .c-oval { animation: ew-draw 2.1s cubic-bezier(.65,.02,.28,1) forwards; }
  .cartouche--animate .c-plate { animation: ew-draw 1.4s ease .15s forwards; }
  .cartouche--animate .c-flourish { animation: ew-draw 1s ease 1.35s both; }
  .cartouche--animate .c-mono { animation: ew-settle 1.1s ease 1.15s both; }
  .cartouche--animate .c-tick { animation: ew-settle 0.9s ease 1.7s both; }
  @keyframes ew-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  @keyframes ew-settle { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
}

/* global reduced-motion gate: neutralize ALL animations + transitions site-wide
   (product-card zoom, buttons, segmented control, thumbnails, swatches, etc.).
   The cartouche default state above is already static-complete, so disabling the
   animation leaves the crest fully drawn. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ── order-tiers (Quick Ship vs Custom) ───────────────────────────────────── */
.tiers { display: grid; gap: 0; margin-top: 34px; }
.tier {
  position: relative; padding: 30px 4px 6px; text-align: center;
  border-top: 1px solid var(--hair);
}
.tier__kicker { margin-bottom: 12px; }
.tier__title { margin-bottom: 12px; }
.tier__body { color: var(--ink-soft); max-width: 40ch; margin: 0 auto 20px; }
.tier__link { }
@media (min-width: 768px) {
  .tiers { grid-template-columns: 1fr 1fr; gap: 0; }
  .tier { padding: 8px 34px 8px; border-top: 0; text-align: left; }
  .tier + .tier { border-left: 1px solid var(--hair); }
  .tier__body { margin-left: 0; }
}

/* ── plate (engraved image frame) ─────────────────────────────────────────── */
.plate { margin: 0; }
.plate__frame {
  position: relative; border: 1px solid var(--hair-strong); background: var(--bone);
  padding: 8px;
}
.plate__frame img { width: 100%; }
.plate--flush .plate__frame { padding: 0; }
.plate__cap {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin-top: 12px;
}
.plate__no {
  font-size: var(--step-eyebrow); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--brass-text);
}
.plate__label { font-size: var(--step-eyebrow); font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: var(--meta); }

/* ── catalog grid (shop / featured) ───────────────────────────────────────── */
.catalog { display: grid; gap: 40px 26px; grid-template-columns: 1fr; margin-top: 40px; }
@media (min-width: 620px) { .catalog { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .catalog { grid-template-columns: 1fr 1fr 1fr; } }
/* four-tile collections: 4-up on wide (no 3+1 orphan), 2×2 on medium, stack on mobile */
@media (min-width: 980px) { .catalog--four { grid-template-columns: repeat(4, 1fr); } }

.card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.card__frame {
  position: relative; border: 1px solid var(--hair-strong); background: var(--bone);
  overflow: hidden;
}
.card__frame img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  transition: transform 1.1s cubic-bezier(.2,.7,.2,1);
}
.card:hover .card__frame img { transform: scale(1.035); }
.card__tag {
  position: absolute; top: 10px; left: 10px;
  font-size: 0.5625rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em;
  padding: 5px 9px; background: color-mix(in srgb, var(--bone) 88%, transparent);
  border: 1px solid var(--hair-strong); color: var(--ink);
}
.card__tag--custom { color: var(--brass-text); border-color: var(--brass); }
.card__body { padding-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.card__title { font-family: var(--f-body); font-size: 1.0625rem; font-weight: 600; font-variant: small-caps; letter-spacing: 0.06em; line-height: 1.2; color: var(--ink); }
.card__meta { color: var(--meta); font-size: 0.875rem; }
.card__price { font-family: var(--f-body); font-size: 1.0625rem; font-weight: 600; letter-spacing: 0.01em; font-variant-numeric: lining-nums; margin-top: 4px; color: var(--ink); }
.card:hover .card__title { color: var(--brass-text); }

/* two-column feature (image + text) */
.feature { display: grid; gap: 32px; align-items: center; }
@media (min-width: 860px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; }
  .feature--flip .feature__media { order: 2; }
}
.feature__body { max-width: 48ch; }
.feature__body > * + * { margin-top: 18px; }

/* proof-promise banner block */
.promise-band { text-align: center; }
.promise-band .display { max-width: 20ch; margin-inline: auto; }

/* ── steps (proof page) ───────────────────────────────────────────────────── */
.steps { display: grid; gap: 0; margin-top: 44px; counter-reset: step; }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start;
  padding: 26px 0; border-top: 1px solid var(--hair);
}
.step:last-child { border-bottom: 1px solid var(--hair); }
.step__no {
  font-family: var(--f-display); font-weight: 500; font-size: 2.4rem; line-height: 1;
  color: var(--brass); font-feature-settings: "lnum"; min-width: 1.6em;
}
.step__title { font-family: var(--f-display); font-size: 1.4rem; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.step__body { color: var(--ink-soft); max-width: 56ch; }
@media (min-width: 768px) {
  .step { grid-template-columns: 90px 1fr; gap: 34px; padding: 34px 0; }
  .step__no { font-size: 3.2rem; }
}

/* ── accordions ───────────────────────────────────────────────────────────── */
.acc { border-top: 1px solid var(--hair); }
.acc:last-of-type { border-bottom: 1px solid var(--hair); }
.acc > summary {
  list-style: none; cursor: pointer; padding: 20px 2px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--f-display); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.005em;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc__sign { position: relative; width: 14px; height: 14px; flex: none; }
.acc__sign::before, .acc__sign::after {
  content: ""; position: absolute; background: var(--brass); transition: transform .3s ease;
}
.acc__sign::before { top: 6px; left: 0; width: 14px; height: 1.5px; }
.acc__sign::after { left: 6px; top: 0; width: 1.5px; height: 14px; }
.acc[open] .acc__sign::after { transform: scaleY(0); }
.acc__panel { padding: 0 2px 22px; color: var(--ink-soft); max-width: 64ch; }
.acc__panel > * + * { margin-top: 0.9em; }
.acc__panel ul { margin: 0; padding-left: 1.2em; }
.acc__panel li + li { margin-top: 6px; }

/* ── gallery (PDP) ────────────────────────────────────────────────────────── */
.gallery { display: grid; gap: 12px; }
.gallery__main { grid-column: 1 / -1; }
.gallery__thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── footer ───────────────────────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: var(--bone); padding-block: 56px 30px; }
.site-footer a { color: var(--bone); }
.footer__grid { display: grid; gap: 34px; }
.footer__brand-name { font-family: var(--f-display); font-size: 1.7rem; font-weight: 600; letter-spacing: 0.01em; }
.footer__tag { color: var(--porcelain); max-width: 34ch; margin-top: 10px; font-size: 0.9375rem; }
.footer__col h3 { font-size: var(--step-eyebrow); font-weight: 600; text-transform: uppercase; letter-spacing: 0.2em; color: var(--brass-on-ink); margin-bottom: 14px; }
.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col li + li { margin-top: 9px; }
.footer__col a { text-decoration: none; font-size: 0.9375rem; color: color-mix(in srgb, var(--bone) 82%, var(--ink)); }
.footer__col a:hover { color: var(--bone); }
.footer__rule { border: 0; border-top: 1px solid var(--hair-onink); margin: 34px 0 20px; }
.footer__base { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; align-items: baseline; }
.footer__fine { font-size: 0.8125rem; color: var(--porcelain); }
.footer__proto { font-size: 0.8125rem; color: color-mix(in srgb, var(--bone) 70%, var(--ink)); }
.footer__proto a { color: var(--brass-on-ink); text-decoration: none; border-bottom: 1px solid var(--hair-onink); }
.footer__proto a:hover { color: var(--bone); }
@media (min-width: 768px) {
  .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 44px; }
}

/* ── utility ──────────────────────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bone); padding: 10px 16px;
  text-decoration: none; font-size: var(--step-eyebrow); text-transform: uppercase; letter-spacing: 0.16em;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }
