/* JPS demo: "the sentence is the layout". One template; each trade sets its own accent. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #dfdedb;
  --surface: #d3d2ce;
  --paper: #f4f3f0;
  --ink: #26251e;
  --muted: #55534b;
  --accent: #2456d6;
  --accent-ink: #ffffff;
  --accent-deep: #1a43ad;

  --font: "Schibsted Grotesk", system-ui, sans-serif;
  --t-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --t-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --t-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --t-statement: clamp(1.5rem, 1rem + 1.6vw, 2.25rem);
  --t-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --t-hero: clamp(2.75rem, 0.6rem + 6.4vw, 7.25rem);
  --t-phone: clamp(3rem, 0.5rem + 8.6vw, 9rem);

  --m: clamp(16px, 1rem + 0.8vw, 28px);
  --gap: clamp(12px, 1.6vw, 24px);
  --sec: clamp(96px, 5rem + 6vw, 180px);
  --r: 14px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}
[data-trade="electrician"] { --accent: #e3a008; --accent-ink: #1d1b14; --accent-deep: #b97f00; }
[data-trade="landscaper"] { --accent: #2f6b3a; --accent-ink: #ffffff; --accent-deep: #21502a; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; color-scheme: light; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-body)/1.45 var(--font); letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent); color: var(--accent-ink); }
img { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--m); top: -100px; z-index: 50; background: var(--ink); color: var(--paper); padding: 12px 16px; }
.skip:focus { top: 12px; }
.frame { width: 100%; padding-inline: var(--m); }
.h-head { font-size: var(--t-head); font-weight: 800; line-height: 0.95; letter-spacing: -0.045em; text-wrap: balance; }
.h-lead { font-size: var(--t-lead); font-weight: 600; letter-spacing: -0.02em; }
.textlink { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.sample { margin-top: 24px; font-size: var(--t-small); color: var(--muted); }

/* Buttons: one shape, one fill */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 22px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color 160ms var(--ease), transform 120ms var(--ease); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: scale(0.97); }
.btn--big { min-height: 60px; padding: 14px 26px; font-size: var(--t-lead); }
.btn--small { min-height: 44px; padding: 8px 16px; }
.btn--block { width: 100%; min-height: 56px; }
.btn--ink { background: var(--ink); color: var(--paper); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--accent-deep); }
  .btn--ink:hover { background: #000; }
  .textlink:hover { text-decoration-thickness: 4px; }
}

