/* ============================================
   Design tokens
   ============================================ */
:root {
  --ink:        #0F1B3D;   /* headings, primary text */
  --signal:     #2563EB;   /* primary action / brand blue */
  --signal-dark:#1D4ED8;
  --paper:      #FFFFFF;
  --paper-soft: #F6F8FC;
  --line:       #E4E9F2;
  --slate:      #5B6478;
  --success:    #16A34A;
  --success-bg: #EAF8EF;
  --amber:      #F59E0B;
  --amber-bg:   #FFF7E8;
  --danger:     #DC2626;
  --danger-bg:  #FDECEC;

  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(15,27,61,0.04), 0 8px 24px rgba(15,27,61,0.06);
  --shadow-lift: 0 12px 32px rgba(15,27,61,0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.01em;
}

.mono { font-family: var(--font-mono); }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ============================================
   Nav
   ============================================ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(155deg, var(--signal), var(--signal-dark));
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark svg { width: 18px; height: 18px; }

.brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  color: var(--slate);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--slate);
  font-size: 14.5px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--ink); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--signal);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.nav-cta:hover { background: var(--signal-dark); transform: translateY(-1px); }

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

/* ============================================
   Hero
   ============================================ */
.hero {
  padding: 72px 0 64px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 40px 0; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--signal-dark);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 52px;
  line-height: 1.06;
  font-weight: 700;
}
.hero h1 .accent { color: var(--signal); }

@media (max-width: 560px) {
  .hero h1 { font-size: 36px; }
}

.hero p.lead {
  font-size: 18px;
  color: var(--slate);
  line-height: 1.6;
  margin: 20px 0 28px;
  max-width: 46ch;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 12px;
}

@media (max-width: 560px) {
  .platform-grid { grid-template-columns: 1fr; }
}

.platform-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: block;
}
.platform-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  border-color: transparent;
}
.platform-card .icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.platform-card.android .icon { background: #E8F8EE; }
.platform-card.ios .icon { background: #F1EBFA; }
.platform-card.web .icon { background: #E8F0FE; }
.platform-card .icon svg { width: 20px; height: 20px; }

.platform-card strong { font-size: 15.5px; display: block; margin-bottom: 4px; }
.platform-card span.desc { font-size: 13px; color: var(--slate); display: block; margin-bottom: 14px; line-height: 1.5; }
.platform-card .go {
  font-size: 13.5px; font-weight: 600; color: var(--signal-dark);
  display: inline-flex; align-items: center; gap: 4px;
}

.trust-strip {
  margin-top: 28px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--slate);
}
.trust-strip span { display: inline-flex; align-items: center; gap: 6px; }
.trust-strip svg { width: 15px; height: 15px; color: var(--success); flex-shrink: 0; }

/* --- Hero visual: transmission mockup --- */
.transmit-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-lift);
  position: relative;
  max-width: 360px;
  margin: 0 auto;
}

.transmit-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.transmit-doc {
  position: relative;
  height: 150px;
  border-radius: 10px;
  background: var(--paper-soft);
  border: 1px dashed var(--line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.transmit-doc .page {
  width: 92px; height: 118px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(15,27,61,0.1);
  position: relative;
}
.transmit-doc .page::before,
.transmit-doc .page::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
}
.transmit-doc .page::before { top: 20px; }
.transmit-doc .page::after { top: 32px; width: 60%; }

.scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--signal), transparent);
  top: 0;
  animation: scan 2.6s ease-in-out infinite;
}
@keyframes scan {
  0% { top: 6%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 92%; opacity: 0; }
}

.transmit-status {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--success-bg);
  color: var(--success);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}
.transmit-status svg { width: 18px; height: 18px; flex-shrink: 0; }

.transmit-meta {
  margin-top: 14px;
  font-size: 13px;
  color: var(--slate);
  display: flex;
  justify-content: space-between;
}
.transmit-meta .mono { color: var(--ink); }

/* ============================================
   How it works (real sequence -> numbered is honest here)
   ============================================ */
.section { padding: 72px 0; }
.section-head { max-width: 560px; margin-bottom: 44px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head h2 { font-size: 34px; }
.section-head p { color: var(--slate); font-size: 16px; margin-top: 12px; line-height: 1.6; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.step {
  position: relative;
  padding: 28px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}
.step .step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--signal-dark);
  background: #fff;
  border: 1px solid var(--line);
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { font-size: 14.5px; color: var(--slate); line-height: 1.55; margin: 0; }

/* Connector line between steps on desktop */
.steps { counter-reset: step; }

/* ============================================
   Feature grid
   ============================================ */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }

.feature {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.feature .icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--paper-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  color: var(--signal);
}
.feature .icon svg { width: 19px; height: 19px; }
.feature h3 { font-size: 15.5px; margin-bottom: 6px; }
.feature p { font-size: 13.5px; color: var(--slate); line-height: 1.5; margin: 0; }

/* ============================================
   Pricing strip
   ============================================ */
