/* Adore The Set: customer app styles, concept D.
   A layout, C colors and type. Owned by Miriam.
   Desktop: home plus a one page appointment builder.
   Phone (767px and below): the builder steps flip as pages, no scrolling between them. */

/* ============================ base ============================ */
* { box-sizing: border-box; }

/* the ground lives on html so it covers the whole document, not one viewport.
   background-attachment: fixed was the first try and it left everything below
   the fold white in a full page render, and it misbehaves on iOS Safari. */
html {
  min-height: 100%;
  background:
    radial-gradient(ellipse at 18% 22%, rgba(20, 17, 20, 0.045), transparent 45%),
    radial-gradient(ellipse at 80% 70%, rgba(233, 123, 163, 0.16), transparent 42%),
    linear-gradient(180deg, var(--blush-pale), var(--blush) 38%, var(--blush-deep) 92%);
  background-repeat: no-repeat;
}
body { min-height: 100%; background: transparent; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* pink marble veins: the lookbook filter, tinted pink instead of grey */
body::before {
  content: "";
  position: fixed;
  inset: -60px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.42;
  background: repeating-linear-gradient(
    112deg,
    transparent 0 70px,
    rgba(150, 70, 105, 0.18) 70px 72px,
    transparent 72px 160px,
    rgba(150, 70, 105, 0.09) 160px 161px,
    transparent 161px 260px);
  filter: url(#veins);
}

svg.defs { position: absolute; width: 0; height: 0; }

h1, h2, h3, p, dl, dd, figure { margin: 0; }
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }

.script {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-tight);
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--blush);
  padding: 10px 16px; z-index: var(--z-toast);
}
.skip:focus { left: 0; }

:where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.eyebrow, .step-label {
  font-size: var(--fs-micro);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}
.eyebrow { letter-spacing: var(--track-brand); font-size: 12px; }

.loading { color: var(--muted); font-size: var(--fs-sm); }
.fine { font-size: var(--fs-fine); color: var(--muted-2); margin-top: var(--sp-3); }

/* ============================ buttons ============================ */
.btn {
  display: inline-block;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--blush);
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.cash { background: var(--pink); color: var(--ink); }
.btn.cash:hover { background: var(--rose); }
.btn.block { display: block; width: 100%; margin-top: var(--sp-4); }
.btn-sm { padding: 9px 16px; }

.iconbtn {
  border: 1px solid var(--ink);
  background: transparent;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 22px; line-height: 1;
  cursor: pointer;
  flex: none;
}
.iconbtn:hover:not([disabled]) { background: var(--ink); color: var(--blush); }
.iconbtn[disabled] { opacity: 0.25; cursor: not-allowed; }

/* ============================ nav and footer ============================ */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--pad-x);
  border-bottom: 1px solid var(--line);
}
.nav .brand {
  font-family: var(--font-display);
  font-size: var(--fs-brand);
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
}
.nav .links { display: flex; gap: 22px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.nav .links a { color: var(--ink); text-decoration: none; }
.nav .links a:hover { text-decoration: underline; }

.site-foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-3);
  padding: var(--sp-5) var(--pad-x);
  border-top: 1px solid var(--line);
  font-size: var(--fs-fine);
  color: var(--muted);
}
.site-foot .script { font-size: 26px; color: var(--ink); }

/* ============================ views ============================ */
.view { display: none; }
.view.is-active { display: block; }

.pad { padding: var(--sp-7) var(--pad-x); }
.strip {
  height: 14px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

h2.script { font-size: var(--fs-h2); margin-bottom: var(--sp-2); }
h3.script { font-size: var(--fs-h3); }
.section-note { color: var(--ink-soft); max-width: 62ch; margin-bottom: var(--sp-5); font-size: var(--fs-sm); }

/* ============================ home hero ============================ */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--sp-7);
  align-items: center;
  padding: var(--sp-8) var(--pad-x);
  max-width: var(--maxw);
  margin: 0 auto;
}
.hero h1 { font-size: var(--fs-h1); margin-top: var(--sp-2); }
.lede { max-width: 44ch; color: var(--ink-soft); margin: var(--sp-4) 0 var(--sp-6); }
.hero-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

.hero-pic { position: relative; }
.hero-pic::before {
  content: "";
  position: absolute;
  inset: 16px -16px -16px 16px;
  border: var(--border);
  background:
    radial-gradient(ellipse at 18% 22%, rgba(0, 0, 0, 0.05), transparent 45%),
    radial-gradient(ellipse at 80% 70%, rgba(0, 0, 0, 0.04), transparent 40%),
    linear-gradient(180deg, var(--marble-hi), var(--marble-lo));
}
.hero-pic img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: var(--border);
}
.hero-pic figcaption {
  position: relative;
  text-align: center;
  font-size: 22px;
  margin-top: var(--sp-2);
}