/* Demo bar: the JPS frame around the made-up business */
.demobar { background: var(--ink); color: var(--paper); font-size: var(--t-small); }
.demobar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; min-height: 48px; padding-block: 8px; }
.demobar-note { margin-right: auto; }
.demobar-note a { font-weight: 600; }
.demobar-switch { display: flex; align-items: center; gap: 4px; }
.demobar-label { margin-right: 8px; color: #c9c7bf; }
.demobar-switch a { padding: 6px 10px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.demobar-switch a[aria-current="page"] { background: var(--paper); color: var(--ink); }
.demobar-cta { font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .demobar-switch a:not([aria-current]):hover { background: #3a3930; } }

/* Header */
.top-in { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-mark { width: 26px; height: 26px; border-radius: 6px; background: var(--accent-ink); border: 7px solid var(--accent); }
.brand-name { font-weight: 800; font-size: var(--t-body); letter-spacing: -0.03em; }
.nav { display: flex; gap: clamp(14px, 1.8vw, 28px); font-weight: 600; }
.nav a, .top-phone { text-decoration: none; }
.top-phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.top-phone svg { width: 18px; height: 18px; color: var(--accent-deep); }
@media (hover: hover) and (pointer: fine) { .nav a:hover, .top-phone:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.25em; } }

/* Hero: one sentence with the photograph standing in for a word */
.hero { padding-block: clamp(40px, 6vw, 96px) clamp(56px, 6vw, 96px); }
.sentence { display: flex; align-items: center; gap: 0.18em; font-size: var(--t-hero); font-weight: 800; line-height: 0.95; letter-spacing: -0.05em; white-space: nowrap; }
.sentence .w { flex: none; }
.strip { flex: 1 1 auto; min-width: 2.4em; height: 0.78em; border-radius: var(--r); overflow: hidden; background: var(--surface); }
.strip-img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo { display: none; }
.hero-foot { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; margin-top: 40px; }
.lede { grid-column: 1 / span 6; font-size: var(--t-lead); line-height: 1.3; max-width: 34ch; }
.hero-act { grid-column: 8 / span 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 16px 24px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 40px; font-weight: 600; font-size: var(--t-small); }
.facts li { display: flex; align-items: center; gap: 10px; }
.facts li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }

/* Services: one paragraph with picture words */
.services { padding-block: var(--sec) 0; }
.statement { font-size: var(--t-statement); font-weight: 600; line-height: 1.25; letter-spacing: -0.025em; max-width: 66ch; }
.pic { display: inline-block; width: 1.9em; height: 1em; margin-inline: 0.12em; vertical-align: -0.16em; border-radius: 0.2em; overflow: hidden; background: var(--surface); transition: transform 260ms var(--ease); transform-origin: left center; }
.pic img { width: 100%; height: 100%; object-fit: cover; }

/* Picker: the live thing for customers */
.picker { padding-block: var(--sec); }
.picker-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 32px; align-items: start; }
.picker-grid > div { grid-column: 1 / span 5; }
.picker-note { margin-top: 20px; max-width: 34ch; font-weight: 600; }
.needs { grid-column: 7 / span 6; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.need { width: 100%; min-height: 88px; display: grid; align-content: center; gap: 4px; padding: 16px 18px; border: 0; border-radius: 12px; background: var(--paper); text-align: left; cursor: pointer; transition: background-color 160ms var(--ease), transform 120ms var(--ease); }
.need-name { font-weight: 800; font-size: var(--t-body); letter-spacing: -0.02em; }
.need-note { color: var(--muted); font-size: var(--t-small); }
.need:active { transform: scale(0.98); }
.need[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.need[aria-pressed="true"] .need-note { color: inherit; }
@media (hover: hover) and (pointer: fine) { .need:hover:not([aria-pressed="true"]) { background: #fff; } }

/* Prices: the offer as a sentence on its own field */
.prices { background: var(--surface); padding-block: var(--sec); }
.price-line { font-size: var(--t-hero); font-weight: 800; line-height: 1; letter-spacing: -0.05em; max-width: 12em; text-wrap: balance; }
.tag { display: inline-block; padding: 0 0.15em; border-radius: 0.12em; background: var(--accent); color: var(--accent-ink); }
.prices-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 40px; align-items: start; margin-top: 64px; }
.prices-grid > div { grid-column: 1 / span 5; display: grid; gap: 24px; justify-items: start; }
.price-note { font-size: var(--t-lead); line-height: 1.3; max-width: 30ch; }
.price-list { grid-column: 7 / span 6; display: grid; gap: 6px; }
.price-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; border-radius: 10px; background: var(--paper); }
.price-row dd { font-weight: 800; white-space: nowrap; }

/* Jobs: names as one paragraph with photo frames */
.jobs { padding-block: var(--sec) 0; }
.statement--jobs { max-width: 66ch; font-weight: 400; }
.statement--jobs strong { font-weight: 800; }
.job { white-space: normal; }
.pic--job { width: 1.6em; }
@media (hover: hover) and (pointer: fine) { .job:hover .pic--job { transform: scale(1.6); position: relative; z-index: 2; } }

/* Review: one quotation spread edge to edge */
.review { padding-block: var(--sec); }
.spread { margin-top: 56px; font-size: var(--t-hero); font-weight: 800; letter-spacing: -0.05em; line-height: 0.95; }
.spread-line { display: flex; justify-content: space-between; gap: 0.3em; }
.spread-line + .spread-line { margin-top: 0.3em; }
.spread-by { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; font-size: var(--t-body); font-weight: 600; }
.spread-by span:first-child { color: var(--muted); }

/* Areas and hours: statement, table pushed right */
.areas { padding-block: 0 var(--sec); }
.areas-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 56px; align-items: end; }
.areas-h { grid-column: 1 / span 8; padding-left: 3vw; }
.areas-photo { grid-column: 1 / span 4; grid-row: 2; aspect-ratio: 4 / 5; border-radius: var(--r); overflow: hidden; background: var(--surface); }
.areas-photo img { width: 100%; height: 100%; object-fit: cover; }
.areas-table { grid-column: 7 / span 6; grid-row: 2; border-collapse: collapse; width: 100%; }
.areas-table th, .areas-table td { text-align: left; padding: 13px 12px 13px 0; vertical-align: top; }
.areas-table th { font-weight: 400; color: var(--muted); width: 26%; }
.areas-table td:last-child { text-align: right; font-weight: 600; white-space: nowrap; padding-right: 0; }
.areas-table tr.group th, .areas-table tr.group td { padding-top: 44px; }

/* Questions: wide heading, indented questions */
.faq { padding-block: 0 var(--sec); }
.faq-h { max-width: 12em; }
.faq-list { margin: 64px 0 0 calc((100% + var(--gap)) / 12 * 4); display: grid; gap: 4px; }
.faq details { border-radius: 12px; transition: background-color 200ms var(--ease); }
.faq details[open] { background: var(--surface); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 64px; padding: 16px 24px; font-size: var(--t-body); font-weight: 600; letter-spacing: -0.02em; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { position: relative; flex: none; width: 14px; height: 14px; }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; top: 2px; width: 2px; height: 10px; background: currentColor; transition: transform 200ms var(--ease); }
.faq summary i::before { left: 3px; transform: rotate(-45deg); }
.faq summary i::after { left: 9px; transform: rotate(45deg); }
.faq details[open] summary i::before { transform: rotate(45deg); }
.faq details[open] summary i::after { transform: rotate(-45deg); }
.faq details p { padding: 0 24px 24px; max-width: 52ch; }

/* Quote: the form as a card on a full-bleed job photo */
.quote { position: relative; min-height: 100svh; }
.quote-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.quote-frame { position: relative; display: flex; justify-content: flex-end; padding-block: 60px; }
.card { position: sticky; top: 24px; width: min(420px, 100%); background: var(--paper); border-radius: 8px; padding: 32px; display: grid; gap: 14px; }
.card-h { font-size: var(--t-lead); font-weight: 400; letter-spacing: -0.03em; }
.card-area { color: var(--muted); }
.card-hours { display: grid; gap: 4px; }
.card-hour { display: flex; justify-content: space-between; gap: 12px; }
.card-hour dd { font-weight: 600; }
.card-phone a { font-size: var(--t-lead); font-weight: 800; letter-spacing: -0.03em; text-decoration: none; }
.form { display: grid; gap: 6px; margin-top: 8px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: var(--t-small); }
.opt { font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid #b9b7af; border-radius: 8px; background: #fff; font-size: 1rem; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; border-color: var(--ink); }
.field input[aria-invalid="true"] { border-color: #a3261b; }
.err { min-height: 1.3em; font-size: var(--t-small); font-weight: 600; color: #a3261b; }
.form .btn--block { margin-top: 8px; }
.form-legal { font-size: var(--t-small); color: var(--muted); }
.sent { display: grid; gap: 10px; padding: 20px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); }
.sent-h { font-weight: 800; font-size: var(--t-body); }
.sent:focus { outline: none; }

/* Footer: the phone number is the headline */
.foot { background: var(--accent); color: var(--accent-ink); min-height: 56svh; display: flex; }
.foot-in { display: grid; grid-template-rows: auto 1fr auto auto; gap: 24px; padding-block: 40px; }
.foot-top { display: flex; justify-content: space-between; gap: 24px; align-items: start; }
.foot-notes { display: grid; gap: 4px; font-size: var(--t-small); }
.foot-back { font-size: var(--t-small); font-weight: 600; }
.foot-phone { grid-row: 3; align-self: end; font-size: var(--t-phone); font-weight: 800; letter-spacing: -0.05em; line-height: 0.9; text-decoration: none; white-space: nowrap; }
.foot-meta { grid-row: 4; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; font-size: var(--t-small); }
.foot-meta a { margin-right: 16px; }
.foot--short { min-height: 0; }
.foot--short .foot-in { grid-template-rows: auto; }
.foot--short .foot-meta { grid-row: auto; }
@media (hover: hover) and (pointer: fine) { .foot-phone:hover { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.1em; } }

/* Chooser */
.intro { padding-block: clamp(56px, 8vw, 140px) clamp(48px, 6vw, 96px); }
.intro-h { font-size: var(--t-hero); font-weight: 800; line-height: 0.95; letter-spacing: -0.05em; }
.intro-h .ln { display: block; }
.intro .lede { margin: 40px 0 24px; max-width: 46ch; }
.intro-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; }
.intro-text { grid-column: 1 / span 7; }
.intro-video { grid-column: 9 / span 3; display: grid; gap: 12px; }
.intro-video video { width: 100%; height: auto; aspect-ratio: 390 / 844; border-radius: 22px; background: var(--surface); }
.intro-video figcaption { font-size: var(--t-small); color: var(--muted); }
.door { background: var(--bg); padding-block: clamp(48px, 6vw, 96px); }
.door:nth-of-type(odd) { background: var(--surface); }
.door-in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 24px; align-items: center; }
.door-h { grid-column: 1 / span 6; grid-row: 1; font-size: var(--t-head); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; }
.door-h a { text-decoration: none; }
.door-h a span { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 0.12em; text-underline-offset: 0.1em; }
.door-text { grid-column: 1 / span 5; grid-row: 2; max-width: 40ch; }
.door-btn { grid-column: 1 / span 5; grid-row: 4; justify-self: start; }
.door-detail { grid-column: 1 / span 3; grid-row: 3; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--bg); }
.door-detail img { width: 100%; height: 100%; object-fit: cover; }
.door:nth-of-type(odd) .door-detail { grid-column: 8 / span 3; }
.door:nth-of-type(odd) .door-h, .door:nth-of-type(odd) .door-text, .door:nth-of-type(odd) .door-btn { grid-column: 8 / span 5; }
.door:nth-of-type(odd) .door-photo { grid-column: 1 / span 6; }
.door-photo { grid-column: 7 / span 6; grid-row: 1 / span 4; aspect-ratio: 3 / 2; border-radius: var(--r); overflow: hidden; background: var(--surface); }
.door-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Text pages */
.page { padding-block: clamp(56px, 8vw, 120px); }
.page-in { max-width: 760px; display: grid; gap: 18px; }
.page-in p { max-width: 62ch; }

/* Recent job photos under the paragraph */
.job-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: 48px; }
.job-photos figure { display: grid; gap: 10px; }
.job-photos img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: var(--r); background: var(--surface); }
.job-photos figcaption { font-weight: 600; font-size: var(--t-small); }
@media (max-width: 640px) {
  .job-photos { grid-template-columns: 1fr 1fr; }
  .job-photos figure:first-child { grid-column: 1 / -1; }
}

