/* ============================================================
   Tessera marketing site — control-room theme
   ============================================================ */
:root {
  --bg: #0a0e14;
  --bg-elev: #111722;
  --bg-row: #0e141d;
  --border: #1f2935;
  --border-bright: #2b3a49;
  --text: #c4d0dc;
  --text-dim: #6b7888;
  --text-bright: #eef4fa;
  --up: #3ddc97;
  --warn: #ff9f43;
  --down: #ff5470;
  --accent: #36d6e7;
  --accent-dim: #1c8898;
  --radius: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --font-display: "Chakra Petch", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  /* atmosphere: soft cyan glow top-right + faint instrument grid */
  background-image:
    radial-gradient(1200px 560px at 82% -8%, rgba(54, 214, 231, 0.10), transparent 62%),
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 100% 100%, 44px 44px, 44px 44px;
  background-attachment: fixed;
}

h1, h2, h3 { font-family: var(--font-display); color: var(--text-bright); font-weight: 600; letter-spacing: 0.01em; line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.dim { color: var(--text-dim); }
.up { color: var(--up); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #04161a; padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 9px; border: 1px solid var(--border-bright);
  background: #131b25; color: var(--text-bright); cursor: pointer;
  transition: transform .08s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { border-color: var(--accent-dim); background: #16202c; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-dim));
  border-color: transparent; color: #04161a;
  box-shadow: 0 8px 24px rgba(54, 214, 231, 0.18);
}
.btn-primary:hover { filter: brightness(1.06); background: linear-gradient(180deg, var(--accent), var(--accent-dim)); }
.btn-ghost { background: transparent; }

/* ---------- panels ---------- */
.panel {
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-row));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.eyebrow { color: var(--accent); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 12px; }

/* ============================================================ NAV */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 14, 20, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 16px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text-bright); }
.brand-logo { border-radius: 8px; box-shadow: 0 0 16px rgba(54, 214, 231, 0.22); display: block; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: 0.02em; color: var(--text-bright); }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.nav-links a:not(.btn) { color: var(--text); font-weight: 500; }
.nav-links a:not(.btn):hover { color: var(--text-bright); }
.nav-cta { padding: 8px 16px; font-size: 14px; }
.nav-toggle { display: none; margin-left: auto; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text-bright); border-radius: 2px; transition: .2s; }

/* ============================================================ HERO */
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero-copy h1 { font-size: clamp(32px, 4.6vw, 52px); }
.lede { margin-top: 20px; font-size: 18px; color: var(--text); max-width: 42ch; }
.hero-cta { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 18px; color: var(--text-dim); font-size: 13px; }
.hero-trust .up { color: var(--up); }

/* dashboard mockup */
.mockup { padding: 16px; box-shadow: var(--shadow); }
.mockup-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 12px; border-bottom: 1px solid var(--border); }
.mockup-summary { display: flex; gap: 12px; font-size: 12px; }
.s-up { color: var(--up); } .s-warn { color: var(--warn); } .s-down { color: var(--down); }
.mockup-rows { display: flex; flex-direction: column; }
.mrow {
  display: grid; grid-template-columns: 14px minmax(0,1fr) auto 80px auto; gap: 12px; align-items: center;
  padding: 12px 6px; border-bottom: 1px solid rgba(31,41,53,0.6);
}
.mrow:last-child { border-bottom: 0; }
.mname { color: var(--text-bright); font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; flex-direction: column; }
.mnote { font-family: var(--font-mono); font-size: 10.5px; font-weight: 400; color: var(--text-dim); }
.mrow.warn .mnote { color: var(--warn); }
.mrow.down .mnote { color: var(--down); }
.mtype { font-size: 10px; color: var(--text-dim); border: 1px solid var(--border-bright); border-radius: 5px; padding: 2px 6px; }
.mlat { font-size: 13px; color: var(--text-bright); text-align: right; }
.mlat.down { color: var(--down); }
.spark { width: 80px; height: 22px; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.6; opacity: 0.8; }
.mrow.down .spark polyline { stroke: var(--down); }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.up { background: var(--up); box-shadow: 0 0 10px rgba(61,220,151,0.7); }
.dot.warn { background: var(--warn); box-shadow: 0 0 10px rgba(255,159,67,0.7); }
.dot.down { background: var(--down); box-shadow: 0 0 12px rgba(255,84,112,0.85); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ============================================================ STRIP */
.strip { border-block: 1px solid var(--border); background: rgba(17,23,34,0.35); }
.strip-inner { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 20px 0; flex-wrap: wrap; }
.strip-inner p { color: var(--text-bright); font-size: 15px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { font-size: 12px; color: var(--text-dim); border: 1px solid var(--border-bright); border-radius: 999px; padding: 5px 12px; }

/* ============================================================ SECTIONS */
.section { padding: 76px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); }
.section-sub { margin-top: 12px; color: var(--text-dim); font-size: 17px; }

/* features */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 18px; }
.feature { padding: 24px; transition: transform .15s ease, border-color .15s ease; }
.feature:hover { transform: translateY(-3px); border-color: var(--border-bright); }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { color: var(--text-dim); font-size: 14.5px; }
.ficon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; margin-bottom: 16px;
  background: rgba(54,214,231,0.09); border: 1px solid rgba(54,214,231,0.22); }
