/* ==========================================================================
   RoofFlow System — stylesheet
   Palette: bone / sand / stone / taupe / charcoal, accent = weathered zinc
   Type:    Newsreader (display) · Instrument Sans (body) · IBM Plex Mono (data)
   ========================================================================== */

/* --- 1. Tokens ----------------------------------------------------------- */

:root {
  --paper:      #F7F4EF;
  --paper-lift: #FDFBF8;
  --sand:       #EDE6DA;
  --stone:      #E2D9CA;
  --line:       #D9CFBF;
  --line-soft:  #E8E0D3;
  --taupe:      #968C7E;
  --ink:        #1E1C19;
  --ink-2:      #574F46;
  --ink-3:      #7A7166;
  --slate:      #26424A;
  --slate-2:    #33565F;
  --slate-wash: #E6EBEA;
  --clay:       #9C6A55;
  --moss:       #4F6B52;

  --display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --body: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1180px;
  --gutter: 22px;
  --sect: 84px;
  --radius: 3px;
  --radius-lg: 6px;

  --shadow-sm: 0 1px 2px rgba(30, 28, 25, .04), 0 4px 14px rgba(30, 28, 25, .045);
  --shadow-md: 0 2px 6px rgba(30, 28, 25, .05), 0 18px 46px rgba(30, 28, 25, .09);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

@media (min-width: 700px) { :root { --gutter: 40px; --sect: 116px; } }
@media (min-width: 1100px) { :root { --gutter: 56px; --sect: 148px; } }

/* --- 2. Reset ------------------------------------------------------------ */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  font-feature-settings: "ss01" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

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

::selection { background: var(--slate); color: var(--paper-lift); }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
  transition: top .2s;
}
.skip:focus { top: 12px; }

/* --- 3. Typography ------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -.017em;
  text-wrap: balance;
}

.h-xl { font-size: clamp(2.55rem, 7.4vw, 4.65rem); }
.h-lg { font-size: clamp(2.05rem, 5.1vw, 3.15rem); }
.h-md { font-size: clamp(1.6rem, 3.3vw, 2.1rem); line-height: 1.14; }
.h-sm { font-size: clamp(1.22rem, 2.1vw, 1.42rem); line-height: 1.22; }

.lede {
  font-size: clamp(1.06rem, 1.9vw, 1.28rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 40ch;
  text-wrap: pretty;
}

p { text-wrap: pretty; }
p + p { margin-top: 1.05em; }

.muted { color: var(--ink-2); }
.small { font-size: .95rem; }
.fine { font-size: .82rem; line-height: 1.55; color: var(--ink-3); }

/* Mono eyebrow — used as the site's structural label */
.eyebrow {
  font-family: var(--mono);
  font-size: .715rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--taupe);
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.eyebrow--tight { display: inline-flex; }
.eyebrow--tight::after { display: none; }

/* --- 4. Layout ----------------------------------------------------------- */

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

