/* =============================================================
   FlashCall — marketing site styles (responsive, mobile-first)
   ============================================================= */

:root {
  --bg: #0a0f1e;
  --bg-alt: #0d1428;
  --panel: #111a30;
  --panel-2: #0d1526;
  --border: #1e2a47;
  --text: #e6edf7;
  --muted: #93a3bd;
  --accent: #38bdf8;
  --accent-2: #34d399;
  --grad: linear-gradient(92deg, #38bdf8, #34d399);
  --code-bg: #0b1220;
  --code-border: #1c2a45;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(2, 6, 23, 0.55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

.wrap {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ------------------------------------------------------------- nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.8rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(10, 15, 30, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.brand-mark { display: inline-flex; }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin-right: auto;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.93rem;
  padding: 0.25rem 0.1rem;
}

.nav-links a:hover { color: var(--text); }

.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.nav-user {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ------------------------------------------------------------- hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(3rem, 8vw, 6rem);
  background:
    radial-gradient(60% 55% at 18% 0%, rgba(56, 189, 248, 0.16), transparent 65%),
    radial-gradient(50% 45% at 88% 12%, rgba(52, 211, 153, 0.12), transparent 60%),
    var(--bg);
}

.hero-inner {
  width: min(880px, 100% - 2.5rem);
  margin-inline: auto;
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 0.38rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: clamp(0.72rem, 2.4vw, 0.85rem);
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(2rem, 6.5vw, 3.6rem);
  line-height: 1.12;
  font-weight: 800;
  margin: 1.1rem 0 0;
  letter-spacing: -0.02em;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .sub {
  color: var(--muted);
  font-size: clamp(1rem, 2.6vw, 1.18rem);
  max-width: 44rem;
  margin: 1.15rem auto 0;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.9rem 1.2rem;
  margin-top: 2rem;
}

.hero-note {
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: clamp(0.82rem, 2.4vw, 0.95rem);
}

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0.62rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  background: transparent;
  color: var(--text);
  font-family: inherit;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--grad);
  border: none;
  color: #05202b;
}

.btn-primary:hover { box-shadow: 0 8px 26px rgba(56, 189, 248, 0.35); }

.btn-ghost { border: 1px solid var(--border); background: var(--panel-2); }

.btn-ghost:hover { border-color: var(--accent); }

.btn-small { padding: 0.35rem 0.85rem; font-size: 0.82rem; }

/* ------------------------------------------------------------- sections */
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-title {
  font-size: clamp(1.5rem, 4.2vw, 2.2rem);
  margin: 0 0 0.4rem;
  text-align: center;
  letter-spacing: -0.015em;
}

.section-sub {
  color: var(--muted);
  text-align: center;
  max-width: 40rem;
  margin: 0 auto clamp(2rem, 5vw, 3rem);
}

/* steps */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

.step {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.5rem;
}

.step-num {
  width: 2.1rem;
  height: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--grad);
  color: #05202b;
  font-weight: 800;
  margin-bottom: 0.9rem;
}

.step h3, .feature h3, .card h3, .doc-step h3 {
  margin: 0 0 0.45rem;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
}

.step p, .feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* features */
.grid-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.feature {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
}

.feature-icon { font-size: 1.6rem; margin-bottom: 0.65rem; }

/* pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  align-items: stretch;
}

.price-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.7rem;
  display: flex;
  flex-direction: column;
}

.price-card-pop { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow); }

.pop-badge {
  position: absolute;
  top: -0.85rem;
  right: 1rem;
  background: var(--grad);
  color: #05202b;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.price-card h3 { margin: 0 0 0.6rem; font-size: 1.12rem; color: var(--text); }

.price { display: flex; align-items: baseline; gap: 0.45rem; margin-bottom: 0.4rem; }

.amount {
  font-size: clamp(1.9rem, 6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.per { color: var(--muted); font-size: 0.9rem; }

.save-note { color: var(--accent-2); font-size: 0.85rem; margin: 0 0 0.6rem; font-weight: 600; }

.price-list {
  list-style: none;
  margin: 0.7rem 0 1.2rem;
  padding: 0;
  display: grid;
  gap: 0.42rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.price-list li::before {
  content: "✓";
  color: var(--accent-2);
  margin-right: 0.5rem;
  font-weight: 700;
}

.price-card .btn { margin-top: auto; }

.pp-slot { display: grid; place-items: center; min-height: 0; }

.pp-slot + .btn, .pp-slot .btn { margin-top: auto; }

.price-card .btn-signin-needed { margin-top: auto; }

.pricing-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 46rem;
  margin: 1.6rem auto 0;
}

.free-active-note { color: var(--accent-2); font-size: 0.9rem; font-weight: 600; margin-top: 0.6rem; }

/* ------------------------------------------------------------- dashboard */
.dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.dash-head .section-title, .dash-head .section-sub { text-align: left; margin: 0; }

.dash-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}

