/* ==========================================================================
   Cleaning Lady Company — design tokens
   Values are taken verbatim from the design handoff. Treat this file as the
   single source of truth for colour, type and shape.
   ========================================================================== */

:root {
  /* Colour */
  --ink: #2a160f;
  --ink-2: #4a3227;
  --ink-3: #6b4c3d;
  --ink-4: #8a6f62;
  --ink-5: #7a5f52;

  --paper: #fffdfa;
  --paper-warm: #faf7f2;
  --card: #ffffff;
  --cream: #faf4ea;
  --cream-2: #fbf8f4;

  --magenta: #c6007e;
  --magenta-dark: #8e0059;
  --pink-tint: #fbe4f1;
  --pink-2: #f7d3e8;
  --pink-3: #f49bd0;
  --pink-pale: #fff4fa;
  --plum: #6b2b4e;

  --brown: #331c13;
  --brown-2: #3f261b;
  --on-dark: #f6ede6;
  --on-dark-2: #d8c4b8;
  --on-dark-3: #c9b3a6;
  --on-dark-4: #a98b7c;

  --success-bg: rgba(37, 120, 73, 0.12);
  --success-fg: #1f6b41;
  --danger-bg: rgba(154, 44, 44, 0.1);
  --danger-fg: #9a2c2c;

  --hair: rgba(42, 22, 15, 0.09);
  --hair-2: rgba(42, 22, 15, 0.12);
  --hair-3: rgba(42, 22, 15, 0.16);
  --hair-4: rgba(42, 22, 15, 0.2);

  --stripes: repeating-linear-gradient(135deg, #f3ebe3 0 10px, #efe5db 10px 20px);

  /* Type */
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Familjen Grotesk", Helvetica, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  /* Shape */
  --r-pill: 999px;
  --r-card: 22px;
  --r-card-admin: 18px;
  --r-input: 10px;
  --r-photo: 12px;

  /* Layout */
  --pad-y: clamp(72px, 9vw, 140px);
  --pad-x: clamp(20px, 4vw, 32px);
  --wrap: 1280px;
  --wrap-s: 1180px;

  --shadow-panel: 0 24px 48px -24px rgba(42, 22, 15, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--magenta);
  text-decoration: none;
}

a:hover {
  color: var(--magenta-dark);
}

::selection {
  background: var(--magenta);
  color: #fff;
}

input,
select,
textarea,
button {
  font-family: var(--sans);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 2px;
}

/* ==========================================================================
   Primitives
   ========================================================================== */

.serif {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.eyebrow {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--magenta);
}

.eyebrow-sm {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.section {
  padding: clamp(62px, 9.2vw, 120px) var(--pad-x);
}

.section-sm {
  padding: clamp(57px, 8.5vw, 110px) var(--pad-x);
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
}

.wrap-s {
  max-width: var(--wrap-s);
  margin: 0 auto;
}

.h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 6.4vw, 96px);
  line-height: 0.94;
  letter-spacing: -0.025em;
  margin: 0;
}

.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 5vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
}

.h2-sm {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 62px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
}

.h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 40px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0;
}

.lede {
  font-size: 21px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}

.body {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
}

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-block;
  border: 0;
  cursor: pointer;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  padding: 13px 24px;
  text-align: center;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-lg {
  font-size: 19px;
  padding: 18px 36px;
}

.btn-xl {
  font-size: 20px;
  padding: 19px 40px;
}

.btn-primary {
  background: var(--magenta);
  color: #fff;
}

.btn-primary:hover {
  background: var(--magenta-dark);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid rgba(42, 22, 15, 0.26);
}

.btn-secondary:hover {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
}

.btn-secondary-dark {
  background: transparent;
  color: var(--on-dark);
  border: 1.5px solid rgba(246, 237, 230, 0.4);
}

.btn-secondary-dark:hover {
  border-color: var(--on-dark);
  color: #fff;
}

.btn-danger-outline {
  background: #fff;
  color: var(--danger-fg);
  border: 1.5px solid rgba(154, 44, 44, 0.4);
}

.btn-danger-outline:hover {
  background: #fdf1f1;
}

.btn-ink {
  background: var(--ink);
  color: #fff;
}

.pill {
  cursor: pointer;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--hair-4);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pill[aria-pressed="true"],
.pill.is-on {
  background: var(--magenta);
  color: #fff;
  border-color: var(--magenta);
}

/* Inputs ----------------------------------------------------------------- */

.field {
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 9px;
}

.input {
  width: 100%;
  font-size: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1.5px solid rgba(42, 22, 15, 0.22);
  background: #fff;
  color: var(--ink);
}

.input-sm {
  font-size: 16px;
  padding: 12px 16px;
  border-radius: var(--r-input);
  border: 1.5px solid rgba(42, 22, 15, 0.18);
  background: #fff;
  color: var(--ink);
  width: 100%;
}

textarea.input,
textarea.input-sm {
  line-height: 1.5;
  resize: vertical;
}

/* Grids ------------------------------------------------------------------ */

.grid {
  display: grid;
  gap: 20px;
}

/*
 * `min(Npx, 100%)` keeps the track from exceeding the container: without it a
 * 360px minimum overflows the page on a 375px phone once padding is taken off.
 */
.auto-160 { grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); }
.auto-170 { grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); }
.auto-190 { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
.auto-200 { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.auto-210 { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }
.auto-230 { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.auto-240 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.auto-260 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.auto-280 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.auto-300 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.auto-320 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.auto-330 { grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr)); }
.auto-340 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.auto-360 { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }

/*
 * Wide admin card inside an auto-fit grid. Spans two tracks where two tracks
 * exist; below that the grid is single-column and `span 2` would overflow the
 * page, so it collapses to a full-width cell.
 */
.span-2 {
  grid-column: span 2;
}

@media (max-width: 719px) {
  .span-2 {
    grid-column: 1 / -1;
  }
}

/* Customer list beside the detail pane; stacks on narrow screens. */
.cust-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 860px) {
  .cust-layout {
    grid-template-columns: 1fr;
  }
}

