/* ==========================================================================
   demo.css — shared skeleton for the Plain Page example builds.

   Structure only. Every colour, typeface and radius comes from a token that
   each example site sets in its own theme.css, which is why Rivet & Pine and
   Marlowe & Fen can share this file and still look nothing alike.
   ========================================================================== */

:root {
  /* Defaults — each theme.css overrides these. */
  --d-bg:        #ffffff;
  --d-surface:   #f6f6f6;
  --d-ink:       #1a1a1a;
  --d-ink-soft:  #444444;
  --d-muted:     #767676;
  --d-rule:      #e2e2e2;
  --d-accent:    #333333;
  --d-accent-ink:#ffffff;
  --d-dark:      #1a1a1a;

  --d-font-display: Georgia, serif;
  --d-font-body:    system-ui, sans-serif;

  --d-radius:    6px;
  --d-wrap:      1120px;
  --d-gutter:    clamp(1.25rem, 4vw, 2.75rem);
  --d-section:   clamp(3.5rem, 2rem + 6vw, 6.5rem);

  --d-h1: clamp(2.4rem, 1.5rem + 4.2vw, 4.25rem);
  --d-h2: clamp(1.75rem, 1.3rem + 2vw, 2.6rem);
  --d-h3: clamp(1.15rem, 1.05rem + 0.6vw, 1.4rem);
  --d-lead: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);

  --d-ease: cubic-bezier(.2,.7,.3,1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--d-bg);
  color: var(--d-ink-soft);
  font-family: var(--d-font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--d-font-display);
  color: var(--d-ink);
  line-height: 1.15;
  margin: 0 0 1rem;
  text-wrap: balance;
}
h1 { font-size: var(--d-h1); }
h2 { font-size: var(--d-h2); }
h3 { font-size: var(--d-h3); line-height: 1.3; }

p { margin: 0 0 1.25rem; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--d-accent); text-underline-offset: 3px; }
img, svg { max-width: 100%; height: auto; display: block; }
strong { color: var(--d-ink); }

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

.d-skip {
  position: absolute; left: -9999px; top: .5rem; z-index: 300;
  background: var(--d-ink); color: #fff; padding: .7rem 1.2rem; border-radius: 4px;
  text-decoration: none;
}
.d-skip:focus { left: .5rem; }

/* -------------------------------------------------------------------------
   Layout
   ------------------------------------------------------------------------- */

.d-wrap {
  width: 100%; max-width: var(--d-wrap);
  margin-inline: auto; padding-inline: var(--d-gutter);
}
.d-narrow { max-width: 68ch; }

.d-section { padding-block: var(--d-section); }
.d-section--surface { background: var(--d-surface); }
.d-section--dark { background: var(--d-dark); color: rgba(255,255,255,.78); }
.d-section--dark h2, .d-section--dark h3, .d-section--dark strong { color: #fff; }
.d-section--tight { padding-block: calc(var(--d-section) * .6); }

.d-grid { display: grid; gap: 1.75rem; }
/* Same reason as the main site: track children must be allowed to shrink
   below their content width, or wide content bursts the page on mobile. */
.d-grid > *, .d-split > *, .d-row > * { min-width: 0; }
@media (min-width: 700px) { .d-grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .d-grid--3 { grid-template-columns: repeat(3, 1fr); } }

.d-split { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 900px) {
  .d-split { grid-template-columns: 1fr 1.3fr; gap: clamp(2.5rem, 5vw, 4.5rem); }
  .d-split--even { grid-template-columns: 1fr 1fr; }
}

.d-eyebrow {
  font-family: var(--d-font-body);
  font-size: .8125rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--d-accent);
  margin: 0 0 .9rem;
}
.d-lead { font-size: var(--d-lead); line-height: 1.55; color: var(--d-ink-soft); }
.d-meta { font-size: .9375rem; color: var(--d-muted); }

/* -------------------------------------------------------------------------
   Demo banner — sits above everything, on every page
   ------------------------------------------------------------------------- */

.pp-demo-bar {
  background: #123B3A; color: rgba(255,255,255,.85);
  font-family: "Outfit", system-ui, sans-serif;
  font-size: .875rem; line-height: 1.4;
  padding: .6rem 0;
  position: relative; z-index: 300;
}
.pp-demo-bar__inner {
  max-width: var(--d-wrap); margin-inline: auto; padding-inline: var(--d-gutter);
  display: flex; flex-wrap: wrap; gap: .35rem 1.25rem;
  align-items: center; justify-content: space-between;
}
.pp-demo-bar strong { color: #fff; font-weight: 600; }
.pp-demo-bar a {
  color: #6FAE9B; text-decoration: none; font-weight: 500;
  border-bottom: 1px solid rgba(111,174,155,.45);
  white-space: nowrap;
}
.pp-demo-bar a:hover { color: #fff; border-color: #fff; }

/* -------------------------------------------------------------------------
   Header / nav
   ------------------------------------------------------------------------- */

.d-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--d-bg);
  border-bottom: 1px solid var(--d-rule);
}
.d-header--dark { background: var(--d-dark); border-bottom-color: rgba(255,255,255,.14); }

