/* tetha.net — layout for the "tetha.net marketing site" design canvas. Every
   colour, font and radius comes from tokens.css (the tetha design system). */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 24px; }

/* Pre-launch switch (see index.html): live-only vs soon-only blocks. */
.prelaunch .live-only { display: none !important; }
html:not(.prelaunch) .soon-only { display: none !important; }
/* Store switch (see index.html): the Play button until the app is public. */
.nostore .store-only { display: none !important; }
html:not(.nostore) .nostore-only { display: none !important; }

/* Logo per theme: full-colour on light grounds, white on dark. Element +
   class so these always win over a layout rule like `.header-logo img`. */
img.logo-light { display: block; }
img.logo-dark { display: none; }
[data-theme="dark"] img.logo-light { display: none; }
[data-theme="dark"] img.logo-dark { display: block; }

/* Header */
.site-header { border-bottom: 1px solid var(--hairline); }
.header-row { padding-block: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.header-logo { display: block; }
.header-logo img { height: 120px; width: auto; }
.header-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.header-nav a { font-size: 17px; font-weight: 600; color: var(--ink); text-decoration: none; }
.header-nav a.signin { color: var(--accent-text); text-decoration: underline; }
.btn {
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-primary { background: var(--brand-blue); color: var(--on-blue); }
.header-nav .btn-primary { height: 44px; padding: 0 18px; color: var(--on-blue); }
.pill-soon {
  height: 36px; padding: 0 14px;
  border-radius: var(--radius-full);
  border: 2px dashed var(--status-waiting);
  font-size: 15px; font-weight: 700;
  display: inline-flex; align-items: center;
}

/* Hero */
.hero { padding-block: 72px 88px; display: flex; flex-wrap: wrap; align-items: center; gap: 56px 64px; }
.hero-copy { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(40px, 4vw + 12px, 64px); line-height: 1.02; font-weight: 800; letter-spacing: -0.01em; }
.hero-lede { max-width: 520px; font-size: 20px; line-height: 30px; color: var(--ink-muted); }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hero-ctas .btn-primary { height: 54px; padding: 0 24px; font-size: 18px; }
.btn-outline {
  height: 54px; padding: 0 22px;
  border: 2px solid var(--ink-muted); color: var(--ink);
  font-size: 17px;
}
.hero-note { font-size: 15px; color: var(--ink-muted); }
/* Google's badge image includes its own clear space; the negative margin lines
   the visible badge up with the 54px buttons beside it. */
.play-badge { display: inline-block; margin: -13px -13px; line-height: 0; }
.play-badge img { height: 80px; width: auto; display: block; }
.footer-legal { font-size: 13px; color: var(--ink-muted); }
.hero-soon { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hero-soon .soon-box {
  height: 54px; padding: 0 22px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--status-waiting);
  font-size: 18px; font-weight: 700;
  display: inline-flex; align-items: center;
}
.hero-soon p { font-size: 17px; line-height: 24px; color: var(--ink-muted); max-width: 300px; }

/* Phone mock-up (decorative) */
.hero-art { flex: 1 1 320px; display: flex; justify-content: center; }
.phone {
  width: 300px; height: 600px;
  border-radius: 40px;
  border: 10px solid var(--ink);
  background: var(--surface-muted);
  position: relative; overflow: hidden;
  box-shadow: 0 24px 60px rgba(17, 29, 37, 0.18);
}
.phone svg { position: absolute; inset: 0; display: block; }
.phone .tint { fill: var(--blue-tint); }
.phone .road { fill: none; stroke: var(--surface); }
.phone .route { fill: none; stroke: var(--brand-blue); stroke-width: 4; stroke-linecap: round; }
.pin-moving {
  position: absolute; left: 184px; top: 178px;
  width: 30px; height: 30px; border-radius: var(--radius-full);
  background: var(--status-moving); border: 4px solid var(--surface);
  box-shadow: 0 0 0 6px rgba(105, 189, 69, 0.3);
}
.pin-parked {
  position: absolute; left: 44px; top: 120px;
  width: 24px; height: 24px; border-radius: var(--radius-full);
  background: var(--status-parked); border: 3px solid var(--surface);
  color: var(--on-blue); font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.vehicle-card {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  padding: 14px 16px; border-radius: 16px;
  background: var(--surface);
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: 0 4px 16px rgba(17, 29, 37, 0.12);
}
.vehicle-card .name { font-size: 20px; font-weight: 700; }
.vehicle-card .status { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.vehicle-card .dot { width: 10px; height: 10px; border-radius: var(--radius-full); background: var(--status-moving); }
.vehicle-card .status strong { font-weight: 700; }
.vehicle-card .muted { color: var(--ink-muted); }
.vehicle-card .updated { font-size: 13px; color: var(--ink-muted); }

/* Sections */
.band-muted { background: var(--surface-muted); }
.section { padding-block: 88px; display: flex; flex-direction: column; gap: 40px; }
.section h2 { font-size: 40px; line-height: 46px; font-weight: 700; }
.section-lede { font-size: 18px; line-height: 27px; color: var(--ink-muted); max-width: 560px; margin-top: 10px; }

/* How it works: nodes joined by the brand line */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px 24px; }
.steps li { display: flex; flex-direction: column; gap: 12px; }
.step-node { display: flex; align-items: center; }
.step-node .n {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: var(--radius-full);
  background: var(--brand-blue); color: var(--on-blue);
  font-size: 20px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.step-node .line { height: 6px; flex-grow: 1; background: var(--brand-blue); opacity: 0.25; }
.steps li:last-child .n { background: var(--brand-green); color: var(--on-green); }
.steps li:last-child .line { opacity: 0; }
.steps h3 { margin-top: 4px; font-size: 22px; font-weight: 700; }
.steps p, .features p { font-size: 17px; line-height: 25px; color: var(--ink-muted); }

/* Features */
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.features li { padding: 24px; border-radius: var(--radius-md); border: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 10px; }
.features svg { width: 32px; height: 32px; color: var(--accent-text); }
.features h3 { font-size: 22px; font-weight: 700; }

/* Trackers */
.trackers { padding-block: 88px; display: flex; flex-direction: column; gap: 16px; }
.trackers h2 { font-size: 40px; line-height: 46px; font-weight: 700; }
.trackers p { max-width: 640px; font-size: 18px; line-height: 27px; color: var(--ink-muted); }

/* Free band */
.free-wrap { padding-block: 88px; }
.free {
  border-radius: 16px;
  background: var(--brand-blue); color: var(--on-blue);
  padding: 48px clamp(24px, 4vw, 56px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px;
  position: relative; overflow: hidden;
}
.free-copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 10px; position: relative; }
.free h2 { font-size: 40px; line-height: 46px; font-weight: 700; }
.free p { font-size: 20px; line-height: 28px; }
.free .btn-light {
  height: 56px; padding: 0 28px;
  background: var(--surface); color: var(--ink);
  font-size: 18px; font-weight: 700; position: relative;
}
.free .soon-box {
  height: 56px; padding: 0 26px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--on-blue);
  font-size: 18px; font-weight: 700;
  display: inline-flex; align-items: center; position: relative;
}
.free .motif { position: absolute; right: -20px; top: 18px; opacity: 0.35; }
.free-list { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 12px 40px; }
.free-list li { display: flex; align-items: center; gap: 10px; font-size: 20px; line-height: 28px; }
.free-list strong { font-weight: 700; }
.free-list svg { width: 26px; height: 26px; flex: none; }
.free-list svg circle { fill: var(--brand-green); }
.free-list svg path { fill: none; stroke: var(--on-green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.free .free-note { font-size: 17px; line-height: 24px; opacity: 0.9; }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); background: var(--surface-muted); }
.footer-row { padding-block: 40px 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
/* flex-start, not the default stretch: a stretched column child takes the
   column's full width, and the 36px-high wordmark was drawn ~2x too wide. */
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer-brand img { height: 36px; width: auto; }
.footer-support { font-size: 16px; color: var(--ink-muted); }
/* Brand glyphs from Simple Icons (CC0), drawn in the footer ink, not brand colours. */
.footer-social { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; margin-left: -11px; }
.footer-social a { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--ink); border-radius: 8px; }
.footer-social a:hover { color: var(--ink-muted); }
.footer-social svg { fill: currentColor; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: flex-start; }
.footer-nav a { font-size: 16px; font-weight: 600; color: var(--ink); }

@media (max-width: 560px) {
  .wrap { padding-inline: 16px; }
  .section, .trackers, .free-wrap { padding-block: 64px; }
  .section h2, .trackers h2, .free h2 { font-size: 32px; line-height: 38px; }
  .free-list { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Installer registration (installers/index.html) */
.installer-page { padding-block: 56px 88px; display: grid; grid-template-columns: 1fr minmax(0, 440px); gap: 56px; align-items: start; }
.installer-copy h1 { font-size: 44px; line-height: 50px; font-weight: 700; }
.installer-copy .hero-lede { margin-top: 16px; }
.installer-copy h2 { font-size: 26px; line-height: 32px; font-weight: 700; margin-top: 36px; margin-bottom: 10px; }
.installer-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.installer-card { border: 1px solid var(--hairline); border-radius: var(--radius-md); padding: 28px; background: var(--surface); }
.installer-card h2 { font-size: 26px; line-height: 32px; font-weight: 700; margin-bottom: 8px; }
.installer-card form { display: flex; flex-direction: column; }
.installer-card label { font-size: 16px; font-weight: 600; margin-top: 16px; margin-bottom: 6px; }
.installer-card input:not([type="checkbox"]), .installer-card select {
  height: 48px; padding: 0 12px; width: 100%;
  border: 1px solid var(--ink-muted); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: inherit;
}
.installer-card select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2371717A' viewBox='0 0 24 24'%3E%3Cpath d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 20px;
}
.installer-card label.form-tick { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-top: 20px; margin-bottom: 0; }
.form-tick input { width: 20px; height: 20px; flex: none; margin: 3px 0 0; }
.installer-card .btn { height: 52px; margin-top: 20px; font-size: 18px; border: 0; cursor: pointer; font-family: inherit; }
.installer-card .btn:disabled { opacity: 0.6; cursor: wait; }
.form-message { margin-top: 8px; padding: 12px; border-radius: var(--radius-sm); background: var(--blue-tint); color: var(--ink); font-weight: 600; }
.form-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }
.installer-card .form-group { display: flex; flex-direction: column; }
.form-hint { font-size: 14px; line-height: 20px; color: var(--ink-muted); margin-top: 6px; }
@media (max-width: 860px) {
  .installer-page { grid-template-columns: 1fr; gap: 36px; padding-block: 32px 56px; }
  .installer-copy h1 { font-size: 34px; line-height: 40px; }
}

/* Affiliates (affiliates/index.html): sign in, terms, then the dashboard. */
.aff-page { padding-block: 48px 88px; }
.aff-narrow { max-width: 480px; }
.aff-page h1 { font-size: 40px; line-height: 46px; font-weight: 700; }
.aff-page .hero-lede { margin-top: 12px; color: var(--ink-muted); }
.aff-page .installer-card { margin-top: 28px; }
.aff-link { background: none; border: 0; padding: 0; margin-top: 16px; color: var(--accent-text); font: inherit; text-decoration: underline; cursor: pointer; align-self: flex-start; }
.aff-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.aff-stats { margin-top: 28px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.aff-stat { border: 1px solid var(--hairline); border-radius: var(--radius-md); padding: 16px; background: var(--surface-muted); }
.aff-stat .n { font-size: 28px; line-height: 34px; font-weight: 700; }
.aff-stat .l { font-size: 14px; color: var(--ink-muted); }
.aff-share { margin-top: 20px; border: 1px solid var(--hairline); border-radius: var(--radius-md); padding: 20px; display: grid; gap: 10px; }
.aff-share .row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.aff-share code { font-family: inherit; font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.aff-share .code { font-size: 24px; letter-spacing: 3px; }
.aff-share .muted, .aff-muted { color: var(--ink-muted); font-size: 15px; }
.btn-small { height: 40px; padding: 0 16px; border: 1px solid var(--ink-muted); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }
.aff-page h2 { font-size: 26px; line-height: 32px; font-weight: 700; margin-top: 40px; margin-bottom: 12px; }
.aff-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hairline); }
.aff-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.aff-list .who { font-weight: 600; }
.aff-list .sub { font-size: 14px; color: var(--ink-muted); }
.aff-list .what { text-align: right; }
.aff-pill { display: inline-block; padding: 2px 10px; border-radius: var(--radius-full); font-size: 14px; font-weight: 700; background: var(--blue-tint); color: var(--ink); }
.aff-pill.paid { background: var(--brand-green); color: var(--on-green); }
.aff-pill.wait { background: transparent; border: 1px dashed var(--ink-muted); color: var(--ink-muted); font-weight: 600; }
.aff-empty { padding: 16px 0; color: var(--ink-muted); }
.aff-foot { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
@media (max-width: 860px) {
  .aff-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aff-page h1 { font-size: 32px; line-height: 38px; }
}
@media (max-width: 560px) {
  .aff-list .what { text-align: left; }
}
