/* ==========================================================================
   Demonstration sites — shared skeleton, three themes.
   These are the sample builds. They are NOT BookedFolio-branded: each one has
   its own palette, type pairing and section order, because that is the point.
   The only thing they share is the standard of construction.
   ========================================================================== */

:root {
  --ease: cubic-bezier(.2, .6, .3, 1);
  --t: 160ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

h1, h2, h3 { font-family: var(--font-display); margin: 0; font-weight: var(--display-weight, 400); line-height: 1.12; }
p { margin: 0 0 1rem; max-width: 62ch; }
p:last-child { margin-bottom: 0; }

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

.d-wrap { width: 100%; max-width: var(--max, 1180px); margin-inline: auto; padding-inline: clamp(20px, 5vw, 48px); }
.d-section { padding-block: clamp(56px, 8vw, 112px); }
.d-narrow { max-width: 720px; }

.d-label {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--label-tracking, .2em);
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.d-lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.55; max-width: 54ch; }

/* Notice bar — the honesty requirement. Present on every demonstration. */
.d-notice {
  background: #132B23;
  color: #E9E0CF;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  padding: 10px clamp(16px, 4vw, 32px);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.d-notice a { color: #BA9B5F; font-weight: 600; text-underline-offset: 3px; }
.d-notice a:hover { color: #E9E0CF; }

/* Header */
.d-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 93%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(8px)) { .d-header { background: var(--paper); } }

.d-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 66px;
}
.d-logo {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  letter-spacing: var(--logo-tracking, .04em);
  text-transform: var(--logo-case, none);
  text-decoration: none;
  color: var(--ink);
  font-weight: var(--display-weight, 400);
}
.d-nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.d-nav a {
  font-family: var(--font-body);
  font-size: 13px; font-weight: 500; letter-spacing: .04em;
  text-decoration: none; color: var(--muted);
  text-transform: var(--nav-case, none);
  transition: color var(--t) var(--ease);
}
.d-nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .d-nav a:not(.d-btn) { display: none; } }

/* Buttons */
.d-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 11px 22px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  border: 1px solid var(--accent); border-radius: var(--radius, 0);
  background: var(--accent); color: var(--on-accent);
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.d-btn:hover { background: transparent; color: var(--accent); }
.d-btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.d-btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Hero */
.d-hero { position: relative; }
.d-hero__img { width: 100%; height: clamp(380px, 74vh, 760px); object-fit: cover; }
.d-hero__over {
  position: absolute; inset: auto 0 0 0;
  padding: clamp(28px, 6vw, 72px) 0;
  background: linear-gradient(to top, rgba(0,0,0,.52), rgba(0,0,0,0));
  color: #fff;
}
.d-hero__over h1 { color: #fff; font-size: clamp(2rem, 5.4vw, 4rem); letter-spacing: -0.01em; }
.d-hero__over p { color: rgba(255,255,255,.9); margin-top: 14px; max-width: 46ch; }

/* Split hero variant */
.d-hero--split { display: grid; gap: 0; }
@media (min-width: 900px) { .d-hero--split { grid-template-columns: 1fr 1.2fr; align-items: stretch; } }
.d-hero--split .d-hero__copy {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(40px, 6vw, 80px) clamp(20px, 5vw, 64px);
}
.d-hero--split h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.d-hero--split .d-hero__img { height: 100%; min-height: 380px; }

/* Galleries */
.d-gal { display: grid; gap: var(--gap, 14px); }
.d-gal--2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.d-gal--3 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.d-gal img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: var(--ar, 3/2); }
.d-gal .tall { aspect-ratio: 2/3; }
.d-gal--stagger > *:nth-child(even) { margin-top: var(--stagger, 0); }

.d-figure { margin: 0; }
.d-figure figcaption { font-family: var(--font-body); font-size: 12px; color: var(--muted); padding-top: 8px; letter-spacing: .02em; }

