/* ═══════════════════════════════════════════════════════════
   DESIGN TOKENS — Bloom Hair Studio
   This file is project-specific art direction, not a neutral
   default. When adapting this kit for a different business,
   this is the file to redesign from scratch — see README.
═══════════════════════════════════════════════════════════ */

:root {

  /* ─── Color ──────────────────────────────────────────────
     4 colors, chosen for this subject: a hair studio's world
     is ink, paper, and a single warm clay accent — not pastel
     florals despite the name "Bloom". */
  --color-ink:      #16140F;   /* near-black: headings, nav     */
  --color-paper:    #FAF8F3;   /* page background               */
  --color-clay:     #B8472A;   /* the one accent: CTAs, signature line */
  --color-clay-dark:#8F361F;   /* clay hover state              */
  --color-stone:    #8A8475;   /* secondary text                */
  --color-stone-bg: #F0ECE3;   /* alternating section background */
  --color-border:   rgba(22, 20, 15, 0.12);
  --color-white:    #FFFFFF;

  /* ─── Type ───────────────────────────────────────────────
     Fraunces: soft ink-trap serif, feels hand-finished —
     pairs with a hair studio's "considered, unrushed" brief.
     Inter: neutral workhorse for body copy. */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --text-xs:   0.78rem;
  --text-sm:   0.9rem;
  --text-base: 1rem;
  --text-md:   1.15rem;
  --text-lg:   clamp(1.4rem, 2.4vw, 1.75rem);
  --text-xl:   clamp(2rem, 4vw, 2.75rem);
  --text-2xl:  clamp(2.75rem, 7vw, 5.25rem);

  /* ─── Spacing scale ──────────────────────────────────────  */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-7:  3rem;
  --space-8:  4rem;
  --space-9:  6rem;

  --section-pad: clamp(var(--space-8), 8vw, var(--space-9));

  --radius-sm: 3px;      /* used on buttons + form inputs only — */
  --radius-pill: 999px;  /* everything else (cards, images) is sharp, by design */

  --shadow-sm: 0 1px 0 rgba(22, 20, 15, 0.06);
  --shadow-md: 0 16px 40px rgba(22, 20, 15, 0.12);

  --transition: 0.25s ease;

  --container-width: 75rem;
  --container-pad: clamp(1.5rem, 6vw, 5rem);

  /* ─── Breakpoints (reference only) ───────────────────────
     @media (max-width: 640px)  -> mobile
     @media (max-width: 960px)  -> tablet and below
     @media (min-width: 961px)  -> desktop and up           */
}
/* ═══════════════════════════════════════════════════════════
   BASE — reset + raw element defaults
═══════════════════════════════════════════════════════════ */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--color-paper);
  color: var(--color-ink);
  line-height: 1.65;
  font-size: var(--text-base);
  overflow-x: hidden;
}

img, picture, video { display: block; width: 100%; height: 100%; object-fit: cover; }

a { color: var(--color-clay); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-clay-dark); }

ul, ol { list-style: none; }
address { font-style: normal; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: var(--text-base); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-ink);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--text-2xl); font-weight: 500; }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }

p { color: var(--color-ink); }

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 2px solid var(--color-clay);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* ═══════════════════════════════════════════════════════════
   LAYOUT PRIMITIVES — genuinely reusable, subject-agnostic.
   Unlike tokens.css and components.css's visual styling, this
   file should rarely need edits between projects.
═══════════════════════════════════════════════════════════ */

.container {
  width: min(var(--container-width), 100% - (var(--container-pad) * 2));
  margin-inline: auto;
}

.section { padding-block: var(--section-pad); }
.section--alt { background: var(--color-stone-bg); }
.section--dark { background: var(--color-ink); color: var(--color-paper); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--color-paper); }
.section--tight { padding-block: var(--space-7); }
.section--flush { padding: 0; }

.stack { display: flex; flex-direction: column; }
.stack > * + * { margin-top: var(--space-5); }
.stack--sm > * + * { margin-top: var(--space-3); }
.stack--lg > * + * { margin-top: var(--space-7); }

.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.cluster--center { justify-content: center; }
.cluster--between { justify-content: space-between; }
.cluster--tight { gap: var(--space-2); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}
.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }
.split--tight { gap: var(--space-6); }
.split--flush { gap: 0; }

@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; gap: var(--space-6); }
  .split--reverse { direction: ltr; }
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
  gap: var(--space-6);
}
.grid-auto--tight { gap: var(--space-4); }

.grid-fixed-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-fixed-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-fixed-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

@media (max-width: 760px) {
  .grid-fixed-2, .grid-fixed-3, .grid-fixed-4 { grid-template-columns: 1fr; }
}
@media (min-width: 761px) and (max-width: 960px) {
  .grid-fixed-3, .grid-fixed-4 { grid-template-columns: repeat(2, 1fr); }
}

