/* SR1 Crafts Website - V1.0 stylesheet.
   Brand palette only (checked by scripts/sr1site/checks.py):
   ink #171717, accent #0066FF, paper #FFFFFF, mist #F5F5F5.
   Accent text is used on paper only (4.8:1); on mist, links use ink; on the ink footer, paper. */

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/poppins-latin-700-normal.woff2") format("woff2"); }

:root {
  --ink: #171717;
  --accent: #0066FF;
  --paper: #FFFFFF;
  --mist: #F5F5F5;
  --ink-soft: rgba(23, 23, 23, 0.74);
  --line: rgba(23, 23, 23, 0.12);
  --line-strong: rgba(23, 23, 23, 0.28);
  --paper-soft: rgba(255, 255, 255, 0.78);
  --paper-line: rgba(255, 255, 255, 0.16);
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(23, 23, 23, 0.06), 0 8px 24px rgba(23, 23, 23, 0.06);
  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(3.5rem, 8vw, 6.5rem);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
picture { display: block; }

h1, h2, h3 { line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
.section-muted a:not(.button) { color: var(--ink); }
.site-footer a:not(.button) { color: var(--paper); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.button:focus-visible { outline-color: var(--ink); }
main:focus { outline: none; }

.visually-hidden {
  position: absolute !important; 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: 1rem; top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 0.75rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; color: var(--paper); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }

.preview-banner {
  background: var(--ink); color: var(--paper); text-align: center;
  font-size: 0.82rem; font-weight: 500; padding: 0.45rem 1rem;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px; padding: 0.65rem 1.25rem;
  font: inherit; font-weight: 600; font-size: 0.95rem; line-height: 1.2;
  border-radius: var(--radius); border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.button-primary { background: var(--accent); color: var(--paper); }
.button-primary:hover { background: var(--ink); color: var(--paper); }
.button-secondary { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.button-secondary:hover { background: var(--ink); color: var(--paper); }
.button-large { min-height: 52px; padding: 0.85rem 1.6rem; font-size: 1rem; }
.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.text-link { font-weight: 600; }

/* ---------- Header and navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: var(--header-h); flex-wrap: wrap;
}
.brand { display: inline-flex; padding: 0.4rem 0; }
.header-logo { width: 110px; height: auto; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; padding: 0.5rem 0.9rem;
  font: inherit; font-weight: 600; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer;
}
.nav-toggle[hidden] { display: none; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; content: "";
  transition: transform 0.2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav { width: 100%; }
.nav-list, .submenu { list-style: none; margin: 0; padding: 0; }
.nav-list { padding: 0.5rem 0 1.25rem; }
.nav-list > li { border-top: 1px solid var(--line); }
.nav-list a:not(.button) {
  display: block; padding: 0.8rem 0.25rem; color: var(--ink); text-decoration: none; font-weight: 500;
}
.nav-list a[aria-current="page"], .has-submenu.is-active > .submenu-row > a { color: var(--accent); }
.nav-list a:not(.button):hover { color: var(--accent); }
.submenu-row { display: flex; align-items: center; justify-content: space-between; }
.submenu-row > a { flex: 1; }
.submenu-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  color: var(--ink); background: transparent; border: 0; border-radius: var(--radius); cursor: pointer;
}
.submenu-toggle[hidden] { display: none; }
.submenu-toggle[aria-expanded="true"] .icon-chevron { transform: rotate(180deg); }
.icon-chevron { transition: transform 0.2s ease; }
.submenu { padding: 0 0 0.5rem 1rem; }
.submenu a:not(.button) { padding: 0.55rem 0.25rem; font-weight: 400; }
.nav-cta { padding-top: 1rem; border-top: 0 !important; }
.nav-cta .button { width: 100%; }

/* With JavaScript: collapsible menus. Without it, everything stays visible. */
.js .site-nav { display: none; }
.js .site-nav.is-open { display: block; }
.js .submenu { display: none; }
.js .has-submenu.is-open .submenu { display: block; }

@media (min-width: 960px) {
  .header-inner { flex-wrap: nowrap; }
  .header-logo { width: 128px; }
  .nav-toggle { display: none !important; }
  .site-nav, .js .site-nav { display: block; width: auto; }
  .nav-list { display: flex; align-items: center; gap: 0.25rem; padding: 0; }
  .nav-list > li { border-top: 0; position: relative; }
  .nav-list a:not(.button) { padding: 0.5rem 0.8rem; border-radius: var(--radius); }
  .submenu-row > a { padding-right: 0.1rem !important; }
  .submenu-toggle { width: 32px; height: 40px; }
  .submenu, .js .submenu {
    display: none; position: absolute; top: calc(100% + 0.35rem); left: 0; min-width: 280px;
    padding: 0.5rem; background: var(--paper); border: 1px solid var(--line);
    border-radius: var(--radius-lg); box-shadow: var(--shadow);
  }
  .has-submenu:hover .submenu, .has-submenu:focus-within .submenu,
  .js .has-submenu.is-open .submenu { display: block; }
  .has-submenu::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 0.5rem; }
  .submenu a:not(.button) { padding: 0.6rem 0.8rem; }
  .nav-cta { padding: 0 0 0 0.75rem; }
  .nav-cta .button { width: auto; }
}

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
.section-tight { padding: clamp(2rem, 5vw, 3.5rem) 0 var(--section); }
.section-muted { background: var(--mist); }
.section-head { max-width: 680px; margin-bottom: 2.5rem; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

.eyebrow {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.eyebrow a { color: inherit; text-decoration: none; }
.lead { font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--ink-soft); }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0; }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-copy h1 { margin-bottom: 0.45em; }
.hero-copy .lead { max-width: 34ch; }
.hero-figure { margin: 0; position: relative; }
.hero-image, .hero-media .photo-placeholder {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-lg); background: var(--mist);
}
.hero-figure figcaption {
  position: absolute; left: 1rem; bottom: 1rem; padding: 0.35rem 0.8rem;
  font-size: 0.85rem; font-weight: 500; color: var(--ink); background: var(--paper);
  border-radius: 999px; box-shadow: var(--shadow);
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1fr 1.05fr; }
}

/* ---------- Cards ---------- */
.card-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) {
  .card-grid { grid-template-columns: repeat(4, 1fr); }
  .card-grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; transition: box-shadow 0.2s ease, transform 0.2s ease; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-link { display: flex; flex-direction: column; height: 100%; color: var(--ink) !important; text-decoration: none; }
.card-media img, .card-media .photo-placeholder { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-media { background: var(--mist); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem 1.25rem 1.4rem; }
.card-title { font-size: 1.1rem; margin-bottom: 0.4rem; }
.card-text { color: var(--ink-soft); font-size: 0.95rem; flex: 1; }
.card-cta { font-weight: 600; font-size: 0.92rem; color: var(--accent); }
.section-muted .card-cta { color: var(--accent); }

/* ---------- Placeholders (preview only; production builds refuse them) ---------- */
.photo-placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 1rem;
  background: var(--mist); color: var(--ink-soft); font-size: 0.85rem; font-weight: 500;
  border: 2px dashed var(--line-strong);
}
.card .photo-placeholder { border-width: 0 0 2px; }
.placeholder, .placeholder-block {
  color: var(--ink); background: var(--paper); border: 1px dashed var(--line-strong);
  border-radius: 6px; font-size: 0.88em; font-weight: 500;
}
.placeholder { padding: 0.05rem 0.4rem; }
.placeholder-block { padding: 0.6rem 0.8rem; }

/* ---------- Story ---------- */
.story-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.story-copy p { font-size: 1.05rem; }
.pillars { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.pillar { padding: 1.25rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent); }
.pillar-title { font-size: 1.02rem; margin-bottom: 0.25rem; }
.pillar p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
@media (min-width: 640px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .story-grid { grid-template-columns: 1fr 1.1fr; align-items: start; } }

/* ---------- Where to buy ---------- */
.buy-grid { display: grid; gap: 1.5rem; }
@media (min-width: 800px) { .buy-grid { grid-template-columns: 1.15fr 1fr; } }
.buy-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3.5vw, 2.25rem); }
.buy-card-primary { border: 2px solid var(--accent); }
.buy-card h3 { font-size: 1.45rem; }
.buy-card .button { margin-top: 0.5rem; }
.buy-kicker { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 0.4rem; color: var(--ink-soft); }

