/* shiftedtech Rug & Sofa Care (sample website). Cool mist page, ivory panels, rug-border burgundy. Light only.
   Contrast (calculated): ink #22282A on mist 13.7:1, burgundy #7B2D3B on mist 8.4:1,
   white on burgundy 9.2:1, muted #5E5D55 on mist 6.0:1, on ivory 5.5:1, white on #0F7A3E 5.4:1.
   Stone #9B9A8D is decoration only (2.6:1), never text. */

@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/instrument-serif.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap;
  src: url(fonts/instrument-serif-italic.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(fonts/work-sans.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --mist: #F3F5F4;
  --white: #FFFFFF;
  --ivory: #EFE9DD;
  --ink: #22282A;
  --wine: #7B2D3B;
  --wine-dark: #62222F;
  --stone: #9B9A8D;
  --muted: #5E5D55;
  --wa: #0F7A3E;
  --hh: 64px;
  --gut: clamp(16px, 5vw, 80px);
  --serif: 'Instrument Serif', 'Times New Roman', Georgia, serif;
  --sans: 'Work Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
@media (max-width: 899px) { :root { --hh: 60px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--mist); color: var(--ink);
  font: 400 17px/1.6 var(--sans); overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 900px) { body { font-size: 18px; } }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--wine); text-underline-offset: 3px; }
h1, h2 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.01em; }
em { font-style: italic; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--wine); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[tabindex="-1"]:focus { outline: none; }

