/*
  templates/noir/style.css
  ========================
  Dark editorial product template. Near-black warm canvas, heavy Archivo display
  headings over Inter body, a single burnt-orange accent, sharp corners and big
  imagery. Built for luxury / fashion / accessories — bags, watches, footwear,
  eyewear, jewellery — where the photography carries the page.

  Brand variables (--bg, --text, --accent, --brand-dark, --font-heading, etc.)
  are set at runtime by shared/script.js from config.js. Static design tokens
  are here.

  Structure:
  1. Variables (brand defaults + static tokens)
  2. Base and reset
  3. Primitives (container, eyebrow, buttons, section title)
  4. Section blocks, in page order
  5. Responsive
*/

/* 1. VARIABLES ----------------------------------------------------------- */
:root {
  /* Brand colors (overridden from config.colors) */
  --bg: #0e0d0c;            /* warm near-black canvas */
  --surface: #161412;       /* cards / panels */
  --accent-soft: #211e1a;   /* subtle raised panel */
  --text: #f4efe8;          /* warm white */
  --muted: #9a9389;         /* warm grey body */
  --border: #2b2722;        /* hairline borders */
  --accent: #e0613a;        /* burnt orange */
  --accent-2: #cf5630;      /* orange hover */
  --accent-text: #ffffff;
  --brand-dark: #0a0908;
  --footer-bg: #0a0908;
  --footer-text: #8a847a;

  /* Fonts (overridden from config.fonts) */
  --font-heading: 'Archivo', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Shape: sharp, modern */
  --radius: 4px;
  --radius-pill: 4px;

  /* Layout */
  --maxw: 1180px;
  --section-y: 120px;

  /* 8px spacing scale */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 40px;
  --s-6: 48px;
  --s-8: 64px;
  --s-10: 80px;
  --s-12: 96px;

  /* Type scale */
  --fs-hero: clamp(2.75rem, 8vw, 5.5rem);    /* up to ~88px */
  --fs-h2: clamp(2rem, 4.5vw, 3.25rem);      /* 32 to 52px */
  --fs-h3: 1.375rem;                         /* 22px */
  --fs-body: 1rem;                           /* 16px */
  --fs-body-lg: 1.1875rem;                   /* 19px */
  --fs-small: 0.875rem;                      /* 14px */
  --fs-eyebrow: 0.75rem;                     /* 12px */
}

/* 2. BASE AND RESET ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-heading); margin: 0; line-height: 1.04; letter-spacing: var(--heading-ls, -0.02em); font-weight: 800; }
p { margin: 0; }
[hidden] { display: none !important; }

/* 3. PRIMITIVES ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--s-3);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.04;
  max-width: 18ch;
  margin: var(--s-3) 0 var(--s-6);
  color: var(--text);
}

/* Buttons: sharp, orange solid by default */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  padding: 18px 34px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-text);
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); transform: translateY(-2px); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn-block { display: block; width: 100%; }

/* Ghost (outline) button on the dark canvas */
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--text); color: var(--text); }

/* 4. SECTION BLOCKS ------------------------------------------------------ */

/* SECTION: hero (dark, two columns, big display headline) */
.hero { background: var(--bg); color: var(--text); padding: var(--s-10) 0 var(--s-12); position: relative; overflow: hidden; }
.hero::before {
  /* soft warm glow behind the product */
  content: "";
  position: absolute;
  top: -10%; right: -10%;
  width: 60vw; height: 60vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(circle, rgba(224, 97, 58, 0.16) 0%, rgba(224, 97, 58, 0) 60%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-8);
  align-items: center;
}
.hero-brand { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-8); }
.hero-logo { height: 30px; width: auto; }
.hero-brand-logo-only .hero-logo { height: 38px; }
.hero-business { font-family: var(--font-heading); font-weight: 800; font-size: 1.25rem; letter-spacing: 0.02em; color: var(--text); }
.hero-headline {
  font-size: var(--fs-hero);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: var(--heading-ls, -0.03em);
  max-width: 12ch;
  margin: 0 0 var(--s-4);
  color: var(--text);
}
.hero-subheadline {
  font-size: var(--fs-body-lg);
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 var(--s-6);
}
.hero-media { justify-self: stretch; }
.hero-image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* SECTION: trust strip (dark feature tiles) */
.trust { padding: 0 0 var(--s-4); background: var(--bg); }
.trust-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.trust-list li {
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-small);
  letter-spacing: 0.01em;
  padding: var(--s-4) var(--s-3);
  display: flex;
  align-items: center;
  min-height: 96px;
}