.d-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 4.5rem;
}

.d-logo {
  font-family: var(--d-font-display);
  font-size: 1.25rem; font-weight: 700;
  color: var(--d-ink); text-decoration: none;
  line-height: 1.1; letter-spacing: -.01em;
  display: flex; flex-direction: column;
}
.d-logo small {
  font-family: var(--d-font-body);
  font-size: .625rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--d-muted); margin-top: .18rem;
}
.d-header--dark .d-logo { color: #fff; }
.d-header--dark .d-logo small { color: rgba(255,255,255,.6); }

.d-nav__links { display: none; list-style: none; margin: 0; padding: 0; gap: 1.75rem; align-items: center; }
@media (min-width: 900px) { .d-nav__links { display: flex; } }

.d-nav__links a {
  font-size: .9688rem; font-weight: 500;
  color: var(--d-ink-soft); text-decoration: none;
  padding: .3rem 0; border-bottom: 2px solid transparent;
  transition: color .15s var(--d-ease), border-color .15s var(--d-ease);
}
.d-nav__links a:hover { color: var(--d-accent); }
.d-nav__links a[aria-current="page"] { color: var(--d-ink); border-bottom-color: var(--d-accent); }
.d-header--dark .d-nav__links a { color: rgba(255,255,255,.75); }
.d-header--dark .d-nav__links a:hover,
.d-header--dark .d-nav__links a[aria-current="page"] { color: #fff; }

.d-nav__phone { display: none; }
@media (min-width: 900px) { .d-nav__phone { display: inline-flex; } }

.d-nav__toggle {
  display: inline-flex; align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--d-rule);
  color: var(--d-ink); border-radius: 4px;
  padding: .55rem .85rem; font: inherit; font-size: .9375rem; font-weight: 600;
  cursor: pointer;
}
.d-header--dark .d-nav__toggle { color: #fff; border-color: rgba(255,255,255,.3); }
@media (min-width: 900px) { .d-nav__toggle { display: none; } }

.d-nav__panel { display: none; border-top: 1px solid var(--d-rule); padding-block: .5rem 1.5rem; }
.d-nav__panel[data-open="true"] { display: block; }
@media (min-width: 900px) { .d-nav__panel { display: none !important; } }
.d-nav__panel ul { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.d-nav__panel li + li { border-top: 1px solid var(--d-rule); }
/* Scoped to the list on purpose: an unscoped `.d-nav__panel a` outranks
   `.d-btn--primary` and would repaint the panel's CTA dark-on-dark. */
.d-nav__panel ul a {
  display: block; padding: .9rem 0; font-size: 1.05rem; font-weight: 600;
  color: var(--d-ink); text-decoration: none;
}
.d-header--dark .d-nav__panel { border-color: rgba(255,255,255,.14); }
.d-header--dark .d-nav__panel li + li { border-color: rgba(255,255,255,.14); }
.d-header--dark .d-nav__panel ul a { color: #fff; }

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

.d-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--d-font-body);
  font-size: 1rem; font-weight: 600; line-height: 1;
  padding: .95em 1.6em; border-radius: var(--d-radius);
  border: 2px solid transparent; text-decoration: none; cursor: pointer;
  transition: background-color .16s var(--d-ease), color .16s var(--d-ease),
              border-color .16s var(--d-ease), transform .16s var(--d-ease);
}
.d-btn:active { transform: translateY(1px); }
.d-btn--primary { background: var(--d-accent); color: var(--d-accent-ink); border-color: var(--d-accent); }
.d-btn--primary:hover { filter: brightness(1.1); color: var(--d-accent-ink); }
.d-btn--outline { background: transparent; color: var(--d-ink); border-color: var(--d-rule); }
.d-btn--outline:hover { border-color: var(--d-accent); color: var(--d-accent); }
.d-btn--light { background: #fff; color: var(--d-dark); border-color: #fff; }
.d-btn--light:hover { background: var(--d-accent); color: var(--d-accent-ink); border-color: var(--d-accent); }
.d-btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.d-btn--ghost-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.d-btn--lg { font-size: 1.0625rem; padding: 1.05em 1.9em; }

.d-btn-row { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }
@media (max-width: 539px) {
  .d-btn-row { flex-direction: column; align-items: stretch; }
  .d-btn-row > .d-btn { width: 100%; }
}

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */

.d-hero { padding-block: clamp(3rem, 2rem + 7vw, 7rem); }
.d-hero h1 { margin-bottom: 1.25rem; }
.d-hero .d-lead { max-width: 52ch; }
.d-hero__actions { margin-top: 2rem; }

/* -------------------------------------------------------------------------
   Cards, services, features
   ------------------------------------------------------------------------- */

.d-card {
  background: var(--d-bg);
  border: 1px solid var(--d-rule);
  border-radius: var(--d-radius);
  padding: 1.75rem;
}
.d-card h3 { margin-bottom: .5rem; }
.d-section--surface .d-card { background: var(--d-bg); }

.d-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }

/* Marker positioned out of flow, not placed in a grid track — otherwise every
   <strong> and text run in the <li> becomes its own grid item and the trailing
   text wraps into the 1.4rem icon column, one word per line. */
.d-list li { position: relative; padding-left: 1.75rem; }
.d-list li::before {
  content: ""; position: absolute; left: 0; top: .38em;
  width: 1.1rem; height: 1.1rem;
  border-radius: 50%; background: var(--d-accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 100 16A8 8 0 008 0zm3.9 6.1l-4.6 5a.9.9 0 01-1.3 0L3.9 8.9a.9.9 0 011.3-1.2l1.5 1.6 4-4.4a.9.9 0 011.3 1.2z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 100 16A8 8 0 008 0zm3.9 6.1l-4.6 5a.9.9 0 01-1.3 0L3.9 8.9a.9.9 0 011.3-1.2l1.5 1.6 4-4.4a.9.9 0 011.3 1.2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.d-section--dark .d-list li::before { background: #fff; }

/* Numbered service rows */
.d-rows { border-top: 1px solid var(--d-rule); }
.d-row {
  display: grid; gap: .5rem 2rem;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--d-rule);
}
@media (min-width: 800px) { .d-row { grid-template-columns: minmax(180px, 1fr) 2fr auto; align-items: baseline; } }
.d-row h3 { margin: 0; }
.d-row p { margin: 0; }
.d-row__price { font-family: var(--d-font-display); font-size: 1.15rem; color: var(--d-ink); white-space: nowrap; }

/* -------------------------------------------------------------------------
   Image placeholders — deliberate abstract art, not missing-photo boxes.
   Swap the <svg> or the background for real photography.
   ------------------------------------------------------------------------- */

.d-figure {
  border-radius: var(--d-radius);
  overflow: hidden;
  position: relative;
  background: var(--d-surface);
}
.d-figure > svg,
.d-figure > img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;   /* photos crop to the frame rather than letterbox */
}
/* A hair of zoom on hover, so photo cards feel alive without moving layout. */
.d-figure > img { transition: transform .5s var(--d-ease); }
.d-gallery a:hover .d-figure > img,
.d-figure:hover > img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) {
  .d-figure > img, .d-gallery a:hover .d-figure > img, .d-figure:hover > img {
    transition: none; transform: none;
  }
}
/* The caption sits on a scrim rather than directly on the artwork, so white
   text stays legible no matter how light that corner of the image is. */
.d-figure figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.5rem 1.1rem .9rem;
  background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,.55) 55%, transparent);
  color: #fff; font-size: .875rem; font-weight: 500;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}

