/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #07110d;
  --bg-2: #0d1d17;
  --surface: rgba(10, 25, 19, 0.78);
  --border: rgba(114, 255, 196, 0.18);
  --text: #eefbf4;
  --text-muted: #97b3a7;
  --accent: #72ffc4;
  --accent-2: #8ab4ff;
  --danger: #ff7b72;
  --radius: 22px;
  --max-w: 1220px;
  /* App real colors */
  --app-bg: #000000;
  --app-surface: #1C1C1E;
  --app-border: #38383A;
  --app-text: #FFFFFF;
  --app-muted: #8E8E93;
  --app-mine: #3A3A3C;
  --app-theirs: #1C1C1E;
  --app-green: #30D158;
}

html {
  font-family: 'SF Mono', 'IBM Plex Mono', 'Menlo', monospace;
  background:
    radial-gradient(circle at top left, rgba(114, 255, 196, 0.14), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(138, 180, 255, 0.16), transparent 22%),
    linear-gradient(135deg, var(--bg), var(--bg-2));
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-image:
    linear-gradient(rgba(114, 255, 196, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(114, 255, 196, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
}

body.home-page {
  height: 100dvh;
  overflow: hidden;
}

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

/* ── Header ──────────────────────────────────────────── */
.header {
  position: relative;
  z-index: 10;
  background: rgba(3, 10, 8, 0.66);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-logo img { height: 28px; width: 28px; }

.header-nav { display: flex; gap: 24px; align-items: center; }

.header-nav a {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: color 0.15s;
}

.header-nav a:hover { color: var(--text); text-decoration: none; }

/* ── Hero shell ──────────────────────────────────────── */
.hero-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 28px;
  overflow: hidden;
}

.hero-grid {
  width: min(100%, var(--max-w));
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 28px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-copy h1 {
  font-size: clamp(36px, 5vw, 72px);
  line-height: 0.97;
  letter-spacing: -0.05em;
  max-width: 8.5ch;
}

.hero-copy h1 span {
  color: var(--accent-2);
  text-shadow: 0 0 24px rgba(138, 180, 255, 0.3);
}

.hero-text {
  max-width: 58ch;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}

.badge-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(11, 23, 18, 0.7);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge svg { flex-shrink: 0; }

.signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.signal-card {
  background: linear-gradient(180deg, rgba(17, 35, 27, 0.92), rgba(9, 20, 16, 0.85));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.signal-label {
  display: inline-block;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.16em;
  margin-bottom: 8px;
}

.signal-card strong {
  display: block;
  font-size: 14px;
  margin-bottom: 5px;
}

.signal-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Hero visual ─────────────────────────────────────── */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 5% 5% 5% 5%;
  border-radius: 40px;
  background: radial-gradient(circle, rgba(114, 255, 196, 0.1), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}

/* ── iPhone mockup ───────────────────────────────────── */
.phone-mockup {
  position: relative;
  z-index: 1;
}

.phone-frame {
  width: 300px;
  height: 600px;
  padding: 12px;
  border-radius: 40px;
  background: linear-gradient(145deg, #1a1a1a, #050505);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(114, 255, 196, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  position: relative;
}

.phone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 26px;
  border-radius: 14px;
  background: #000;
  z-index: 3;
}

.phone-screen {
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  background: var(--app-bg);
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  color: var(--app-text);
}

/* Status bar */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--app-text);
  margin-top: 12px;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-time { letter-spacing: 0; }

/* Chat header */
.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 10px;
  border-bottom: 1px solid var(--app-border);
  background: var(--app-bg);
}

.chat-back {
  color: var(--app-text);
  padding: 4px;
  flex-shrink: 0;
  opacity: 0.9;
}

.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 17px;
  background: #3d6b5c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.chat-info {
  flex: 1;
  min-width: 0;
}

.chat-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--app-text);
  line-height: 1.2;
}

.chat-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.chat-key {
  font-size: 10px;
  color: var(--app-muted);
  font-family: 'SF Mono', 'Menlo', monospace;
}

.chat-online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--app-green);
  flex-shrink: 0;
}

.chat-actions { flex-shrink: 0; }

.call-pill {
  display: flex;
  align-items: center;
  background: var(--app-surface);
  border-radius: 999px;
  padding: 6px 10px;
  gap: 8px;
  color: var(--app-text);
}

.call-divider {
  width: 1px;
  height: 14px;
  background: var(--app-border);
}

/* Date separator */
.chat-date {
  text-align: center;
  font-size: 11px;
  color: var(--app-muted);
  padding: 10px 0 4px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

/* Messages */
.message-stream {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 10px;
  overflow: hidden;
}

.message-row {
  display: flex;
}

.message-row.outgoing {
  justify-content: flex-end;
}

.message-bubble {
  max-width: 78%;
  padding: 8px 12px 6px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.5;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

.message-bubble.theirs {
  background: var(--app-theirs);
  color: var(--app-text);
  border-bottom-left-radius: 4px;
}

.message-bubble.mine {
  background: var(--app-mine);
  color: var(--app-text);
  border-bottom-right-radius: 4px;
}

.msg-time {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 3px;
  font-size: 10px;
  color: var(--app-muted);
  justify-content: flex-end;
}

.msg-time-mine { color: var(--app-muted); }

/* Composer */
.composer-shell {
  padding: 8px 10px 14px;
  flex-shrink: 0;
}

.composer-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 22px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
}

.composer-attach {
  color: var(--app-muted);
  flex-shrink: 0;
}

.composer-input {
  flex: 1;
  font-size: 13px;
  color: var(--app-muted);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

.composer-send-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--app-text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--app-bg);
}

/* ── Legal pages ─────────────────────────────────────── */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  flex: 1;
}

.legal h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 6px;
}

.legal .updated {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.legal h2 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.legal h3 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 8px;
}

.legal p, .legal li {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.legal ul, .legal ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.legal li { margin-bottom: 6px; }

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}

.legal th, .legal td {
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--border);
}

.legal th {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}

.legal td { color: var(--text-muted); }
.legal strong { color: var(--text); font-weight: 600; }

.contact-btn {
  display: inline-block;
  background: var(--accent);
  color: #07110d !important;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 999px;
  text-decoration: none !important;
  letter-spacing: 0.04em;
}

.contact-btn:hover {
  opacity: 0.85;
  text-decoration: none !important;
}

.legal .highlight-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 20px 0;
}

.legal .highlight-box p { margin-bottom: 4px; }

/* ── Footer ──────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
}

body.home-page .footer { display: none; }

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); font-size: 13px; }
.footer-links a:hover { color: var(--text); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1080px) {
  body.home-page {
    height: auto;
    overflow-y: auto;
  }

  .hero-shell {
    padding: 24px 20px 32px;
    overflow: visible;
  }

  .hero-grid {
    height: auto;
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-copy h1 { max-width: none; }
  .signal-grid { grid-template-columns: 1fr; }

  .hero-visual {
    justify-content: center;
    height: auto;
    padding: 20px 0;
  }
}

@media (max-width: 640px) {
  .header-inner { padding: 12px 16px; }
  .header-nav { gap: 14px; }
  .header-nav a { font-size: 11px; letter-spacing: 0.08em; }

  .hero-shell { padding: 16px; }
  .hero-copy h1 { font-size: clamp(32px, 11vw, 52px); }
  .hero-text { font-size: 13px; }

  .phone-frame { width: min(100%, 280px); height: 560px; }

  .legal { padding: 32px 20px 60px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
