/* ============================================================
   Fade Republic — barbershop, Accra
   Palette: cafe warmth. Creamy latte base, coffee-brown ink,
   deep burgundy accents, olive structural marks.
   ============================================================ */

:root {
  --bg:        #f4ead8;
  --bg-2:      #efe2cb;
  --surface:   #fbf5e9;
  --ink:       #3a2415;
  --ink-soft:  #6b5540;
  --ink-faint: #6f5c46;
  --accent:    #6b1f1a;
  --accent-2:  #8a2b23;
  --secondary: #5a5e3a;
  --line:      #d8c6a8;
  --line-soft: #e6d8bf;
  --warm-light: rgba(255, 214, 150, 0.55);
  --glow-y: 12%;
  --shadow: 0 1px 2px rgba(58, 36, 21, .06), 0 12px 32px -18px rgba(58, 36, 21, .35);

  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', 'Inter', system-ui, -apple-system, sans-serif;

  --wrap: 1120px;
  --pad: clamp(1.15rem, 4vw, 2.5rem);
  --radius: 4px;
}

[data-theme="dark"] {
  --bg:        #1c1410;
  --bg-2:      #241a14;
  --surface:   #261b14;
  --ink:       #f2e6d5;
  --ink-soft:  #cbb69c;
  --ink-faint: #a08d76;
  --accent:    #e0836f;
  --accent-2:  #f0a08c;
  --secondary: #a8ad7e;
  --line:      #3d2c20;
  --line-soft: #33251b;
  --warm-light: rgba(255, 170, 90, 0.16);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 36px -20px rgba(0, 0, 0, .8);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

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

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
  position: relative;
  z-index: 1;
}

/* ── type ─────────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-variation-settings: "SOFT" 20, "WONK" 1;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 8vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 5vw, 3rem); }
h3 { font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.005em; }

p { margin: 0 0 1rem; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-underline-offset: 3px; }

.eyebrow {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0 0 .9rem;
}
.muted { color: var(--ink-soft); font-size: .95rem; }

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

/* ── buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .7rem 1.35rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn-solid {
  background: var(--accent);
  color: #fdf6ec;
  border-color: var(--accent);
}
[data-theme="dark"] .btn-solid { color: #1c1410; }
.btn-solid:hover { background: var(--accent-2); border-color: var(--accent-2); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn-lg { min-height: 56px; padding: .95rem 2rem; font-size: 1.05rem; }

/* ── header ───────────────────────────────────────────────── */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.head-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 74px;
  flex-wrap: wrap;
  padding-block: .6rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.brand-mark { color: var(--accent); display: flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.site-nav { display: flex; gap: 1.4rem; }
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .93rem;
  font-weight: 500;
  padding: .5rem 0;
  border-bottom: 1.5px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.head-actions { display: flex; align-items: center; gap: .6rem; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 44px;
  padding: .5rem .85rem;
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.theme-toggle:hover { border-color: var(--ink); color: var(--ink); }
.theme-icon {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: inset -4px -3px 0 0 var(--bg);
  transition: box-shadow .25s ease, background-color .25s ease;
}
[data-theme="dark"] .theme-icon { box-shadow: inset 0 0 0 0 var(--bg); background: var(--accent); }

/* ── hero ─────────────────────────────────────────────────── */
.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 4rem); }
.hero-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.hero-copy { grid-column: 1 / 5; }
.hero-figure { grid-column: 5 / 7; margin: 0; }

.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "SOFT" 60, "WONK" 1;
}
.lede {
  font-size: 1.12rem;
  color: var(--ink-soft);
  margin-top: 1.4rem;
  max-width: 46ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2.4rem;
  margin: 2.4rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.hero-facts dt {
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: .15rem;
}
.hero-facts dd { margin: 0; font-size: .95rem; font-weight: 500; }

.hero-figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-figure figcaption {
  font-size: .82rem;
  color: var(--ink-faint);
  margin-top: .7rem;
  max-width: 30ch;
  line-height: 1.5;
}

/* ── section head ─────────────────────────────────────────── */
.section-head { max-width: 62ch; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.section-intro { color: var(--ink-soft); margin-top: 1rem; }

/* ── expandable index (signature) ─────────────────────────── */
.services, .questions { padding-block: clamp(2.5rem, 6vw, 5rem); }
.questions { background: var(--bg-2); }

.index {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0 clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

.entry {
  grid-column: 1 / 6;
  border-bottom: 1px solid var(--line);
}
/* broken bento: every third entry breaks out of the column */
.entry:nth-child(3n) { grid-column: 2 / 7; }
.entry:nth-child(4n) { grid-column: 1 / 5; }

.entry summary {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.35rem .25rem;
  cursor: pointer;
  list-style: none;
  min-height: 44px;
  transition: color .18s ease, padding-left .22s ease;
}
.entry summary::-webkit-details-marker { display: none; }
.entry summary:hover { color: var(--accent); padding-left: .6rem; }

.entry-num {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--secondary);
  flex: 0 0 auto;
  padding-top: .35rem;
}
.entry-title {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3.4vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  flex: 1 1 auto;
}
.entry-tag {
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .2rem .6rem;
  flex: 0 0 auto;
  align-self: center;
}
.entry-chev {
  flex: 0 0 auto;
  width: 12px; height: 12px;
  border-right: 1.8px solid var(--accent);
  border-bottom: 1.8px solid var(--accent);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  align-self: center;
}
.entry[open] .entry-chev { transform: rotate(225deg) translate(-2px, -2px); }

.entry-body {
  padding: 0 .25rem 1.9rem;
  max-width: 66ch;
  color: var(--ink-soft);
  animation: reveal .32s cubic-bezier(.4,0,.2,1);
}
.entry-body p { margin-bottom: .9rem; }
.entry[open] .entry-title { color: var(--accent); }

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

.entry-list {
  list-style: none;
  margin: 1.1rem 0 1.1rem;
  padding: 0;
  display: grid;
  gap: .4rem;
}
.entry-list li {
  position: relative;
  padding-left: 1.3rem;
  font-size: .95rem;
}
.entry-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 8px; height: 1.5px;
  background: var(--secondary);
}
.entry-list.tight { margin: 0; }

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.6rem;
  font-size: .88rem;
  color: var(--ink);
  border-top: 1px dashed var(--line);
  padding-top: .9rem;
  margin-top: 1.2rem;
}
.entry-meta .k {
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-right: .4rem;
}