/* no photo yet: the marble slab carries her name on its own */
.hero-pic.is-empty { aspect-ratio: 4 / 5; display: grid; place-items: center; }
.hero-pic.is-empty::before { inset: 0; }
.hero-pic.is-empty figcaption { font-size: clamp(34px, 6vw, 56px); margin: 0; }

/* ============================ deposit line, her words ============================ */
.deposit {
  display: flex; gap: var(--sp-4); align-items: center; flex-wrap: wrap;
  background: var(--ink);
  color: var(--blush);
  padding: var(--sp-4) var(--pad-x);
  font-size: var(--fs-sm);
}
.deposit b { color: var(--pink); font-weight: 700; white-space: nowrap; }
.deposit-slim { padding: var(--sp-3) var(--pad-x); font-size: var(--fs-fine); }

/* ============================ prices, policy, gallery ============================ */
.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
  max-width: var(--maxw);
  margin: 0 auto var(--sp-6);
}
.price-block h4 {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-micro);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  font-weight: 500;
}
.price-block table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.price-block td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-block td:last-child { text-align: right; white-space: nowrap; font-weight: 700; }
.price-block .dur { display: block; font-size: var(--fs-fine); color: var(--muted-2); }

.policy {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  max-width: var(--maxw);
  margin: 0 auto;
  font-size: var(--fs-sm);
}
.policy article {
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow-offset);
  padding: var(--sp-5);
}
.policy b { display: block; margin-bottom: var(--sp-1); }
.policy p { color: var(--ink-soft); }

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
  max-width: var(--maxw);
  margin: 0 auto;
}
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: var(--border);
}

/* ============================ cards and lists ============================ */
.card {
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow-offset);
  padding: var(--sp-5);
}

.list {
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow-offset);
  overflow: hidden;
}
.list .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-4);
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 16px var(--sp-5);
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  cursor: pointer;
}
.list .row:last-child { border-bottom: 0; }
.list .row:hover:not(.is-on) { background: #fff6fa; }
.list .row.is-on { background: var(--blush); }
.list .name { font-size: var(--fs-lg); font-weight: 500; }
.list .meta { font-size: var(--fs-sm); color: #4a4146; margin-top: 2px; font-variant-numeric: tabular-nums; }
.list .note { font-size: var(--fs-fine); color: var(--muted-2); margin-top: var(--sp-2); line-height: 1.45; max-width: 46ch; }
.list .select {
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.14em;
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.list .row.is-on .select { background: var(--pink); color: var(--ink); }
.cats .row { padding: 20px var(--sp-5); }
.cats .name { font-size: 18px; font-weight: 400; }

/* ============================ the builder ============================ */
#view-book { display: none; }
#view-book.is-active { display: flex; flex-direction: column; }

.flowbar {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-3) var(--pad-x);
  border-bottom: 1px solid var(--line);
}
.flowbar-title {
  font-size: 30px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flowbar-meta { font-size: var(--fs-fine); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.book {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--sp-7);
  align-items: start;
  padding: var(--sp-6) var(--pad-x) var(--sp-8);
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}

.steps { display: flex; flex-direction: column; gap: var(--sp-6); min-width: 0; }
.step-head { margin-bottom: var(--sp-3); }
.step-head h3 { margin: var(--sp-1) 0 var(--sp-1); }
.step-note { font-size: var(--fs-fine); color: var(--ink-soft); max-width: 52ch; }
.step-hint { font-size: var(--fs-fine); color: var(--muted); margin-top: var(--sp-3); }

/* the category page and the review page are phone navigation devices,
   the desktop page shows every list at once with the summary beside it */
.step-page[data-step="category"],
.step-page[data-step="review"] { display: none; }

.summary {
  position: sticky;
  top: var(--sp-4);
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow-offset);
  padding: var(--sp-5);
}
.chosen-list { margin-top: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-2); }
.chosen {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-3);
  align-items: start;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: var(--sp-2);
}
.chosen .name { font-size: var(--fs-sm); font-weight: 500; }
.chosen .meta { font-size: var(--fs-fine); color: var(--muted-2); font-variant-numeric: tabular-nums; }
.chosen .x {
  border: 0; background: transparent; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--muted-2);
  padding: 0 var(--sp-1);
}
.chosen .x:hover { color: var(--ink); }
.chosen-empty { font-size: var(--fs-sm); color: var(--muted); }