.d-gallery { display: grid; gap: 1.1rem; }
@media (min-width: 620px) { .d-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .d-gallery { grid-template-columns: repeat(3, 1fr); } }
.d-gallery .d-figure { aspect-ratio: 4/3; }
.d-gallery .d-figure--wide { aspect-ratio: 4/3; }
@media (min-width: 940px) { .d-gallery .d-figure--wide { grid-column: span 2; aspect-ratio: 8/3; } }

/* -------------------------------------------------------------------------
   Photographic band — full-bleed image with text laid over a scrim.
   Uses a real <img> rather than a CSS background so srcset still applies.
   ------------------------------------------------------------------------- */

.d-band { position: relative; isolation: isolate; overflow: hidden; background: var(--d-dark); }

.d-band__media { position: absolute; inset: 0; z-index: 0; }
.d-band__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Scrim strength is a variable so each theme can tune it to its photography. */
.d-band__media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to right,
      rgba(0,0,0,var(--d-scrim, .82)) 0%,
      rgba(0,0,0,calc(var(--d-scrim, .82) * .82)) 45%,
      rgba(0,0,0,calc(var(--d-scrim, .82) * .45)) 100%);
}
@media (max-width: 799px) {
  /* Text sits over the whole frame on a phone, so darken it evenly. */
  .d-band__media::after {
    background: linear-gradient(to top,
      rgba(0,0,0,calc(var(--d-scrim, .82) + .08)) 20%,
      rgba(0,0,0,var(--d-scrim, .82)) 100%);
  }
}

