/* SSHWave — sshwave.com
   Tide palette + Liquid Glass aesthetic in the browser.
   System fonts only. Dark by default; light variant via prefers-color-scheme. */

:root {
  --tide-abyss: #06121F;
  --tide-deep: #0F2237;
  --tide-mid: #1B3A5C;
  --tide-foam: #7FB7D6;
  --tide-spray: #E8F4FA;
  --tide-crest: #FFFFFF;

  --tide-gradient: linear-gradient(135deg, #0A2540 0%, #13C6E5 100%);
  --tide-gradient-soft: linear-gradient(135deg, rgba(10,37,64,0.85) 0%, rgba(19,198,229,0.6) 100%);

  /* Theme tokens — dark default */
  --bg: var(--tide-abyss);
  --bg-elevated: rgba(15, 34, 55, 0.55);
  --bg-glass: rgba(27, 58, 92, 0.35);
  --bg-glass-strong: rgba(27, 58, 92, 0.55);
  --border: rgba(127, 183, 214, 0.18);
  --border-strong: rgba(127, 183, 214, 0.35);
  --text: var(--tide-spray);
  --text-muted: rgba(232, 244, 250, 0.68);
  --text-faint: rgba(232, 244, 250, 0.45);
  --accent: #13C6E5;
  --accent-deep: #0A2540;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.25);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --max-width: 1200px;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro", "SF Pro Text",
               "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #F6FBFE;
    --bg-elevated: rgba(255, 255, 255, 0.72);
    --bg-glass: rgba(255, 255, 255, 0.55);
    --bg-glass-strong: rgba(255, 255, 255, 0.75);
    --border: rgba(10, 37, 64, 0.10);
    --border-strong: rgba(10, 37, 64, 0.22);
    --text: #07182B;
    --text-muted: rgba(7, 24, 43, 0.66);
    --text-faint: rgba(7, 24, 43, 0.42);
    --accent: #0A8DB8;
    --accent-deep: #0A2540;
    --shadow: 0 20px 60px rgba(10, 37, 64, 0.12);
    --shadow-soft: 0 8px 24px rgba(10, 37, 64, 0.08);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  /* Layered ambient ocean background — three radial pools that shift with scheme. */
  background-image:
    radial-gradient(1100px 700px at 12% -10%, rgba(19,198,229,0.18), transparent 60%),
    radial-gradient(900px 600px at 95% 8%, rgba(10,37,64,0.55), transparent 65%),
    radial-gradient(1400px 900px at 50% 110%, rgba(127,183,214,0.10), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-color-scheme: light) {
  body {
    background-image:
      radial-gradient(1100px 700px at 12% -10%, rgba(19,198,229,0.22), transparent 60%),
      radial-gradient(900px 600px at 95% 8%, rgba(10,37,64,0.10), transparent 65%),
      radial-gradient(1400px 900px at 50% 110%, rgba(127,183,214,0.18), transparent 60%);
  }
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }

img, svg { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 0.4em;
  line-height: 1.15;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; color: var(--text-muted); }

code, pre, kbd, samp { font-family: var(--font-mono); font-size: 0.92em; }

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

.section { padding-block: clamp(56px, 9vw, 112px); }
.section-tight { padding-block: clamp(40px, 6vw, 72px); }

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; }
.brand-name { font-size: 1.05rem; }

.nav-links {
  display: flex;
  gap: clamp(8px, 2vw, 22px);
  align-items: center;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  padding-top: clamp(60px, 8vw, 120px);
  padding-bottom: clamp(60px, 8vw, 140px);
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 880px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-strong);
  margin-bottom: 24px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.hero h1 .accent {
  background: var(--tide-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-muted);
  max-width: 620px;
  margin-top: 18px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
  text-decoration: none;
  color: var(--text);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--tide-gradient);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { box-shadow: var(--shadow); }

.btn-glass {
  background: var(--bg-glass-strong);
  border-color: var(--border-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.btn-glass:hover { background: var(--bg-elevated); }

.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: var(--radius);
  background: #000;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  min-width: 200px;
}
.btn-appstore:hover { text-decoration: none; transform: translateY(-1px); background: #111; }
.btn-appstore svg { width: 28px; height: 28px; flex-shrink: 0; }
.btn-appstore .small { font-size: 0.65rem; opacity: 0.85; line-height: 1; }
.btn-appstore .big { font-size: 1.05rem; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }
.btn-appstore .stack { display: flex; flex-direction: column; gap: 2px; }

/* ---------- Wave background (SVG hero motion) ---------- */

.wave-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.wave-stage svg {
  position: absolute;
  left: -10%;
  width: 130%;
  height: auto;
  bottom: 0;
}

.wave-1 { opacity: 0.55; animation: drift-a 22s ease-in-out infinite alternate; }
.wave-2 { opacity: 0.40; animation: drift-b 30s ease-in-out infinite alternate; }
.wave-3 { opacity: 0.28; animation: drift-c 38s ease-in-out infinite alternate; }

@keyframes drift-a {
  from { transform: translateX(-3%) translateY(0); }
  to   { transform: translateX(3%)  translateY(-6px); }
}
@keyframes drift-b {
  from { transform: translateX(2%)  translateY(0); }
  to   { transform: translateX(-4%) translateY(-10px); }
}
@keyframes drift-c {
  from { transform: translateX(-2%) translateY(0); }
  to   { transform: translateX(2%)  translateY(-4px); }
}

/* Shark silhouette: cresting the wave, faintly. Tasteful, not cartoon. */
.shark {
  position: absolute;
  right: clamp(-40px, -2vw, 60px);
  bottom: 38%;
  width: clamp(120px, 18vw, 220px);
  opacity: 0.16;
  transform: rotate(-6deg);
  animation: shark-glide 28s ease-in-out infinite alternate;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,0.35));
}

@keyframes shark-glide {
  from { transform: rotate(-7deg) translateY(0); }
  to   { transform: rotate(-5deg) translateY(-12px); }
}

@media (prefers-reduced-motion: reduce) {
  .wave-1, .wave-2, .wave-3, .shark { animation: none; }
  .hero-fade-in { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ---------- Section headings ---------- */

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(36px, 5vw, 64px);
}
.section-head .eyebrow { margin-bottom: 18px; }
.section-head p { font-size: 1.1rem; }

/* ---------- Features grid ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.feature {
  position: relative;
  padding: 28px 24px 26px;
  border-radius: var(--radius-lg);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow-soft);
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease;
}
.feature:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: var(--bg-glass-strong);
}

.feature-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--tide-gradient);
  color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(19,198,229,0.35);
}
.feature-icon svg { width: 22px; height: 22px; }

.feature h3 { color: var(--text); margin-bottom: 6px; font-size: 1.08rem; }
.feature p { font-size: 0.95rem; margin: 0; color: var(--text-muted); }

/* ---------- Screenshot strip ---------- */

.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 720px) {
  .shots { grid-template-columns: 1fr; }
}

.shot {
  aspect-ratio: 9 / 19;
  border-radius: 28px;
  border: 1px solid var(--border-strong);
  background:
    linear-gradient(180deg, rgba(127,183,214,0.10), rgba(10,37,64,0.25)),
    var(--bg-glass-strong);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.shot::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 22px;
  border: 1px dashed var(--border-strong);
  background:
    radial-gradient(420px 220px at 30% 10%, rgba(19,198,229,0.18), transparent 60%),
    radial-gradient(380px 280px at 80% 90%, rgba(10,37,64,0.45), transparent 60%);
}
.shot-label {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-glass-strong);
}

