/* ═════════════════════════════════════════════════════════════════════
   Hyper Foundation — Ecosystem Spreading & Growth Suite (spread.css)
   ═════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: Inter;
  src: url('../inter-latin-400-normal.9698cc7dbf147ed363b6.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: Teodor;
  src: url('../Teodor-Light.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #072723;
  --ink-deep: #031412;
  --ink-surface: #0a2f2b;
  --mint: #97fce4;
  --mint-hover: #50d2c1;
  --mint-active: #33998c;
  --mint-glow: rgba(151, 252, 228, 0.2);
  --muted: #a3bfb9;
  --text-dim: #678c85;
  --border: #183e37;
  --border-light: #24564d;
  --card-bg: rgba(10, 41, 37, 0.7);
  --card-bg-hover: rgba(14, 52, 47, 0.85);
  --success: #67e8c3;
  --danger: #f87171;
  --warning: #fbbf24;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: #edf7f5;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

/* Background Atmosphere */
.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambient-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(151, 252, 228, 0.02) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(151, 252, 228, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 70%, transparent 100%);
}
.ambient-glow {
  position: absolute;
  top: -240px;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(151, 252, 228, 0.08) 0%, rgba(7, 39, 35, 0) 70%);
}

/* Navigation Bar */
.navbar {
  position: fixed;
  z-index: 100;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  max-width: calc(100% - 40px);
  height: 56px;
  padding: 8px 8px 8px 16px;
  border-radius: 37px;
  background: white;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.brand img { display: block; width: 170px; }
.navbar nav { display: flex; align-items: center; gap: 32px; }
.nav-link { border: 0; background: transparent; color: inherit; padding: 0; font-weight: 500; font-size: 15px; }
.navbar nav a:hover, .nav-link:hover { color: #349a8d; }
.nav-badge {
  background: var(--ink);
  color: var(--mint);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
  margin-left: 4px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 60px;
  background: var(--mint);
  color: #193833;
  font-size: 14.5px;
  font-weight: 600;
  padding: 10px 22px;
  transition: all .25s ease;
  white-space: nowrap;
}
.pill:hover { background: var(--mint-hover); transform: translateY(-1px); }
.pill.outline {
  background: transparent;
  border-color: var(--mint);
  color: var(--mint);
}
.pill.outline:hover { color: #50d2c1; border-color: #50d2c1; background: rgba(151,252,228,0.06); }
.menu-toggle { display: none; }

/* Container & Sections */
.main-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 110px 20px 80px;
}

.suite-hero {
  text-align: center;
  padding: 40px 0 50px;
}
.suite-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(151, 252, 228, 0.08);
  border: 1px solid rgba(151, 252, 228, 0.25);
  border-radius: 40px;
  padding: 5px 14px;
  font-size: 11.5px;
  color: var(--mint);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin-bottom: 20px;
}
.tag-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
}
.suite-hero h1 {
  font-family: Teodor, Georgia, serif;
  font-size: 56px;
  line-height: 1.1;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 18px;
}
.suite-hero p {
  color: var(--muted);
  font-size: 16px;
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* Metrics Ribbon */
.metrics-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(10, 41, 37, 0.6);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 0;
  margin-bottom: 48px;
}
.metric-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-right: 1px solid var(--border);
}
.metric-box:last-child { border-right: none; }
.metric-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-dim); }
.metric-val { font-size: 26px; font-weight: 600; color: #ffffff; }
.metric-val.highlight { color: var(--mint); }
.metric-sub { font-size: 11px; color: var(--muted); }

/* Spreading Cards Grid */
.spread-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  margin-bottom: 48px;
}
.suite-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
  transition: border-color .2s;
}
.suite-card:hover { border-color: var(--border-light); }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.card-head h2, .card-head h3 {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-head svg { color: var(--mint); }

/* Form Controls */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}
.form-input, .form-select {
  width: 100%;
  background: rgba(3, 20, 18, 0.7);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: #ffffff;
  font-size: 13.5px;
  outline: none;
  transition: border-color .2s;
}
.form-input:focus, .form-select:focus {
  border-color: var(--mint);
}
.form-select option {
  background: var(--ink-surface);
  color: #fff;
}

/* Tracked URL Output Box */
.output-box {
  background: rgba(3, 20, 18, 0.85);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 20px;
}
.output-url {
  font-family: monospace;
  font-size: 12.5px;
  color: var(--mint);
  word-break: break-all;
  line-height: 1.4;
  margin-bottom: 12px;
}
.output-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Tabs */
.tabs-header {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  overflow-x: auto;
}
.tab-btn {
  background: none;
  border: none;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
  white-space: nowrap;
}
.tab-btn:hover { color: #fff; background: rgba(151, 252, 228, 0.05); }
.tab-btn.active { color: var(--ink); background: var(--mint); font-weight: 600; }

.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn .3s ease-out; }

.copy-snippet-box {
  background: rgba(3, 20, 18, 0.7);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
}
.snippet-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 11.5px;
  color: var(--text-dim);
}
.snippet-text {
  font-size: 13px;
  color: #d1e7e2;
  line-height: 1.55;
  white-space: pre-wrap;
  font-family: inherit;
  margin-bottom: 12px;
}
.snippet-actions {
  display: flex;
  gap: 8px;
}

/* QR Code Section */
.qr-preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 20, 18, 0.6);
  border: 1px dashed var(--border);
  border-radius: 12px;
  margin-top: 16px;
}
#qr-canvas {
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

/* Flex Card Studio */
.canvas-preview-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 18px;
  background: #031412;
}
.canvas-preview-wrap canvas {
  width: 100%;
  height: auto;
  display: block;
}

/* Telemetry Dashboard Table */
.telemetry-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.telemetry-table th {
  text-align: left;
  padding: 10px 14px;
  color: var(--text-dim);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  font-size: 11px;
}
.telemetry-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(24, 62, 55, 0.5);
  color: #c4ded8;
}
.telemetry-table tr:last-child td { border-bottom: none; }
.telemetry-table td.highlight { color: var(--mint); font-weight: 500; }

/* Quick Action Buttons */
.quick-action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 41, 37, 0.8);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 18px;
  color: #c4ded8;
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
}
.action-btn:hover {
  background: rgba(151, 252, 228, 0.08);
  border-color: var(--mint);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Feedback toast */
.feedback-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #092e29;
  border: 1px solid var(--mint);
  color: var(--mint);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all .3s cubic-bezier(0.16, 1, 0.3, 1);
}
.feedback-toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 900px) {
  .spread-grid { grid-template-columns: 1fr; }
  .metrics-ribbon { grid-template-columns: 1fr 1fr; row-gap: 16px; }
  .metric-box:nth-child(2) { border-right: none; }
  .suite-hero h1 { font-size: 40px; }
  .navbar { top: 12px; }
  .navbar nav a, .nav-link { display: none; }
  .menu-toggle { display: block; background: none; border: 0; font-size: 22px; }
}