.ficon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* how it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { padding: 26px; position: relative; }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; margin-bottom: 14px;
  color: #04161a; font-weight: 600; background: linear-gradient(160deg, var(--accent), var(--accent-dim)); }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 14.5px; }

/* pricing */
.billing-toggle { display: inline-flex; margin-top: 24px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-row); padding: 4px; }
.bt-opt { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--text-dim); font-family: var(--font-body); font-size: 14px; font-weight: 500; padding: 8px 16px; border-radius: 7px; cursor: pointer; }
.bt-opt.active { background: var(--bg-elev); color: var(--text-bright); box-shadow: inset 0 0 0 1px var(--border-bright); }
.save-hint { font-family: var(--font-mono); font-size: 10.5px; color: var(--up); }
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
.tier { padding: 26px 22px; display: flex; flex-direction: column; position: relative; }
.tier.popular { border-color: var(--accent-dim); box-shadow: 0 0 0 1px var(--accent-dim), 0 18px 44px rgba(54,214,231,0.10); }
.tier-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: linear-gradient(180deg, var(--accent), var(--accent-dim)); color: #04161a; font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.tier-name { font-family: var(--font-display); font-weight: 600; font-size: 19px; color: var(--text-bright); }
.tier-targets { color: var(--text-dim); font-size: 13px; margin-top: 3px; }
.tier-price { margin: 18px 0 4px; display: flex; align-items: baseline; gap: 4px; }
.tier-price .amt { font-family: var(--font-display); font-weight: 700; font-size: 38px; color: var(--text-bright); }
.tier-price .per { color: var(--text-dim); font-size: 13px; font-family: var(--font-mono); }
.tier-save { font-family: var(--font-mono); font-size: 11.5px; color: var(--up); min-height: 16px; }
.tier ul { list-style: none; margin: 18px 0 22px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.tier li { font-size: 13.5px; color: var(--text); padding-left: 22px; position: relative; }
.tier li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: rgba(61,220,151,0.16); box-shadow: inset 0 0 0 2px var(--up); }
.tier .btn { margin-top: auto; width: 100%; }
.pricing-note { text-align: center; margin-top: 22px; color: var(--text-dim); font-size: 13px; }

/* contact */
.contact-inner { max-width: 720px; }
.contact-form { padding: 28px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.field .opt { text-transform: none; letter-spacing: 0; }
.field input, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--text-bright);
  background: #0c121a; border: 1px solid var(--border); border-radius: 9px; padding: 11px 13px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease; resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--accent-dim); box-shadow: 0 0 0 3px rgba(54,214,231,0.12); }
.field input.invalid, .field textarea.invalid { border-color: var(--down); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-status { font-size: 13px; margin: 0; }
.form-status.ok { color: var(--up); }
.form-status.err { color: var(--down); }
.contact-form.sent .field, .contact-form.sent .cf-turnstile, .contact-form.sent #cf-submit { display: none; }
.ns { color: var(--warn); font-size: 14px; }

/* footer */
.footer { border-top: 1px solid var(--border); background: rgba(17,23,34,0.4); padding: 40px 0; margin-top: 30px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .brand-name { font-size: 16px; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--text); font-weight: 500; }
.footer-meta { text-align: right; font-size: 12px; line-height: 1.7; }

/* focus visibility */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ============================================================ RESPONSIVE */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .mockup { order: 2; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 22px 18px;
    background: rgba(10,14,20,0.97); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .22s ease, padding .22s ease; padding-block: 0;
  }
  .nav-links.open { max-height: 320px; padding-block: 12px 18px; }
  .nav-links a:not(.btn) { padding: 10px 4px; }
  .nav-cta { width: 100%; }
  .section { padding: 56px 0; }
  .hero { padding: 44px 0 20px; }
  .strip-inner { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-meta { text-align: left; }
  .mockup-head { flex-wrap: wrap; gap: 8px; }
  .mockup-summary { flex-wrap: wrap; }
}
@media (max-width: 460px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
