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

:root {
  --bg:        #f5f0e8;
  --surface:   #fdfaf4;
  --border:    #ddd5c0;
  --accent:    #4f7fff;
  --accent-h:  #3a6bff;
  --danger:    #c0392b;
  --success:   #2e7d5e;
  --text:      #2c2416;
  --muted:     #7a6e5f;
  --radius:    10px;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background:  var(--bg);
  color:       var(--text);
  min-height:  100vh;
  display:     flex;
  flex-direction: column;
}

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

/* ─── Layout ────────────────────────────────────────────── */
.container { width: 100%; max-width: 700px; margin: 0 auto; padding: 0 1.25rem; }
.page-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

/* ─── Nav ───────────────────────────────────────────────── */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.nav-brand:hover { text-decoration: none; }
.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
.nav-logo-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: var(--muted); font-size: 0.9rem; }
.nav-links a:hover { color: var(--text); }

/* ─── Card ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.card-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.card-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

/* ─── Forms ─────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--muted); margin-bottom: 0.35rem; }
input, select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 0.6rem 0.85rem;
  transition: border-color 0.15s;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 100px; }
input::placeholder, textarea::placeholder { color: #b0a898; }
.hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem; }
.char-count { text-align: right; font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  transition: background 0.15s;
  width: 100%;
}
.btn:hover:not(:disabled) { background: var(--accent-h); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { font-size: 0.85rem; padding: 0.45rem 1rem; width: auto; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: transparent; }

/* ─── Alerts ────────────────────────────────────────────── */
.alert { border-radius: 6px; font-size: 0.9rem; padding: 0.75rem 1rem; margin-bottom: 1rem; }
.alert-error   { background: rgba(192,57,43,0.08);  border: 1px solid rgba(192,57,43,0.3);  color: #a93226; }
.alert-success { background: rgba(46,125,94,0.08);  border: 1px solid rgba(46,125,94,0.3);  color: #1e6b4a; }
.alert-info    { background: rgba(79,127,255,0.08); border: 1px solid rgba(79,127,255,0.3); color: #2f5fcf; }

/* ─── Hero (index) ──────────────────────────────────────── */
.hero { text-align: center; padding: 3.5rem 0 2rem; }
.hero h1 { font-size: 2.2rem; font-weight: 800; line-height: 1.2; margin-bottom: 0.75rem; color: var(--text); }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 500px; margin: 0 auto 2rem; line-height: 1.65; }
.search-bar { display: flex; gap: 0.5rem; max-width: 440px; margin: 0 auto; }
.search-bar input { flex: 1; }
.search-bar .btn { width: auto; }

.how-it-works { padding: 3rem 0; }
.how-it-works h2 { text-align: center; font-size: 1.4rem; margin-bottom: 2rem; color: var(--text); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.25rem; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.step-num { background: var(--accent); color: #fff; border-radius: 50%; width: 2rem; height: 2rem; line-height: 2rem; font-weight: 700; margin: 0 auto 0.75rem; font-size: 0.9rem; }
.step h3 { font-size: 0.95rem; margin-bottom: 0.35rem; color: var(--text); }
.step p { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }

/* ─── Subscriber result card ────────────────────────────── */
.subscriber-result { display: none; margin-top: 1rem; }
.subscriber-result.visible { display: block; }
.subscriber-badge { display: flex; align-items: center; gap: 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.subscriber-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; flex-shrink: 0; color: #fff; }
.subscriber-info h3 { font-size: 1rem; color: var(--text); }
.subscriber-info p { font-size: 0.85rem; color: var(--muted); }

/* ─── Steps indicator ───────────────────────────────────── */
.steps-indicator { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.75rem; }
.step-dot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; border: 2px solid var(--border); color: var(--muted); flex-shrink: 0; }
.step-dot.active { border-color: var(--accent); color: var(--accent); }
.step-dot.done { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-line { flex: 1; height: 1px; background: var(--border); }

/* ─── Price badge ───────────────────────────────────────── */
.price-badge { background: rgba(79,127,255,0.07); border: 1px solid rgba(79,127,255,0.25); border-radius: 6px; padding: 0.75rem 1rem; display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.price-badge .price { font-size: 1.4rem; font-weight: 800; color: var(--accent); }
.price-badge p { font-size: 0.82rem; color: var(--muted); line-height: 1.4; }

/* ─── Footer ────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 1.25rem; text-align: center; font-size: 0.82rem; color: var(--muted); }

/* ─── Spinner ───────────────────────────────────────────── */
.spinner { display: inline-block; width: 1em; height: 1em; border: 2px solid rgba(0,0,0,0.15); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Phone input ───────────────────────────────────────── */
.phone-input-wrap {
  display: flex;
  gap: 0;
}
.phone-country-select {
  flex-shrink: 0;
  width: auto;
  min-width: 90px;
  border-radius: 6px 0 0 6px;
  border-right: none;
  padding: 0.6rem 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.phone-country-select:focus {
  border-color: var(--accent);
  z-index: 1;
}
.phone-local-input {
  flex: 1;
  border-radius: 0 6px 6px 0 !important;
  min-width: 0;
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 520px) {
  .form-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.6rem; }
  .search-bar { flex-direction: column; }
  .search-bar .btn { width: 100%; }
}
