/* ============================================================
   Star Chart Generator — tool-specific styles.
   Builds on the site's root design tokens (css/style.css) for
   header/nav/footer/typography; everything below is scoped to
   .sc-* so it can't leak into the rest of the site.
   ============================================================ */

.sc-main { background: var(--paper); }

button.btn-primary, button.btn-ghost {
    font-family: 'Karla', sans-serif;
    font-size: 1rem;
}

.sc-hero-promo {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.25rem 2.6rem;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: center;
}

.sc-hero-promo-text .hero-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-deep);
    background: rgba(46, 158, 232, 0.1);
    border: 1px solid rgba(46, 158, 232, 0.25);
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    margin-bottom: 1.1rem;
}

.sc-hero-promo-text h1 {
    font-family: 'Fraunces', serif;
    font-size: clamp(1.9rem, 3.6vw, 2.7rem);
    color: var(--ink);
    line-height: 1.15;
    margin-bottom: 0.9rem;
}

.sc-hero-promo-text p {
    color: var(--ink-soft);
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

.sc-hero-cta { display: inline-block; }

.sc-hero-promo-image {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(30, 36, 56, 0.18);
    border: 1px solid rgba(30, 36, 56, 0.1);
}

.sc-hero-promo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 860px) {
    .sc-hero-promo {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding-top: 2.4rem;
    }
    .sc-hero-promo-image { order: -1; max-width: 340px; margin: 0 auto; }
}

.sc-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1.25rem 4rem;
}

.sc-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.8rem;
    box-shadow: 0 20px 50px rgba(13, 59, 92, 0.06);
}

.sc-card + .sc-card { margin-top: 1.5rem; }

.sc-field { margin-bottom: 1.15rem; }
.sc-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.4rem;
}
.sc-optional { font-weight: 400; color: var(--ink-faint); font-size: 0.78rem; }

.sc-field input[type="text"],
.sc-field input[type="date"],
.sc-field input[type="time"],
.sc-field input[type="email"],
.sc-field textarea {
    width: 100%;
    font: inherit;
    font-size: 0.98rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink);
}
.sc-field input:focus, .sc-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 158, 232, 0.15);
}
.sc-field input:disabled { opacity: 0.55; }

.sc-time-row { display: flex; gap: 0.75rem; align-items: center; }
.sc-time-row input[type="time"] { flex: 1; }
.sc-checkbox-row { display: flex; align-items: center; gap: 0.5rem; white-space: nowrap; font-size: 0.85rem; color: var(--ink-soft); }
.sc-note {
    font-size: 0.8rem;
    color: var(--ink-faint);
    margin-top: 0.4rem;
    font-style: italic;
}

.sc-location-wrap { position: relative; }
.sc-location-results {
    position: absolute;
    z-index: 20;
    left: 0; right: 0; top: calc(100% + 4px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(13, 59, 92, 0.12);
    list-style: none;
    margin: 0; padding: 0.3rem;
    max-height: 260px; overflow-y: auto;
}
.sc-location-results li {
    padding: 0.55rem 0.7rem;
    border-radius: 7px;
    font-size: 0.9rem;
    color: var(--ink);
    cursor: pointer;
}
.sc-location-results li:hover { background: rgba(46, 158, 232, 0.1); }
.sc-location-results .sc-loc-empty { color: var(--ink-faint); cursor: default; }
.sc-location-results .sc-loc-empty:hover { background: none; }

.sc-use-location {
    margin-top: 0.5rem;
    background: none;
    border: none;
    color: var(--primary-deep);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.2rem 0;
}
.sc-use-location:disabled { opacity: 0.6; cursor: default; }

.sc-error {
    color: #B3261E;
    font-size: 0.88rem;
    margin-top: 0.6rem;
    min-height: 1.2em;
}

.sc-generate-btn {
    width: 100%;
    margin-top: 0.3rem;
}

/* ── Preview ─────────────────────────────────────────────── */
.sc-preview-card {
    background: #EFEDE6;
    padding: 1.4rem;
}
.sc-canvas-wrap {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(13, 59, 92, 0.1);
    background: #FAFAF7;
}
.sc-canvas-wrap canvas { width: 100%; height: 100%; display: block; }

.sc-preview-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.4rem;
    flex-wrap: wrap;
}
.sc-preview-actions .btn-primary { flex: 1; min-width: 200px; }
.sc-pdf-link {
    display: block;
    text-align: center;
    margin-top: 0.7rem;
    font-size: 0.85rem;
    color: var(--ink-faint);
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
}
.sc-pdf-link:hover { color: var(--ink); }

