/* ============================================================
   Albert's Pals — style.css
   Token-driven design system. Orange-led identity, warm paper
   light mode, espresso dark mode. Bento grid, kinetic type,
   micro-interactions. No frameworks, no preprocessor.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand */
  --orange:        #F4661F;   /* primary */
  --orange-bright: #FF8A3D;   /* hover / gradients */
  --orange-deep:   #C24A0E;   /* pressed / dark-mode primary text-on-light */
  --moss:          #4A7C59;   /* functional: "available" state only */
  --moss-soft:     #4a7c5926;

  /* Light surface set */
  --paper:      #FFF8F1;
  --card:       #FFFFFF;
  --card-tint:  #FDEEE2;
  --ink:        #24160C;
  --ink-soft:   #6B5847;
  --line:       #EADFD3;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;

  --shadow-1: 0 1px 2px rgb(36 22 12 / .05), 0 4px 14px rgb(36 22 12 / .06);
  --shadow-2: 0 2px 4px rgb(36 22 12 / .07), 0 12px 30px rgb(36 22 12 / .12);

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;

  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);  /* playful overshoot — the dog-bounce */
  --ease-out:    cubic-bezier(.22, 1, .36, 1);
  --t-fast: 150ms;
  --t-med:  280ms;

  color-scheme: light;
}

/* Dark: espresso-brown, not generic near-black. Orange stays the lead. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1B120B; --card: #251A10; --card-tint: #2E2014;
    --ink: #F3E9DF; --ink-soft: #BCA893; --line: #3A2A1B;
    --shadow-1: 0 1px 2px rgb(0 0 0 / .3), 0 4px 14px rgb(0 0 0 / .35);
    --shadow-2: 0 2px 4px rgb(0 0 0 / .35), 0 14px 34px rgb(0 0 0 / .5);
    color-scheme: dark;
  }
}
[data-theme="light"] {
  --paper: #FFF8F1; --card: #FFFFFF; --card-tint: #FDEEE2;
  --ink: #24160C; --ink-soft: #6B5847; --line: #EADFD3;
  --shadow-1: 0 1px 2px rgb(36 22 12 / .05), 0 4px 14px rgb(36 22 12 / .06);
  --shadow-2: 0 2px 4px rgb(36 22 12 / .07), 0 12px 30px rgb(36 22 12 / .12);
  color-scheme: light;
}
[data-theme="dark"] {
  --paper: #1B120B; --card: #251A10; --card-tint: #2E2014;
  --ink: #F3E9DF; --ink-soft: #BCA893; --line: #3A2A1B;
  --shadow-1: 0 1px 2px rgb(0 0 0 / .3), 0 4px 14px rgb(0 0 0 / .35);
  --shadow-2: 0 2px 4px rgb(0 0 0 / .35), 0 14px 34px rgb(0 0 0 / .5);
  color-scheme: dark;
}

/* ---------- 2. Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  transition: background-color var(--t-med) ease, color var(--t-med) ease;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 .5em; }
h2 { font-size: clamp(1.8rem, 4.5vw, 3rem); font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 1.25rem; font-weight: 620; }
p { margin: 0 0 1em; }
a { color: inherit; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--orange); color: #fff; padding: .6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0; z-index: 100; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* Universal focus ring — visible, on-brand, offset */
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---------- 3. Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  text-decoration: none; font-family: var(--font-display);
  font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em;
}
.brand-mark { fill: var(--orange); transition: transform var(--t-med) var(--ease-spring); }
.brand:hover .brand-mark { transform: rotate(-12deg) scale(1.12); }

.site-nav { display: flex; align-items: center; gap: clamp(.25rem, 1.5vw, 1rem); }
.site-nav a {
  position: relative; text-decoration: none; font-weight: 500;
  padding: .45rem .65rem; border-radius: var(--radius-sm);
  transition: color var(--t-fast) ease;
}
/* Nav micro-interaction: underline sweeps in from the left */
.site-nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: .65rem; right: .65rem; bottom: .2rem;
  height: 2px; background: var(--orange); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-med) var(--ease-out);
}
.site-nav a:not(.nav-cta):hover::after,
.site-nav a:not(.nav-cta):focus-visible::after { transform: scaleX(1); }

