/* LVL website styles.
   Colours and type sizes are set once at the top; everything else uses them. */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/Inter-Regular.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../fonts/Inter-Medium.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/Inter-SemiBold.woff") format("woff"); }
@font-face { font-family: "Inter Display"; font-weight: 600; font-display: swap; src: url("../fonts/InterDisplay-SemiBold.woff") format("woff"); }
@font-face { font-family: "Inter Display"; font-weight: 700; font-display: swap; src: url("../fonts/InterDisplay-Bold.woff") format("woff"); }

:root {
  --ink: #16191d;        /* dark tone from the logo and app */
  --slate: #555d66;      /* secondary text */
  --line: #e2e4e1;       /* hairlines */
  --mist: #f4f5f3;       /* quiet section background */
  --paper: #ffffff;
  --ember: #f2711c;      /* the orange: buttons and one or two marks only */
  --ember-deep: #c2500a; /* orange for small text on white */
  --level: #2a9d57;      /* green means "level", nothing else */
  --almost: #c99a06;

  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Inter Display", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 70rem;
  --gap: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7.5rem);
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.25rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
p { margin: 0; max-width: 38em; text-wrap: pretty; }
p + p { margin-top: 1em; }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.5; color: var(--slate); max-width: 34em; }
.muted { color: var(--slate); }
.small { font-size: 0.9375rem; }
.num { font-variant-numeric: tabular-nums; }