.eyebrow { font: 600 13px/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.body { color: var(--ink); max-width: 34em; }

/* ---------- Notice + header ---------- */
.notice { background: var(--white); color: var(--muted); font-size: 13px; line-height: 1.4; text-align: center; padding: 8px var(--gut); border-bottom: 1px solid #E1E4E2; }
.top {
  position: sticky; top: 0; z-index: 40; height: var(--hh);
  display: flex; align-items: center; gap: 24px; padding: 0 var(--gut);
  background: var(--white); border-bottom: 1px solid #E1E4E2;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mark { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--wine); color: var(--white); font: 600 17px/1 var(--sans); letter-spacing: 0.02em; flex: none; }
.brand-name { font: 400 26px/1 var(--serif); }
.brand-name span { font: 600 11px/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-left: 4px; vertical-align: 3px; }
.nav { display: none; gap: 28px; }
.nav a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; padding: 6px 0; background: linear-gradient(var(--wine), var(--wine)) left bottom / 0 2px no-repeat; transition: background-size .35s ease; }
.nav a:hover { background-size: 100% 2px; }
@media (min-width: 900px) { .nav { display: flex; } }
@media (max-width: 420px) { .brand-name span { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 2px solid transparent;
  font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .25s ease, transform .25s ease;
}
.btn-wine { background: var(--wine); color: var(--white); }
.btn-wine:hover { background: var(--wine-dark); }
.btn-small { min-height: 42px; padding: 0 18px; font-size: 15px; }
.btn-wide { width: 100%; }
@media (max-width: 479px) { .hide-sm { display: none; } }

/* ---------- Hero: the reveal ---------- */
.hero { position: relative; }
.hero-stage {
  display: grid; gap: 18px; padding: 24px var(--gut) 40px;
  grid-template-areas: "head" "compare" "more";
}
.hero-head { grid-area: head; }
.compare { grid-area: compare; margin: 0; }
.hero-more { grid-area: more; }
.hero-head .eyebrow { margin-bottom: 12px; }
.hero h1 { font-size: clamp(3.2rem, 13.5vw, 8.6rem); line-height: 0.92; }
.hero h1 em { position: relative; color: var(--wine); white-space: nowrap; }
/* Underline under "difference" grows as the clean side is revealed */
.ul { position: absolute; left: 0.04em; right: 0.3em; bottom: 0.1em; height: 0.045em; min-height: 2px; background: var(--wine); transform-origin: left; transform: scaleX(var(--sweep, 1)); }
.lede { font-size: 17px; max-width: 30em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 18px; }

.rating-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 18px; border-radius: 999px; background: var(--white); border: 1px solid #DCDFDD; color: var(--ink); text-decoration: none; font-size: 15px; }
.rating-chip:hover { border-color: var(--wine); }
.rc-num { font: 400 26px/1 var(--serif); }
.rc-stars { color: var(--wine); letter-spacing: 1px; font-size: 13px; }
.rc-text { font-weight: 500; }

/* The comparison frame. "Before" is the base photo; "After" sits on top, clipped to the
   right of the divider. --p is the divider position in percent (0 = all after, 100 = all before).
   Both halves are 720px wide, so the frame never renders wider than 600px. */
.compare-frame {
  --p: 50;
  position: relative; overflow: hidden; width: 100%; max-width: 600px; aspect-ratio: 1 / 1;
  background: var(--ivory); border-radius: 18px;
  touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none;
  box-shadow: 0 1px 0 #fff inset, 0 30px 60px -40px rgba(34,40,42,0.45);
}
.c-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; pointer-events: none; -webkit-user-drag: none; }
.c-after { clip-path: inset(0 0 0 calc(var(--p) * 1%)); }
.c-tag {
  position: absolute; top: 14px; padding: 7px 14px; border-radius: 999px;
  background: var(--white); color: var(--ink); font: 600 13px/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase;
  box-shadow: 0 6px 18px -8px rgba(34,40,42,0.35); transition: opacity .3s ease; pointer-events: none;
}
.c-tag-before { left: 14px; }
.c-tag-after { right: 14px; background: var(--wine); color: var(--white); }
.c-tag.is-off { opacity: 0; }
.c-line { position: absolute; top: 0; bottom: 0; left: calc(var(--p) * 1%); width: 2px; margin-left: -1px; background: var(--white); box-shadow: 0 0 0 1px rgba(34,40,42,0.12); pointer-events: none; }
.c-knob {
  position: absolute; top: 50%; left: clamp(30px, calc(var(--p) * 1%), calc(100% - 30px)); width: 52px; height: 52px; margin: -26px 0 0 -26px; pointer-events: none;
  display: grid; place-items: center; border-radius: 50%; background: var(--white); color: var(--wine);
  box-shadow: 0 8px 24px -8px rgba(34,40,42,0.5);
  transition: transform .25s ease;
}
.compare-frame.is-dragging .c-knob { transform: scale(1.08); }
.compare-frame:has(.c-range:focus-visible) .c-knob { outline: 3px solid var(--wine); outline-offset: 3px; }
/* The range input is the keyboard control. Pointer dragging is handled on the frame so that
   vertical swipes on a phone still scroll the page. */
.c-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.compare figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); max-width: 600px; }

@media (min-width: 900px) {
  .hero-stage {
    grid-template-columns: minmax(0, 680px) auto; justify-content: center; grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas: ". compare" "head compare" "more compare" ". compare";
    column-gap: clamp(48px, 8vw, 140px); row-gap: 28px; align-items: center;
    padding: 40px var(--gut) 56px;
  }
  .hero-more { align-self: start; }
  .compare-frame { aspect-ratio: auto; height: min(calc(100vh - var(--hh) - 150px), 720px); width: auto; aspect-ratio: 3 / 4; max-width: none; }
  .compare { width: min-content; }
  .hero h1 { font-size: clamp(5rem, 9.6vw, 9.4rem); }
  .lede { font-size: 19px; }
}

/* With motion: the hero becomes a tall section with a sticky stage. Scrolling through it
   sweeps the divider across. No ScrollTrigger pin (it re-parents and hurt mobile LCP). */
