/* Cloudbill.ch - site styles
   Palette: orange / black / white. Type: Schibsted Grotesk (self-hosted). */

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("../fonts/schibsted-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --orange: #FF5A1F;
  --orange-deep: #E54A12;
  --black: #000000;
  --white: #FFFFFF;
  --grey: #575757;          /* secondary text on white, 7.3:1 */
  --grey-on-black: #ADADAD; /* secondary text on black, 9:1 */
  --rule: #E3E3E3;
  --rule-dark: #2F2F2F;

  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 128px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 800; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--black); outline-offset: 3px; border-radius: 4px; }
.features :focus-visible, .foot :focus-visible { outline-color: var(--white); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--black); color: var(--white); padding: 10px 16px; border-radius: 8px;
  text-decoration: none; font-weight: 700;
}
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  border: 2px solid transparent; border-radius: 12px;
  font: inherit; font-size: 1.0625rem; font-weight: 700; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-orange { background: var(--orange); color: var(--black); }
.btn-orange:hover { background: var(--orange-deep); }
.btn-black { background: var(--black); color: var(--white); }
.btn-black:hover { background: #262626; }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 1rem; }
.btn-wide { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

.link-strong {
  font-weight: 700; text-decoration: underline;
  text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.link-strong:hover { text-decoration-color: var(--orange); }

/* ---------------------------------------------------------------- header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.top-inner { display: flex; align-items: center; gap: 32px; min-height: 76px; }
.brand img { height: 36px; width: auto; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; font-size: 1rem; }
.nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: var(--orange); }

/* ---------------------------------------------------------------- hero */
.hero { padding: clamp(48px, 7vw, 96px) 0 var(--section); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 80px); align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 4.6vw, 4.1rem);
  line-height: 1.0; letter-spacing: -0.035em;
}
.hero h1 span { display: block; }
.hero h1 span + span { margin-top: .12em; }
.lead { margin-top: 28px; font-size: 1.25rem; color: var(--grey); max-width: 34em; }
.lead strong { color: var(--black); font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }

.facts { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 1rem; font-weight: 600; }
.facts li { display: flex; align-items: center; gap: 10px; }
.facts li::before { content: ""; width: 10px; height: 10px; background: var(--orange); border-radius: 2px; flex: none; }

/* hero art: an invoice with its QR payment slip, on an orange field */
.hero-art {
  margin: 0; background: var(--orange); border-radius: 28px;
  padding: clamp(24px, 4vw, 44px) clamp(16px, 3vw, 36px) 22px;
}
.sheet {
  background: var(--white); border-radius: 6px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 24px 40px -24px rgba(0, 0, 0, .45);
  transform: rotate(-1.4deg);
  overflow: hidden;
}
.sheet-head { display: flex; justify-content: space-between; gap: 16px; padding: 22px 24px 0; }
.sheet-company { margin: 0; font-weight: 800; font-size: .95rem; }
.sheet-meta { margin: 0; font-size: .78rem; color: var(--grey); }
.sheet-title { margin: 0; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; }
.sheet-rows { padding: 14px 24px 18px; font-size: .85rem; }
.sheet-rows p { display: flex; justify-content: space-between; margin: 0; padding: 6px 0; border-top: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.sheet-total { font-weight: 800; }

.perf { position: relative; height: 22px; display: flex; align-items: center; padding-left: 10px; color: var(--black); }
.perf::after { content: ""; position: absolute; left: 34px; right: 0; top: 50%; border-top: 1.5px dashed var(--black); }

.slip {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
  font-size: .64rem; line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.slip p { margin: 0 0 7px; }
.slip-h1 { font-weight: 800; font-size: .82rem; margin-bottom: 9px !important; }
.slip-h { display: block; font-weight: 800; font-size: .58rem; margin: 0 0 1px !important; }
.slip-receipt { padding: 14px 12px 14px 16px; border-right: 1.5px dashed var(--black); position: relative; }
.slip-pay { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); padding: 14px 16px 14px 14px; column-gap: 12px; }
.slip-pay-right { min-width: 0; overflow-wrap: anywhere; }
.slip-qr { width: 100%; max-width: 150px; height: auto; margin: 4px 0 10px; }
.slip-amount { display: flex; gap: 16px; }
.slip-amount p { margin: 0; }
.slip-depot { font-weight: 800; font-size: .58rem; text-align: right; margin-top: 10px !important; }

.hero-art figcaption { margin-top: 18px; font-size: .9rem; font-weight: 600; color: var(--black); text-align: center; }

/* the one orchestrated moment: the slip settles in once on load */
@media (prefers-reduced-motion: no-preference) {
  .sheet { animation: settle .9s cubic-bezier(.2, .8, .2, 1) .15s both; }
  @keyframes settle {
    from { opacity: 0; transform: translateY(28px) rotate(-4deg); }
    to   { opacity: 1; transform: translateY(0) rotate(-1.4deg); }
  }
}

/* ---------------------------------------------------------------- sections */
.section-head { max-width: 44rem; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { text-wrap: balance; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.05; letter-spacing: -0.03em; }
.section-head p { margin-top: 18px; color: var(--grey); font-size: 1.15rem; }

/* features: a ledger on black */
.features { background: var(--black); color: var(--white); padding: var(--section) 0; }
.features .section-head p { color: var(--grey-on-black); }
.ledger { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 72px); }
.ledger > div { border-top: 1px solid var(--rule-dark); padding: 26px 0 30px; }
.ledger dt { font-weight: 800; font-size: 1.3rem; letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 12px; }
.ledger dt::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--orange); flex: none; transform: translateY(-2px); }
.ledger dd { margin: 8px 0 0 22px; color: var(--grey-on-black); max-width: 34em; }