.nav-cta {
  background: var(--orange); color: #fff; font-weight: 600;
  padding: .5rem .95rem; border-radius: 99px;
  transition: transform var(--t-fast) var(--ease-spring), background var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
.nav-cta:hover { background: var(--orange-bright); transform: translateY(-1px); box-shadow: var(--shadow-1); }
.nav-cta:active { transform: translateY(0) scale(.97); }

.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--card); color: var(--ink); cursor: pointer;
  transition: transform var(--t-med) var(--ease-spring), border-color var(--t-fast) ease;
}
.theme-toggle:hover { transform: rotate(35deg); border-color: var(--orange); }
.theme-toggle:active { transform: rotate(35deg) scale(.9); }

/* ---------- 4. Hero + kinetic type ---------- */
.hero { padding: clamp(2.5rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem) clamp(2rem, 5vw, 4rem); max-width: 1200px; margin-inline: auto; }

.eyebrow {
  font-family: var(--font-display); font-weight: 600; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .14em; color: var(--orange-deep);
  margin-bottom: .75rem;
}
[data-theme="dark"] .eyebrow { color: var(--orange-bright); }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] .eyebrow { color: var(--orange-bright); } }

h1.kinetic, .section-title.kinetic {
  font-family: var(--font-display);
}
h1 {
  font-size: clamp(2.6rem, 8vw, 6rem);
  font-weight: 750;
  letter-spacing: -.02em;
  line-height: 1.02;
  margin: 0 0 .4em;
  max-width: 14ch;
}

/* Split characters (spans injected by JS). Each char staggers up with a
   spring, then "breathes" its variable-font weight once in view. */
.kinetic .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(.6em) rotate(4deg);
  font-variation-settings: "wght" 300;
}
.kinetic.in-view .char {
  animation:
    char-in 620ms var(--ease-spring) forwards,
    char-weight 900ms var(--ease-out) forwards;
  animation-delay: calc(var(--char-i) * 28ms), calc(180ms + var(--char-i) * 28ms);
}
@keyframes char-in {
  to { opacity: 1; transform: translateY(0) rotate(0); }
}
@keyframes char-weight {
  from { font-variation-settings: "wght" 300; }
  to   { font-variation-settings: "wght" 750; }
}
/* Supporting lines: simple fade-rise, staggered after the headline */
.kinetic-line { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.kinetic-line.in-view { opacity: 1; transform: none; }

.hero-sub { max-width: 52ch; font-size: 1.15rem; color: var(--ink-soft); transition-delay: 350ms; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 2.2rem; }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: .8rem 1.5rem; border-radius: 99px; border: 0; cursor: pointer;
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease-spring),
              background var(--t-fast) ease,
              box-shadow var(--t-fast) ease,
              color var(--t-fast) ease;
}
.btn-primary { background: var(--orange); color: #fff; box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--orange-bright); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.btn-primary:active { transform: translateY(0) scale(.96); background: var(--orange-deep); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange-deep); transform: translateY(-2px); }
[data-theme="dark"] .btn-ghost:hover { color: var(--orange-bright); }
.btn-ghost:active { transform: scale(.96); }
.btn-cell {
  background: var(--card-tint); color: var(--orange-deep);
  padding: .6rem 1.1rem; font-size: .95rem; margin-top: auto; align-self: start;
}
[data-theme="dark"] .btn-cell { color: var(--orange-bright); }
.btn-cell:hover { background: var(--orange); color: #fff; transform: translateY(-2px); }
.btn-cell:active { transform: scale(.95); }

/* ---------- 6. Sections ---------- */
.section { padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem); max-width: 1200px; margin-inline: auto; }
.section-title { max-width: 20ch; }
.section-sub { color: var(--ink-soft); margin-top: -0.5rem; margin-bottom: 2rem; max-width: 50ch; }

/* ---------- 7. Bento grid ----------
   Mobile: 1 col → Tablet: 2 col → Desktop: 4 col.
   .span-2 widens on tablet+; every cell reflows without gaps. */
.bento { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 2rem; }
@media (min-width: 620px)  { .bento { grid-template-columns: repeat(2, 1fr); } .span-2 { grid-column: span 2; } }
@media (min-width: 1000px) { .bento { grid-template-columns: repeat(4, 1fr); } }

.cell {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  min-height: 190px;
  box-shadow: var(--shadow-1);
  transition: transform var(--t-med) var(--ease-spring),
              box-shadow var(--t-med) ease,
              border-color var(--t-med) ease;
}
/* Card micro-interaction: lift + orange edge on hover */
.cell:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); }

.cell-service h3 { color: var(--orange-deep); }
[data-theme="dark"] .cell-service h3 { color: var(--orange-bright); }
.cell-service p { color: var(--ink-soft); font-size: .98rem; }
.price { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; margin: .2rem 0 .9rem; color: var(--ink); }
.price span { font-size: .85rem; font-weight: 500; color: var(--ink-soft); margin-inline: .3ch; }

