/* ==========================================================================
   365 HAIR HAVEN — stylesheet
   Affordable luxury raw hair | Black & Red, bold & confident

   Structure mirrors the GITG house pattern established on The Rollin' Trapp
   build (static HTML/CSS/JS, no build step, JSON-driven owner-edited data):
     1.  Tokens
     2.  Fonts
     3.  Reset & base
     4.  Accessibility utilities
     5.  Layout: sections & containers
     6.  Typography
     7.  Buttons
     8.  Header & navigation
     9.  Hero
     10. Cards & grids
     11. Product catalog
     12. FAQ
     13. Testimonial
     14. Forms
     15. Footer
     16. Motion & print
   ========================================================================== */


/* ==========================================================================
   1. TOKENS
   ========================================================================== */

:root {
  /* --- Brand palette -------------------------------------------------------
     PROVISIONAL, chosen for premium/luxury Black & Red per brief. If Zoe has
     established hex values from prior print/social artwork, swap these and
     the whole site follows. Contrast checked (WCAG 2.1, computed): */
  --black:        #0A0A0A;   /* warm near-black, not pure #000 */
  --black-soft:   #171414;
  --red:          #B3122A;   /* primary brand red */
  --red-deep:     #7A0C1D;   /* hover on light surfaces */
  --red-bright:   #E01F3D;   /* hover on dark surfaces */
  --cream:        #F7F3EC;   /* warm off-white, not stark white */
  --cream-warm:   #EFE6D8;
  --cream-dim:    #DCCEBA;

  /* Contrast reference (WCAG 2.1, computed):
       cream on black .............. 17.9:1  OK all text
       black on cream ............... 17.9:1  OK all text
       red on cream .................. 6.3:1  OK all text
       white/cream text on red bg .... 6.3–6.9:1  OK all text (buttons)
       NEVER: red text directly on black (2.9:1) — large display type/logo
       only, never body copy or links. Use cream/white text on black instead,
       with red reserved for backgrounds, borders, and large headings. */

  /* --- Semantic ------------------------------------------------------------ */
  --bg:            var(--cream);
  --bg-dark:       var(--black);
  --ink:           var(--black);
  --ink-soft:      #3A3230;
  --ink-on-dark:   var(--cream);
  --rule:          rgba(10, 10, 10, 0.14);
  --rule-strong:   rgba(10, 10, 10, 0.28);
  --rule-on-dark:  rgba(247, 243, 236, 0.18);
  --error:         #E01F3D;
  --success:       #1F6B3A;

  /* --- Type ------------------------------------------------------------------
     Display: a bold, confident serif/slab for headlines. Body: a clean
     grotesk for legibility at small sizes. Swap the Google Fonts import
     below if Zoe prefers a different pairing. */
  --font-display:  "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body:     "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-util:     "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Fluid scale. Body floor is 17px. */
  --t-xs:    0.8125rem;                                  /* 13px, captions only */
  --t-sm:    0.9375rem;                                  /* 15px */
  --t-base:  1.0625rem;                                  /* 17px */
  --t-md:    1.1875rem;                                  /* 19px */
  --t-lg:    clamp(1.375rem, 1.15rem + 1.1vw, 1.75rem);
  --t-xl:    clamp(1.75rem, 1.35rem + 2vw,   2.5rem);
  --t-2xl:   clamp(2.25rem, 1.6rem + 3.2vw,  3.5rem);
  --t-3xl:   clamp(2.75rem, 1.8rem + 4.8vw,  4.75rem);

  --lh-tight: 1.15;
  --lh-normal: 1.5;
  --lh-loose: 1.7;

  /* --- Spacing --------------------------------------------------------------- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;
  --sp-9: 6.5rem;

  --container: 72rem;
  --radius: 0px;   /* zero radius: sharp, confident, editorial-luxury (validated
                       against ui-ux-pro-max "Minimalist Monochrome" luxury
                       e-commerce pattern — soft rounded corners read as SaaS,
                       not premium hair/fashion) */
  --radius-lg: 0px;
}

/* ==========================================================================
   2. FONTS
   ========================================================================== */
/* Google Fonts provide the approved display and body families. */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap");

/* ==========================================================================
   3. RESET & BASE
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }

/* ==========================================================================
   4. ACCESSIBILITY UTILITIES
   ========================================================================== */

.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: -999px; top: 0; z-index: 100;
  background: var(--red); color: #fff; padding: var(--sp-3) var(--sp-4);
  font-weight: 600;
}
.skip-link:focus { left: var(--sp-3); top: var(--sp-3); }

:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* ==========================================================================
   5. LAYOUT
   ========================================================================== */

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--sp-5); }
section { padding-block: var(--sp-8); }
.section-dark { background: var(--bg-dark); color: var(--ink-on-dark); }
.section-tight { padding-block: var(--sp-6); }

/* ==========================================================================
   6. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  margin: 0 0 var(--sp-4);
  letter-spacing: -0.01em;
}
/* Hero statement weight: bolder + tighter tracking than body headings —
   "oversized, confident type" per the Exaggerated Minimalism reference. */
h1 { font-size: var(--t-3xl); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-xl); }
h4 { font-size: var(--t-lg); }

p { margin: 0 0 var(--sp-4); }
.lede { font-size: var(--t-md); color: var(--ink-soft); line-height: var(--lh-loose); }

.eyebrow {
  display: inline-block; font-family: var(--font-util); font-weight: 700;
  font-size: var(--t-xs); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--red); margin-bottom: var(--sp-3);
}
.section-dark .eyebrow { color: var(--red-bright); }

/* ==========================================================================
   7. BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--font-util); font-weight: 700; font-size: var(--t-sm);
  letter-spacing: 0.03em; text-transform: uppercase; text-decoration: none;
  padding: var(--sp-4) var(--sp-6); border-radius: var(--radius);
  border: 2px solid transparent; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-bright); }
.btn-outline-dark { background: transparent; color: var(--black); border-color: var(--black); }
.btn-outline-dark:hover { background: var(--black); color: var(--cream); }
.btn-outline-light { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn-outline-light:hover { background: var(--cream); color: var(--black); }
.btn[disabled], .btn.is-disabled {
  background: var(--cream-dim); color: var(--ink-soft); border-color: var(--cream-dim);
  cursor: not-allowed; pointer-events: none;
}

/* ==========================================================================
   8. HEADER & NAVIGATION
   ========================================================================== */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--black); color: var(--cream);
  border-bottom: 1px solid var(--rule-on-dark);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-block: var(--sp-3); }
.brand { display: flex; align-items: center; gap: var(--sp-3); text-decoration: none; color: var(--cream); }
.brand-logo { position: relative; display: block; flex: 0 0 88px; width: 88px; height: 58px; overflow: hidden; }
.brand-logo img {
  position: absolute; max-width: none; width: 140px; height: 140px;
  left: -26px; top: -41px;
}
.nav-toggle {
  display: none; align-items: center; gap: var(--sp-2);
  background: transparent; border: 2px solid var(--cream); color: var(--cream);
  padding: var(--sp-2) var(--sp-3); border-radius: var(--radius);
}
.nav-toggle[hidden] { display: none; }

#site-nav { display: flex; }
#site-nav ul { list-style: none; display: flex; gap: var(--sp-6); margin: 0; padding: 0; }
#site-nav a {
  text-decoration: none; font-family: var(--font-util); font-weight: 600;
  font-size: var(--t-sm); letter-spacing: 0.02em; text-transform: uppercase;
  padding: var(--sp-2) 0; border-bottom: 2px solid transparent;
}
#site-nav a:hover, #site-nav a[aria-current="page"] { border-bottom-color: var(--red); }

@media (max-width: 62em) {
  .nav-toggle { display: inline-flex; }
  .nav-toggle[hidden] { display: none; }
  #site-nav {
    position: absolute; inset-inline: 0; top: 100%;
    background: var(--black); border-top: 1px solid var(--rule-on-dark);
    flex-direction: column; padding: var(--sp-4) var(--sp-5);
  }
  #site-nav[data-open="false"] { display: none; }
  #site-nav ul { flex-direction: column; gap: var(--sp-2); }
}

/* ==========================================================================
   9. HERO
   ========================================================================== */

.hero {
  background: var(--black); color: var(--cream);
  padding-block: var(--sp-9);
  background-size: cover; background-position: center;
}
.hero-grid { display: grid; gap: var(--sp-7); align-items: center; }
@media (max-width: 30em) {
  .contact-title { font-size: 2.65rem; white-space: nowrap; }
}
@media (min-width: 62em) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; } }
.hero h1 { font-size: var(--t-3xl); }
.hero .tagline { font-size: var(--t-lg); color: var(--cream-dim); font-style: italic; }
.hero-actions { display: flex; gap: var(--sp-4); flex-wrap: wrap; margin-top: var(--sp-6); }
.hero-photo { border: 3px solid var(--red); border-radius: var(--radius-lg); overflow: hidden; }
.hero-photo img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }

/* ==========================================================================
   10. CARDS & GRIDS
   ========================================================================== */