.section { padding-block: var(--sect); }
.section--tight { padding-block: calc(var(--sect) * .62); }
.section--sand { background: var(--sand); }
.section--stone { background: var(--stone); }
.section--ink { background: var(--ink); color: var(--sand); }
.section--ink .eyebrow { color: #8E8579; }
.section--ink .eyebrow::after { background: #3A3630; }
.section--ink .lede, .section--ink .muted { color: #C6BDAF; }

.rule { height: 1px; background: var(--line); border: 0; }

.stack > * + * { margin-top: 20px; }
.stack-lg > * + * { margin-top: 38px; }

.grid { display: grid; gap: 34px; }
@media (min-width: 860px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); gap: 52px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-split { grid-template-columns: minmax(0, .86fr) minmax(0, 1fr); gap: 72px; }
  .grid-split--rev { grid-template-columns: minmax(0, 1fr) minmax(0, .86fr); gap: 72px; }
}
@media (min-width: 700px) and (max-width: 859px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

.section-head { max-width: 660px; margin-bottom: 52px; }
.section-head .eyebrow { margin-bottom: 26px; }
.section-head h2 { margin-bottom: 20px; }

/* --- 5. Buttons ---------------------------------------------------------- */

.btn {
  --btn-bg: var(--slate);
  --btn-fg: #FBF9F5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  padding: 15px 26px;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .005em;
  border: 1px solid transparent;
  transition: background .22s var(--ease), transform .22s var(--ease), box-shadow .22s var(--ease);
  will-change: transform;
}
.btn:hover { background: var(--slate-2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { background: rgba(38, 66, 74, .05); border-color: var(--taupe); box-shadow: none; }

.btn--light { --btn-bg: var(--paper-lift); --btn-fg: var(--ink); }
.btn--light:hover { background: #fff; }

.btn--sm { padding: 11px 18px; font-size: .875rem; }
.btn--wide { width: 100%; }

.btn .arw { transition: transform .25s var(--ease); }
.btn:hover .arw { transform: translateX(3px); }

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

/* Text link with underline that grows */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: .95rem;
  padding-bottom: 3px;
  background-image: linear-gradient(var(--slate), var(--slate));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .3s var(--ease), color .2s;
  color: var(--slate);
}
.tlink:hover { background-size: 0% 1px; }

/* --- 6. Header ----------------------------------------------------------- */

.hdr {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(247, 244, 239, .88);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.hdr.is-stuck { border-bottom-color: var(--line); }

.hdr__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 70px;
}

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand__mark { width: 26px; height: 26px; flex: none; }
.brand__name {
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: -.02em;
  line-height: 1;
}
.brand__name b { font-weight: 500; }
.brand__name span { color: var(--taupe); font-weight: 300; }

.nav { display: none; }
@media (min-width: 1000px) {
  .nav { display: flex; align-items: center; gap: 30px; }
}
.nav a {
  font-size: .92rem;
  color: var(--ink-2);
  position: relative;
  padding-block: 6px;
  transition: color .2s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--slate);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); }

.hdr__cta { display: none; }
@media (min-width: 1000px) { .hdr__cta { display: inline-flex; } }

.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  align-items: flex-end;
}
@media (min-width: 1000px) { .burger { display: none; } }
.burger span {
  display: block; height: 1.5px; width: 22px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobnav {
  position: fixed;
  inset: 70px 0 0;
  z-index: 89;
  background: var(--paper);
  padding: 34px var(--gutter) 40px;
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.mobnav.is-open { opacity: 1; transform: none; pointer-events: auto; }
@media (min-width: 1000px) { .mobnav { display: none; } }
.mobnav a.mobnav__link {
  display: block;
  font-family: var(--display);
  font-size: 1.7rem;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}
.mobnav .btn { margin-top: 30px; }

/* --- 7. Hero ------------------------------------------------------------- */

.hero { padding-top: 58px; padding-bottom: var(--sect); position: relative; overflow: hidden; }
@media (min-width: 860px) { .hero { padding-top: 90px; } }

.hero__grid { display: grid; gap: 56px; }
@media (min-width: 980px) {
  .hero__grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 68px; align-items: center; }
}

.hero h1 { margin-block: 26px 24px; }
.hero h1 em {
  font-style: italic;
  color: var(--slate);
}
.hero .lede { max-width: 46ch; }
.hero .btn-row { margin-top: 34px; }

.hero__note {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--taupe);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

/* --- 8. The rail (signature element) ------------------------------------ */

.rail {
  background: var(--paper-lift);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 26px 22px 22px;
  position: relative;
}
@media (min-width: 560px) { .rail { padding: 30px 30px 26px; } }

.rail__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 8px;
}
.rail__title {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--taupe);
}
.rail__live {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--slate);
}
.rail__dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--slate);
  animation: pulse 2.4s infinite var(--ease);
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.rail__steps { list-style: none; padding: 0; position: relative; }
.rail__steps::before {
  content: "";
  position: absolute;
  left: 7px; top: 22px; bottom: 22px;
  width: 1px;
  background: var(--line);
}
.rail__fill {
  position: absolute;
  left: 7px; top: 22px;
  width: 1px;
  background: var(--slate);
  height: 0;
  transition: height .85s var(--ease);
}