.wrap { width: min(100% - 2 * var(--gap), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--section); }
.section-mist { background: var(--mist); }
.section-ink { background: var(--ink); color: #fff; }
.section-ink .muted, .section-ink .lede { color: #b9bfc6; }
.stack > * + * { margin-top: 1.25rem; }
.stack-lg > * + * { margin-top: 2.25rem; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.75rem 1rem; z-index: 50; }
.skip:focus { left: 0; }

/* ---------- Header ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 4.5rem; gap: 1rem; }
.brand { display: flex; align-items: center; }
.brand img { height: 3rem; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); }
.nav a { text-decoration: none; font-weight: 500; font-size: 0.975rem; padding-block: 0.4rem; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.nav a.nav-buy { border: 1.5px solid var(--ink); border-radius: 999px; padding: 0.4rem 1.1rem; }
.nav a.nav-buy:hover, .nav a.nav-buy[aria-current="page"] { background: var(--ink); color: #fff; }
.nav-toggle { display: none; background: none; border: 1.5px solid var(--ink); border-radius: 999px; font: 500 0.95rem var(--body); color: var(--ink); padding: 0.45rem 1rem; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--gap) 1.25rem; }
  .nav.open { display: flex; }
  .nav a { padding: 0.9rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a.nav-buy { margin-top: 1rem; text-align: center; padding: 0.8rem; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font: 600 1rem/1.2 var(--body); text-decoration: none; padding: 0.95rem 1.5rem; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer; }
.btn-primary { background: var(--ember); color: var(--ink); }
.btn-primary:hover { background: #ff8330; }
.btn-quiet { border-color: currentColor; background: transparent; color: inherit; }
.btn-quiet:hover { background: rgba(127, 127, 127, 0.12); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* ---------- Home hero ---------- */
.hero { position: relative; color: #fff; background: var(--ink); isolation: isolate; }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(22,25,29,0.10) 25%, rgba(22,25,29,0.82) 100%); }
.hero .wrap { min-height: min(46rem, 82vh); display: flex; flex-direction: column; justify-content: flex-end; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.hero h1 { max-width: 12em; }
.hero .lede { color: #eef0f1; margin-top: 1.25rem; }
.hero .btn-row { margin-top: 2rem; }

/* ---------- Page heading (inner pages) ---------- */
.page-head { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem); }
.page-head .lede { margin-top: 1.25rem; }

/* ---------- Two-column layouts ---------- */
.split { display: grid; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
@media (min-width: 820px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.narrow-media { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
  .split.top { align-items: start; }
  .split .media-last { order: 2; }
}

/* Plain statement list: a heading and a line, separated by hairlines */
.points { list-style: none; margin: 0; padding: 0; }
.points li { padding-block: 1.4rem; border-top: 1px solid var(--line); }
.points li:last-child { border-bottom: 1px solid var(--line); }
.points h3 + p { margin-top: 0.35rem; color: var(--slate); }
.section-ink .points li { border-color: #353a41; }

/* ---------- Phone frame for app screenshots ---------- */
.phone { width: min(100%, 17.5rem); margin-inline: auto; border-radius: 2.4rem; padding: 0.55rem; background: var(--ink); box-shadow: 0 30px 60px -30px rgba(22,25,29,0.45); }
.phone img, .phone .screen { border-radius: 1.9rem; width: 100%; }
.phones { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.phones figure { margin: 0; }
.phones figcaption { margin-top: 1.25rem; text-align: center; }
.phones figcaption strong { display: block; font-weight: 600; }
.phones figcaption span { color: var(--slate); font-size: 0.9375rem; }

/* ---------- Video ---------- */
.video { position: relative; aspect-ratio: 16 / 9; background: var(--ink); border-radius: var(--radius); overflow: hidden; }
.video.tall { aspect-ratio: 9 / 16; width: min(100%, 21rem); margin-inline: auto; }
@media (min-width: 820px) {
  .has-tall-video { display: grid; grid-template-columns: 1fr auto; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
  .has-tall-video > * + * { margin-top: 0; }
  .has-tall-video .video.tall { width: 21rem; }
}
.video video, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-draft { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #fff; padding: 1.5rem; background-size: cover; background-position: center; }
.video-draft::before { content: ""; position: absolute; inset: 0; background: rgba(22,25,29,0.6); }
.video-draft > * { position: relative; }
.video-draft strong { font: 600 1.25rem var(--display); }
.draft-tag { display: inline-block; font-size: 0.8125rem; font-weight: 600; background: #fff3c4; color: #5c4a00; border-radius: 4px; padding: 0.15rem 0.5rem; }

/* ---------- Product photo ---------- */
.product-photo { border-radius: var(--radius); background: #f1f1f1; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.price { font: 700 clamp(2rem, 4vw, 2.75rem)/1 var(--display); letter-spacing: -0.02em; }

/* ---------- Facts / spec tables ---------- */
.facts { width: 100%; border-collapse: collapse; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 1.05rem 0; border-top: 1px solid var(--line); }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 1px solid var(--line); }
.facts th { font-weight: 500; color: var(--slate); width: 38%; padding-right: 1.5rem; }
.facts td { font-weight: 500; }
.facts td small { display: block; font-weight: 400; color: var(--slate); font-size: 0.9375rem; margin-top: 0.15rem; }
@media (max-width: 520px) { .facts th, .facts td { display: block; width: 100%; } .facts td { border-top: 0; padding-top: 0; } .facts th { padding-bottom: 0.2rem; } }

/* ---------- Steps (a real sequence) ---------- */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; gap: 0 1rem; padding-block: 1.5rem; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step); font: 700 1.5rem/1.2 var(--display); color: var(--ember-deep); }
.steps p { color: var(--slate); margin-top: 0.35rem; }

/* ---------- Levelling demo ---------- */
.demo { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2.25rem); }
.demo-views { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.demo-view { background: var(--mist); border-radius: 8px; padding: 1rem 1rem 0.5rem; }
.demo-view header { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.9375rem; color: var(--slate); }
.demo-view output { font: 700 1.6rem var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.demo-view svg { width: 100%; height: auto; margin-top: 0.25rem; }
.demo-view .tilt { transition: transform 0.25s ease-out; transform-box: view-box; }
.demo-controls { display: grid; gap: 1.25rem 2rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-top: 1.5rem; }
.demo-controls label { display: block; font-weight: 500; font-size: 0.9375rem; }
.demo-controls input[type="range"] { width: 100%; margin-top: 0.6rem; accent-color: var(--ink); height: 1.75rem; }
.demo-out { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: grid; gap: 1rem; }
.status { display: inline-flex; align-items: center; gap: 0.6rem; font: 600 1rem var(--body); }
.vial { position: relative; width: 4.5rem; height: 1.4rem; border: 2px solid var(--ink); border-radius: 999px; flex: none; }
.vial::before, .vial::after { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); }
.vial::before { left: 34%; } .vial::after { right: 34%; }
.vial i { position: absolute; top: 2px; bottom: 2px; width: 26%; left: 37%; border-radius: 999px; background: var(--almost); transition: left 0.25s ease-out, background 0.25s; }
.status[data-state="level"] .vial i { background: var(--level); }
.status[data-state="off"] .vial i { background: var(--ember); }
.demo-todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.demo-todo li { font-weight: 600; font-size: 1.125rem; }
.demo-todo li small { display: block; font-weight: 400; color: var(--slate); font-size: 0.9375rem; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; }
.form .row { display: grid; gap: 1.1rem; align-items: end; }
@media (min-width: 600px) { .form .row { grid-template-columns: 1fr 1fr; } }
.field label, .field legend { display: block; font-weight: 500; font-size: 0.9375rem; margin-bottom: 0.4rem; }
.field .hint { font-weight: 400; color: var(--slate); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 1rem/1.4 var(--body); color: var(--ink); background: var(--paper);
  border: 1.5px solid #c9cdc8; border-radius: 8px; padding: 0.8rem 0.9rem;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(242,113,28,0.35); }
.check { display: grid; grid-template-columns: 1.4rem 1fr; gap: 0.6rem; align-items: start; font-size: 0.9375rem; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; accent-color: var(--ink); }
.form-msg { border-radius: 8px; padding: 0.9rem 1rem; font-size: 0.9375rem; display: none; }
.form-msg.show { display: block; }
.form-msg.ok { background: #e7f5ec; color: #14532d; }
.form-msg.err { background: #fdecea; color: #8a1c12; }
.hp { position: absolute; left: -5000px; }

/* Order summary */
.summary { background: var(--mist); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); }
.summary dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 0.6rem 1rem; }
.summary dt { color: var(--slate); }
.summary dd { margin: 0; text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.summary .total { border-top: 1px solid #d5d8d3; padding-top: 0.8rem; margin-top: 0.3rem; font-weight: 600; color: var(--ink); font-size: 1.125rem; }

/* ---------- FAQ ---------- */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.2rem 2rem 1.2rem 0; font: 600 1.0625rem var(--body); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 1rem; font-size: 1.5rem; font-weight: 400; color: var(--slate); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 1.3rem; color: var(--slate); }

/* ---------- Trust row ---------- */
.trust { display: grid; gap: 1.5rem 3rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.trust h3 + p { margin-top: 0.35rem; color: var(--slate); }

/* ---------- Photo band ---------- */
.band { position: relative; color: #fff; isolation: isolate; background: var(--ink); }
.band img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(22,25,29,0.88) 0%, rgba(22,25,29,0.55) 60%, rgba(22,25,29,0.25) 100%); }
.band .lede { color: #e6e8ea; }

/* ---------- App badge ---------- */
.app-get { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.app-get img { height: 3rem; width: auto; }
.app-badge { display: inline-flex; align-items: center; gap: 0.6rem; }
.app-soon { display: inline-flex; align-items: center; gap: 0.5rem; border: 1.5px dashed #aab0b6; border-radius: 10px; padding: 0.6rem 1rem; font-weight: 500; font-size: 0.9375rem; }

/* ---------- Coming soon ---------- */
.hub svg { width: 100%; height: auto; max-width: 46rem; margin-inline: auto; }
.modules { display: grid; gap: 2.5rem 3rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.modules svg { width: 3.25rem; height: 3.25rem; margin-bottom: 1rem; }
.modules h3 + p { margin-top: 0.4rem; color: var(--slate); }
.in-dev { display: inline-block; font-size: 0.8125rem; font-weight: 600; color: var(--ember-deep); margin-top: 0.75rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: 0.75rem; max-width: 32rem; }
.inline-form .field { flex: 1 1 14rem; }
.inline-form .field label { position: absolute; left: -5000px; }

/* ---------- Policies / long text ---------- */
.prose > * { max-width: 44rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2.75rem; }
.prose h2 + p, .prose h2 + ul { margin-top: 0.75rem; }
.prose ul { padding-left: 1.2rem; margin: 0.75rem 0 0; }
.prose li + li { margin-top: 0.4rem; }
.notice { background: #fff8dc; border-radius: 8px; padding: 1rem 1.15rem; font-size: 0.9375rem; color: #4d3f00; }

/* ---------- Manufacturer page ---------- */
.co-brand { display: flex; align-items: center; justify-content: center; gap: clamp(1rem, 4vw, 2.25rem); padding-block: 1.75rem; border-bottom: 1px solid var(--line); }
.co-brand img { height: 3.25rem; width: auto; }
.co-brand .co-name { font: 700 1.5rem var(--display); letter-spacing: -0.01em; }
.co-brand .x { width: 1px; height: 2.5rem; background: #c9cdc8; }

/* ---------- Orders view ---------- */
.orders { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.orders th, .orders td { text-align: left; vertical-align: top; padding: 0.75rem 0.75rem 0.75rem 0; border-top: 1px solid var(--line); }
.orders th { color: var(--slate); font-weight: 500; }
.pill { display: inline-block; border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.8125rem; font-weight: 600; background: var(--mist); }
.pill.paid { background: #e7f5ec; color: #14532d; }
.table-scroll { overflow-x: auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c8cdd2; padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; font-size: 0.9375rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.footer-grid img { height: 4.25rem; width: auto; margin-bottom: 1rem; }
.footer-grid h3 { font: 600 0.9375rem var(--body); color: #fff; letter-spacing: 0; margin-bottom: 0.75rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-base { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #353a41; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; color: #9aa1a8; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .demo-view .tilt, .vial i { transition: none; }
}
