/* ============================================================
   Coiffeur Hair'Style31 — Toulouse
   Composition: warm earth editorial / broadsheet
   ============================================================ */

:root {
  --bg: #f5efe4;
  --bg-raised: #fbf7ef;
  --ink: #2b1e14;
  --ink-soft: #5c4a3a;
  --ink-faint: #8a7864;
  --accent: #c25a37;
  --accent-deep: #9d4527;
  --secondary: #6a7a4a;
  --rule: #d9cdb9;
  --warm-light: rgba(226, 178, 118, 0.42);
  --shadow: 0 1px 2px rgba(43, 30, 20, 0.06), 0 12px 32px -18px rgba(43, 30, 20, 0.35);
  --glow-y: 12%;
  --maxw: 1180px;
  --serif: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17110c;
    --bg-raised: #201811;
    --ink: #f2e8da;
    --ink-soft: #cbb9a4;
    --ink-faint: #9a8770;
    --accent: #e07a52;
    --accent-deep: #f09a76;
    --secondary: #9aad72;
    --rule: #3a2c20;
    --warm-light: rgba(196, 122, 62, 0.24);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 34px -18px rgba(0, 0, 0, 0.8);
  }
}

:root[data-theme="dark"] {
  --bg: #17110c;
  --bg-raised: #201811;
  --ink: #f2e8da;
  --ink-soft: #cbb9a4;
  --ink-faint: #9a8770;
  --accent: #e07a52;
  --accent-deep: #f09a76;
  --secondary: #9aad72;
  --rule: #3a2c20;
  --warm-light: rgba(196, 122, 62, 0.24);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 34px -18px rgba(0, 0, 0, 0.8);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* --- BACKGROUND: soft light source that follows scroll --- */
.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    circle 62vw at 50% var(--glow-y),
    var(--warm-light) 0,
    transparent 62%
  );
  transition: background-position 0.4s linear;
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.15rem, 4vw, 3rem);
}

/* ---------------- Header ---------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--rule);
}

.site-head__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.7rem 0;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}

.brand__mark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: -0.015em;
  font-variation-settings: "SOFT" 30, "WONK" 1;
}

.brand__sub {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 3px;
  border-bottom: 2px solid transparent;
}

.nav a:hover { color: var(--accent); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: 0.35rem;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

.call-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0 1.05rem;
  background: var(--accent);
  color: #fff8f2;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 3px;
  white-space: nowrap;
}

.call-btn:hover { background: var(--accent-deep); }

:root[data-theme="dark"] .call-btn,
:root:not([data-theme="light"]) .call-btn { color: #1a1109; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .call-btn { color: #fff8f2; }
}

/* ---------------- Hero ---------------- */

.hero {
  padding: clamp(2.6rem, 7vw, 5.2rem) 0 clamp(1.6rem, 4vw, 2.6rem);
}

.hero__kicker {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.1rem;
}

.hero__kicker::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* --- SIGNATURE: H1 swaps to an alternate phrase on hover --- */
.hero__title {
  position: relative;
  margin: 0 0 1.1rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.5rem, 8.4vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 120;
  cursor: default;
  max-width: 20ch;
}

.hero__title .phrase {
  display: block;
  transition: opacity 0.35s ease;
}

.hero__title .phrase--alt {
  position: absolute;
  inset: 0;
  opacity: 0;
  color: var(--accent);
  font-style: italic;
  font-variation-settings: "SOFT" 90, "WONK" 1, "opsz" 120;
}

.hero__title:hover .phrase--default,
.hero__title:focus-within .phrase--default { opacity: 0; }

.hero__title:hover .phrase--alt,
.hero__title:focus-within .phrase--alt { opacity: 1; }

.hero__lede {
  max-width: 62ch;
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin: 0 0 1.6rem;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  padding: 0.9rem 0 0;
  border-top: 1px solid var(--rule);
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.hero__meta span { display: inline-flex; align-items: center; gap: 0.4rem; }

.stars { color: var(--accent); letter-spacing: 0.08em; }

/* ---------------- Photo band ---------------- */

.band {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1.4rem 0 clamp(2.4rem, 6vw, 4rem);
}

.band figure {
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
  background: var(--rule);
}

.band img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.band figcaption {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0.5rem 0 0;
}

@media (min-width: 720px) {
  .band {
    grid-template-columns: 1.55fr 1fr;
    grid-template-rows: auto auto;
  }
  .band figure:first-child { grid-row: span 2; }
  .band figure:first-child img { aspect-ratio: 4 / 5; }
}

/* ---------------- Section furniture ---------------- */

section { scroll-margin-top: 5rem; }

.section {
  padding: clamp(2.2rem, 5.5vw, 3.6rem) 0;
  border-top: 1px solid var(--rule);
}

.section__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.section__num {
  font-family: var(--serif);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.section h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.6vw, 2.35rem);
  letter-spacing: -0.02em;
  line-height: 1.12;
  font-variation-settings: "SOFT" 40, "WONK" 1;
}