.cell-media { padding: 0; overflow: hidden; min-height: 220px; }
.cell-quote {
  background: var(--card-tint); border-color: transparent;
  font-size: 1.12rem; justify-content: center; margin: 0;
}
.cell-quote p { font-family: var(--font-display); font-weight: 500; line-height: 1.4; }
.cell-quote footer { color: var(--ink-soft); font-size: .9rem; }

.cell-trust { align-items: flex-start; justify-content: center; gap: .2rem; }
.trust-big {
  font-family: var(--font-display); font-weight: 800; font-size: 2.2rem;
  color: var(--orange); margin: 0; letter-spacing: -.02em;
}
.cell-trust p:last-child { color: var(--ink-soft); font-size: .92rem; margin: 0; }

.cell-availability { background: var(--ink); color: var(--paper); border-color: transparent; justify-content: center; }
.cell-availability h3 { color: var(--orange-bright); font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; }
.availability-slot { font-family: var(--font-display); font-size: 1.35rem; font-weight: 650; margin: 0 0 .8rem; }
.cell-link { color: var(--orange-bright); font-weight: 600; text-decoration: none; }
.cell-link:hover { text-decoration: underline; }

/* ---------- 8. Image slots ----------
   Empty slots show a labelled dashed placeholder; once a src is present
   (drop the file in /assets and remove nothing) the label hides. */
.img-slot { position: relative; margin: 0; background: var(--card-tint); border-radius: var(--radius-lg); overflow: hidden; }
.img-slot img { width: 100%; height: 100%; object-fit: cover; }
.img-slot img[src=""], .img-slot img:not([src]) { display: none; }
.img-slot-label {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: .85rem; color: var(--ink-soft);
  border: 2px dashed color-mix(in srgb, var(--orange) 40%, transparent);
  border-radius: inherit; text-align: center; padding: 1rem;
}
.img-slot img[src]:not([src=""]) ~ .img-slot-label { display: none; }
.img-slot[data-ratio="16/9"] { aspect-ratio: 16/9; }
.img-slot[data-ratio="1/1"]  { aspect-ratio: 1/1; }
.img-slot[data-ratio="2/1"]  { aspect-ratio: 2/1; }
.img-slot[data-ratio="4/5"]  { aspect-ratio: 4/5; }
.hero-media { margin-top: 1rem; box-shadow: var(--shadow-2); }

/* ---------- 9. About ---------- */
.about-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 800px) { .about-grid { grid-template-columns: 1.2fr .8fr; } }
.section-about p { color: var(--ink-soft); max-width: 58ch; }

/* ---------- 10. Booking ---------- */
.booking {
  display: grid; gap: 1.25rem; margin-top: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .booking { grid-template-columns: 1fr 1fr; }
  .book-step:nth-child(1), .book-footer, .form-status { grid-column: 1 / -1; }
}
.book-step {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--card); padding: 1.3rem; margin: 0; min-inline-size: 0;
}
.book-step legend {
  font-family: var(--font-display); font-weight: 650; font-size: 1.05rem;
  padding-inline: .4rem; display: flex; align-items: center; gap: .55rem;
}
.step-n {
  display: grid; place-items: center; width: 1.6rem; height: 1.6rem;
  background: var(--orange); color: #fff; border-radius: 50%;
  font-size: .85rem; font-weight: 700;
}

/* Service chips */
.service-picker { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: .6rem 1.15rem; border-radius: 99px;
  border: 1.5px solid var(--line); font-weight: 500; cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}
.chip:hover span { border-color: var(--orange); transform: translateY(-1px); }
.chip input:checked + span { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 600; }
.chip input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 3px; }
.chip input:active + span { transform: scale(.96); }

/* Calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .7rem; }
.cal-title { font-family: var(--font-display); font-weight: 650; margin: 0; }
.cal-nav {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); cursor: pointer; font-size: 1rem;
  transition: all var(--t-fast) var(--ease-spring);
}
.cal-nav:hover:not(:disabled) { background: var(--orange); color: #fff; border-color: var(--orange); transform: scale(1.08); }
.cal-nav:active:not(:disabled) { transform: scale(.92); }
.cal-nav:disabled { opacity: .35; cursor: not-allowed; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-daynames span { text-align: center; font-size: .75rem; font-weight: 600; color: var(--ink-soft); padding-block: .3rem; text-transform: uppercase; letter-spacing: .05em; }

.cal-day {
  aspect-ratio: 1; display: grid; place-items: center;
  border-radius: var(--radius-sm); border: 0; background: transparent;
  font: inherit; font-size: .95rem; color: var(--ink); cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}
.cal-day.is-available { background: var(--moss-soft); color: var(--ink); font-weight: 600; }
.cal-day.is-available:hover { background: var(--moss); color: #fff; transform: scale(1.1); }
.cal-day.is-selected { background: var(--orange); color: #fff; font-weight: 700; transform: scale(1.06); box-shadow: var(--shadow-1); }
.cal-day.is-unavailable, .cal-day:disabled { color: var(--ink-soft); opacity: .38; cursor: not-allowed; text-decoration: line-through; }
.cal-day.is-empty { visibility: hidden; }

.cal-legend { display: flex; gap: 1rem; margin: .8rem 0 0; font-size: .8rem; color: var(--ink-soft); flex-wrap: wrap; }
.lg { display: inline-flex; align-items: center; gap: .4rem; }
.lg::before { content: ""; width: .8rem; height: .8rem; border-radius: 4px; }
.lg-available::before { background: var(--moss-soft); border: 1px solid var(--moss); }
.lg-selected::before { background: var(--orange); }
.lg-unavailable::before { background: var(--line); }

/* Time slots */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: .6rem; }
.slots-empty { grid-column: 1 / -1; color: var(--ink-soft); font-size: .95rem; margin: 0; }
.slot {
  padding: .65rem .4rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--card);
  font: inherit; font-size: .95rem; font-weight: 500; color: var(--ink); cursor: pointer;
  transition: all var(--t-fast) var(--ease-spring);
}
.slot:hover:not(:disabled) { border-color: var(--orange); transform: translateY(-2px); }
.slot.is-selected { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 700; }
.slot:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.slot:active:not(:disabled) { transform: scale(.94); }

/* Fields */
.field-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .field-grid { grid-template-columns: 1fr 1fr; } .field-wide { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-weight: 600; font-size: .92rem; }
.optional { font-weight: 400; color: var(--ink-soft); }
.field input, .field textarea {
  font: inherit; color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line); border-radius: var(--radius-md);
  padding: .7rem .9rem;
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease, transform var(--t-fast) ease;
}
.field input:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--orange) 50%, var(--line)); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--orange);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 18%, transparent);
}
.field input:user-invalid { border-color: #C2340E; }

/* Footer of form */
.book-footer {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  background: var(--card-tint); border-radius: var(--radius-lg); padding: 1.1rem 1.4rem;
}
.book-summary { margin: 0; font-weight: 600; font-family: var(--font-display); }
.btn-submit { min-width: 200px; }
.btn-submit.is-busy { pointer-events: none; opacity: .7; }

.form-status { min-height: 1.5em; font-weight: 600; margin: 0; }
.form-status.ok { color: var(--moss); }
.form-status.err { color: #C2340E; }

/* ---------- 11. FAQ ---------- */
.faq-list { display: grid; gap: .8rem; max-width: 760px; margin-top: 1.5rem; }
.faq-item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 0 1.2rem;
  transition: border-color var(--t-fast) ease, box-shadow var(--t-med) ease;
}
.faq-item:hover { border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); }
.faq-item[open] { box-shadow: var(--shadow-1); }
.faq-item summary {
  cursor: pointer; font-weight: 600; padding: 1rem 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-family: var(--font-display); font-size: 1.4rem; color: var(--orange);
  transition: transform var(--t-med) var(--ease-spring);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--ink-soft); padding-bottom: 1.1rem; margin: 0; }

/* ---------- 12. Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem clamp(1rem, 4vw, 3rem) 1.5rem; margin-top: 3rem; }
.footer-grid { display: grid; gap: 1.5rem; max-width: 1200px; margin-inline: auto; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: .3rem; }
.site-footer address { font-style: normal; }
.site-footer a { color: var(--ink-soft); text-decoration: none; transition: color var(--t-fast) ease; }
.site-footer a:hover { color: var(--orange-deep); text-decoration: underline; }
[data-theme="dark"] .site-footer a:hover { color: var(--orange-bright); }
.site-footer nav { display: flex; flex-direction: column; gap: .4rem; }
.footer-legal { max-width: 1200px; margin: 2rem auto 0; color: var(--ink-soft); font-size: .85rem; }

/* ---------- 13. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .kinetic .char { opacity: 1; transform: none; font-variation-settings: "wght" 750; }
  .kinetic-line { opacity: 1; transform: none; }
}