.addon {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  margin-top: var(--sp-4);
  padding: var(--sp-3);
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: var(--fs-sm);
}
.addon input { width: 18px; height: 18px; accent-color: var(--ink); flex: none; margin-top: 2px; }
.addon .sub { display: block; color: var(--muted-2); font-size: var(--fs-fine); }
.addon.is-on { background: var(--blush); border-color: var(--ink); }
.addon.is-off { opacity: 0.45; cursor: not-allowed; }

.totals { margin-top: var(--sp-4); font-variant-numeric: tabular-nums; }
.totals > div { display: flex; justify-content: space-between; gap: var(--sp-3); padding: 6px 0; }
.totals dt { color: var(--muted-2); font-size: var(--fs-sm); }
.totals dd { font-weight: 700; font-size: var(--fs-sm); }
.totals .dep { border-top: 1px solid var(--line); margin-top: var(--sp-2); padding-top: var(--sp-3); }
.totals .dep dd { color: var(--ink); }
.totals.big dd { font-size: var(--fs-xl); }

.flipnav { display: none; }

/* ============================ calendar ============================ */
.cal-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
  padding: var(--sp-6) var(--pad-x) var(--sp-8);
  max-width: 900px;
  margin: 0 auto;
  align-items: start;
}
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.cal-month { font-size: var(--fs-lg); font-weight: 500; }
.cal-dow, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}
.cal-dow { margin-top: var(--sp-4); font-size: 12px; font-weight: 700; color: var(--muted-2); }
.cal-grid { gap: 4px 0; margin-top: var(--sp-2); font-variant-numeric: tabular-nums; }
.cal-grid .day {
  border: 0; background: transparent; cursor: pointer;
  aspect-ratio: 1;
  max-height: 44px;
  border-radius: 50%;
  font-size: var(--fs-sm);
  color: var(--ink);
}
.cal-grid .day:hover:not(.is-off):not(.is-pick) { background: var(--blush); }
/* greyed days stay tappable so a tap can say why */
.cal-grid .day.is-off { color: var(--disabled-ink); background: var(--disabled-bg); cursor: help; }
.cal-grid .day.is-pick { background: var(--ink); color: var(--blush); font-weight: 700; }
.cal-grid .blank { aspect-ratio: 1; max-height: 44px; }

.cal-key { list-style: none; display: flex; gap: var(--sp-4); flex-wrap: wrap; margin: var(--sp-4) 0 0; padding: 0; font-size: 12px; color: var(--muted-2); }
.cal-key li { display: flex; align-items: center; gap: 6px; }
.cal-key i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line); display: block; }
.k-open { background: var(--white); }
.k-off { background: var(--disabled-bg); }
.k-pick { background: var(--ink); }

.slots { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.slots button {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink);
  background: var(--white);
  font-size: var(--fs-sm);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.slots button:hover:not(.is-off):not(.is-on) { background: var(--blush); }
.slots button.is-on { background: var(--ink); color: var(--blush); }
/* greyed slots stay tappable so a tap can say why */
.slots button.is-off {
  background: var(--disabled-bg);
  color: var(--disabled-ink);
  border-color: var(--line);
  cursor: help;
  text-decoration: line-through;
}
.slots button.over { border-style: dashed; }
.slots-empty { font-size: var(--fs-sm); color: var(--muted); margin-top: var(--sp-3); }
.slot-why { font-size: var(--fs-fine); color: var(--warn); margin-top: var(--sp-3); }

/* ============================ details form ============================ */
.form { max-width: 520px; margin: var(--sp-6) auto var(--sp-8); }
.field { margin-bottom: var(--sp-4); }
.field label { display: block; font-size: var(--fs-micro); letter-spacing: var(--track-wide); text-transform: uppercase; margin-bottom: 6px; }
.field input {
  width: 100%;
  padding: 12px var(--sp-3);
  border: var(--border);
  background: var(--white);
  border-radius: var(--radius-sm);
}
.field input:focus { outline: 2px solid var(--pink); outline-offset: 0; }
.field input.bad { border-color: var(--bad); }
.field-note { font-size: var(--fs-fine); color: var(--muted-2); margin-bottom: var(--sp-3); }
.check { display: flex; gap: var(--sp-3); align-items: flex-start; font-size: var(--fs-fine); cursor: pointer; margin-top: var(--sp-4); }
.check input { width: 20px; height: 20px; accent-color: var(--ink); flex: none; }
.form-error { color: var(--bad); font-size: var(--fs-sm); margin-top: var(--sp-3); }

/* ============================ confirm ============================ */
.confirm { max-width: 520px; margin: var(--sp-6) auto var(--sp-8); }
.confirm h3 { margin-bottom: var(--sp-3); }
.received {
  background: var(--blush);
  border: var(--border);
  padding: var(--sp-4);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-4);
}