.center { margin-inline: auto; text-align: center; max-width: 38rem; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
/* ═══════════════════════════════════════════════════════════
   COMPONENTS — Bloom Hair Studio art direction.
   Mobile-first nav: base = dropdown, desktop adds inline row.
═══════════════════════════════════════════════════════════ */

/* ─── Button ─────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1.5px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.btn--primary { background: var(--color-clay); border-color: var(--color-clay); color: var(--color-white); }
.btn--primary:hover { background: var(--color-clay-dark); border-color: var(--color-clay-dark); color: var(--color-white); }

.btn--outline { background: transparent; border-color: var(--color-ink); color: var(--color-ink); }
.btn--outline:hover { background: var(--color-ink); color: var(--color-paper); }

/* ─── Signature element: the cut-line ─────────────────────────
   A single horizontal line draws itself under key headings,
   like a scissor pass — the one piece of motion the brief
   actually earns. Triggered by .is-visible (see js/reveal.js). */
.cut-line {
  position: relative;
  display: inline-block;
}
.cut-line::after {
  content: '';
  position: absolute;
  left: 0; bottom: -0.15em;
  width: 100%;
  height: 2px;
  background: var(--color-clay);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}
.cut-line.is-visible::after { transform: scaleX(1); }

/* ─── Card ───────────────────────────────────────────────────  */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-ink);
  border-radius: 0;
  overflow: hidden;
  transition: border-left-color var(--transition);
}
.card:hover { border-left-color: var(--color-clay); }
.card__body { padding: var(--space-5); }
.card__title { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.card__text { font-size: var(--text-sm); color: var(--color-stone); }

.card--icon { padding: var(--space-6) var(--space-5); }
.card--icon .card__icon {
  font-family: var(--font-display);
  font-size: var(--text-md);
  color: var(--color-clay);
  margin-bottom: var(--space-4);
}

.price {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-clay);
}

/* ─── Hero ───────────────────────────────────────────────────
   Asymmetric: text block left, image bleeds to the viewport
   edge on the right. Deliberately not a centered-text-over-
   full-bleed-photo hero. */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100svh;
  align-items: center;
  background: var(--color-paper);
}
.hero__text {
  position: relative;
  z-index: 1;
  padding: var(--space-9) var(--container-pad) var(--space-8) var(--container-pad);
}
.eyebrow {
  display: block;
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-stone);
  margin-bottom: var(--space-5);
}
.hero__headline {
  margin-bottom: var(--space-5);
}
.hero__sub {
  font-size: var(--text-md);
  color: var(--color-stone);
  max-width: 30rem;
  margin-bottom: var(--space-6);
}
.hero__img-wrap {
  position: relative;
  height: 100%;
  min-height: 28rem;
  overflow: hidden;
}
.hero__img-wrap img { height: 100%; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero__text { padding-top: calc(var(--space-9) + 3rem); order: 2; }
  .hero__img-wrap { order: 1; min-height: 22rem; }
}

/* ─── Nav ─────────────────────────────────────────────────────
   Mobile-first: base rules are the dropdown panel; desktop
   media query switches to an inline row. */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--color-paper);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}
.nav.is-scrolled { border-color: var(--color-border); }

.nav__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--container-pad);
}

.nav__logo {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-ink);
  letter-spacing: -0.01em;
}
.nav__logo:hover { color: var(--color-clay); }

.nav__toggle { display: flex; flex-direction: column; gap: 5px; padding: var(--space-2); }
.nav__toggle span {
  display: block; width: 22px; height: 1.5px;
  background: var(--color-ink);
  transition: transform var(--transition), opacity var(--transition);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav__panel {
  max-height: 0;
  overflow: hidden;
  background: var(--color-paper);
  border-bottom: 1px solid transparent;
  transition: max-height var(--transition);
}
.nav__panel.is-open { max-height: 24rem; border-color: var(--color-border); }

.nav__links { display: flex; flex-direction: column; padding: 0 var(--container-pad) var(--space-5); }
.nav__links a {
  display: block;
  padding: var(--space-3) 0;
  color: var(--color-ink);
  font-size: var(--text-base);
  border-top: 1px solid var(--color-border);
}
.nav__links a:hover { color: var(--color-clay); }
.nav__links .btn { margin-top: var(--space-3); text-align: center; }
.nav__links .btn--primary {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-clay);
  font-weight: 500;
}
.nav__links .btn--primary:hover {
  background: none;
  color: var(--color-clay-dark);
}

/* Desktop: .nav__inner becomes the single flex row — logo left,
   links right. .nav__bar and .nav__panel stop being independent
   stacked blocks and become children sharing that one row. */
@media (min-width: 961px) {
  .nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: var(--container-pad);
  }
  .nav__bar { padding: var(--space-4) 0; flex: 0 0 auto; }
  .nav__toggle { display: none; }
  .nav__panel {
    max-height: none;
    overflow: visible;
    border-bottom: none;
    flex: 0 0 auto;
  }
  .nav__links { flex-direction: row; align-items: center; gap: var(--space-7); padding: 0; }
  .nav__links a { padding: 0; border-top: none; font-size: var(--text-sm); }
  .nav__links .btn { margin-top: 0; }
}

/* ─── Section header ─────────────────────────────────────────  */
.section-header { text-align: center; margin-bottom: var(--space-7); }
.section-header__title { margin-bottom: var(--space-2); }
.section-header__sub { font-size: var(--text-base); color: var(--color-stone); }

/* ─── Form ────────────────────────────────────────────────────  */
.form-field { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-4); }
.form-field label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-stone);
}
.form-field input, .form-field textarea {
  padding: var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
}
.form-field input:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--color-clay);
}