.d-band__inner {
  position: relative; z-index: 2;
  padding-block: clamp(3rem, 2rem + 8vw, 6.5rem);
}
.d-band h2, .d-band h3 { color: #fff; }
.d-band p { color: rgba(255,255,255,.88); }
.d-band .d-meta { color: rgba(255,255,255,.66); }
.d-band .d-eyebrow { color: #fff; }

/* -------------------------------------------------------------------------
   Testimonials
   ------------------------------------------------------------------------- */

.d-quote {
  border-left: 3px solid var(--d-accent);
  padding-left: 1.4rem;
}
.d-quote blockquote {
  margin: 0 0 .9rem;
  font-family: var(--d-font-display);
  font-size: clamp(1.15rem, 1rem + .7vw, 1.5rem);
  line-height: 1.45; color: var(--d-ink);
}
.d-quote cite { font-style: normal; font-size: .9375rem; color: var(--d-muted); }

/* -------------------------------------------------------------------------
   Stats
   ------------------------------------------------------------------------- */

.d-stats { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .d-stats { grid-template-columns: repeat(3, 1fr); } }
.d-stat__n {
  font-family: var(--d-font-display);
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  line-height: 1; color: var(--d-ink); display: block; margin-bottom: .35rem;
}
.d-section--dark .d-stat__n { color: #fff; }

/* -------------------------------------------------------------------------
   Forms
   ------------------------------------------------------------------------- */

.d-form { display: grid; gap: 1.25rem; }
.d-field { display: grid; gap: .4rem; }
.d-field label { font-size: .9375rem; font-weight: 600; color: var(--d-ink); }
.d-field .d-hint { font-size: .8125rem; color: var(--d-muted); }
.d-input, .d-textarea, .d-select {
  width: 100%; font: inherit; font-size: 1rem;
  color: var(--d-ink); background: var(--d-bg);
  border: 1px solid var(--d-rule); border-radius: var(--d-radius);
  padding: .8rem .9rem; appearance: none;
  transition: border-color .15s var(--d-ease), box-shadow .15s var(--d-ease);
}
.d-textarea { min-height: 8.5rem; resize: vertical; }
.d-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23767676' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 6.5l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85rem center; background-size: 1rem;
  padding-right: 2.5rem;
}
.d-input:focus, .d-textarea:focus, .d-select:focus {
  outline: none; border-color: var(--d-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--d-accent) 25%, transparent);
}
@media (min-width: 620px) { .d-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; } }

.d-hp {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.d-form__status { font-size: .9375rem; padding: .9rem; border-radius: var(--d-radius); display: none; }
.d-form__status[data-state] { display: block; background: var(--d-surface); border: 1px solid var(--d-rule); }

/* -------------------------------------------------------------------------
   Contact detail blocks
   ------------------------------------------------------------------------- */

.d-contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.d-contact-list .d-label {
  font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--d-muted); margin-bottom: .25rem;
}
.d-contact-list .d-value {
  font-family: var(--d-font-display); font-size: 1.3rem; color: var(--d-ink); text-decoration: none;
}
a.d-value:hover { color: var(--d-accent); }
/* Same reasoning as the main site: full-size tap target on a phone. */
@media (max-width: 620px) {
  .d-contact-list a.d-value { display: inline-flex; align-items: center; min-height: 44px; }
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */

.d-footer {
  background: var(--d-dark); color: rgba(255,255,255,.72);
  padding-block: 3.5rem 2rem; font-size: .9375rem;
}
.d-footer h4 {
  color: #fff; font-family: var(--d-font-body);
  font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.d-footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.d-footer a:hover { color: #fff; text-decoration: underline; }
.d-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.d-footer__grid { display: grid; gap: 2.5rem; margin-bottom: 3rem; }
@media (min-width: 760px) { .d-footer__grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.d-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  font-size: .8125rem; color: rgba(255,255,255,.55);
}
.d-footer .d-logo { color: #fff; margin-bottom: 1rem; }
.d-footer .d-logo small { color: rgba(255,255,255,.55); }

/* -------------------------------------------------------------------------
   Motion
   ------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