.callbar { display: none; }

/* Motion: the hero photograph opens like a shutter; parts of each section rise once */
@media (prefers-reduced-motion: no-preference) {
  .js .strip { animation: shutter 1100ms var(--ease-expo) 150ms both; }
  .js .strip-img { animation: settle 1400ms var(--ease-expo) 150ms both; }
  .js .hero-photo { animation: shutter 1100ms var(--ease-expo) 150ms both; }
  .js [data-load] { opacity: 0; transform: translateY(16px); animation: rise 600ms var(--ease) 450ms forwards; }
  .js.rise [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--ease), transform 700ms var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
  .js.rise [data-rise].is-in { opacity: 1; transform: none; }
}
@keyframes shutter { from { clip-path: inset(0 100% 0 0 round var(--r)); } to { clip-path: inset(0 0 0 0 round var(--r)); } }
@keyframes settle { from { transform: scale(1.12); } to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (max-width: 1100px) {
  .nav { display: none; }
}
@media (max-width: 860px) {
  .demobar-long { display: none; }
  .lede, .hero-act { grid-column: 1 / -1; }
  .hero-act { justify-content: flex-start; margin-top: 24px; }
  .picker-grid > div, .needs, .prices-grid > div, .price-list { grid-column: 1 / -1; }
  .areas-h { grid-column: 1 / -1; padding-left: 0; }
  .areas-table { grid-column: 1 / -1; grid-row: 2; }
  .areas-photo { grid-column: 4 / -1; grid-row: 3; }
  .faq-list { margin-left: 0; }
  .door .door-h, .door .door-text, .door .door-btn, .door .door-photo, .door:nth-of-type(odd) .door-h, .door:nth-of-type(odd) .door-text, .door:nth-of-type(odd) .door-btn, .door:nth-of-type(odd) .door-photo { grid-column: 1 / -1; grid-row: auto; }
  .door .door-detail, .door:nth-of-type(odd) .door-detail { grid-column: 1 / span 6; grid-row: auto; }
  .intro-text { grid-column: 1 / -1; }
  .intro-video { grid-column: 3 / span 8; margin-top: 40px; }
}
@media (max-width: 640px) {
  .top-phone { display: none; }
  .demobar-label { display: none; }
  .demobar-cta { display: none; }
  .sentence { display: block; white-space: normal; font-size: clamp(2.75rem, 1rem + 9vw, 4.5rem); }
  .sentence .w { display: block; }
  .strip { display: none; }
  .hero-photo { display: block; margin-top: 24px; aspect-ratio: 2 / 1; border-radius: var(--r); overflow: hidden; background: var(--surface); }
  .hero-photo img { width: 100%; height: 100%; object-fit: cover; }
  .hero-act .btn { width: 100%; }
  .facts { flex-direction: column; }
  .needs { grid-template-columns: 1fr; }
  .need { min-height: 72px; }
  .spread { font-size: 9vw; }
  .spread-line { flex-wrap: wrap; row-gap: 0.15em; }
  .spread-by { flex-direction: column; gap: 4px; }
  .faq summary { padding: 14px 16px; }
  .faq details p { padding: 0 16px 20px; }
  .quote { min-height: 0; padding-bottom: 24px; }
  .quote-bg { position: relative; height: 70svh; }
  .quote-frame { display: block; padding-block: 0; margin-top: -80px; }
  .card { position: relative; top: auto; width: 100%; padding: 24px 20px; }
  .foot { min-height: 64svh; }
  .foot-top { flex-direction: column; }
  .foot-phone { font-size: 12vw; }
  .foot-meta { flex-direction: column; }
  body { padding-bottom: 72px; }
  .callbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 8px var(--m) calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--paper); }
  .callbar .btn { width: 100%; }
  .foot--short + .callbar, .page ~ .callbar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
