/* OhTeq site styles.
   Direction: calm competence for a trust-first utility. One petrol accent,
   ruled sections instead of boxed cards, quiet type with big scale contrast.
   Tokens swap for dark mode via prefers-color-scheme. Motion only answers
   actions (hover, press, focus) and collapses under reduced motion. */

:root {
  --bg: #f5f6f6;
  --surface: #fcfdfd;
  --ink: #16232a;
  --muted: #54666c;
  --line: #dbe2e2;
  --accent: #0c6b62;
  --accent-strong: #08504a;
  --accent-ink: #ffffff;
  --accent-wash: #eef3f2;
  --danger: #a8382c;
  --radius-card: 16px;
  --radius-input: 12px;
  --radius-pill: 999px;
  color-scheme: light dark;
  font-family: system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1719;
    --surface: #172023;
    --ink: #e2eaea;
    --muted: #97a9a7;
    --line: #28393b;
    --accent: #46b5aa;
    --accent-strong: #63c6bc;
    --accent-ink: #0a1513;
    --accent-wash: #132523;
    --danger: #f08a7d;
  }
}

* { box-sizing: border-box; }
body { margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

a { color: var(--accent); text-underline-offset: 3px; }

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

/* Chrome */

header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand-text span { color: var(--accent); }

/* OhTeq hub mark: geometric, one accent, the frame takes the ink colour so it
   reads on light and dark. The product uses the original Tabroost logo PNG. */

.mark-footer { display: block; }

.hero-logo { width: 56px; height: 56px; image-rendering: pixelated; border-radius: 12px; display: block; margin-bottom: 16px; }
nav a { margin-left: 24px; color: var(--muted); text-decoration: none; font-size: 0.95rem; }
nav a:hover { color: var(--ink); text-decoration: underline; }

footer.site { border-top: 1px solid var(--line); margin-top: 80px; padding: 26px 0 44px; color: var(--muted); font-size: 0.9rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; }
footer.site .foot-brand { display: flex; align-items: flex-start; }
footer.site a { color: var(--muted); margin-right: 16px; }
footer.site a:hover { color: var(--ink); }

/* Type */

h1, h2, h3 { line-height: 1.08; letter-spacing: -0.025em; }
h2 { font-size: 1.4rem; font-weight: 750; letter-spacing: -0.02em; margin: 60px 0 20px; }

/* Hero */

.hero { padding: 84px 0 56px; }
.hero h1 { font-size: clamp(2.5rem, 5.5vw, 3.5rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.035em; margin: 0; max-width: 16ch; }
.hero p { color: var(--muted); font-size: 1.125rem; max-width: 50ch; margin: 16px 0 0; }

.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }

/* Screenshot slot: fixed 16:10 body so the real image drops in with zero
   layout shift. The browser-chrome top bar marks it as a browser window. */

.shot-frame { margin: 0; width: 100%; max-width: 540px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.shot-chrome { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.shot-chrome span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.shot-url { flex: 1; height: 12px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); margin-left: 6px; }
.shot-body { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.shot-body img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-note { color: var(--muted); font-size: 0.9rem; padding: 0 16px; text-align: center; }

.popup-shot { margin: 0; min-width: 0; display: flex; justify-content: center; }
.popup-shot img { display: block; width: 100%; max-width: 360px; height: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 24px 60px #00000066, 0 0 0 1px #ffffff08; }

/* Cards, used only where you type or buy */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 24px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; padding-bottom: 24px; }
.tool { display: flex; gap: 18px; align-items: flex-start; text-decoration: none; color: inherit; transition: border-color 0.15s ease, transform 0.15s ease; }
.tool:hover { border-color: var(--accent); transform: translateY(-1px); }
.tool img { width: 56px; height: 56px; image-rendering: pixelated; border-radius: 12px; flex: none; }
.tool h3 { margin: 0 0 4px; font-size: 1.15rem; font-weight: 700; }
.tool p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.tag { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 10px; }
.card.soon { border-style: dashed; color: var(--muted); display: flex; align-items: center; justify-content: center; min-height: 120px; }

/* Pricing */

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); gap: 16px; align-items: stretch; }
.plan h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.price { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin: 10px 0 2px; }
.price small { font-size: 0.95rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan small { display: block; color: var(--muted); }
.plan ul { padding-left: 18px; margin: 14px 0 20px; color: var(--muted); font-size: 0.95rem; }
.plan li { margin: 4px 0; }
.plan.best { border: 2px solid var(--accent); background: var(--accent-wash); }

.buy { display: flex; flex-wrap: wrap; gap: 8px; }

/* Buttons: one pill system, motion answers the press */

.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; border-radius: var(--radius-pill); padding: 10px 22px; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; transition: background 0.15s ease, border-color 0.15s ease, transform 0.06s ease; }
.btn:hover { background: var(--accent-strong); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--line); }
.btn.ghost:hover { background: var(--accent-wash); border-color: var(--accent); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn:disabled:hover { background: var(--accent); }
.btn.ghost:disabled:hover { background: transparent; border-color: var(--line); }
a.btn[aria-disabled="true"] { background: var(--surface); color: var(--muted); border-color: var(--line); }
a.btn[aria-disabled="true"]:hover { background: var(--surface); }

/* Good to know: ruled rows, no boxed table */

.feature-table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.feature-table th { text-align: left; font-size: 0.8rem; font-weight: 600; color: var(--muted); padding: 0 16px 10px 0; border-bottom: 1px solid var(--ink); }
.feature-table td { text-align: left; font-size: 0.95rem; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.feature-table tr:last-child td { border-bottom: 0; }
.feature-table td:first-child { color: var(--ink); font-weight: 600; width: 30%; }

/* Account and thanks forms */

form.key { display: flex; gap: 10px; flex-wrap: wrap; }

input, select, textarea { border: 1px solid var(--line); border-radius: var(--radius-input); background: var(--surface); color: inherit; padding: 10px 14px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

form.key input { flex: 1; min-width: 240px; font-family: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace; text-transform: uppercase; }

.computers { list-style: none; padding: 0; margin: 16px 0 0; }
.computers li { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.computers li:last-child { border-bottom: 0; }
.computers small { color: var(--muted); }

.msg { margin-top: 14px; color: var(--muted); }
.msg.err { color: var(--danger); }

.licence-key { font: 600 1.25rem/1.4 ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace; letter-spacing: 0.04em; background: var(--accent-wash); border: 1px solid var(--line); border-radius: var(--radius-input); padding: 12px 16px; display: inline-block; margin: 6px 12px 6px 0; }

/* Legal pages */

.legal { max-width: 62ch; padding-bottom: 24px; }
.legal h1 { margin-top: 56px; font-size: clamp(2rem, 4vw, 2.6rem); }
.legal h2 { margin: 36px 0 12px; font-size: 1.15rem; }
.legal p { margin: 12px 0; }

/* The one coloured mark on legal pages: Mahmoud's placeholders stay visibly yellow */

.todo { background: #fff4d6; border: 1px solid #e8cf7e; border-radius: 8px; padding: 2px 6px; }
@media (prefers-color-scheme: dark) {
  .todo { background: #463c14; border-color: #6b5d22; color: #f3e8c8; }
}

/* Reduced motion collapses everything */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .tool:hover { transform: none; }
}

/* Small screens */

@media (max-width: 900px) {
  .hero { padding: 56px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .shot-frame { max-width: 420px; }
  .wrap { padding: 0 20px; }
  h2 { margin-top: 44px; }
}

/* Plans: stable 2x2 grid, buttons pinned to one shared bottom line (fix 2026-11-19) */
.plans { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
.card.plan { display: flex; flex-direction: column; }
.card.plan ul { flex: 1; }
.card.plan .buy { margin-top: auto; }
.card.plan .plan-note { margin-top: auto; padding-top: 16px; }

/* OhTeq hub mark: The Click, ring opens at one o'clock, the petrol dot arrives (2026-11-19) */
.mark-hub { display: block; }
.mark-hub path { stroke: currentColor; }
.mark-hub circle { fill: var(--accent); }

/* Billing toggle: Monthly / Yearly as main categories (2026-11-19). Pure CSS, no JS. */
.bill-radio { position: absolute; opacity: 0; pointer-events: none; }
.bill-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.bill-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; border: 1px solid var(--line); border-radius: var(--radius-pill); font-weight: 650; cursor: pointer; color: var(--muted); transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease; }
.bill-tab:hover { border-color: var(--accent); color: var(--ink); }
.bill-badge { font-size: 0.78rem; font-weight: 600; color: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius-pill); padding: 2px 8px; }
.panel { display: none; }
#bill-m:checked ~ .bill-tabs label[for="bill-m"],
#bill-y:checked ~ .bill-tabs label[for="bill-y"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
#bill-y:checked ~ .bill-tabs label[for="bill-y"] .bill-badge { color: var(--accent-ink); border-color: var(--accent-ink); }
#bill-m:checked ~ .panel-m, #bill-y:checked ~ .panel-y { display: grid; }
.pass-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 16px; }
.pass-strip h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.pass-strip .price { margin: 0; }
.pass-strip ul { flex: 1 1 260px; margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.95rem; }
.pass-strip li { margin: 4px 0; }

/* Coming soon page with the team password gate (served by the Worker while the site is locked) */

body.gate { min-height: 100vh; display: flex; flex-direction: column; }
.gate-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 64px 24px 32px; }
.gate-mark { color: var(--ink); }
.gate-brand { font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; margin: 12px 0 0; }
.gate-brand span { color: var(--accent); }
.gate-main h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 800; margin: 28px 0 12px; }
.gate-lead { color: var(--muted); font-size: 1.1rem; max-width: 34em; margin: 0 0 40px; }
.gate-form { width: 100%; max-width: 400px; text-align: left; }
.gate-form label { display: block; font-size: 0.9rem; font-weight: 650; color: var(--muted); margin-bottom: 8px; }
.gate-row { display: flex; gap: 10px; }
.gate-row input[type="password"] { flex: 1; min-width: 0; }
.gate-error { color: var(--danger); font-size: 0.92rem; margin: 10px 0 0; }
.gate-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; padding: 24px; font-size: 0.88rem; }
.gate-foot a { color: var(--muted); }
.gate-foot a:hover { color: var(--ink); }

/* Tabroost page usability fixes (audit 2026-11-28) */

/* Screen reader only text, for cues like "(opens in a new tab)" */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Hero actions and note, moved out of inline styles */
.hero .hero-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero .hero-note { margin-top: 12px; font-size: 0.9rem; max-width: 52ch; }
.hero .hero-note strong { color: var(--ink); font-weight: 650; }

/* Billing switch: the radios are hidden, so their keyboard focus shows on the visible label */
#bill-m:focus-visible ~ .bill-tabs label[for="bill-m"],
#bill-y:focus-visible ~ .bill-tabs label[for="bill-y"] { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Keep "/ month" on the same line as the price */
.plan .price small { display: inline; }

/* Checkout feedback */
.btn[aria-busy="true"] { cursor: progress; opacity: 0.75; }
.checkout-msg { margin: 14px 0 0; color: var(--danger); font-size: 0.95rem; }

/* Good to know: stack question over answer on phones */
@media (max-width: 600px) {
  .feature-table tr:first-child { display: none; }
  .feature-table tr, .feature-table td { display: block; width: auto; }
  .feature-table td:first-child { width: auto; padding: 16px 0 4px; border-bottom: 0; }
  .feature-table td:last-child { padding: 0 0 16px; }
  .feature-table tr:not(:last-child) td:last-child { border-bottom: 1px solid var(--line); }
}

/* Browsers the helper works with, under the download button. */
.hero-browsers { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 0.875rem; color: var(--muted); }
.hero-browsers ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hero-browsers li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line, #d9e0e0); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 550; }
.hero-browsers img { display: block; }