/* Split content */
.d-split { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (min-width: 880px) {
  .d-split { grid-template-columns: 1fr 1fr; }
  .d-split--wide { grid-template-columns: 1.25fr 1fr; }
}

/* Services / pricing */
.d-cards { display: grid; gap: clamp(16px, 2.4vw, 28px); grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.d-card { border: 1px solid var(--line); padding: clamp(22px, 3vw, 34px); background: var(--card); border-radius: var(--radius, 0); }
.d-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.d-card__price { font-family: var(--font-display); font-size: 2rem; line-height: 1; margin: 16px 0; font-variant-numeric: tabular-nums; }
.d-card ul { list-style: none; margin: 16px 0 0; padding: 0; font-family: var(--font-body); font-size: 14px; }
.d-card li { padding: 7px 0; border-top: 1px solid var(--line); color: var(--muted); }

/* Testimonial placeholder — deliberately empty, deliberately labelled */
.d-quote {
  border-left: 2px solid var(--accent);
  padding-left: clamp(20px, 3vw, 32px);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  line-height: 1.35;
  max-width: 26ch;
}
.d-quote cite { display: block; font-family: var(--font-body); font-size: 13px; font-style: normal; color: var(--muted); margin-top: 16px; letter-spacing: .04em; }

/* Form */
.d-form { display: grid; gap: 18px; }
.d-form__row { display: grid; gap: 18px; }
@media (min-width: 620px) { .d-form__row { grid-template-columns: 1fr 1fr; } }
.d-field { display: grid; gap: 6px; }
.d-field label { font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.d-field input, .d-field textarea, .d-field select {
  width: 100%; min-height: 46px; padding: 11px 13px;
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line-strong);
  border-radius: var(--radius, 0);
  transition: border-color var(--t) var(--ease);
}
.d-field textarea { min-height: 108px; resize: vertical; }
.d-field input:hover, .d-field textarea:hover, .d-field select:hover { border-color: var(--ink); }
.d-form__note { font-family: var(--font-body); font-size: 12px; color: var(--muted); margin: 0; }

/* Footer */
.d-footer { border-top: 1px solid var(--line); padding-block: clamp(36px, 5vw, 64px); }
.d-footer__grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.d-footer a { font-family: var(--font-body); font-size: 14px; color: var(--muted); text-decoration: none; }
.d-footer a:hover { color: var(--ink); }
.d-footer__foot { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-family: var(--font-body); font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }

/* ==========================================================================
   THEME A — Wedding Canvas Studio
   Bone ground, charcoal ink, dusty rose accent. High-contrast serif display.
   Long, quiet, generous. The gallery is the site.
   ========================================================================== */

.t-wedding {
  --paper: #F6F2EC;
  --card: #FFFFFF;
  --ink: #2A2724;
  --muted: #6F655E;   /* darkened from #8A8079: 3.46:1 failed AA, now 5.09:1 */
  --accent: #96685A;  /* darkened from #B08B7E so white button text reaches 4.75:1 */
  --on-accent: #FFFFFF;
  --line: rgba(42, 39, 36, .14);
  --line-strong: rgba(42, 39, 36, .28);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: Inter, system-ui, sans-serif;
  --display-weight: 300;
  --logo-tracking: .22em;
  --logo-case: uppercase;
  --label-tracking: .26em;
  --gap: 16px;
  --stagger: 48px;
  --radius: 0;
  --max: 1240px;
}
.t-wedding .d-logo { font-size: clamp(.95rem, 1.8vw, 1.15rem); }
.t-wedding h1, .t-wedding h2 { letter-spacing: .005em; }

/* ==========================================================================
   THEME B — Rowan Hill Portraits
   Cream ground, walnut ink, sage accent. Softer, rounder, warmer.
   Prices visible early. Booking is the spine of the page.
   ========================================================================== */

.t-portrait {
  --paper: #FBF7F1;
  --card: #FFFFFF;
  --ink: #3B3229;
  --muted: #6E6357;   /* darkened from #8B7F72: 3.66:1 failed AA, now 5.49:1 */
  --accent: #5F6E50;  /* darkened from #7C8B6B so white button text reaches 5.48:1 */
  --on-accent: #FFFFFF;
  --line: rgba(59, 50, 41, .13);
  --line-strong: rgba(59, 50, 41, .26);
  --font-display: Lora, Georgia, serif;
  --font-body: Inter, system-ui, sans-serif;
  --display-weight: 500;
  --logo-tracking: .02em;
  --label-tracking: .18em;
  --gap: 12px;
  --radius: 6px;
  --max: 1120px;
}
.t-portrait .d-card { box-shadow: 0 1px 2px rgba(59,50,41,.05); }

/* ==========================================================================
   THEME C — Northline Property Media
   White ground, graphite ink, slate blue accent. Grotesk, tabular figures.
   Dense, fast, sortable. Built for someone in a hurry.
   ========================================================================== */

.t-realestate {
  --paper: #FFFFFF;
  --card: #F6F7F8;
  --ink: #1C2126;
  --muted: #5A646D;   /* darkened from #6B757E: 4.38:1 on the card failed AA, now 6.04:1 */
  --accent: #2E5C7E;
  --on-accent: #FFFFFF;
  --line: rgba(28, 33, 38, .12);
  --line-strong: rgba(28, 33, 38, .26);
  --font-display: "Archivo", Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, sans-serif;
  --display-weight: 600;
  --logo-tracking: -.01em;
  --label-tracking: .14em;
  --gap: 8px;
  --radius: 3px;
  --max: 1280px;
}
.t-realestate h1, .t-realestate h2 { letter-spacing: -0.02em; }
.t-realestate .d-listing {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}
.t-realestate .d-listing article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.t-realestate .d-listing img { aspect-ratio: 3/2; width: 100%; object-fit: cover; }
.t-realestate .d-listing__body { padding: 16px 18px 20px; }
.t-realestate .d-listing h3 { font-size: 1rem; margin-bottom: 4px; }
.t-realestate .d-listing__meta {
  font-family: var(--font-body); font-size: 13px; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px;
  font-variant-numeric: tabular-nums;
}
.t-realestate .d-stat { font-variant-numeric: tabular-nums; }
.t-realestate .d-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.t-realestate .d-filters button {
  appearance: none; min-height: 40px; padding: 8px 16px;
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 100px; cursor: pointer;
  transition: all var(--t) var(--ease);
}
.t-realestate .d-filters button:hover { color: var(--ink); border-color: var(--ink); }
.t-realestate .d-filters button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }

/* When a demonstration is shown inside a frame on the BookedFolio site, its own
   scrollbar reads as a defect rather than a feature. Standalone it keeps one. */
.is-framed { scrollbar-width: none; }
.is-framed::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* --------------------------------------------------------------------------
   FIXES FOUND IN QA
   -------------------------------------------------------------------------- */

/* `.d-nav a` outranked `.d-btn`, so the primary call to action in every demo
   header rendered muted-on-accent at 1.2:1. The button wins now. */
.d-nav a.d-btn { color: var(--on-accent); }
.d-nav a.d-btn:hover { color: var(--accent); }
.d-nav a.d-btn--ghost { color: var(--ink); }
.d-nav a.d-btn--ghost:hover { color: var(--paper); }

/* Measured against the real hero pixels: white text over the photograph reached
   only 2.04:1 on the headline. The scrim now starts higher and lands harder. */
.d-hero__over {
  padding-top: clamp(72px, 15vw, 168px);
  background: linear-gradient(to top,
    rgba(0, 0, 0, .80) 0%,
    rgba(0, 0, 0, .68) 38%,
    rgba(0, 0, 0, .34) 74%,
    rgba(0, 0, 0, 0) 100%);
}

/* Header nav links sit in a nav, not in prose, so the WCAG 2.2 inline exception
   does not apply to them. They need real height. */
.d-nav a:not(.d-btn) { display: inline-block; padding-block: 6px; min-height: 26px; }

/* The tap-height rule above re-enabled `display` and so cancelled the mobile
   hide from earlier in this file. Restated here, after it, where it wins. */
@media (max-width: 640px) {
  .d-nav a:not(.d-btn) { display: none; }
}

/* Footer links are stacks, not prose. */
.d-footer a { display: inline-block; padding-block: 4px; min-height: 24px; }
.d-notice a { display: inline-block; padding-block: 3px; min-height: 24px; }