/* ---------- Inner pages ---------- */
.page-intro { padding: clamp(2rem, 5vw, 3.5rem) 0 0; }
.page-intro-compact { padding-bottom: 0; }
.page-intro .lead, .intro-text { max-width: 70ch; }
.intro-text p { font-size: 1.05rem; color: var(--ink-soft); }
.breadcrumb ol { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap;
  gap: 0.35rem; font-size: 0.85rem; color: var(--ink-soft); }
.breadcrumb li + li::before { content: "/"; margin-right: 0.35rem; color: var(--line-strong); }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 500; }

.empty-state { padding: clamp(2rem, 5vw, 3rem); background: var(--mist); border-radius: var(--radius-lg);
  max-width: 720px; }
.empty-state h2 { font-size: 1.4rem; }
.empty-state a:not(.button) { color: var(--ink); }

.product-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 960px) { .product-grid { grid-template-columns: 1.1fr 1fr; } }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.gallery img { width: 100%; border-radius: var(--radius-lg); background: var(--mist); }
.product-gallery .photo-placeholder { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); }
@media (min-width: 960px) { .product-info { position: sticky; top: calc(var(--header-h) + 1.5rem); } }
.product-info h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.product-price { font-size: 1.35rem; font-weight: 600; }
.badge { display: inline-block; padding: 0.2rem 0.7rem; border-radius: 999px; font-size: 0.8rem;
  font-weight: 600; background: var(--mist); }