.card h3 { display: flex; align-items: center; gap: 0.5rem; }

.card p { color: var(--muted); font-size: 0.92rem; }

.quota-big { font-size: clamp(1.7rem, 5vw, 2.2rem); font-weight: 800; margin: 0.5rem 0 0.6rem; }

.quota-bar {
  height: 0.65rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.6rem;
}

.quota-fill {
  height: 100%;
  width: 0%;
  background: var(--grad);
  border-radius: 999px;
  transition: width 0.5s ease;
}

.quota-meta { margin: 0; }

.plan-badge {
  display: inline-block;
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}

.key-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin: 0.8rem 0 0.9rem;
}

.api-key {
  flex: 1 1 14rem;
  min-width: 0;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 9px;
  padding: 0.5rem 0.7rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.83rem;
  word-break: break-all;
  color: #a5f3fc;
}

.key-warning { margin: 0.55rem 0 0; font-size: 0.78rem; }

.table-wrap { overflow-x: auto; margin-top: 0.9rem; }

.recent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 380px;
}

.recent-table th, .recent-table td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border);
}

.recent-table th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }

.recent-table td.empty { color: var(--muted); text-align: center; padding: 1.2rem; }

.pill-ok, .pill-fail {
  display: inline-block;
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.pill-ok { background: rgba(52, 211, 153, 0.14); color: var(--accent-2); }

.pill-fail { background: rgba(248, 113, 113, 0.14); color: #f87171; }

/* ------------------------------------------------------------- docs */
.doc-step {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem 2rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  margin-bottom: 1.1rem;
  align-items: start;
}

.doc-left {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.doc-num {
  flex: none;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--grad);
  color: #05202b;
  font-weight: 800;
}

.doc-left h3 { font-size: 1.02rem; }

.doc-left p { color: var(--muted); font-size: 0.92rem; margin: 0; }

.doc-left code, .card p code {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 6px;
  padding: 0.06rem 0.35rem;
  font-size: 0.85em;
  color: #a5f3fc;
}

.doc-right { min-width: 0; }

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  background: #0e1729;
  border: 1px solid var(--code-border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 0.4rem 0.6rem 0.4rem 0.95rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.doc-right pre {
  margin: 0;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 0 0 10px 10px;
  padding: 0.95rem 1.05rem;
  overflow-x: auto;
}

.code-head + pre { border-top: none; border-radius: 0 0 10px 10px; }

.doc-right code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: #c9e3ff;
  line-height: 1.65;
  white-space: pre;
}

/* faq */
.faq-item {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 1.15rem 1.4rem;
  margin-bottom: 0.9rem;
}

.faq-item h3 { margin: 0 0 0.4rem; font-size: 1.02rem; }

.faq-item p { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.4rem;
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.5rem;
}

.footer-brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; }

.footer-links { display: flex; gap: 1.2rem; }

.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }

.footer-copy { color: var(--muted); font-size: 0.82rem; margin: 0; }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translate(-50%, 1.6rem);
  background: #0e1a33;
  color: var(--text);
  border: 1px solid var(--accent);
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
  max-width: min(92vw, 30rem);
  text-align: center;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------- responsive */
@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .grid-features { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .card-recent { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
  .grid-features { grid-template-columns: repeat(3, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .doc-step { grid-template-columns: 0.85fr 1.15fr; }
}

@media (min-width: 1120px) {
  .pricing-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 640px) {
  .nav { padding-inline: 1rem; }
  .nav-links { order: 3; width: 100%; justify-content: center; }
  .nav-auth { margin-left: auto; }
  .hero-cta .btn, .hero-cta > div { width: 100%; max-width: 22rem; }
  .price-card { padding: 1.3rem 1.15rem 1.4rem; }
}

/* PayPal buttons should stretch nicely inside cards */
.pp-slot iframe { max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .quota-fill, .toast { transition: none; }
}
