/* ============================================================
   VEDIC CALCULATOR — Shared Stylesheet
   Matches the dark navy + gold design from the reference screenshot
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=Jost:wght@300;400;500;600&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  --navy-deep:   #0a0e1f;
  --navy-mid:    #111630;
  --navy-card:   #161d38;
  --navy-border: #1f2a4a;
  --gold:        #c8a96e;
  --gold-light:  #e2c98a;
  --gold-muted:  #8a6e42;
  --white:       #f4f1ec;
  --white-soft:  #cdd0da;
  --white-dim:   #7a819a;
  --accent-btn:  #1a2248;
  --accent-btn-hover: #243060;
  --input-bg:    #0e1329;
  --input-border:#2a3560;
  --input-focus: #c8a96e;
  --error:       #e07070;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --shadow-card: 0 8px 40px rgba(0,0,0,0.45);
  --shadow-glow: 0 0 20px rgba(200,169,110,0.12);
  --font-display:'Cormorant Garamond', Georgia, serif;
  --font-body:   'Jost', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--navy-deep);
  color: var(--white);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Top Navigation Bar ───────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 24px;
  background: var(--navy-mid);
  border-bottom: 1px solid var(--navy-border);
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 64px;
  width: 100%;
}

@media (max-width: 480px) {
  .topbar {
    padding: 12px 18px;
    min-height: 58px;
  }
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0; /* Allow shrinking */
}

.topbar-logo .logo-icon {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  background: url("/static/website-logo.jpeg") center / cover no-repeat;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
}

.topbar-logo .logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
}

/* ── Hero Banner ──────────────────────────────────────────── */
.hero-banner {
  background: linear-gradient(135deg, #0e1735 0%, #0a1228 60%, #111a36 100%);
  padding: 24px 18px 20px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--navy-border);
}

@media (max-width: 480px) {
  .hero-banner {
    padding: 18px 14px 16px;
  }
}

.hero-banner::before {
  content: '';
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  width: 140px;
  height: 140px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Ccircle cx='100' cy='100' r='90' fill='none' stroke='rgba(200,169,110,0.15)' stroke-width='1'/%3E%3Ccircle cx='100' cy='100' r='70' fill='none' stroke='rgba(200,169,110,0.1)' stroke-width='1'/%3E%3Ccircle cx='100' cy='100' r='50' fill='none' stroke='rgba(200,169,110,0.08)' stroke-width='1'/%3E%3Cpolygon points='100,10 190,55 190,145 100,190 10,145 10,55' fill='none' stroke='rgba(200,169,110,0.12)' stroke-width='1'/%3E%3Cline x1='100' y1='10' x2='100' y2='190' stroke='rgba(200,169,110,0.06)' stroke-width='1'/%3E%3Cline x1='10' y1='55' x2='190' y2='145' stroke='rgba(200,169,110,0.06)' stroke-width='1'/%3E%3Cline x1='10' y1='145' x2='190' y2='55' stroke='rgba(200,169,110,0.06)' stroke-width='1'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.6;
  pointer-events: none;
}

@media (max-width: 480px) {
  .hero-banner::before {
    width: 100px;
    height: 100px;
    right: -20px;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(200,169,110,0.1);
  border: 1px solid rgba(200,169,110,0.25);
  padding: 4px 12px 4px 4px;
  border-radius: 20px;
  margin-bottom: 10px;
  position: relative;
}

.hero-badge::before {
  content: attr(data-num, '');
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-deep);
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Badge variants by number */
.hero-badge.badge-1 {
  color: #c8a96e;
  background: rgba(200,169,110,0.1);
  border-color: rgba(200,169,110,0.3);
}
.hero-badge.badge-1::before {
  content: '1';
  background: linear-gradient(135deg, #c8a96e, #e2c98a);
  color: var(--navy-deep);
}

.hero-badge.badge-2 {
  color: #7eb8d4;
  background: rgba(126,184,212,0.1);
  border-color: rgba(126,184,212,0.3);
}
.hero-badge.badge-2::before {
  content: '2';
  background: linear-gradient(135deg, #5a9fbf, #7eb8d4);
  color: #fff;
}

.hero-badge.badge-3 {
  color: #a98ed4;
  background: rgba(169,142,212,0.1);
  border-color: rgba(169,142,212,0.3);
}
.hero-badge.badge-3::before {
  content: '3';
  background: linear-gradient(135deg, #8a6abf, #a98ed4);
  color: #fff;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 8px;
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.5rem;
  }
}

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--white-dim);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--white-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover { color: var(--gold); }

.breadcrumb .sep {
  color: var(--gold-muted);
  font-size: 0.7rem;
}

.breadcrumb .current { color: var(--white-soft); }

/* ── Main Card ────────────────────────────────────────────── */
.page-wrapper {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 22px 32px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.form-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-muted), var(--gold), var(--gold-muted));
}