.pricing-band {
  background: var(--ink);
  color: #fff;
  border-radius: 20px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.pricing-band h2 { font-size: 26px; color: #fff; }
.pricing-band p { color: #B8C0D9; font-size: 15px; margin-top: 8px; max-width: 42ch; line-height: 1.55; }
.pricing-band .price { font-family: var(--font-mono); font-size: 32px; font-weight: 600; }
.pricing-band .price span { font-size: 15px; color: #B8C0D9; font-family: var(--font-body); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-body);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--signal); color: #fff; }
.btn-primary:hover { background: var(--signal-dark); transform: translateY(-1px); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ============================================
   Footer
   ============================================ */
footer.container {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  color: var(--slate);
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================
   FAX APP PAGE (fax.html)
   ============================================ */
.app-shell {
  min-height: calc(100vh - 73px);
  background: var(--paper-soft);
  padding: 48px 0 64px;
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 880px) { .app-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.fax-card { padding: 32px; }
.fax-card h1 { font-size: 26px; margin-bottom: 6px; }
.fax-card .subhead { color: var(--slate); font-size: 14.5px; margin-bottom: 28px; }

.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}
.field .hint { font-size: 12.5px; color: var(--slate); margin-top: 6px; }

.fax-number-input {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
}
.fax-number-input .prefix {
  display: flex; align-items: center;
  padding: 0 14px;
  background: var(--paper-soft);
  border-right: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--slate);
}
.fax-number-input input {
  border: none;
  outline: none;
  padding: 13px 14px;
  font-family: var(--font-mono);
  font-size: 15px;
  flex: 1;
  min-width: 0;
}

.dropzone {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  background: var(--paper-soft);
}
.dropzone:hover, .dropzone.drag-over { border-color: var(--signal); background: #EEF3FE; }
.dropzone svg { width: 30px; height: 30px; color: var(--signal); margin-bottom: 10px; }
.dropzone .dz-title { font-weight: 600; font-size: 14.5px; margin-bottom: 4px; }
.dropzone .dz-sub { font-size: 12.5px; color: var(--slate); }
.dropzone input[type=file] { display: none; }

.file-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 12px;
}
.file-chip .file-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--danger-bg);
  color: var(--danger);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.file-chip .file-meta { flex: 1; min-width: 0; }
.file-chip .file-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip .file-size { font-size: 12px; color: var(--slate); }
.file-chip .file-remove {
  background: none; border: none; cursor: pointer; color: var(--slate);
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
}
.file-chip .file-remove:hover { background: var(--paper-soft); color: var(--ink); }

.page-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--amber-bg);
  border: 1px solid #F3D9A6;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12.5px;
  color: #8A5A00;
  margin-top: 12px;
  line-height: 1.5;
}
.page-note svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }

.send-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}
.send-row .btn { width: 100%; justify-content: center; padding: 14px; font-size: 15.5px; }

/* Sidebar: usage / trust */
.side-card { padding: 24px; margin-bottom: 20px; }
.side-card h3 { font-size: 14.5px; margin-bottom: 14px; }
.usage-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13.5px; padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.usage-row:last-child { border-bottom: none; }
.usage-row .val { font-family: var(--font-mono); font-weight: 600; }

.trust-list { list-style: none; margin: 0; padding: 0; }
.trust-list li {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; color: var(--slate);
  padding: 8px 0;
}
.trust-list svg { width: 16px; height: 16px; color: var(--success); flex-shrink: 0; }

/* --- Status states inline in the card --- */
.status-panel {
  display: none;
  text-align: center;
  padding: 28px 12px 8px;
}
.status-panel.show { display: block; }
.status-panel .status-icon {
  width: 58px; height: 58px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.status-panel.success .status-icon { background: var(--success-bg); color: var(--success); }
.status-panel.error .status-icon { background: var(--danger-bg); color: var(--danger); }
.status-panel .status-icon svg { width: 28px; height: 28px; }
.status-panel h2 { font-size: 20px; margin-bottom: 8px; }
.status-panel p { color: var(--slate); font-size: 14px; line-height: 1.55; margin: 0 auto 22px; max-width: 34ch; }
.status-detail {
  display: inline-flex; flex-direction: column; gap: 6px;
  text-align: left; background: var(--paper-soft);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 18px; margin-bottom: 22px; font-size: 13px;
}
.status-detail .row { display: flex; justify-content: space-between; gap: 24px; }
.status-detail .row .k { color: var(--slate); }
.status-detail .row .v { font-family: var(--font-mono); font-weight: 600; }

.form-panel.hide { display: none; }

/* ============================================
   Modals (auth + billing)
   ============================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,27,61,0.5);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-overlay.show { display: flex; }

.modal {
  background: #fff;
  border-radius: 18px;
  max-width: 420px;
  width: 100%;
  padding: 32px;
  position: relative;
  box-shadow: var(--shadow-lift);
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 30px; height: 30px; border-radius: 8px;
  border: none; background: var(--paper-soft); cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--slate);
}
.modal-close:hover { background: var(--line); }

.modal .modal-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--paper-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; color: var(--signal);
}
.modal .modal-icon svg { width: 24px; height: 24px; }
.modal h2 { font-size: 21px; margin-bottom: 8px; }
.modal p.modal-sub { color: var(--slate); font-size: 14px; line-height: 1.55; margin-bottom: 22px; }

.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff;
  font-size: 14.5px; font-weight: 600; color: var(--ink);
  cursor: pointer;
}
.google-btn:hover { background: var(--paper-soft); }
.google-btn img { width: 18px; height: 18px; }

.gsi-mount { display: flex; justify-content: center; }

/* Billing modal specifics */
.plan-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 22px;
}
.plan-box .plan-row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.plan-box .plan-price { font-family: var(--font-mono); font-size: 22px; font-weight: 700; }
.plan-box .plan-price span { font-size: 13px; color: var(--slate); font-family: var(--font-body); font-weight: 500; }
.plan-box .trial-tag {
  display: inline-block;
  background: var(--amber-bg); color: #8A5A00;
  font-size: 11.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  margin-bottom: 10px;
}
.plan-box ul { list-style: none; margin: 12px 0 0; padding: 0; }
.plan-box li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--slate); padding: 5px 0;
}
.plan-box li svg { width: 14px; height: 14px; color: var(--success); flex-shrink: 0; }

.modal-fineprint { font-size: 12px; color: var(--slate); text-align: center; margin-top: 14px; line-height: 1.5; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