/* lifecycle timeline */
.lifecycle { padding: var(--section) 0 calc(var(--section) * .6); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; border-top: 2px solid var(--black); }
.timeline li { position: relative; padding-top: 40px; display: flex; flex-direction: column; gap: 6px; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 0; width: 20px; height: 20px;
  border-radius: 50%; background: var(--white); border: 2px solid var(--black);
}
.t-when { font-size: .95rem; font-weight: 700; color: var(--grey); font-variant-numeric: tabular-nums; }
.t-what { font-size: 1.2rem; font-weight: 800; line-height: 1.2; }
.t-how { font-size: 1rem; color: var(--grey); }
.t-paid::before { background: var(--orange) !important; border-color: var(--orange) !important; width: 28px !important; height: 28px !important; top: -4px !important; }
.t-paid .t-when { color: var(--black); }

/* pricing */
.pricing { padding: calc(var(--section) * .6) 0 var(--section); }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.plan {
  border: 2px solid var(--black); border-radius: 24px;
  padding: clamp(28px, 4vw, 44px);
  display: flex; flex-direction: column;
}
.plan h3 { font-size: 1.35rem; letter-spacing: -0.01em; }
.plan-price { margin: 14px 0 0; font-size: clamp(2rem, 3.6vw, 2.75rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.plan-note { margin: 10px 0 0; color: var(--grey); }
.plan-updates { background: var(--orange); border-color: var(--orange); }
.plan-updates .plan-note, .plan-updates .plan-foot { color: var(--black); }
.checks { list-style: none; padding: 0; margin: 26px 0 30px; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: .45em;
  width: 14px; height: 8px; border-left: 3px solid currentColor; border-bottom: 3px solid currentColor;
  transform: rotate(-45deg);
}
.plan .btn { margin-top: auto; align-self: flex-start; }
.plan-foot { margin: auto 0 0; padding-top: 18px; border-top: 2px solid var(--black); font-weight: 600; }

/* steps (a real sequence, so numbered) */
.steps { background: #F5F5F5; padding: var(--section) 0; }
.step-list { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.step-list li { counter-increment: step; }
.step-list li::before {
  content: counter(step); display: block;
  font-size: clamp(3.5rem, 6vw, 5rem); font-weight: 900; line-height: 1; letter-spacing: -0.04em;
  color: var(--orange); margin-bottom: 14px;
  -webkit-text-stroke: 0;
}
.step-list h3 { font-size: 1.3rem; letter-spacing: -0.01em; }
.step-list p { margin-top: 8px; color: var(--grey); }

/* faq */
.faq { padding: var(--section) 0; }
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(32px, 6vw, 80px); }
.faq h2 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.05; letter-spacing: -0.03em; }
.faq-list details { border-top: 2px solid var(--black); }
.faq-list details:last-child { border-bottom: 2px solid var(--black); }
.faq-list summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative;
  font-weight: 800; font-size: 1.2rem; line-height: 1.3;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  background:
    linear-gradient(var(--black), var(--black)) center / 18px 3px no-repeat,
    linear-gradient(var(--black), var(--black)) center / 3px 18px no-repeat;
  transition: transform .2s ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { margin: 0 0 24px; color: var(--grey); max-width: 38em; }

/* quote form */
.quote { background: var(--orange); padding: var(--section) 0; }
.quote-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.quote-intro { position: sticky; top: 110px; }
.quote-intro h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.02; letter-spacing: -0.035em; }
.quote-intro p { margin-top: 18px; font-size: 1.2rem; max-width: 26em; }
.quote-intro a { font-weight: 700; text-underline-offset: 4px; }
.quote-card { background: var(--white); border-radius: 24px; padding: clamp(24px, 4vw, 40px); }

.quote-form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { font-weight: 700; font-size: 1rem; }
.opt { font-weight: 500; color: var(--grey); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--black);
  background: var(--white); border: 2px solid var(--black); border-radius: 12px;
  padding: 12px 14px; min-height: 52px;
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.5; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--black) 50%), linear-gradient(135deg, var(--black) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 15px) 50%; background-size: 7px 7px; background-repeat: no-repeat; padding-right: 44px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--orange); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: #C40000; }
.field-error { color: #B00000; font-size: .95rem; font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { min-height: 65px; }
.privacy { margin: 0; font-size: .95rem; color: var(--grey); }

.form-status { border-radius: 12px; padding: 14px 16px; font-weight: 700; }
.form-status[data-kind="ok"] { background: var(--black); color: var(--white); }
.form-status[data-kind="error"] { background: #FFE9E9; color: #8A0000; border: 2px solid #C40000; }
.quote-done { text-align: left; }
.quote-done h3 { font-size: 1.6rem; letter-spacing: -0.02em; }
.quote-done p { margin-top: 10px; color: var(--grey); }

/* footer */
.foot { background: var(--black); color: var(--white); padding: 56px 0; }
.foot-inner { display: grid; gap: 14px; }
.foot img { height: 36px; width: auto; }
.foot p { margin: 0; color: var(--grey-on-black); }
.foot-small { font-size: .95rem; }
.foot a { color: var(--white); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline::before { left: 9px; right: auto; top: 10px; bottom: 10px; border-top: 0; border-left: 2px solid var(--black); }
  .timeline li { padding: 0 0 28px 44px; }
  .t-paid::before { left: -4px !important; }
  .plans, .step-list, .faq-grid, .quote-grid { grid-template-columns: 1fr; }
  .quote-intro { position: static; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .top-inner { justify-content: space-between; min-height: 64px; }
  .brand img { height: 30px; }
  .ledger { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .slip { grid-template-columns: 1fr; }
  .slip-receipt { display: none; }
  .slip-pay { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  body { font-size: 1.0625rem; }
}
@media (max-width: 420px) {
  .btn-small { padding: 0 14px; font-size: .95rem; }
  .brand img { height: 26px; }
  .slip-pay { grid-template-columns: 1fr; }
  .slip-qr { max-width: 140px; }
  .sheet-head { flex-direction: column; gap: 8px; }
}