/* ── visit ────────────────────────────────────────────────── */
.visit { padding-block: clamp(2.5rem, 6vw, 5rem); }
.visit-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(1.8rem, 4vw, 3rem);
  align-items: start;
}
.visit-main { grid-column: 1 / 5; }
.visit-side { grid-column: 5 / 7; display: grid; gap: 1.1rem; }

.visit-main > p { color: var(--ink-soft); margin-top: 1rem; }

.steps { list-style: none; margin: 2.2rem 0 0; padding: 0; display: grid; gap: 1.6rem; }
.steps li { display: flex; gap: 1.1rem; align-items: flex-start; }
.step-num {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1.5px solid var(--secondary);
  border-radius: 50%;
  font-size: .82rem;
  font-weight: 600;
  color: var(--secondary);
}
.steps h3 { margin-bottom: .3rem; }
.steps p { font-size: .96rem; color: var(--ink-soft); margin: 0; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.3rem 1.35rem;
  box-shadow: var(--shadow);
}
.panel h3 { margin-bottom: .9rem; }
.panel-accent { border-left: 3px solid var(--accent); }

.hours { margin: 0; display: grid; gap: .35rem; }
.hours > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .92rem;
  padding-bottom: .35rem;
  border-bottom: 1px dotted var(--line);
}
.hours > div:last-child { border-bottom: 0; padding-bottom: 0; }
.hours dt { color: var(--ink-soft); }
.hours dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.hours .closed dd { color: var(--accent); }

/* ── book ─────────────────────────────────────────────────── */
.book { padding-block: clamp(3rem, 8vw, 6rem); }
.book-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: clamp(2.5rem, 6vw, 4rem);
}
.book-inner .eyebrow { color: var(--accent); }
.book-lede { color: var(--ink-soft); margin: 1.1rem auto 2rem; max-width: 48ch; }
.book-note { font-size: .85rem; color: var(--ink-faint); margin-top: 1.1rem; }

/* ── footer ───────────────────────────────────────────────── */
.site-foot {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding-block: 2.4rem 3rem;
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.foot-brand .brand-name { display: block; font-size: 1.1rem; }
.foot-brand .muted { margin: .2rem 0 0; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.foot-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .9rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.foot-nav a:hover { color: var(--accent); }
.attribution { margin: 0; font-size: .78rem; color: var(--ink-faint); }
.attribution a { color: var(--ink-faint); }

/* ── view transitions ─────────────────────────────────────── */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .28s ease both; }
::view-transition-new(root) { animation: vt-in .34s cubic-bezier(.4,0,.2,1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in  { from { opacity: 0; transform: translateY(10px); } }

/* ── responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-copy { grid-column: 1 / 7; }
  .hero-figure { grid-column: 1 / 7; }
  .hero-figure img { aspect-ratio: 16 / 11; }
  .visit-main { grid-column: 1 / 7; }
  .visit-side { grid-column: 1 / 7; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .entry, .entry:nth-child(3n), .entry:nth-child(4n) { grid-column: 1 / 7; }
}

@media (max-width: 720px) {
  .site-nav { display: none; }
  .head-actions .btn { padding: .6rem 1rem; font-size: .88rem; }
  .theme-label { display: none; }
  .theme-toggle { padding: .5rem .7rem; }
  .entry summary { gap: .7rem; }
  .entry-tag { display: none; }
  .foot-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .glow { transition: none; }
  .entry-body { animation: none; }
  .btn:hover { transform: none; }
  .entry summary:hover { padding-left: .25rem; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