/* SECTION: highlight (conversion value prop, text-only) */
.highlight { padding: var(--section-y) 0 48px; background: var(--bg); }
.highlight-inner { max-width: 680px; }
.highlight-text .section-title { margin: var(--s-3) 0 var(--s-4); }
.highlight-body p { color: var(--muted); font-size: var(--fs-body-lg); margin: 0 0 var(--s-3); }
.highlight-body p:last-child { margin-bottom: 0; }

/* SECTION: packages / colourways */
.packages { padding: var(--section-y) 0 48px; background: var(--bg); }
.pricing-eyebrow { display: inline-flex; }
.pricing-heading { margin: var(--s-3) 0 var(--s-8); max-width: 16ch; }
.packages-grid { display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
.package {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.package:hover { border-color: var(--muted); transform: translateY(-3px); }
.package.is-selected { border-color: var(--accent); }
.package.is-selected::after {
  content: "Selected";
  position: absolute; top: var(--s-2); right: var(--s-2);
  background: var(--accent); color: var(--accent-text);
  font-family: var(--font-body); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 10px; border-radius: var(--radius);
}
.package-media { width: 100%; aspect-ratio: 1 / 1; background: #0b0a09; margin: 0; overflow: hidden; }
.package-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.package:hover .package-image { transform: scale(1.04); }
.package-badge {
  position: absolute; top: var(--s-2); left: var(--s-2);
  background: var(--text); color: var(--bg);
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 10px; border-radius: var(--radius);
}
.package-name { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; color: var(--text); margin: 0; padding: var(--s-3) var(--s-3) 0; }
.package-price { font-family: var(--font-heading); font-size: 1.125rem; font-weight: 600; color: var(--accent); padding: var(--s-1) var(--s-3) 0; }
.package-desc { color: var(--muted); font-size: var(--fs-small); margin: 0; padding: var(--s-1) var(--s-3) 0; }
.package .btn {
  /* Override btn-block's width:100% so the side margins don't overflow the
     card (width:100% excludes margins). width:auto on a block element fills
     the card minus the margins, giving equal left/right insets. */
  width: auto;
  margin: var(--s-3);
  /* Smaller label + tighter tracking so longer CTAs (e.g. "Select the Full
     Drip Bundle") stay on a single line inside the card. */
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  padding: 16px 18px;
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.package:hover .btn { border-color: var(--text); }
.package.is-selected .btn { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.package-radio { display: none; }

/* SECTION: benefits (dark feature cards) */
.benefits { padding: var(--section-y) 0; background: var(--bg); }
.benefits-heading { margin: var(--s-3) 0 var(--s-8); }
.benefits-grid { display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
.benefit { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-5); }
.benefit-title { font-size: var(--fs-h3); font-weight: 700; margin: 0 0 var(--s-2); color: var(--text); }
.benefit-text { color: var(--muted); margin: 0; }

/* SECTION: steps (dark cards, big orange numerals, optional images) */
.steps { padding: var(--section-y) 0; background: var(--bg); }
.steps-heading { margin: var(--s-3) 0 var(--s-8); }
.steps-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); grid-template-columns: 1fr; counter-reset: step; }
.step {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
}
.step-num { font-family: var(--font-heading); font-weight: 900; font-size: 2.5rem; line-height: 1; color: var(--accent); margin-bottom: var(--s-3); }
.step-num::before { content: counter(step, decimal-leading-zero); }
.step-body { display: contents; }
.step-title { font-size: var(--fs-h3); font-weight: 700; margin: 0 0 var(--s-1); color: var(--text); }
.step-text { color: var(--muted); margin: 0; }
.step-media { margin-top: var(--s-4); border-radius: var(--radius); overflow: hidden; order: 3; }
.step-image { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }

/* SECTION: gallery (editorial strip) */
.gallery { padding: var(--section-y) 0; background: var(--bg); }
.gallery-title { margin: var(--s-3) 0 var(--s-8); }
.gallery-grid { display: grid; gap: var(--s-3); grid-template-columns: repeat(2, 1fr); }
.gallery-item { margin: 0; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); }
.gallery-image { width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover .gallery-image { transform: scale(1.04); }

/* SECTION: testimonials (dark quote cards) */
.testimonials { padding: var(--section-y) 0; background: var(--bg); }
.testimonials-heading { margin: var(--s-3) 0 var(--s-6); }
.testimonials-summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); margin: 0 0 var(--s-6); }
.testimonials-summary:empty { display: none; }
.testimonials-summary-stars { display: inline-flex; gap: 2px; }
.testimonials-summary-stars .testimonial-star svg { width: 20px; height: 20px; display: block; fill: var(--border); }
.testimonials-summary-stars .testimonial-star.is-filled svg { fill: var(--accent); }
.testimonials-summary-rating { font-family: var(--font-heading); font-weight: 700; color: var(--text); }
.testimonials-summary-recommend { flex-basis: 100%; margin: 0; color: var(--muted); font-size: var(--fs-small); }
.testimonials-grid { display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
.testimonial { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-5); display: flex; flex-direction: column; }
.testimonial-stars { display: flex; gap: 2px; margin-bottom: var(--s-3); }
.testimonial-star svg { width: 16px; height: 16px; display: block; fill: var(--border); }
.testimonial-star.is-filled svg { fill: var(--accent); }
.testimonial-title { font-family: var(--font-heading); font-size: 1.0625rem; font-weight: 700; color: var(--text); margin: 0 0 var(--s-2); }
.testimonial-quote { font-size: var(--fs-body-lg); line-height: 1.6; margin: 0 0 var(--s-4); color: var(--text); }
.testimonial-foot { display: flex; align-items: center; gap: var(--s-2); margin-top: auto; }
.testimonial-avatar { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; background: var(--accent-soft); color: var(--text); font-family: var(--font-heading); font-weight: 700; overflow: hidden; }
.testimonial-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.testimonial-who { display: flex; flex-direction: column; }
.testimonial-meta { color: var(--text); font-size: var(--fs-small); font-weight: 600; margin: 0; }
.testimonial-role { color: var(--muted); font-size: var(--fs-small); margin: 0; }

/* SECTION: faq */
.faq { padding: var(--section-y) 0; background: var(--bg); }
.faq-heading { margin: var(--s-3) 0 var(--s-6); }
.faq-list { display: flex; flex-direction: column; max-width: 820px; }
.faq-item { border-top: 1px solid var(--border); padding: var(--s-4) 0; }
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-question { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; margin: 0 0 var(--s-2); color: var(--text); }
.faq-answer { color: var(--muted); margin: 0; }

/* SECTION: call to action band (image backdrop) */
.cta-band {
  position: relative;
  background: var(--surface);
  padding: var(--s-12) 0;
  overflow: hidden;
  text-align: center;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0;
  background-image: var(--cta-bg, none);
  background-size: cover; background-position: center;
  opacity: 0.45;
}
.cta-band::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,13,12,0.55), rgba(14,13,12,0.85));
}
.cta-inner { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.cta-heading { font-size: var(--fs-h2); font-weight: 800; margin: 0 0 var(--s-3); color: var(--text); }
.cta-text { color: var(--muted); font-size: var(--fs-body-lg); margin: 0 0 var(--s-6); }

/* SECTION: form (dark card) */
.order { padding: var(--section-y) 0; background: var(--bg); }
.order-inner { max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-6); }
.order .section-title { margin-bottom: var(--s-2); max-width: none; }
.order-sub { color: var(--muted); margin: 0 0 var(--s-5); }
.field { margin-bottom: var(--s-3); }
.field label { display: block; font-size: var(--fs-small); font-weight: 500; margin-bottom: var(--s-1); color: var(--muted); }
.field input, .field select {
  width: 100%; font-family: var(--font-body); font-size: var(--fs-body); color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px;
}
.field input::placeholder { color: #6c665d; }
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.field select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-right: 44px; background-repeat: no-repeat; background-position: right 16px center; background-size: 12px 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%239a9389' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='2 4 6 8 10 4'/%3E%3C/svg%3E");
}
.field select:invalid { color: #6c665d; }

.order-summary {
  display: grid; grid-template-columns: 1fr auto;
  grid-template-areas: "info qty" "total total";
  align-items: center; gap: var(--s-2) var(--s-3);
  background: var(--bg); border: 1px solid var(--accent); border-radius: var(--radius);
  padding: var(--s-3); margin: var(--s-1) 0 var(--s-3);
}
.order-summary-info { grid-area: info; display: flex; flex-direction: column; min-width: 0; }
.order-summary-label { font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.order-summary-name { font-family: var(--font-heading); font-size: 1.0625rem; font-weight: 700; color: var(--text); line-height: 1.25; }
.order-summary-price { font-size: var(--fs-small); color: var(--muted); margin-top: 2px; }
.order-summary-total { grid-area: total; display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--s-2); border-top: 1px solid var(--border); }
.order-summary-total-label { font-size: var(--fs-small); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.order-summary-total-value { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--accent); }

.qty { grid-area: qty; display: inline-flex; align-items: stretch; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; height: 42px; }
.qty-btn { width: 38px; border: 0; background: transparent; color: var(--text); font-size: 1.25rem; font-weight: 700; line-height: 1; cursor: pointer; padding: 0; transition: background-color 0.15s ease; }
.qty-btn:hover { background: var(--accent-soft); }
.qty-input { width: 44px; border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); background: transparent; text-align: center; font-family: var(--font-body); font-size: var(--fs-body); font-weight: 700; color: var(--text); padding: 0; -moz-appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input:focus { outline: none; }
.form-error { color: #ff8a73; font-size: var(--fs-small); margin: 0 0 var(--s-2); }

/* SECTION: footer */
.footer { background: var(--footer-bg); color: var(--footer-text); padding: var(--s-8) 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); }
.footer-business { font-family: var(--font-heading); font-weight: 800; font-size: 1.125rem; color: var(--text); }
.footer-phone { font-size: var(--fs-small); color: var(--footer-text); text-decoration: none; opacity: 0.85; }
.footer-phone:hover { opacity: 1; }
.footer-social { display: flex; gap: var(--s-2); }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.06); color: var(--footer-text); opacity: 0.85; transition: opacity 0.15s ease, background-color 0.15s ease; }
.footer-social a:hover { opacity: 1; background: rgba(255,255,255,0.12); }
.footer-social svg { width: 20px; height: 20px; fill: currentColor; }
.footer-copy { color: var(--footer-text); opacity: 0.6; font-size: var(--fs-small); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.reveal-in { opacity: 1; transform: translateY(0); }

@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; }
  .reveal, .reveal.reveal-in, .package { opacity: 1; transform: none; }
}

/* 5. RESPONSIVE ---------------------------------------------------------- */
@media (max-width: 699px) {
  :root { --section-y: 72px; }
  .order-inner { padding: var(--s-4); }
}

@media (min-width: 760px) {
  .hero { padding: var(--s-12) 0; }
  .hero-inner { grid-template-columns: 1.1fr 0.9fr; gap: var(--s-10); }
  .hero-headline { margin-bottom: var(--s-5); }

  .trust-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  /* highlight is single-column text block — no grid override needed */

  .packages-grid { grid-template-columns: repeat(3, 1fr); }
  .benefits-grid { grid-template-columns: repeat(3, 1fr); }
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(3, 1fr); }

  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