/* ── Email modal ─────────────────────────────────────────── */
.sc-modal-backdrop {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(4, 6, 15, 0.72);
    display: flex; align-items: center; justify-content: center;
    padding: 1.25rem;
}
.sc-modal-backdrop[hidden] { display: none; }
.sc-modal {
    position: relative;
    background: var(--surface);
    border-radius: 18px;
    padding: 2rem;
    max-width: 420px; width: 100%;
    box-shadow: 0 30px 70px rgba(0,0,0,0.35);
}
.sc-modal-close {
    position: absolute; top: 0.8rem; right: 1rem;
    background: none; border: none; font-size: 1.5rem;
    color: var(--ink-faint); cursor: pointer; line-height: 1;
}
.sc-modal h3 { font-family: 'Fraunces', serif; font-size: 1.4rem; color: var(--ink); margin-bottom: 0.4rem; }
.sc-modal p.sc-modal-sub { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 1.3rem; }
.sc-consent-row {
    display: flex; align-items: flex-start; gap: 0.5rem;
    font-size: 0.8rem; color: var(--ink-faint);
    margin: 0.9rem 0 0.4rem;
}
.sc-consent-row input { margin-top: 0.2rem; }
.sc-privacy-note { font-size: 0.76rem; color: var(--ink-faint); margin-top: 0.8rem; line-height: 1.5; }

/* ── Keepsake ────────────────────────────────────────────── */
.sc-keepsake-card { text-align: center; }
.sc-keepsake-card h3 { font-family: 'Fraunces', serif; font-size: 1.5rem; color: var(--ink); margin-bottom: 0.5rem; }
.sc-keepsake-card p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 1.3rem; }
.sc-whatsapp-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: #25D366; color: #fff; border: none;
    padding: 0.85rem 1.6rem; border-radius: 10px;
    font-weight: 700; font-size: 0.98rem; cursor: pointer;
    text-decoration: none;
}
.sc-whatsapp-btn:hover { background: #1EBE5A; }
.sc-chart-id {
    margin-top: 1rem; font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem; color: var(--ink-faint); letter-spacing: 0.03em;
}
.sc-chart-id span { color: var(--ink); font-weight: 600; }

/* ── FAQ ─────────────────────────────────────────────────── */
.sc-faq {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}
.sc-faq h2 {
    font-family: 'Fraunces', serif;
    font-size: 1.3rem;
    color: var(--ink);
    margin-bottom: 1.1rem;
}
.sc-faq-item { margin-bottom: 1.1rem; }
.sc-faq-item h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.3rem;
}
.sc-faq-item p {
    font-size: 0.88rem;
    color: var(--ink-soft);
    line-height: 1.6;
}

/* ── Accuracy / sources note ─────────────────────────────── */
.sc-sources {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-size: 0.8rem;
    color: var(--ink-faint);
    line-height: 1.7;
}
.sc-sources summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 0.6rem;
}
.sc-sources ul { margin: 0.6rem 0 0 1.1rem; }

@media (max-width: 560px) {
    .sc-card { padding: 1.3rem; border-radius: 14px; }
    .sc-preview-actions { flex-direction: column; }
    .sc-preview-actions .btn-primary { min-width: unset; }
}