/* ============================ toast ============================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  background: var(--ink);
  color: var(--blush);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-lift);
  max-width: min(92vw, 420px);
  text-align: center;
}

/* ============================ tablet ============================ */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; }
  .hero-pic { max-width: 420px; }
  .price-grid, .cal-wrap { grid-template-columns: 1fr; }
  .policy { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .book { grid-template-columns: 1fr; }
  .summary { position: static; }
}

/* ============================ phone: flip pages ============================ */
@media (max-width: 767px) {
  :root { --pad-x: var(--pad-x-sm); }

  .nav .links { display: none; }
  .nav .brand { font-size: 28px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: var(--sp-6) var(--pad-x); }
  .deposit { font-size: var(--fs-fine); }

  /* while a flow view is up the page itself never scrolls */
  body.flow-lock { overflow: hidden; }

  #view-book.is-active {
    height: 100dvh;
    height: 100vh;
    overflow: hidden;
  }
  #view-book .deposit-slim {
    font-size: 12px;
    padding: 10px var(--pad-x);
    line-height: 1.4;
  }
  #view-book .flowbar { padding: var(--sp-2) var(--pad-x); }
  /* the script title and the step counter share a narrow bar, so the title gives way */
  .flowbar { grid-template-columns: 34px minmax(0, 1fr) auto; gap: var(--sp-2); }
  .flowbar-title { font-size: 24px; }
  .flowbar-meta { font-size: 12px; }
  .iconbtn { width: 34px; height: 34px; font-size: 20px; }

  .book {
    flex: 1;
    min-height: 0;
    display: block;
    padding: var(--sp-4) var(--pad-x) var(--sp-3);
    overflow: hidden;
  }
  .steps { height: 100%; min-height: 0; display: block; }

  /* one page at a time, each one fits, nothing scrolls between them */
  .step-page { display: none; height: 100%; min-height: 0; flex-direction: column; overflow: hidden; }
  .step-page.is-active { display: flex; animation: flip var(--dur-page) var(--ease); }
  .step-page[data-step="category"].is-active,
  .step-page[data-step="review"].is-active { display: flex; }

  .step-head h3 { font-size: 30px; }
  .step-note { font-size: 12px; line-height: 1.4; }
  .step-head { margin-bottom: var(--sp-2); }

  .step-page .list { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
  .step-page .list .row { padding: 12px var(--sp-4); flex: 1; min-height: 0; align-items: center; }
  /* the shared note already sits under the title, rows stay short so four fit */
  .step-page .list .note { display: none; }
  .list .name { font-size: 16px; }
  .list .select { padding: 9px 12px; font-size: 11px; }

  .review-body { flex: 1; min-height: 0; overflow-y: auto; }
  /* keep the white card here, the rest of the app is built from them */
  .review-body .summary { box-shadow: var(--shadow-offset-sm); padding: var(--sp-4); }
  .review-body .summary > .step-label { display: none; }
  .review-body .summary > .btn.block,
  .review-body .summary > .fine { display: none; }

  .flipnav {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--sp-3);
    align-items: center;
    padding: var(--sp-3) var(--pad-x);
    padding-bottom: max(var(--sp-3), env(safe-area-inset-bottom));
    border-top: 1px solid var(--ink);
    background: var(--white);
  }
  .flipnav .btn { padding: 11px 18px; }
  .flip-total { text-align: center; font-size: var(--fs-fine); font-variant-numeric: tabular-nums; }

  @keyframes flip {
    from { opacity: 0; transform: translateX(22px); }
    to { opacity: 1; transform: translateX(0); }
  }

  /* calendar, details and confirm each sit on one screen too */
  #view-calendar.is-active,
  #view-details.is-active,
  #view-confirm.is-active {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    height: 100vh;
    overflow: hidden;
  }
  .cal-wrap, .form, .confirm {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* align-content: start, or the two cards stretch apart to fill the column */
  .cal-wrap { padding: var(--sp-4) var(--pad-x); gap: var(--sp-4); align-content: start; }
  .form, .confirm { margin: var(--sp-4) var(--pad-x); }
  .cal-grid .day, .cal-grid .blank { max-height: 40px; }
  .site-foot { display: none; }

  /* the toast sat on top of the flip nav and covered Next for its whole life */
  body.flow-lock .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .step-page.is-active { animation: none; }
}
