/* Layout and components, mobile first; every colour comes from tokens.css.
   Breakpoints: 480 header button, 640 / 760 / 900 grids, 1000 navigation (see --bp-* tokens). */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
img, svg { display: block; }
address { font-style: normal; }
:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 2px; border-radius: 2px; }

/* ---------- Type ---------- */
.h1 { font-size: clamp(2.125rem, 6vw, 3.5rem); }
.h2 { font-size: clamp(1.625rem, 3.4vw, 2.25rem); }
.h3 { font-size: clamp(1.1rem, 1.8vw, 1.3rem); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.6; color: var(--muted); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

/* ---------- Layout primitives ---------- */
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 1.25rem; }
@media (min-width: 900px) { .wrap { padding-inline: 3rem; } }

/* Content sections sit on a translucent ground so running text never lies directly on a dial. */
.section { padding-block: clamp(3.5rem, 8vw, 5.5rem); border-top: 1px solid var(--line); background: var(--backdrop); }
.section.tinted { background: var(--backdrop-tinted); }
.section-head { max-width: 42rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .lead { margin-top: 1rem; }
.section-body { margin-top: 2.75rem; }

.grid { display: grid; gap: 2.25rem 2.5rem; align-items: start; }
.grid h3 + p { margin-top: 0.6rem; color: var(--muted); }
@media (min-width: 760px) {
  .grid.c3 { grid-template-columns: repeat(3, 1fr); }
  .grid.c4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) { .grid.c4 { grid-template-columns: repeat(4, 1fr); } }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }

/* Elevation is a hairline, never a shadow. */
.card { border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--white); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.14s, border-color 0.14s, color 0.14s;
}
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { border-color: var(--ghost-border); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.8rem;
  color: var(--muted);
}
.pill .dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* A module icon (components/icon.latte); the size comes from where it is used. */
.icon {
  flex: none;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Clock field ---------- */
.clockfield { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.35; contain: strict; }
.clockfield.is-hero { opacity: calc(0.55 - 0.3 * var(--cf-scroll, 0)); }
.clockfield svg { width: 100%; height: 100%; }
.cf-edges line { stroke: var(--ink); stroke-opacity: 0.035; stroke-width: 1; }
.cf-dial { fill: none; stroke: var(--ink); stroke-opacity: 0.08; stroke-width: 1; transition: stroke 0.5s, stroke-opacity 0.5s; }
.cf-dial.lit { stroke: var(--accent); stroke-opacity: 0.45; transition: none; }
.cf-tick { stroke: var(--ink); stroke-opacity: 0.08; stroke-width: 1; stroke-linecap: round; }
.cf-hand { stroke: var(--ink); stroke-opacity: 0.16; stroke-width: 1.4; stroke-linecap: round; }
.cf-hand.lit { stroke: var(--accent); stroke-opacity: 0.55; }
.cf-center { fill: var(--ink); fill-opacity: 0.15; }
.cf-glows line { stroke: var(--accent); stroke-opacity: 0.3; stroke-width: 1.6; stroke-linecap: round; }
.cf-ring { fill: none; stroke: var(--accent); stroke-opacity: 0.35; stroke-width: 1.2; }
.cf-dot { fill: var(--accent); fill-opacity: 0.6; }
.cf-halo { fill: var(--accent); fill-opacity: 0.35; filter: url(#cf-blur); }
.page { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* ---------- Header ---------- */
.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid transparent;
  background: var(--header-bg);
  backdrop-filter: blur(6px);
}
.header.scrolled, .header.menu-open { border-bottom-color: var(--line); }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.75rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.brand span { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
}
.lang:hover { color: var(--ink); }
.header-cta { display: none; padding-inline: 1rem; }
.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}
.burger svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* Below 1000px the navigation is a panel under the header bar, opened by the burger. */
.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 0.25rem 1.25rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.menu-open .site-nav { display: block; }
.site-nav a:not(.btn) { display: flex; align-items: center; min-height: 48px; color: var(--ink); text-decoration: none; }
.site-nav li + li { border-top: 1px solid var(--line); }
.site-nav a[aria-current] { font-weight: 600; color: var(--accent-deep); }
.menu-cta { width: 100%; margin-top: 1rem; }

@media (min-width: 480px) {
  .header-cta { display: inline-flex; }
  .menu-cta { display: none; }
}
@media (min-width: 1000px) {
  .site-nav, .menu-open .site-nav { display: block; position: static; padding: 0; border: 0; background: none; }
  .site-nav ul { display: flex; gap: 0.15rem; }
  .site-nav li + li { border-top: 0; }
  .site-nav a:not(.btn) { min-height: 44px; padding-inline: 0.75rem; border-radius: var(--radius); font-size: 0.95rem; color: var(--muted); }
  .site-nav a:not(.btn):hover { color: var(--ink); }
  .site-nav a[aria-current] { color: var(--accent-deep); }
  .burger { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(4rem, 10vw, 7rem) clamp(3rem, 7vw, 5rem); text-align: center; }
.hero .pill { margin-bottom: 1.6rem; }
.hero .h1 { max-width: 48rem; margin-inline: auto; }
.hero .accent { color: var(--accent-deep); }
.hero .lead { max-width: 40rem; margin: 1.5rem auto 0; }
.hero .actions { margin-top: 2.25rem; }
.hero-note { margin-top: 1rem; font-size: 0.85rem; color: var(--muted); }

/* ---------- Proof strip ---------- */
.strip { border-top: 1px solid var(--line); background: var(--backdrop); }
.strip ul { display: grid; gap: 0.6rem 2rem; padding-block: 1.25rem; }
.strip li { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.7rem; font-size: 0.92rem; color: var(--muted); }
.strip b { font-family: var(--font-mono); font-weight: 500; color: var(--ink); white-space: nowrap; }
@media (min-width: 760px) { .strip ul { grid-template-columns: repeat(4, 1fr); } }

/* ---------- How it works: the step number is a small dial whose hand points at the step ---------- */
.step .dial { width: 40px; height: 40px; margin-bottom: 0.9rem; }
.step .dial circle { fill: none; stroke: var(--line); stroke-width: 1.5; }
.step .dial line { stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; }
.step .dial .hub { fill: var(--accent); stroke: none; }

/* ---------- Feature grid ---------- */
.features {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--line);
}
.features li { min-width: 0; background: var(--white); }
.features a { display: block; height: 100%; padding: 1.35rem 1.4rem; text-decoration: none; }
.features a:hover { background: var(--surface); }
.features h3 { display: flex; align-items: center; gap: 0.55rem; font-size: 1.02rem; }
.features .icon { width: 20px; height: 20px; }
.features p { margin-top: 0.45rem; font-size: 0.92rem; color: var(--muted); }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Documentation teaser ---------- */

/* ---------- Pricing teaser ---------- */
.prices { display: grid; gap: 1rem; }
.price { padding: 1.5rem; }
.price.highlight { border-color: var(--accent); }
.price .amount {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.price .amount small { font-size: 0.95rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.price .amount + p { margin-top: 0.5rem; font-size: 0.92rem; color: var(--muted); }
@media (min-width: 760px) { .prices { grid-template-columns: repeat(3, 1fr); } }
.prices-more { margin-top: 2rem; }

/* ---------- Footer ---------- */
.footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--backdrop); }
.footer-cols { display: grid; gap: 2.25rem; padding-block: 3rem; }
.footer h2 { font-family: var(--font-body); font-size: 0.9rem; font-weight: 600; letter-spacing: 0; }
.footer-tagline { max-width: 22rem; margin-top: 0.75rem; font-size: 0.92rem; color: var(--muted); }
.footer-links { margin-top: 0.5rem; font-size: 0.92rem; }
.footer-links a, .footer address a { display: flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.footer-links a:hover, .footer address a:hover { color: var(--accent-deep); }
.footer address { margin-top: 0.75rem; font-size: 0.92rem; line-height: 1.7; color: var(--muted); }
.footer address .mono { font-size: 0.85rem; }
.footer-legal { padding-block: 1.1rem; border-top: 1px solid var(--line); font-size: 0.78rem; color: var(--muted); }
@media (min-width: 760px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .footer-cols { grid-template-columns: 1.3fr 1fr 1fr 1.2fr; } }

/* ---------- Form fields (contact, installation) ---------- */
/* minmax(0, 1fr): a select is never wider than the field, whatever its longest option */
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
.field label { font-size: 0.92rem; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--ghost-border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--accent); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 1px; border-color: var(--accent-deep); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field-error { font-size: 0.9rem; color: var(--danger); }
.field-hint { font-size: 0.9rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cf-dial { transition: none; }
}