.grid { display: grid; gap: var(--sp-6); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 48em) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  /* No shadow — depth comes from a solid black rule, not blur (brutalist-
     luxury convention: shadows read as soft/SaaS, hairline+solid borders
     read as editorial/premium). */
  background: #fff; border: 1px solid var(--rule); border-top: 3px solid var(--black);
  border-radius: var(--radius-lg); padding: var(--sp-6);
}
.photo-frame { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/5; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   11. PRODUCT CATALOG
   ========================================================================== */

.catalog-group { margin-bottom: var(--sp-7); }
.catalog-group h3 { color: var(--red); }
.catalog-table { width: 100%; border-collapse: collapse; }
.catalog-table th, .catalog-table td {
  text-align: left; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--rule);
  font-size: var(--t-base);
}
.catalog-table th { font-family: var(--font-util); text-transform: uppercase; font-size: var(--t-xs); letter-spacing: 0.08em; color: var(--ink-soft); }
.catalog-table td.price { font-weight: 700; white-space: nowrap; }
.catalog-table tr[data-available="false"] { opacity: 0.55; }

.product-actions { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.buy-btn { min-width: 9.5rem; }
.buy-note { font-size: var(--t-xs); color: var(--ink-soft); }

.preorder-banner {
  background: var(--cream-warm); border: 1px dashed var(--rule-strong);
  border-radius: var(--radius-lg); padding: var(--sp-5); margin-bottom: var(--sp-7);
}

/* ==========================================================================
   12. FAQ
   ========================================================================== */

.faq-item { border-bottom: 1px solid var(--rule); padding-block: var(--sp-4); }
.faq-item summary {
  cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: var(--t-md);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--red); font-size: 1.5em; line-height: 1; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin-top: var(--sp-3); color: var(--ink-soft); }

/* ==========================================================================
   13. TESTIMONIAL
   ========================================================================== */

.testimonial {
  background: var(--black); color: var(--cream);
  padding: var(--sp-7) var(--sp-6); border-left: 6px solid var(--red);
  border-radius: var(--radius-lg);
}
.testimonial blockquote { font-family: var(--font-display); font-size: var(--t-lg); font-style: italic; margin: 0 0 var(--sp-4); }
.testimonial cite { font-style: normal; font-weight: 600; color: var(--cream-dim); }

/* ==========================================================================
   14. FORMS
   ========================================================================== */

label { display: block; font-weight: 600; margin-bottom: var(--sp-2); }
input, textarea, select {
  width: 100%; padding: var(--sp-3) var(--sp-4); border: 2px solid var(--rule-strong);
  border-radius: var(--radius); font: inherit; margin-bottom: var(--sp-4); background: #fff;
}
input:focus, textarea:focus, select:focus { border-color: var(--red); }

/* ==========================================================================
   15. FOOTER
   ========================================================================== */

.site-footer { background: var(--black); color: var(--cream-dim); padding-block: var(--sp-8) var(--sp-6); }
.footer-grid { display: grid; gap: var(--sp-6); }
@media (min-width: 48em) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-head { font-family: var(--font-util); text-transform: uppercase; letter-spacing: 0.08em; font-size: var(--t-xs); color: var(--cream); margin-bottom: var(--sp-3); }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: var(--sp-2); }
.footer-list a { text-decoration: none; }
.footer-list a:hover { color: var(--red-bright); }
.footer-bottom {
  margin-top: var(--sp-7); padding-top: var(--sp-5); border-top: 1px solid var(--rule-on-dark);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  justify-content: center; text-align: center; font-size: var(--t-sm);
}
.footer-bottom p { margin: 0; }
.footer-credit a { color: var(--cream); text-decoration: underline; text-underline-offset: 3px; }
.footer-credit a:hover { color: var(--red-bright); }

/* ==========================================================================
   16. INTERACTIVE SHOP CATALOG
   ========================================================================== */

.shop-drilldown { min-height: 34rem; }
.catalog-screen[hidden] { display: none; }
.catalog-crumbs {
  min-height: 1.5rem; margin-bottom: var(--sp-5); color: var(--ink-soft);
  font-family: var(--font-util); font-size: var(--t-sm); letter-spacing: .04em;
}
.catalog-crumbs .step {
  appearance: none; border: 0; padding: 0; background: transparent; color: var(--ink-soft);
  cursor: pointer; text-decoration: underline; text-underline-offset: 4px;
}
.catalog-crumbs .step:hover { color: var(--red); }
.catalog-crumbs .sep { margin-inline: var(--sp-2); color: var(--rule-strong); }
.catalog-crumbs .current { color: var(--black); font-weight: 700; }
.catalog-intro { color: var(--ink-soft); margin-bottom: var(--sp-6); }

