/* === Base === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #e8706a;
    --primary-light: #f4a59e;
    --primary-soft: #fdf0ee;
    --accent: #f0b27a;
    --warm-bg: #fef9f6;
    --warm-bg-alt: #fdf5f0;
    --warm-card: #fffbf9;
    --text: #3d2c2c;
    --text-light: #8a7575;
    --text-muted: #b5a3a3;
    --border: rgba(232,112,106,0.12);
    --glow: rgba(232,112,106,0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--warm-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }

/* === Nav === */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(254,249,246,0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: 0 1px 16px rgba(232,112,106,0.08); }
.nav .wrap { display: flex; align-items: center; height: 64px; }
.nav-brand { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 18px; color: var(--primary); }
.nav-logo { height: 40px; width: 40px; object-fit: contain; flex-shrink: 0; }
.nav-menu { display: flex; gap: 32px; margin-left: 48px; }
.nav-menu a { font-size: 15px; color: var(--text-light); transition: color 0.2s; }
.nav-menu a:hover { color: var(--primary); }
.nav-actions { margin-left: auto; display: flex; gap: 12px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* === Buttons === */
.btn-fill {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 24px; border-radius: 10px; border: none; cursor: pointer;
    font-size: 15px; font-weight: 500; color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    transition: all 0.2s;
}
.btn-fill:hover { transform: translateY(-1px); box-shadow: 0 4px 20px var(--glow); }
.btn-ghost {
    display: inline-flex; align-items: center; padding: 10px 20px;
    border-radius: 10px; border: none; cursor: pointer;
    font-size: 15px; color: var(--text-light); background: transparent; transition: 0.2s;
}
.btn-ghost:hover { color: var(--primary); background: var(--primary-soft); }
.btn-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 24px; border-radius: 10px; cursor: pointer;
    font-size: 15px; font-weight: 500; color: var(--primary);
    background: transparent; border: 1.5px solid var(--primary); transition: 0.2s;
}
.btn-outline:hover { background: var(--primary-soft); }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }

