/* ============================================================
   FISH GANG CO. — SHARED THEME
   "Everything = Nothing"
   One signature motif: the waterline. Everything else stays quiet.
   ============================================================ */

:root {
  /* palette — deep water to surface */
  --deep: #06151c;
  --surface: #0e2630;
  --surface-2: #122d38;
  --border: #1b4552;
  --accent: #5fd4c7;
  --accent-dim: #3a8a80;
  --text: #e8f4f1;
  --text-dim: #7a8b8f;
  --danger: #e0654f;

  /* type */
  --font-display: 'JetBrains Mono', 'Söhne Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 40px;
  --sp-6: 64px;
  --sp-7: 96px;

  --radius: 6px;
  --max-w: 1080px;

  /* motion — overridden to 0/none by [data-motion="static"] below */
  --t-fast: 120ms;
  --t-med: 240ms;
  --t-slow: 600ms;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html[data-motion="static"] { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--deep);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 var(--sp-3) 0;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 var(--sp-3) 0; color: var(--text); }
p.dim, .text-dim { color: var(--text-dim); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: var(--sp-2);
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

/* ============================================================
   DEPTH BANDS — each section steps one shade darker, surface to deep
   ============================================================ */
.band-surface { background: var(--surface); }
.band-mid     { background: var(--surface-2); }
.band-deep    { background: var(--deep); }
section { padding: var(--sp-6) 0; }

/* ============================================================
   SIGNATURE ELEMENT — the waterline
   A 1px rule with rising bubbles. Static mode: same rule, bubbles
   frozen in place, zero motion.
   ============================================================ */
.waterline {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 15%, var(--border) 85%, transparent);
  margin: var(--sp-5) 0;
  overflow: visible;
}
.waterline .bubble {
  position: absolute;
  bottom: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}
.waterline .bubble:nth-child(1) { left: 12%; }
.waterline .bubble:nth-child(2) { left: 38%; width: 3px; height: 3px; }
.waterline .bubble:nth-child(3) { left: 64%; }
.waterline .bubble:nth-child(4) { left: 84%; width: 3px; height: 3px; }

html[data-motion="animated"] .waterline .bubble {
  animation: bubble-rise 4.5s ease-in infinite;
}
html[data-motion="animated"] .waterline .bubble:nth-child(2) { animation-delay: 1.1s; animation-duration: 3.8s; }
html[data-motion="animated"] .waterline .bubble:nth-child(3) { animation-delay: 2.3s; animation-duration: 5.2s; }
html[data-motion="animated"] .waterline .bubble:nth-child(4) { animation-delay: 0.6s; animation-duration: 4.1s; }

@keyframes bubble-rise {
  0%   { transform: translateY(0) scale(1);   opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.3; }
  100% { transform: translateY(-28px) scale(0.6); opacity: 0; }
}

/* static mode: bubbles sit fixed, slightly staggered vertically, no motion */
html[data-motion="static"] .waterline .bubble:nth-child(1) { bottom: 2px; }
html[data-motion="static"] .waterline .bubble:nth-child(2) { bottom: 5px; }
html[data-motion="static"] .waterline .bubble:nth-child(3) { bottom: 1px; }
html[data-motion="static"] .waterline .bubble:nth-child(4) { bottom: 4px; }

/* ============================================================
   NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 21, 28, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
html[data-motion="static"] .site-header { backdrop-filter: none; background: var(--deep); }

.nav-bar {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.brand .dot { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: var(--sp-4); list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--text-dim); font-size: 0.92rem; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-drawer {
  display: none;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-3) var(--sp-4) var(--sp-5);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nav-drawer.open { display: flex; }
.nav-drawer a {
  color: var(--text-dim);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.98rem;
}
.nav-drawer a:hover { color: var(--accent); }
.nav-group-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: var(--sp-3);
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
html[data-motion="static"] .btn { transition: none; }
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
html[data-motion="animated"] .btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: var(--deep);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-dim); border-color: var(--accent-dim); color: var(--deep); }
.btn-block { width: 100%; justify-content: center; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-4);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-3);
}

/* ============================================================
   FORMS
   ============================================================ */
label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: var(--sp-1);
}
input, textarea, select {
  width: 100%;
  background: var(--deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: var(--sp-2) var(--sp-3);
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin-bottom: var(--sp-3);
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-5) 0;
  background: var(--deep);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-4);
}
.footer-col a {
  display: block;
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-bottom: var(--sp-1);
}
.footer-col a:hover { color: var(--accent); }
.footer-note { color: var(--text-dim); font-size: 0.8rem; margin-top: var(--sp-4); }

/* ============================================================
   PERF-TIER PROMPT (first-visit)
   ============================================================ */
.tier-prompt {
  position: fixed;
  bottom: var(--sp-4);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-4);
  max-width: 92vw;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.tier-prompt p { margin: 0; font-size: 0.88rem; color: var(--text-dim); }
.tier-prompt-actions { display: flex; gap: var(--sp-2); }

/* ============================================================
   UTILITY
   ============================================================ */
.mono { font-family: var(--font-display); }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