.section__note {
  margin: 0 0 1.6rem;
  max-width: 66ch;
  color: var(--ink-soft);
}

/* --- LAYOUT: three-column newspaper flow --- */
.broadsheet {
  column-count: 1;
  column-gap: 3rem;
}

@media (min-width: 760px) { .broadsheet { column-count: 2; } }
@media (min-width: 1060px) { .broadsheet { column-count: 3; } }

.broadsheet > *:first-child { margin-top: 0; }

.broadsheet p {
  margin: 0 0 1rem;
  max-width: 68ch;
  break-inside: avoid-column;
}

.broadsheet h3 {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  margin: 1.4rem 0 0.5rem;
  break-after: avoid-column;
}

.broadsheet h3:first-child { margin-top: 0; }

.dropcap::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 3.5rem;
  line-height: 0.82;
  font-weight: 600;
  padding: 0.14em 0.12em 0 0;
  color: var(--accent);
}

.pull {
  break-inside: avoid-column;
  margin: 1.4rem 0;
  padding: 1rem 0 1rem 1.1rem;
  border-left: 3px solid var(--accent);
  font-family: var(--serif);
  font-size: 1.16rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
}

/* ---------------- Services ---------------- */

.services {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}

@media (min-width: 700px) { .services { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }

.service {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1.2rem;
  align-items: baseline;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--rule);
}

.service__name {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.service__price {
  font-size: 0.92rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.service__desc {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.services__foot {
  margin-top: 1.4rem;
  font-size: 0.88rem;
  color: var(--ink-faint);
}

/* ---------------- Gallery ---------------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 820px) { .gallery { grid-template-columns: repeat(4, 1fr); } }

.gallery figure { margin: 0; }

.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 2px;
  background: var(--rule);
}

.gallery figcaption {
  font-size: 0.78rem;
  color: var(--ink-faint);
  padding-top: 0.45rem;
}

/* ---------------- Hours + contact ---------------- */

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.2rem;
}

@media (min-width: 820px) {
  .info-grid { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
}

.hours {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
}

.hours th,
.hours td {
  text-align: left;
  padding: 0.62rem 0;
  border-bottom: 1px solid var(--rule);
  font-weight: 400;
}

.hours th { color: var(--ink-soft); }

.hours td { text-align: right; font-variant-numeric: tabular-nums; }

.hours tr.is-closed td { color: var(--ink-faint); }

.hours tr.is-today th,
.hours tr.is-today td { color: var(--accent); font-weight: 500; }

.contact-card {
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.contact-card h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin: 0 0 0.7rem;
}

.contact-card p { margin: 0 0 0.85rem; color: var(--ink-soft); font-size: 0.96rem; }

.contact-card address {
  font-style: normal;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 1.1rem;
}

.phone-big {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.phone-big:hover { border-bottom-color: var(--accent); }

.map-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--secondary);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.map-link:hover { color: var(--accent); }

/* ---------------- Footer ---------------- */

.site-foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--rule);
  padding: 2.2rem 0 2.6rem;
  font-size: 0.86rem;
  color: var(--ink-faint);
}

.site-foot__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.site-foot a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--rule); }
.site-foot a:hover { color: var(--accent); }

.claim-banner {
  display: inline-block;
  margin: 1.6rem 0 0.9rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--rule) 45%, transparent);
  border: 1px solid var(--rule);
  border-radius: 3px;
  text-decoration: none;
}

.claim-banner:hover { color: var(--accent); border-color: var(--accent); }

.attribution { margin: 0; font-size: 0.78rem; }

.attribution a { border-bottom: none; }

/* ---------------- Motion: one-shot page-load orchestration ---------------- */

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes typeIn {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  .site-head__inner { animation: slideDown 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero__kicker { animation: fadeIn 0.7s ease both; animation-delay: 0.1s; }
  .hero__title .phrase--default {
    animation: typeIn 0.95s steps(28, end) both;
    animation-delay: 0.22s;
  }
  .hero__lede { animation: riseIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: 0.46s; }
  .hero__meta { animation: riseIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: 0.58s; }
  .band { animation: riseIn 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: 0.7s; }
}

/* ---------------- Focus ---------------- */

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .glow { transition: none; }
}