/* === Hero === */
.hero {
    position: relative; padding: 120px 0 80px; overflow: hidden;
    background: linear-gradient(160deg, #fef6f2 0%, #fde8e0 30%, #fdf0ee 60%, #f6eff8 100%);
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-orb {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.35;
}
.hero-orb-1 { width: 500px; height: 500px; background: #f4a59e; top: -100px; right: -100px; }
.hero-orb-2 { width: 400px; height: 400px; background: #f0b27a; bottom: -80px; left: -80px; }
.hero-orb-3 { width: 300px; height: 300px; background: #f8c9d4; top: 50%; left: 40%; }

.hero-wrap { display: flex; align-items: center; gap: 60px; position: relative; z-index: 1; }
.hero-text { flex: 1; }
.hero-badge {
    display: inline-block; padding: 6px 16px; border-radius: 20px;
    background: rgba(232,112,106,0.1); color: var(--primary);
    font-size: 13px; font-weight: 500; margin-bottom: 24px;
}
.hero h1 { font-size: 44px; font-weight: 700; line-height: 1.3; margin-bottom: 20px; color: var(--text); }
.text-gradient {
    background: linear-gradient(135deg, var(--primary), #d35d8a);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc { font-size: 17px; color: var(--text-light); line-height: 1.8; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 24px; align-items: center; }
.stat strong { display: block; font-size: 22px; color: var(--text); }
.stat span { font-size: 13px; color: var(--text-muted); }
.stat-divider { width: 1px; height: 36px; background: rgba(232,112,106,0.15); }

/* Chat Preview */
.hero-visual { flex: 1; max-width: 400px; }
.chat-preview {
    background: #fff; border-radius: 20px;
    box-shadow: 0 20px 60px rgba(232,112,106,0.12), 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden; border: 1px solid rgba(232,112,106,0.08);
}
.chat-header {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px; border-bottom: 1px solid rgba(232,112,106,0.08);
    background: linear-gradient(135deg, #fffaf8, #fff);
}
.chat-avatar-sm {
    width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
}
.chat-avatar-sm img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-name { font-size: 15px; font-weight: 600; color: var(--text); }
.chat-status { font-size: 12px; color: #e8706a; }
.chat-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; min-height: 240px; background: #fffcfa; }
.chat-msg p {
    padding: 12px 16px; border-radius: 16px; font-size: 14px;
    line-height: 1.6; max-width: 85%;
}
.chat-msg-ai p { background: #fdf0ee; color: var(--text); border-bottom-left-radius: 4px; }
.chat-msg-user { align-self: flex-end; }
.chat-msg-user p {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; border-bottom-right-radius: 4px;
}
.typing-dots { display: flex; gap: 4px; padding: 12px 16px; }
.typing-dots span {
    width: 8px; height: 8px; border-radius: 50%; background: var(--primary-light);
    animation: blink 1.4s infinite both;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%,80%,100%{ opacity:0.3; } 40%{ opacity:1; } }
.chat-input-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 16px; border-top: 1px solid rgba(232,112,106,0.08);
}
.chat-input-bar input {
    flex: 1; border: none; outline: none; font-size: 14px;
    padding: 10px 14px; border-radius: 10px; background: #fdf5f2;
}
.chat-send {
    width: 38px; height: 38px; border-radius: 10px; border: none;
    background: var(--primary-soft); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.chat-send svg path { fill: var(--primary); }

/* === Sections === */
.section { padding: 100px 0; }
.section-alt { background: var(--warm-bg-alt); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-tag {
    display: inline-block; padding: 4px 14px; border-radius: 16px;
    background: rgba(232,112,106,0.08); color: var(--primary);
    font-size: 13px; font-weight: 500; margin-bottom: 16px;
}
.section-header h2 { font-size: 32px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.section-header p { font-size: 16px; color: var(--text-light); }

/* Features */
.features-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.feat-card {
    padding: 32px 28px; border-radius: 16px; background: var(--warm-card);
    border: 1px solid var(--border); transition: all 0.25s;
}
.feat-card:hover { border-color: rgba(232,112,106,0.25); box-shadow: 0 8px 30px rgba(232,112,106,0.1); transform: translateY(-3px); }
.feat-card-lg { grid-column: span 1; }
.feat-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.feat-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.feat-card p { font-size: 14px; color: var(--text-light); line-height: 1.7; }

/* Characters */
.char-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.char-card {
    display: flex; border-radius: 16px; background: var(--warm-card);
    border: 1px solid var(--border); overflow: hidden; transition: all 0.25s; cursor: pointer;
}
.char-card:hover { border-color: rgba(232,112,106,0.3); box-shadow: 0 8px 30px rgba(232,112,106,0.12); transform: translateY(-3px); }
.char-img { width: 160px; min-height: 220px; flex-shrink: 0; overflow: hidden; }
.char-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.char-info { padding: 24px; flex: 1; }
.char-info h3 { font-size: 20px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.char-type { font-size: 13px; color: var(--primary); font-weight: 500; }
.char-info p { font-size: 14px; color: var(--text-light); margin: 12px 0; line-height: 1.7; }
.char-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.char-tags span {
    padding: 4px 12px; border-radius: 12px; font-size: 12px;
    background: var(--primary-soft); color: var(--primary);
}
.char-meta { display: flex; gap: 16px; font-size: 13px; color: var(--text-muted); }
.center-action { text-align: center; margin-top: 40px; }

/* Scenes */
.scenes-list { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 0; }
.scene-item {
    display: flex; gap: 24px; padding: 32px 0;
    border-bottom: 1px solid var(--border);
}
.scene-item:last-child { border-bottom: none; }
.scene-num { font-size: 48px; font-weight: 700; color: rgba(232,112,106,0.15); line-height: 1; min-width: 60px; }
.scene-content h3 { font-size: 20px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.scene-content p { font-size: 15px; color: var(--text-light); line-height: 1.7; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 900px; margin: 0 auto; }
.price-card {
    padding: 36px 28px; border-radius: 16px; background: var(--warm-card);
    border: 1px solid var(--border); text-align: center; position: relative;
}
.price-card-pop { border-color: var(--primary); box-shadow: 0 8px 30px rgba(232,112,106,0.15); }
.price-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    padding: 4px 16px; border-radius: 12px; font-size: 12px; font-weight: 600;
    background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff;
}
.price-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 16px; color: var(--text); }
.price { font-size: 40px; font-weight: 700; color: var(--text); margin-bottom: 24px; }
.price span { font-size: 16px; font-weight: 400; color: var(--text-muted); }
.price-card ul { list-style: none; margin-bottom: 28px; }
.price-card li { padding: 8px 0; font-size: 14px; color: var(--text-light); border-bottom: 1px solid rgba(232,112,106,0.06); }
.price-card li:last-child { border-bottom: none; }

/* Final CTA */
.final-cta {
    padding: 80px 0; text-align: center;
    background: linear-gradient(160deg, #3d2c2c 0%, #5a3e3e 50%, #4a3040 100%); color: #fff;
}
.final-cta h2 { font-size: 32px; font-weight: 700; margin-bottom: 12px; }
.final-cta p { font-size: 16px; color: rgba(255,255,255,0.6); margin-bottom: 32px; }

/* Footer */
.footer { background: #3d2c2c; color: rgba(255,255,255,0.7); padding: 60px 0 0; }
.footer-wrap { display: flex; gap: 60px; }
.footer-brand { flex: 1; }
.footer-brand .nav-brand { margin-bottom: 12px; }
.footer-brand .nav-brand span { color: #fff; }
.footer-brand p { font-size: 14px; color: rgba(255,255,255,0.5); }
.footer-links { display: flex; gap: 60px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.footer-col a { font-size: 14px; color: rgba(255,255,255,0.5); transition: 0.2s; }
.footer-col a:hover { color: var(--primary-light); }
.footer-bottom {
    margin-top: 40px; padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 13px; color: rgba(255,255,255,0.3);
}

/* === Modal === */
.modal {
    display: none; position: fixed; inset: 0; z-index: 200;
    background: rgba(61,44,44,0.5); backdrop-filter: blur(8px);
    align-items: center; justify-content: center;
}
.modal.active { display: flex; }
.modal-box {
    background: #fff; border-radius: 20px; padding: 40px;
    width: 90%; max-width: 440px; position: relative;
    animation: modalIn 0.25s ease;
}
.modal-box-lg { max-width: 600px; }
@keyframes modalIn { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: translateY(0); } }
.modal-close {
    position: absolute; top: 16px; right: 20px;
    background: none; border: none; font-size: 28px; color: var(--text-muted); cursor: pointer;
    transition: 0.2s;
}
.modal-close:hover { color: var(--text); }
.modal-box h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.modal-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }

/* Auth Form */
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header svg { margin-bottom: 16px; }
.auth-header h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--text-light); }
.form-group input, .area-code {
    padding: 12px 14px; border: 1.5px solid rgba(232,112,106,0.2);
    border-radius: 10px; font-size: 15px; transition: 0.2s; outline: none;
    background: var(--warm-bg);
}
.form-group input:focus { border-color: var(--primary); background: #fff; }
.form-group input.error { border-color: #e74c3c; }
.form-group input.valid { border-color: #27ae60; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.form-select {
    width: 100%; padding: 12px 14px; border: 1.5px solid rgba(232,112,106,0.2);
    border-radius: 10px; font-size: 15px; outline: none; background: var(--warm-bg);
    color: var(--text); cursor: pointer; transition: 0.2s;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%238a7575' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}
.form-select:focus { border-color: var(--primary); background-color: #fff; }
.form-select.error { border-color: #e74c3c; }
.form-group textarea {
    width: 100%; padding: 12px 14px; border: 1.5px solid rgba(232,112,106,0.2);
    border-radius: 10px; font-size: 15px; outline: none; background: var(--warm-bg);
    font-family: inherit; resize: vertical; transition: 0.2s;
}
.form-group textarea:focus { border-color: var(--primary); background: #fff; }
.form-hint {
    display: block; font-size: 12px; margin-top: 4px; min-height: 18px; transition: 0.2s;
}
.form-hint.error { color: #e74c3c; }
.form-hint.success { color: #27ae60; }

/* Success State */
.success-state { text-align: center; padding: 20px 0; }
.success-icon { margin-bottom: 24px; }
.success-state h2 { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.success-state p { font-size: 15px; color: var(--text-light); line-height: 1.7; margin-bottom: 8px; }
.success-msg { max-width: 400px; margin: 0 auto 8px; }
.success-detail { margin: 20px auto 28px; padding: 16px; background: var(--primary-soft); border-radius: 10px; max-width: 360px; }
.success-detail p { font-size: 14px; color: var(--text); margin: 0; }
.success-detail strong { color: var(--primary); }
.success-next { margin-bottom: 28px; }
.success-next h4 { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 16px; }
.success-steps { display: flex; gap: 16px; justify-content: center; }
.success-step { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; max-width: 160px; }
.step-num {
    width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--primary); color: #fff; font-size: 14px; font-weight: 600;
}
.success-step p { font-size: 13px; color: var(--text-light); line-height: 1.5; }

/* Phone input — intl-tel-input v25 overrides */
.iti { width: 100%; }
.iti input,
.iti__tel-input {
    width: 100%; padding: 12px 14px; border: 1.5px solid rgba(232,112,106,0.2);
    border-radius: 10px; font-size: 15px; outline: none; background: var(--warm-bg);
    transition: 0.2s;
}
.iti input:focus,
.iti__tel-input:focus { border-color: var(--primary); background: #fff; }
.iti input.error,
.iti__tel-input.error { border-color: #e74c3c; }
.iti input.valid,
.iti__tel-input.valid { border-color: #27ae60; }

/* Form consent */
.form-consent { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.form-consent a { color: var(--primary); }
.btn-submit { transition: all 0.2s; position: relative; }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-submit:disabled:hover { box-shadow: none; transform: none; }
.btn-submit .spinner {
    display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite;
    margin-right: 8px; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
.auth-divider {
    text-align: center; margin: 20px 0; position: relative;
    color: var(--text-muted); font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
    content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: rgba(232,112,106,0.12);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px; border-radius: 10px; border: 1.5px solid #4285F4;
    background: transparent; color: #4285F4; font-size: 15px; cursor: pointer;
    transition: 0.2s;
}
.btn-google:hover { background: rgba(66,133,244,0.06); }
.auth-footer { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 20px; }
.auth-footer a { color: var(--primary); }

/* Character Detail */
.char-detail-header { display: flex; gap: 24px; margin-bottom: 24px; }
.char-detail-img { width: 120px; height: 120px; border-radius: 20px; flex-shrink: 0; overflow: hidden; }
.char-detail-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.char-detail-info h2 { margin-bottom: 4px; color: var(--text); }
.char-detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.char-detail-tags span { padding: 4px 12px; border-radius: 12px; font-size: 12px; background: var(--primary-soft); color: var(--primary); }
.char-detail-desc { font-size: 15px; color: var(--text-light); line-height: 1.8; margin-bottom: 24px; }
.char-detail-sample { background: var(--primary-soft); border-radius: 12px; padding: 20px; margin-bottom: 24px; }
.char-detail-sample h4 { font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--text-light); }
.char-detail-sample p { font-size: 14px; color: var(--text-light); line-height: 1.7; }

/* === Responsive === */
@media (max-width: 768px) {
    .nav-menu, .nav-actions { display: none; }
    .nav-toggle { display: flex; margin-left: auto; }
    .hero-wrap { flex-direction: column; text-align: center; }
    .hero h1 { font-size: 30px; }
    .hero-desc br { display: none; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual { max-width: 100%; }
    .features-grid { grid-template-columns: 1fr; }
    .char-grid { grid-template-columns: 1fr; }
    .char-card { flex-direction: column; }
    .char-img { width: 100%; min-height: 200px; }
    .char-img img { height: 200px; }
    .pricing-grid { grid-template-columns: 1fr; }
    .footer-wrap { flex-direction: column; gap: 40px; }
    .footer-links { gap: 40px; }
    .section { padding: 60px 0; }
}