/* Hairline-separated tile group (cards share a 2px gap on a hairline bg) */
.tile-group {
  display: grid;
  gap: 2px;
  background: var(--hair-2);
  border-radius: var(--r-card);
  overflow: hidden;
}

.tile {
  background: var(--paper);
  padding: 24px 26px;
}

/* Reveal on scroll ------------------------------------------------------- */

/*
 * Visible by default. The hidden-then-fade-in state only applies once the
 * script has claimed the page by putting `js` on <html>, so a blocked, failed
 * or slow script can never leave a section stuck at opacity 0 — which is
 * exactly what happens if the IntersectionObserver never fires.
 */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Chrome-specific hovers -------------------------------------------------- */

.mega-link:hover {
  background: var(--pink-tint);
  color: var(--ink);
}

.footer-link:hover {
  color: #fff;
}

.district-chip:hover {
  border-color: var(--pink-3);
  color: #fff;
}

/* Utility ---------------------------------------------------------------- */

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.stack {
  display: flex;
  flex-direction: column;
}

.mono {
  font-family: var(--mono);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Site chrome.

   The original header carried these rules as inline styles switched by a
   `narrow` state in JavaScript. Here the breakpoint is a media query, so the
   right layout is painted before any script runs.
   ========================================================================== */

.nav-bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px var(--pad-x);
  display: flex;
  align-items: center;
  gap: 16px 36px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  flex: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
  margin-left: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 17px;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  color: var(--ink);
}

.nav-link.is-active,
.nav-link.is-open {
  color: var(--magenta);
}

.nav-link.is-open {
  background: var(--pink-tint);
}

.nav-caret {
  font-size: 11px;
  opacity: 0.55;
  transition: transform 0.2s ease;
}

.nav-link.is-open .nav-caret {
  transform: rotate(180deg);
}

.nav-cta {
  font-size: 17px;
  flex: none;
}

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--hair-4);
  border-radius: var(--r-pill);
  background: transparent;
  cursor: pointer;
  flex: none;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-burger[aria-expanded="true"] {
  background: var(--pink-tint);
}

.nav-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--paper);
  border-bottom: 1px solid var(--hair-2);
  box-shadow: var(--shadow-panel);
}

.nav-mega-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px var(--pad-x) 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 40px;
}

.nav-drawer {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  max-height: 78vh;
  overflow-y: auto;
  background: var(--paper);
  border-bottom: 1px solid var(--hair-2);
  box-shadow: 0 24px 48px -24px rgba(42, 22, 15, 0.3);
}

.nav-drawer-inner {
  padding: 20px var(--pad-x) 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Below this width the row cannot hold the links, so it becomes a drawer. */
@media (max-width: 999px) {
  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-burger {
    display: flex;
  }

  .nav-mega {
    display: none !important;
  }
}

@media (min-width: 1000px) {
  .nav-drawer {
    display: none !important;
  }
}

/* Panels are rendered into the page and revealed, so the whole navigation is
   in the HTML whether or not the script runs. */
[hidden] {
  display: none !important;
}

/* Tables that would otherwise push the page sideways on a phone. */
.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Two-column text/photo blocks used across the service pages. */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}

.split-top {
  align-items: start;
}

/* Booking wizard ---------------------------------------------------------- */

.step-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 10px 18px 10px 10px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--hair-3);
  background: transparent;
  color: var(--ink-4);
}

.step-tab.is-active {
  border-color: var(--magenta);
  background: var(--pink-tint);
  color: var(--ink);
}

.step-tab.is-done {
  color: var(--ink);
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: rgba(42, 22, 15, 0.1);
  color: var(--ink-3);
}

.step-tab.is-active .step-num {
  background: var(--magenta);
  color: #fff;
}

.step-tab.is-done .step-num {
  background: var(--brown);
  color: #fff;
}

.choice.is-selected {
  background: var(--pink-tint);
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(198, 0, 126, 0.12);
}

.day-cell {
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  padding: 14px 8px;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--hair-3);
}

.day-cell[aria-pressed="true"] {
  background: var(--magenta);
  border-color: var(--magenta);
  color: #fff;
}

.day-cell:disabled {
  cursor: not-allowed;
  color: #b9a597;
  opacity: 0.55;
}

.day-dow {
  display: block;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.day-num {
  display: block;
  font-size: 24px;
  font-weight: 600;
  margin-top: 4px;
}

.day-mon {
  display: block;
  font-size: 14px;
  opacity: 0.7;
}

/* Admin console ----------------------------------------------------------- */

.admin-sidebar {
  background: var(--ink);
  color: var(--on-dark-2);
  width: 262px;
  flex: none;
  padding: 26px 16px 24px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  overflow-y: auto;
}

.admin-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 22px;
  border: 1.5px solid rgba(42, 22, 15, 0.18);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  flex: none;
  color: var(--ink);
}

@media (max-width: 999px) {
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    display: none;
  }

  .admin-sidebar.is-open {
    display: flex;
    box-shadow: 0 0 0 100vw rgba(42, 22, 15, 0.35);
  }

  .admin-burger {
    display: inline-flex;
  }
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.admin-table th {
  text-align: left;
  padding: 13px 16px;
  white-space: nowrap;
}

.admin-table td {
  padding: 14px 16px;
  border-top: 1px solid var(--hair);
  vertical-align: top;
}

.admin-bar {
  display: block;
  border-radius: 4px;
  background: var(--magenta);
}