/* ---------- Terminal mock (decorative on hero on wide screens) ---------- */

.terminal-mock {
  margin-top: 56px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background:
    linear-gradient(180deg, rgba(10,37,64,0.55), rgba(6,18,31,0.85));
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 760px;
}

.terminal-mock .bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(6,18,31,0.45);
}
.terminal-mock .dot { width: 12px; height: 12px; border-radius: 50%; }
.terminal-mock .dot.r { background: #ff5f57; }
.terminal-mock .dot.y { background: #febc2e; }
.terminal-mock .dot.g { background: #28c840; }
.terminal-mock .title {
  margin-left: 14px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-faint);
}

.terminal-mock pre {
  margin: 0;
  padding: 18px 20px 22px;
  color: #DCEFF7;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-mock .prompt { color: var(--accent); }
.terminal-mock .ok { color: #6ee7b7; }
.terminal-mock .dim { color: var(--text-faint); }

/* ---------- Article (privacy/terms) ---------- */

.article {
  max-width: 760px;
  margin-inline: auto;
}
.article h1 { margin-bottom: 8px; }
.article .updated {
  color: var(--text-faint);
  font-size: 0.9rem;
  margin-bottom: 32px;
  font-family: var(--font-mono);
}
.article h2 {
  margin-top: 40px;
  font-size: 1.4rem;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}
.article h2:first-of-type { border-top: 0; padding-top: 0; }
.article h3 { margin-top: 24px; font-size: 1.1rem; color: var(--text); }
.article p, .article li { color: var(--text); }
.article ul, .article ol { padding-left: 1.3em; }
.article li { margin-bottom: 0.4em; }
.article strong { color: var(--text); }

/* ---------- FAQ ---------- */

.faq { max-width: 760px; margin-inline: auto; }
.faq details {
  border: 1px solid var(--border);
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 12px;
  transition: border-color 160ms ease, background 160ms ease;
}
.faq details[open] { border-color: var(--border-strong); background: var(--bg-glass-strong); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform 200ms ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p, .faq details > ul {
  margin-top: 12px;
  color: var(--text-muted);
}

/* ---------- Contact card ---------- */

.contact-card {
  max-width: 760px;
  margin: 32px auto 0;
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}
.contact-card h3 { margin: 0; }
.contact-card p { margin: 6px 0 0; color: var(--text-muted); }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: clamp(60px, 8vw, 120px);
  border-top: 1px solid var(--border);
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-block: 48px;
}
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}

.footer-brand p {
  color: var(--text-muted);
  margin-top: 10px;
  max-width: 38ch;
  font-size: 0.95rem;
}
.footer-col h4 {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--text-muted); }
.footer-col a:hover { color: var(--text); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-block: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-faint);
  font-size: 0.85rem;
}

/* ---------- Page header (sub-pages) ---------- */

.page-header {
  padding-top: clamp(60px, 8vw, 120px);
  padding-bottom: clamp(20px, 3vw, 40px);
  text-align: center;
}
.page-header h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.page-header p { color: var(--text-muted); font-size: 1.1rem; max-width: 60ch; margin-inline: auto; }

/* ---------- Misc ---------- */

.kbd {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg-glass-strong);
  color: var(--text);
}

::selection { background: rgba(19,198,229,0.35); color: var(--text); }

/* Subtle entrance for hero, only when motion is allowed. */
@media (prefers-reduced-motion: no-preference) {
  .hero-fade-in {
    animation: hero-rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  @keyframes hero-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}