.texture-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4);
}
@media (min-width: 48em) { .texture-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-5); } }
.texture-tile {
  appearance: none; display: flex; flex-direction: column; width: 100%; padding: 0;
  border: 0; background: transparent; color: var(--black); text-align: left; cursor: pointer;
}
.texture-thumb {
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 5;
  overflow: hidden; border: 1px solid var(--rule-strong); border-top: 4px solid var(--black);
  background: linear-gradient(145deg, var(--black-soft), var(--black));
  transition: border-color .15s ease, transform .15s ease;
}
.texture-tile:hover .texture-thumb,
.texture-tile:focus-visible .texture-thumb { border-color: var(--red); transform: translateY(-3px); }
.texture-thumb img { width: 100%; height: 100%; object-fit: cover; }
.texture-placeholder {
  display: grid; place-items: center; width: 100%; height: 100%; padding: var(--sp-5);
  color: var(--cream); text-align: center;
  background:
    linear-gradient(125deg, transparent 35%, rgba(179,18,42,.42) 35% 37%, transparent 37% 62%, rgba(179,18,42,.28) 62% 64%, transparent 64%),
    linear-gradient(145deg, #201b1b, #080808);
}
.texture-placeholder span {
  font-family: var(--font-display); font-size: var(--t-lg); line-height: var(--lh-tight);
}
.texture-placeholder small {
  position: absolute; inset-inline: var(--sp-3); bottom: var(--sp-3); color: var(--cream-dim);
  font-family: var(--font-util); font-size: var(--t-xs); letter-spacing: .12em; text-transform: uppercase;
}
.texture-name { margin-top: var(--sp-3); font-family: var(--font-display); font-weight: 700; font-size: var(--t-md); }
.texture-meta { color: var(--ink-soft); font-size: var(--t-sm); }
.texture-badge {
  position: absolute; top: var(--sp-3); left: var(--sp-3); z-index: 1;
  padding: var(--sp-1) var(--sp-2); background: var(--red); color: #fff;
  font-family: var(--font-util); font-size: var(--t-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}

.catalog-product-layout { display: grid; gap: var(--sp-7); align-items: start; }
@media (min-width: 56em) { .catalog-product-layout { grid-template-columns: minmax(18rem, .85fr) 1.15fr; } }
.catalog-product-panel, #length-heading, .catalog-price-block { scroll-margin-top: 7rem; }
.catalog-product-media .texture-thumb { max-height: 37rem; }
.catalog-product-note { color: var(--ink-soft); }
.catalog-field-label {
  margin: var(--sp-5) 0 var(--sp-3); color: var(--ink-soft); font-family: var(--font-util);
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.package-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.package-button,
.length-pill {
  appearance: none; border: 1px solid var(--rule-strong); background: #fff; color: var(--black);
  padding: var(--sp-3); cursor: pointer; text-align: center;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.package-button:hover,
.length-pill:hover { border-color: var(--red); }
.package-button.active,
.length-pill.active { border-color: var(--red); background: var(--red); color: #fff; }
.length-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(6.75rem, 8rem));
  justify-content: start; gap: var(--sp-2);
}
.length-pill { min-height: 4.75rem; font-weight: 700; }
.length-pill span,
.length-pill small { display: block; }
.length-pill small { margin-top: var(--sp-1); font-size: var(--t-xs); font-weight: 500; }
.length-pill.locked { color: #756e69; background: var(--cream-warm); cursor: not-allowed; opacity: .68; }
.preorder-option {
  display: grid; gap: var(--sp-1); margin-top: var(--sp-3); padding: var(--sp-4);
  border: 1px dashed var(--rule-strong); color: var(--ink-soft); background: var(--cream-warm);
}
.preorder-option strong { color: var(--black); }
.preorder-option small { font-size: var(--t-xs); }
.catalog-price-block {
  margin-top: var(--sp-5); padding: var(--sp-5); border-left: 5px solid var(--red); background: var(--black); color: var(--cream);
}
.catalog-price-label { display: block; color: var(--cream-dim); font-size: var(--t-sm); }
.catalog-price { display: block; margin-top: var(--sp-1); font-family: var(--font-display); font-size: var(--t-xl); }
.btn-square { width: 100%; margin-top: var(--sp-4); background: var(--black); color: var(--cream); }
.btn-square:not(.is-disabled):hover { background: var(--red); }
.square-mark { display: grid; grid-template-columns: repeat(2, 6px); gap: 2px; }
.square-mark i { width: 6px; height: 6px; background: var(--red-bright); }
.checkout-status { min-height: 1.5rem; margin-top: var(--sp-2); color: var(--ink-soft); text-align: center; font-size: var(--t-xs); }

/* ==========================================================================
   17. MOTION & PRINT
   ========================================================================== */

@media print {
  .site-header, .nav-toggle, .btn, .site-footer { display: none; }
}