.step {
  display: grid;
  grid-template-columns: 15px 1fr;
  gap: 16px;
  align-items: start;
  padding-block: 13px;
  position: relative;
  z-index: 1;
}
.step__node {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper-lift);
  margin-top: 4px;
  display: grid;
  place-items: center;
  transition: border-color .4s var(--ease), background .4s var(--ease), transform .4s var(--ease);
}
.step__node::after {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--line);
  transition: background .4s var(--ease);
}
.step__body { min-width: 0; display: block; }
.step__label {
  display: block;
  font-size: .95rem;
  font-weight: 500;
  transition: color .4s;
  color: var(--ink-3);
}
.step__meta {
  display: block;
  font-family: var(--mono);
  font-size: .705rem;
  color: var(--taupe);
  letter-spacing: .02em;
  margin-top: 3px;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.step.is-on .step__node { border-color: var(--slate); background: var(--slate); transform: scale(1.12); }
.step.is-on .step__node::after { background: var(--paper-lift); }
.step.is-on .step__label { color: var(--ink); }
.step.is-on .step__meta { opacity: 1; transform: none; }

.rail__foot {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: .705rem;
  letter-spacing: .04em;
  color: var(--taupe);
}
.rail__badge {
  background: var(--slate-wash);
  color: var(--slate);
  padding: 4px 9px;
  border-radius: 2px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .64rem;
}

/* --- 9. Cards & lists ---------------------------------------------------- */

.card {
  background: var(--paper-lift);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line); }
.card h3 { margin-bottom: 12px; }
.card__num {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--taupe);
  letter-spacing: .12em;
  display: block;
  margin-bottom: 20px;
}

.ticks { list-style: none; padding: 0; }
.ticks li {
  position: relative;
  padding-left: 27px;
  padding-block: 9px;
  border-bottom: 1px solid var(--line-soft);
  font-size: .98rem;
}
.ticks li:last-child { border-bottom: 0; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px; top: 19px;
  width: 9px; height: 9px;
  border-left: 1.5px solid var(--slate);
  border-bottom: 1.5px solid var(--slate);
  transform: rotate(-45deg);
}

.gaps { list-style: none; padding: 0; }
.gaps li {
  position: relative;
  padding-left: 26px;
  padding-block: 10px;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.gaps li:last-child { border-bottom: 0; }
.gaps li::before {
  content: "";
  position: absolute;
  left: 0; top: 21px;
  width: 11px; height: 1px;
  background: var(--clay);
}

/* Two-column contrast panel: what breaks vs what changes */
.panel {
  background: var(--paper-lift);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
}
.panel--flat { background: transparent; border-color: var(--line); }

/* --- 10. Process --------------------------------------------------------- */

.proc { list-style: none; padding: 0; }
.proc__item {
  display: grid;
  gap: 8px 30px;
  padding-block: 34px;
  border-top: 1px solid var(--line);
  position: relative;
}
@media (min-width: 820px) {
  .proc__item { grid-template-columns: 92px minmax(0, 1fr) minmax(0, 1.05fr); align-items: start; gap: 40px; }
}
.proc__item:last-child { border-bottom: 1px solid var(--line); }
.proc__n {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--slate);
  letter-spacing: .1em;
  padding-top: 6px;
}
.proc__t { font-family: var(--display); font-size: clamp(1.32rem, 2.4vw, 1.65rem); line-height: 1.16; }
.proc__d { color: var(--ink-2); font-size: 1rem; }
.proc__d .fine { margin-top: 12px; }

/* --- 11. Showcase / demos ------------------------------------------------ */

.showcase { display: grid; gap: 30px; }
@media (min-width: 1000px) {
  .showcase { grid-template-columns: 254px minmax(0, 1fr); gap: 46px; align-items: start; }
}