.product-description { margin: 1.5rem 0; }
.buy-box { padding: 1.5rem; background: var(--mist); border-radius: var(--radius-lg); margin-bottom: 1.5rem; }
.buy-note { margin: 0.75rem 0 0; font-size: 0.9rem; color: var(--ink-soft); }

.prose p { font-size: 1.05rem; }
.signature { font-weight: 600; }
.prose .statement { margin: 2rem 0; padding: 1.1rem 1.5rem; border-left: 4px solid var(--accent);
  background: var(--mist); border-radius: 0 var(--radius-lg) var(--radius-lg) 0; font-size: 1.2rem; }
.story-copy .statement { font-size: 1.1rem; }

.contact-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 640px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }
.contact-card { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.contact-card h2 { font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.4rem; }
.contact-card p { margin: 0; font-size: 1.1rem; font-weight: 500; word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding-top: clamp(3rem, 6vw, 4.5rem); font-size: 0.95rem; }
.site-footer :focus-visible { outline-color: var(--paper); }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-logo { width: 150px; margin-bottom: 1rem; }
.footer-logo-link { display: inline-block; }
.footer-tagline { font-weight: 600; max-width: 30ch; }
.footer-heading { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.8rem;
  color: var(--paper-soft); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.45rem; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.25rem; padding-bottom: 1.5rem;
  border-top: 1px solid var(--paper-line); font-size: 0.85rem; color: var(--paper-soft); }
.footer-bottom p { margin: 0; }

/* ---------- Soft-launch content blocks (SR1-WEB-003) ---------- */
.section-tight.section-muted { padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-tight:not(.section-muted) + .section-tight:not(.section-muted) { padding-top: 0; }
.section-muted + .section-tight { padding-top: clamp(2rem, 5vw, 3.5rem); }
.hero-note { font-weight: 500; margin-top: -0.25rem; }
.tagline { font-size: clamp(1.1rem, 2vw, 1.3rem); font-weight: 600; margin-bottom: 1.25rem; }
.story-copy .statement, .intro-text .statement { color: var(--ink); }

.brand-panel { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3;
  background: var(--mist); }
.brand-panel img { width: 72px; height: 72px; opacity: 0.9; }
.hero-media .brand-panel { border-radius: var(--radius-lg); }
.hero-figure > a { display: block; border-radius: var(--radius-lg); }

.highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 640px) { .highlights { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .highlights { grid-template-columns: repeat(4, 1fr); } }
.highlights-item { background: var(--paper); padding: 1.25rem 1.4rem; border-radius: var(--radius-lg);
  border-top: 4px solid var(--accent); }
.highlights-title { font-size: 1.02rem; margin-bottom: 0.3rem; }
.highlights-item p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

.detail-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 960px) { .detail-grid { grid-template-columns: 1fr 1.1fr; } }
.gallery-figure { margin: 0; }
.content-section + .content-section { margin-top: 2.5rem; }
.content-section h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.included { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.75rem; }
.included-item { padding: 1rem 1.25rem; border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); }
.included-title { font-size: 1rem; margin-bottom: 0.2rem; }
.included-item p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

.coming-soon, .note-box { padding: clamp(1.5rem, 4vw, 2.25rem); background: var(--mist); border-radius: var(--radius-lg);
  max-width: 720px; }
.coming-soon h2 { font-size: 1.35rem; }
.note-box { margin-top: 1.5rem; }
.note-box p { color: var(--ink); }

.original-label { display: inline-block; margin: 0 0 0.6rem; padding: 0.15rem 0.65rem; font-size: 0.72rem;
  font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 999px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