.motion .hero { height: calc(100vh - var(--hh) + 150vh); }
.motion .hero-stage { position: sticky; top: var(--hh); height: calc(100vh - var(--hh)); }
@media (max-width: 899px) {
  .motion .hero-stage { display: flex; flex-direction: column; gap: 14px; padding: 18px var(--gut) 22px; }
  .motion .hero-head .eyebrow { margin-bottom: 8px; }
  .motion .hero h1 { font-size: clamp(2.9rem, 12.5vw, 4.4rem); }
  .motion .compare { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
  .motion .compare-frame { flex: 1 1 0; min-height: 0; aspect-ratio: auto; max-width: none; }
  .motion .compare figcaption { margin-top: 8px; font-size: 13px; }
  .motion .lede { font-size: 16px; }
  .motion .actions { margin-top: 12px; }
}
@media (min-width: 900px) {
  .motion .hero-stage { align-content: center; padding-top: 24px; padding-bottom: 24px; }
}

/* ---------- Fringe divider: the tassels at the end of a rug (decoration only) ---------- */
.fringe { height: 18px; margin: 0 var(--gut); background: repeating-linear-gradient(90deg, var(--stone) 0 1px, transparent 1px 7px); opacity: .55;
  -webkit-mask: linear-gradient(#000, rgba(0,0,0,.25)); mask: linear-gradient(#000, rgba(0,0,0,.25)); }

/* ---------- Facts ---------- */
.facts { padding: clamp(48px, 8vw, 104px) var(--gut); }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.facts li a { display: block; color: inherit; text-decoration: none; }
.facts li a:hover .f-small { color: var(--wine); }
.f-big { display: block; font: 400 clamp(4rem, 9vw, 7.5rem)/0.9 var(--serif); color: var(--ink); }
.f-small { display: block; margin-top: 10px; color: var(--muted); font-size: 15px; font-weight: 500; }
@media (min-width: 760px) { .facts ul { grid-template-columns: repeat(3, 1fr); gap: 40px; } .facts li { border-left: 1px solid #D5D8D6; padding-left: 28px; } }

/* ---------- What we clean: typographic index ---------- */
.clean { padding: clamp(32px, 6vw, 72px) var(--gut) clamp(64px, 10vw, 140px); background: var(--white); }
.clean-head { display: grid; gap: 16px; margin-bottom: clamp(32px, 5vw, 64px); }
.clean h2, .homes h2, .quote h2, .visit h2 { font-size: clamp(2.6rem, 6.4vw, 5.6rem); line-height: 0.98; max-width: 14ch; }
@media (min-width: 900px) { .clean-head { grid-template-columns: 1.2fr 1fr; align-items: end; column-gap: 6vw; } .clean-head .eyebrow { grid-column: 1 / -1; } }
.index { list-style: none; margin: 0; padding: 0; border-top: 1px solid #D5D8D6; }
.index li { border-bottom: 1px solid #D5D8D6; }
.index a {
  position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: clamp(18px, 2.6vw, 30px) 4px; color: var(--ink); text-decoration: none; isolation: isolate;
}
/* Hover/focus wipes an ivory band across the line, the same wipe as the hero slider */
.index a::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ivory); transform: scaleX(0); transform-origin: left; transition: transform .55s cubic-bezier(.7,0,.2,1); }
.index a:hover::before, .index a:focus-visible::before { transform: scaleX(1); }
.i-name { font: 400 clamp(2.4rem, 7vw, 6rem)/1 var(--serif); transition: transform .55s cubic-bezier(.7,0,.2,1); }
.i-name em { color: var(--wine); }
.index a:hover .i-name { transform: translateX(14px); }
.i-go { font-size: 15px; font-weight: 600; color: var(--wine); white-space: nowrap; }
@media (max-width: 599px) { .index a { flex-direction: column; gap: 6px; } .i-go { font-size: 14px; } }

/* ---------- Homes ---------- */
.homes { display: grid; gap: 36px; padding: clamp(64px, 10vw, 140px) var(--gut); align-items: center; }
.homes-photo { margin: 0; width: min(300px, 78vw); background: var(--white); padding: 12px 12px 14px; border-radius: 6px; box-shadow: 0 24px 50px -34px rgba(34,40,42,.45); transform: rotate(-1.5deg); }
.homes-photo img { width: 100%; border-radius: 3px; }
.homes-photo figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
.homes-text { display: grid; gap: 18px; justify-items: start; }
.link { font-weight: 600; text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 2px; }
@media (min-width: 900px) { .homes { grid-template-columns: auto 1fr; column-gap: 8vw; } .homes-photo { margin-left: 4vw; } }

/* ---------- Since ---------- */
.since { padding: clamp(72px, 12vw, 180px) var(--gut); }
.since-text { font: 400 clamp(2.4rem, 6.6vw, 6.2rem)/1.02 var(--serif); }
.since-text em { color: var(--wine); }
.wipe-line { display: block; }

/* ---------- Quote ---------- */
.quote { background: var(--ivory); padding: clamp(64px, 10vw, 130px) var(--gut); display: grid; gap: 40px; }
.quote-head { display: grid; gap: 18px; align-content: start; }
.quote-head .body { color: var(--ink); }
.quote-direct { font-weight: 500; }
@media (min-width: 900px) { .quote { grid-template-columns: 1fr minmax(0, 560px); column-gap: 7vw; } .quote-head { position: sticky; top: calc(var(--hh) + 40px); } }
.form { background: var(--white); border-radius: 18px; padding: clamp(22px, 4vw, 40px); display: grid; gap: 18px; box-shadow: 0 30px 60px -44px rgba(34,40,42,.5); }
.field { display: grid; gap: 7px; }
.field-row { display: grid; gap: 18px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { font-weight: 600; font-size: 15px; }
.req, .opt { font-weight: 400; color: var(--muted); font-size: 14px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; font: 400 16px/1.4 var(--sans); color: var(--ink);
  background: var(--white); border: 1.5px solid #8C8B80; border-radius: 10px;
}
.field textarea { resize: vertical; min-height: 96px; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%237B2D3B' stroke-width='2'/%3E%3C/svg%3E") right 14px center no-repeat; }
.field input::placeholder, .field textarea::placeholder { color: #6E6D65; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--wine); outline-offset: 1px; border-color: var(--wine); }
[aria-invalid="true"] { border-color: #B3261E !important; }
.form-error { background: #FBEAEA; color: #8C1D18; border-radius: 10px; padding: 12px 14px; font-weight: 500; font-size: 15px; }
.form-note { font-size: 14px; color: var(--muted); }

/* ---------- Visit + footer (light) ---------- */
.visit { padding: clamp(64px, 10vw, 130px) var(--gut) clamp(40px, 6vw, 80px); background: var(--white); }
.visit-grid { margin: clamp(32px, 5vw, 56px) 0 0; display: grid; gap: 28px; }
@media (min-width: 760px) { .visit-grid { grid-template-columns: repeat(3, 1fr); } }
.visit-grid div { border-top: 1px solid #D5D8D6; padding-top: 16px; }
.visit-grid dt { font: 600 13px/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.visit-grid dd { margin: 0; font: 400 clamp(1.5rem, 2.4vw, 2rem)/1.2 var(--serif); }
.visit-grid dd a { color: var(--ink); text-decoration-color: var(--wine); text-decoration-thickness: 1px; }
.visit-grid dd a:hover { color: var(--wine); }
.foot { background: var(--white); border-top: 1px solid #E1E4E2; padding: 28px var(--gut) 104px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; font-size: 14px; color: var(--muted); }
.foot .brand-mark { width: 40px; height: 40px; font-size: 15px; }
.foot p { flex: 1 1 260px; }
.foot a { color: var(--wine); font-weight: 600; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  display: inline-flex; align-items: center; gap: 8px; min-height: 54px; padding: 0 20px 0 16px;
  border-radius: 999px; background: var(--wa); color: var(--white); text-decoration: none;
  font: 600 16px/1 var(--sans); box-shadow: 0 14px 30px -12px rgba(15,122,62,.6);
  transition: transform .25s ease;
}
.wa-float:hover { transform: translateY(-2px); }
.wa-float:focus-visible { outline-color: var(--ink); }
@media (max-width: 479px) {
  .wa-float { width: 56px; height: 56px; padding: 0; justify-content: center; }
  .wa-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Motion-only starting states (set by JS too, these avoid a flash) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