.demo-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 1000px) {
  .demo-tabs { flex-direction: column; overflow: visible; gap: 0; position: sticky; top: 96px; }
}
.demo-tab {
  flex: none;
  text-align: left;
  padding: 13px 15px;
  border-radius: var(--radius);
  font-size: .92rem;
  color: var(--ink-2);
  white-space: nowrap;
  border: 1px solid var(--line);
  transition: background .22s, color .22s, border-color .22s;
}
@media (min-width: 1000px) {
  .demo-tab {
    white-space: normal;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    padding: 14px 18px;
  }
}
.demo-tab small {
  display: none;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .1em;
  color: var(--taupe);
  text-transform: uppercase;
}
@media (min-width: 1000px) { .demo-tab small { display: block; margin-bottom: 4px; } }
.demo-tab:hover { color: var(--ink); background: rgba(38, 66, 74, .04); }
.demo-tab[aria-selected="true"] {
  color: var(--ink);
  background: var(--paper-lift);
  border-color: var(--slate);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 1000px) {
  .demo-tab[aria-selected="true"] { border-left: 2px solid var(--slate); box-shadow: none; background: rgba(38,66,74,.045); }
}

.demo-stage {
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
}
@media (min-width: 700px) { .demo-stage { padding: 34px; } }
.section--sand .demo-stage { background: var(--paper-lift); }

.demo-flag {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 3;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--clay);
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(156, 106, 85, .3);
  padding: 5px 9px;
  border-radius: 2px;
}

.demo-panel { display: none; }
.demo-panel.is-active { display: block; animation: fade .45s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.demo-caption {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
@media (min-width: 720px) { .demo-caption { grid-template-columns: 1fr auto; align-items: center; gap: 24px; } }
.demo-caption p { font-size: .93rem; color: var(--ink-2); max-width: 62ch; }

/* Device frames */
.screen {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.screen__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  background: #F2EEE7;
  border-bottom: 1px solid var(--line-soft);
}
.screen__dots { display: flex; gap: 5px; }
.screen__dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); display: block; }
.screen__url {
  flex: 1;
  font-family: var(--mono);
  font-size: .62rem;
  color: var(--taupe);
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  padding: 3px 10px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone {
  width: 268px;
  max-width: 100%;
  margin-inline: auto;
  border: 8px solid #24211E;
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-md);
}
.phone__notch {
  height: 20px;
  background: #24211E;
  display: grid;
  place-items: center;
}
.phone__notch::after {
  content: "";
  width: 54px; height: 4px; border-radius: 4px; background: #46413B;
}

/* --- 12. Demo interior UI (namespaced .ui-) ------------------------------ */