/* ── Form Header ──────────────────────────────────────────── */
.form-header {
  text-align: center;
  margin-bottom: 26px;
}

.form-header h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy-deep);
  margin-bottom: 6px;
}

.form-header-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.form-header-divider .line {
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(10,14,31,0.2));
}

.form-header-divider .line.right {
  background: linear-gradient(90deg, rgba(10,14,31,0.2), transparent);
}

.form-header-divider .diamond {
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  border-radius: 1px;
}

/* ── Field Groups ─────────────────────────────────────────── */
.field-group {
  margin-bottom: 18px;
}

.field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--navy-deep);
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}

.field-label .required {
  color: #c0392b;
  margin-left: 2px;
}

/* ── Input Styles ─────────────────────────────────────────── */
.field-input,
.field-select {
  width: 100%;
  padding: 12px 14px;
  background: #f8f7f4;
  border: 1.5px solid #ddd8ce;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  color: #1a1a2e;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.field-input::placeholder {
  color: #aaa7a0;
  font-weight: 300;
}

.field-input:focus,
.field-select:focus {
  border-color: var(--navy-deep);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(10,14,31,0.08);
}

/* Input with icon */
.field-input-wrap {
  position: relative;
}

.field-input-wrap .field-input {
  padding-right: 40px;
}

.field-input-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
  font-size: 1rem;
  pointer-events: none;
}

/* ── Phone Row ────────────────────────────────────────────── */
.phone-row {
  display: flex;
  gap: 8px;
}

.phone-code-wrap {
  position: relative;
  flex-shrink: 0;
}

.phone-code-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 12px 28px 12px 12px;
  background: #f8f7f4;
  border: 1.5px solid #ddd8ce;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: #1a1a2e;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  min-width: 76px;
}

.phone-code-select:focus {
  border-color: var(--navy-deep);
  box-shadow: 0 0 0 3px rgba(10,14,31,0.08);
}

.phone-code-arrow {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.65rem;
  color: #888;
}

.phone-input { flex: 1; }

/* ── AM/PM Toggle ─────────────────────────────────────────── */
.ampm-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.ampm-input-wrap {
  flex: 1;
}

.ampm-toggle {
  display: flex;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1.5px solid #ddd8ce;
  flex-shrink: 0;
}

.ampm-btn {
  padding: 12px 16px;
  background: #f8f7f4;
  border: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  letter-spacing: 0.04em;
}

.ampm-btn.active {
  background: var(--navy-deep);
  color: var(--white);
}

/* ── Submit Button ────────────────────────────────────────── */
.btn-submit {
  width: 100%;
  padding: 15px 20px;
  background: var(--navy-deep);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  margin-top: 24px;
  box-shadow: 0 4px 16px rgba(10,14,31,0.25);
}

.btn-submit:hover {
  background: var(--accent-btn-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(10,14,31,0.35);
}

.btn-submit:active { transform: translateY(0); }

.btn-submit .btn-icon {
  font-size: 1rem;
  opacity: 0.85;
}

/* ── Security Note ────────────────────────────────────────── */
.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--white-dim);
  text-align: center;
}

.security-note svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 420px) {
  .hero-title { font-size: 1.65rem; }
  .form-card  { padding: 22px 16px 26px; }
}