.ui { font-size: 13px; line-height: 1.5; color: #241F1B; }
.ui * { box-sizing: border-box; }

.ui-site__nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; border-bottom: 1px solid #ECE6DD;
}
.ui-site__logo { font-family: var(--display); font-size: 15px; letter-spacing: -.01em; }
.ui-site__links { display: none; gap: 16px; font-size: 11px; color: #7A7166; }
@media (min-width: 620px) { .ui-site__links { display: flex; } }
.ui-btn {
  background: #26424A; color: #fff; font-size: 11px; font-weight: 500;
  padding: 8px 13px; border-radius: 3px; display: inline-block;
  transition: background .2s;
}
.ui-btn:hover { background: #33565F; }
.ui-btn--ghost { background: transparent; color: #26424A; border: 1px solid #CFC5B5; }
.ui-btn--sm { padding: 6px 10px; font-size: 10px; }
.ui-btn--block { display: block; width: 100%; text-align: center; }

.ui-site__hero {
  padding: 30px 18px 26px;
  background: linear-gradient(180deg, #FAF7F2 0%, #F1EBE1 100%);
  display: grid; gap: 18px;
}
@media (min-width: 620px) { .ui-site__hero { grid-template-columns: 1.1fr .9fr; padding: 40px 26px; align-items: center; } }
.ui-site__hero h4 { font-family: var(--display); font-size: clamp(19px, 3vw, 27px); line-height: 1.08; margin-bottom: 10px; }
.ui-site__hero p { font-size: 12px; color: #57514A; margin-bottom: 16px; max-width: 34ch; }
.ui-roof {
  aspect-ratio: 4 / 3;
  background: #E4DCD0;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  display: grid; place-items: end center;
}
.ui-roof::after {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.5) 0 2px, transparent 2px 22px),
    repeating-linear-gradient(180deg, rgba(30,28,25,.07) 0 1px, transparent 1px 16px);
}
.ui-roof__cap {
  position: relative; z-index: 1;
  font-family: var(--mono); font-size: 9px; letter-spacing: .12em;
  text-transform: uppercase; color: #857B6D; padding: 8px;
}
.ui-site__strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #ECE6DD;
}
.ui-site__strip div {
  padding: 13px 10px; text-align: center; border-right: 1px solid #ECE6DD;
  font-size: 10px; color: #7A7166;
}
.ui-site__strip div:last-child { border-right: 0; }
.ui-site__strip b { display: block; font-family: var(--display); font-size: 14px; color: #241F1B; margin-bottom: 2px; }

/* Booking calendar */
.ui-book { padding: 20px 18px; display: grid; gap: 18px; }
@media (min-width: 640px) { .ui-book { grid-template-columns: 1fr 175px; gap: 26px; padding: 26px; } }
.ui-book h4 { font-family: var(--display); font-size: 19px; margin-bottom: 6px; }
.ui-cal__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; font-size: 12px; font-weight: 500;
}
.ui-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ui-cal__grid span {
  text-align: center; font-family: var(--mono); font-size: 9px;
  color: #948A7C; padding-bottom: 4px; letter-spacing: .06em;
}
.ui-day {
  aspect-ratio: 1;
  display: grid; place-items: center;
  font-size: 11px;
  border-radius: 3px;
  border: 1px solid #ECE6DD;
  color: #241F1B;
  transition: background .18s, color .18s, border-color .18s;
}
.ui-day:hover:not(:disabled) { border-color: #26424A; background: #EDF1F0; }
.ui-day:disabled { color: #C4BBAD; border-color: transparent; cursor: default; }
.ui-day[aria-pressed="true"] { background: #26424A; color: #fff; border-color: #26424A; }
.ui-slots { display: grid; gap: 6px; align-content: start; }
.ui-slot {
  border: 1px solid #DDD3C4; border-radius: 3px; padding: 8px;
  font-family: var(--mono); font-size: 11px; text-align: center;
  transition: background .18s, color .18s, border-color .18s;
}
.ui-slot:hover { border-color: #26424A; color: #26424A; }
.ui-slot[aria-pressed="true"] { background: #26424A; border-color: #26424A; color: #fff; }
.ui-confirm {
  background: #EDF1F0; border: 1px solid #D2DCDA; border-radius: 4px;
  padding: 10px 12px; font-size: 11px; color: #26424A;
  display: flex; align-items: center; gap: 8px;
}

/* Quote funnel */
.ui-funnel { padding: 22px 18px 24px; }
@media (min-width: 640px) { .ui-funnel { padding: 26px; } }
.ui-prog { display: flex; gap: 6px; margin-bottom: 20px; }
.ui-prog i {
  flex: 1; height: 3px; border-radius: 3px; background: #E4DCD0; display: block;
  transition: background .35s var(--ease);
}
.ui-prog i.on { background: #26424A; }
.ui-funnel__q { font-family: var(--display); font-size: 18px; margin-bottom: 4px; }
.ui-funnel__hint { font-size: 11px; color: #7A7166; margin-bottom: 16px; }
.ui-opts { display: grid; gap: 8px; margin-bottom: 18px; }
@media (min-width: 520px) { .ui-opts--2 { grid-template-columns: 1fr 1fr; } }
.ui-opt {
  border: 1px solid #DDD3C4; border-radius: 4px; padding: 11px 13px;
  text-align: left; font-size: 12px; display: flex; align-items: center; gap: 10px;
  transition: border-color .2s, background .2s;
}
.ui-opt::before {
  content: ""; width: 13px; height: 13px; border-radius: 50%;
  border: 1px solid #C4BBAD; flex: none; transition: border-color .2s, box-shadow .2s;
}
.ui-opt:hover { border-color: #26424A; }
.ui-opt[aria-pressed="true"] { border-color: #26424A; background: #EDF1F0; }
.ui-opt[aria-pressed="true"]::before { border-color: #26424A; box-shadow: inset 0 0 0 3px #26424A; }
.ui-field { display: grid; gap: 6px; margin-bottom: 12px; }
.ui-field label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: #948A7C; }
.ui-field div {
  border: 1px solid #DDD3C4; border-radius: 3px; padding: 9px 11px;
  font-size: 12px; color: #948A7C; background: #FCFAF7;
}
.ui-done { text-align: center; padding: 12px 0; }
.ui-done__mark {
  width: 34px; height: 34px; border-radius: 50%; background: #EDF1F0;
  border: 1px solid #26424A; display: grid; place-items: center; margin: 0 auto 12px;
  color: #26424A; font-size: 15px;
}

/* Dashboard */
.ui-dash { padding: 16px; }
@media (min-width: 640px) { .ui-dash { padding: 22px; } }
.ui-dash__top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.ui-dash__top h4 { font-family: var(--display); font-size: 16px; }
.ui-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
@media (min-width: 560px) { .ui-stats { grid-template-columns: repeat(4, 1fr); } }
.ui-stat { border: 1px solid #ECE6DD; border-radius: 4px; padding: 10px 11px; }
.ui-stat b { display: block; font-family: var(--display); font-size: 20px; line-height: 1; margin-bottom: 5px; }
.ui-stat span { font-family: var(--mono); font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; color: #948A7C; }
.ui-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.ui-table th {
  text-align: left; font-family: var(--mono); font-size: 8.5px; letter-spacing: .1em;
  text-transform: uppercase; color: #948A7C; font-weight: 400;
  padding: 0 10px 8px 0; border-bottom: 1px solid #ECE6DD;
}
.ui-table td { padding: 10px 10px 10px 0; border-bottom: 1px solid #F3EEE6; vertical-align: middle; }
.ui-table tr:last-child td { border-bottom: 0; }
.ui-table .hide-sm { display: none; }
@media (min-width: 620px) { .ui-table .hide-sm { display: table-cell; } }
.pill {
  display: inline-block; font-family: var(--mono); font-size: 9px;
  letter-spacing: .07em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 2px; white-space: nowrap;
}
.pill--new { background: #EDF1F0; color: #26424A; }
.pill--auto { background: #F1EDE4; color: #7A6A4E; }
.pill--booked { background: #EAF0E9; color: #4F6B52; }
.pill--wait { background: #F5EDE9; color: #9C6A55; }

/* Follow-up flow */
.ui-flow { padding: 20px 18px; }
@media (min-width: 640px) { .ui-flow { padding: 26px; } }
.ui-flow__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.ui-flow__head h4 { font-family: var(--display); font-size: 16px; }
.ui-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: #7A7166;
}
.ui-toggle i {
  width: 30px; height: 17px; border-radius: 20px; background: #26424A;
  position: relative; display: block; transition: background .25s;
}
.ui-toggle i::after {
  content: ""; position: absolute; top: 2px; left: 15px;
  width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: left .25s var(--ease);
}
.ui-toggle[aria-pressed="false"] i { background: #CFC5B5; }
.ui-toggle[aria-pressed="false"] i::after { left: 2px; }

.ui-timeline { list-style: none; padding: 0; position: relative; margin: 0; }
.ui-timeline::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 1px; background: #E4DCD0; }
.ui-timeline li { display: grid; grid-template-columns: 13px 1fr; gap: 14px; padding-block: 9px; position: relative; }
.ui-timeline li::before {
  content: ""; grid-column: 1; width: 13px; height: 13px; border-radius: 50%;
  background: #fff; border: 1px solid #26424A; margin-top: 3px; z-index: 1;
}
.ui-timeline li[data-off]::before { border-color: #CFC5B5; }
.ui-tl__when { font-family: var(--mono); font-size: 9px; letter-spacing: .09em; text-transform: uppercase; color: #948A7C; }
.ui-tl__what { font-size: 12px; margin-top: 1px; }
.ui-tl__body { font-size: 11px; color: #7A7166; margin-top: 3px; }
.ui-timeline li[data-off] { opacity: .42; }

/* Team day view */
.ui-agenda { padding: 18px; }
@media (min-width: 640px) { .ui-agenda { padding: 24px; } }
.ui-agenda__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; gap: 12px; }
.ui-agenda__head h4 { font-family: var(--display); font-size: 16px; }
.ui-cols { display: grid; grid-template-columns: 34px repeat(2, 1fr); gap: 6px; }
@media (min-width: 560px) { .ui-cols { grid-template-columns: 40px repeat(3, 1fr); } }
.ui-cols__h { font-family: var(--mono); font-size: 8.5px; letter-spacing: .09em; text-transform: uppercase; color: #948A7C; padding-bottom: 6px; }
.ui-cols__h.hide-sm { display: none; }
@media (min-width: 560px) { .ui-cols__h.hide-sm { display: block; } }
.ui-hours { display: grid; gap: 4px; }
.ui-hours span { font-family: var(--mono); font-size: 9px; color: #C4BBAD; height: 34px; }
.ui-col { display: grid; gap: 4px; }
.ui-col.hide-sm { display: none; }
@media (min-width: 560px) { .ui-col.hide-sm { display: grid; } }
.ui-slotblock {
  height: 34px; border-radius: 3px; border: 1px dashed #E4DCD0;
  font-size: 9.5px; display: flex; align-items: center; padding: 0 7px; color: #C4BBAD;
  font-family: var(--mono); letter-spacing: .04em;
}
.ui-slotblock.busy {
  background: #EDF1F0; border: 1px solid #D2DCDA; color: #26424A;
  font-family: var(--body); font-size: 10.5px; letter-spacing: 0;
}
.ui-slotblock.travel { background: #F6F1E9; border-style: solid; border-color: #E8DFCF; color: #948A7C; }

/* --- 13. Accordion ------------------------------------------------------- */

.acc { border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__btn {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  text-align: left;
  padding: 26px 0;
  font-family: var(--display);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.25;
  letter-spacing: -.01em;
  transition: color .2s;
}
.acc__btn:hover { color: var(--slate); }
.acc__sign { position: relative; width: 15px; height: 15px; flex: none; margin-top: 6px; }
.acc__sign::before, .acc__sign::after {
  content: ""; position: absolute; background: var(--slate);
  left: 0; top: 7px; width: 15px; height: 1.5px;
  transition: transform .3s var(--ease);
}
.acc__sign::after { transform: rotate(90deg); }
.acc__btn[aria-expanded="true"] .acc__sign::after { transform: rotate(0); }
.acc__panel { height: 0; overflow: hidden; transition: height .35s var(--ease); }
.acc__inner { padding-bottom: 28px; max-width: 68ch; color: var(--ink-2); }
.acc__inner p + p { margin-top: .9em; }

/* --- 14. Forms ----------------------------------------------------------- */

.form { display: grid; gap: 22px; }
.fld { display: grid; gap: 8px; }
.fld label, .fld legend {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--taupe);
}
.fld .hint { font-size: .82rem; color: var(--ink-3); font-family: var(--body); letter-spacing: 0; text-transform: none; }
.fld input, .fld select, .fld textarea {
  background: var(--paper-lift);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  font-size: 1rem;
  width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.fld textarea { min-height: 116px; resize: vertical; line-height: 1.55; }
.fld input:focus, .fld select:focus, .fld textarea:focus {
  outline: none;
  border-color: var(--slate);
  box-shadow: 0 0 0 3px rgba(38, 66, 74, .1);
}
.fld input::placeholder, .fld textarea::placeholder { color: #B6ADA0; }
.fld--2 { display: grid; gap: 22px; }
@media (min-width: 640px) { .fld--2 { grid-template-columns: 1fr 1fr; } }

fieldset { border: 0; padding: 0; margin: 0; }
.fld fieldset legend { margin-bottom: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 40px;
  padding: 9px 16px;
  font-size: .92rem;
  background: var(--paper-lift);
  transition: border-color .2s, background .2s, color .2s;
  cursor: pointer;
}
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip:hover { border-color: var(--taupe); }
.chip:has(input:checked) { border-color: var(--slate); background: var(--slate-wash); color: var(--slate); }
.chip:has(input:focus-visible) { outline: 2px solid var(--slate); outline-offset: 2px; }

.err { color: var(--clay); font-size: .84rem; display: none; }
.fld.is-bad input, .fld.is-bad select { border-color: var(--clay); }
.fld.is-bad .err { display: block; }

/* Multi-step application */
.apply__rail {
  display: flex;
  gap: 4px;
  margin-bottom: 40px;
  counter-reset: s;
}
.apply__seg { flex: 1; display: grid; gap: 9px; }
.apply__seg i { height: 2px; background: var(--line); display: block; transition: background .4s var(--ease); }
.apply__seg span {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--taupe); transition: color .3s;
}
.apply__seg.done i, .apply__seg.now i { background: var(--slate); }
.apply__seg.now span { color: var(--ink); }
@media (max-width: 640px) { .apply__seg span { display: none; } .apply__seg.now span { display: block; } }

.fstep { display: none; }
.fstep.is-active { display: block; animation: fade .4s var(--ease); }
.fstep h2 { margin-bottom: 10px; }
.fstep > .lede { margin-bottom: 30px; }
.fnav { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 36px; }

.calendly-slot {
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-lift);
  padding: 40px 26px;
  text-align: center;
}
.calendly-slot .eyebrow { justify-content: center; margin-bottom: 16px; }
.calendly-slot .eyebrow::after { display: none; }
.calendly-embed { min-height: 680px; }

.summary {
  background: var(--sand);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 28px;
}
.summary dl { display: grid; gap: 10px; margin: 0; }
@media (min-width: 560px) { .summary dl { grid-template-columns: 170px 1fr; gap: 10px 18px; } }
.summary dt { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--taupe); padding-top: 3px; }
.summary dd { margin: 0; font-size: .96rem; }

/* --- 15. CTA band -------------------------------------------------------- */

.cta-band { background: var(--ink); color: var(--sand); }
.cta-band h2 { color: var(--paper-lift); margin-bottom: 18px; }
.cta-band p { color: #C6BDAF; max-width: 46ch; }
.cta-band .btn { --btn-bg: var(--paper-lift); --btn-fg: var(--ink); }
.cta-band .btn:hover { --btn-bg: #fff; }
.cta-band .btn--ghost { --btn-bg: transparent; --btn-fg: var(--sand); border-color: #4A443C; }
.cta-band .btn--ghost:hover { background: rgba(255,255,255,.06); border-color: #6E665C; }
.cta-band__grid { display: grid; gap: 34px; }
@media (min-width: 860px) { .cta-band__grid { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 60px; } }

/* --- 16. Footer ---------------------------------------------------------- */

.ftr { background: var(--sand); padding-block: 66px 34px; }
.ftr__grid { display: grid; gap: 40px; }
@media (min-width: 760px) { .ftr__grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; } }
.ftr h4 {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--taupe); margin-bottom: 18px; font-weight: 400;
}
.ftr ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.ftr a { font-size: .94rem; color: var(--ink-2); transition: color .2s; }
.ftr a:hover { color: var(--slate); }
.ftr__bottom {
  margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px 26px; justify-content: space-between;
  font-size: .8rem; color: var(--ink-3);
}
.ftr__disc { max-width: 62ch; }

/* --- 17. Motion ---------------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .step__meta { opacity: 1; transform: none; }
}

/* --- 18. Legal pages ----------------------------------------------------- */

.doc { max-width: 72ch; }
.doc h2 { font-size: clamp(1.35rem, 2.5vw, 1.7rem); margin-top: 46px; margin-bottom: 14px; }
.doc h2:first-of-type { margin-top: 0; }
.doc p, .doc ul { color: var(--ink-2); font-size: 1rem; }
.doc ul { padding-left: 20px; margin-top: 12px; display: grid; gap: 8px; }
.doc p + p { margin-top: 14px; }
.doc__meta {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--taupe); margin-bottom: 40px;
}
