/* ========================================================
   SELAM LANDING — Airlearn-style 1:1 (Selam Design System)
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Noto+Sans+Ethiopic:wght@400;600;700;800&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Selam tokens */
    --primary: #D4A017;
    --primary-dark: #A67C00;
    --accent: #2D6A4F;
    --bg: #FFF9EF;
    --card-bg: #FFF5E1;
    --surface: #FFFFFF;
    --border: #EDE8DC;
    --text: #2D2A24;
    --text-muted: #A09888;
    --green: #58CC02;
    --green-dark: #46A302;
    --red: #FF4B4B;
    --blue: #1CB0F6;
    --radius: 16px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: 'Nunito', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--surface);
    overflow-x: hidden;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 24px 0;
    background: linear-gradient(180deg,
        #FFF5E1 0%,
        #FFEDC2 25%,
        #FFE4A8 50%,
        #FFF0D0 75%,
        var(--bg) 100%
    );
    overflow: hidden;
}

/* ── Background Decoration ─────────────────── */
.bg-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Secular Tibeb Pattern (Diamonds/Angles) */
.tibeb-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0.05;
    /* A completely secular intersecting diamond and chevron weave pattern */
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 0L80 40L40 80L0 40Z M20 20L40 40L20 60L0 40Z M60 20L80 40L60 60L40 40Z' fill='%23D4A017' fill-rule='evenodd'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    
    /* Fade out the pattern in the exact center so the typography stays 100% legible */
    -webkit-mask-image: radial-gradient(circle at 50% 30%, transparent 20%, #000 85%);
    mask-image: radial-gradient(circle at 50% 30%, transparent 20%, black 85%);
}

/* ── Removed Side Mascots ──────────────────── */

/* ── Logo ──────────────────────────────────── */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    z-index: 2;
}

.logo-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 0 var(--border);
    overflow: hidden;
    padding: 2px;
}

.mascot-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Optional: a subtle bounce animation for personality */
    transform-origin: bottom center;
}
.logo:hover .mascot-img {
    animation: bounceMascot 0.6s cubic-bezier(0.28, 0.84, 0.42, 1);
}

@keyframes bounceMascot {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.1) translateY(-3px); }
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.02em;
}

/* ── Hero Brand Lockup ─────────────────────── */
.hero-brand-lockup {
    margin-bottom: 12px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.hero-mascot-img {
    height: 110px;  /* Shrunk back to let phones be the focal point */
    width: auto;
    object-fit: contain;
    transform-origin: bottom center;
    animation: bounceInHero 1s cubic-bezier(0.28, 0.84, 0.42, 1) forwards;
}

.hero-mascot-img:hover {
    animation: bounceMascot 0.6s cubic-bezier(0.28, 0.84, 0.42, 1) infinite;
}

.hero-app-name {
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 900;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.04em;
    margin-top: -5px; /* Adjust spacing nicely */
}

@keyframes bounceInHero {
    0% { transform: scale(0.4) translateY(40px); opacity: 0; }
    60% { transform: scale(1.1) translateY(-10px); opacity: 1; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* ── Subtitle (Main Body) ──────────────────── */
.headline {
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    font-weight: 800;
    text-align: center;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 12px;
    z-index: 2;
}

/* ── Subtitle ──────────────────────────────── */
.subtitle {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    text-align: center;
    color: var(--text-muted);
    font-weight: 700;
    max-width: 520px;
    line-height: 1.55;
    margin-bottom: 24px; /* Give just enough room before the signup form */
    z-index: 2;
}

/* ── Countdown ─────────────────────────────── */
.countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    z-index: 2;
}

.countdown-label-top {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 1.8px;
    color: var(--primary-dark);
}

.countdown-row { display: flex; align-items: center; gap: 8px; }

.cd-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    min-width: 62px;
    box-shadow: 0 3px 0 var(--border);
}

.cd-num {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary-dark);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.cd-label {
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 800;
}

.cd-colon {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary);
    margin-top: -12px;
}

/* ── Signup Form ───────────────────────────── */
.signup-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 540px;
    z-index: 2;
}

.form-row { display: flex; gap: 10px; width: 100%; }

.form-row input[type="email"] {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 700;
    color: var(--text);
    outline: none;
    transition: all 0.2s;
    box-shadow: 0 3px 0 var(--border);
}

.form-row input[type="email"]::placeholder { color: var(--text-muted); font-weight: 600; }
.form-row input[type="email"]:focus { border-color: var(--primary); box-shadow: 0 3px 0 var(--primary-dark); }

.phone-wrap {
    display: flex;
    flex: 1;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    overflow: hidden;
    box-shadow: 0 3px 0 var(--border);
    transition: all 0.2s;
}

.phone-wrap:focus-within { border-color: var(--primary); box-shadow: 0 3px 0 var(--primary-dark); }

.phone-wrap select {
    width: 88px;
    padding: 14px 8px 14px 12px;
    border: none;
    background: var(--card-bg);
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    outline: none;
    border-right: 2px solid var(--border);
    -webkit-appearance: none;
    appearance: none;
}

.phone-wrap input {
    flex: 1;
    padding: 14px;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 700;
    color: var(--text);
    outline: none;
}

.phone-wrap input::placeholder { color: var(--text-muted); font-weight: 600; }

/* 3D Duolingo button */
.signup-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: var(--surface);
    border: none;
    border-radius: var(--radius);
    font-size: 1.05rem;
    font-weight: 900;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 0 5px 0 var(--primary-dark);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.signup-btn:hover { filter: brightness(1.05); }
.signup-btn:active { transform: translateY(5px); box-shadow: none; }

.btn-loading { display: none; align-items: center; justify-content: center; gap: 8px; }
.signup-btn.loading .btn-default { display: none; }
.signup-btn.loading .btn-loading { display: flex; }

.spinner { width: 20px; height: 20px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Success ───────────────────────────────── */
.signup-success { display: none; flex-direction: column; align-items: center; gap: 12px; z-index: 2; }
.signup-success.show { display: flex; }

.success-check {
    width: 60px; height: 60px;
    display: flex; align-items: center; justify-content: center;
    background: var(--green); color: white;
    font-size: 1.8rem; font-weight: 900;
    border-radius: 50%;
    box-shadow: 0 4px 0 var(--green-dark);
    animation: popIn 0.4s var(--ease) both;
}

@keyframes popIn { 0% { transform: scale(0); } 70% { transform: scale(1.1); } 100% { transform: scale(1); } }

.success-text { font-size: 1.05rem; font-weight: 800; color: var(--text); text-align: center; max-width: 400px; }

/* ── Social Proof & Progressive Form ───────── */
.social-proof-text {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-top: 10px;
    letter-spacing: 0.2px;
}

.progressive-phone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 400px;
    margin-top: 12px;
    padding: 20px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 4px 0 var(--border);
    animation: slideUp 0.4s var(--ease) both;
}

@keyframes slideUp { 0% { transform: translateY(20px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }

.progressive-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
}

.phone-only-row {
    flex-direction: column;
}

.phone-only-row .signup-btn {
    width: 100%;
    font-size: 0.95rem;
    padding: 14px;
}

.skip-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 4px;
    text-decoration: underline;
    text-decoration-color: var(--border);
    text-underline-offset: 4px;
    transition: all 0.2s;
}
.skip-btn:hover { color: var(--text); text-decoration-color: var(--text); }

.final-msg { animation: popIn 0.4s var(--ease) both; }

/* ═══════════════════════════════════════════
   iPHONE MOCKUP STAGE — Airlearn 1:1
   ═══════════════════════════════════════════ */
.phones-stage {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-top: 50px; /* Big gap before phones so they clearly separate from the form above */
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    position: relative;
    /* Bring phones fully into view, no more cut-off bleeding */
    margin-bottom: 40px; 
}

.iphone {
    flex-shrink: 0;
    transition: transform 0.5s var(--ease);
}

/* iPhone frame fallback (using real mockups directly) */
.iphone img {
    display: block;
    width: 100%;
    height: auto;
    /* Use drop-shadow filter so it respects transparent PNG boundaries instead of doing a hard rectangular box shadow */
    filter: 
        drop-shadow(0 20px 40px rgba(0,0,0,0.15))
        drop-shadow(0 6px 12px rgba(0,0,0,0.08));
}

/* Wave Divider */
.wave-divider {
    position: absolute;
    bottom: -1px; /* preventing 1px tear */
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 4; /* Below center phone, above others or above hero bg */
    pointer-events: none;
}
.wave-divider svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ── Per-phone sizing & transform ─────────── */

/* Phone 1 — far left */
.ip-1 {
    z-index: 1;
    margin-right: -80px;
    transform: translateY(40px);
}
.ip-1 img { width: 280px; }

/* Phone 2 — inner left */
.ip-2 {
    z-index: 3;
    margin-right: -80px;
    transform: translateY(15px);
}
.ip-2 img { width: 280px; }

/* Phone 3 — CENTER */
.ip-3 {
    z-index: 5;
    transform: translateY(-10px);
}
.ip-3 img { width: 280px; }

/* Phone 4 — inner right */
.ip-4 {
    z-index: 3;
    margin-left: -80px;
    transform: translateY(15px);
}
.ip-4 img { width: 280px; }

/* Phone 5 — far right */
.ip-5 {
    z-index: 1;
    margin-left: -80px;
    transform: translateY(40px);
}
.ip-5 img { width: 280px; }

/* Hover */
.iphone:hover {
    z-index: 10 !important;
    transform: translateY(-20px) scale(1.05) !important;
}

.iphone:hover img {
    filter: 
        drop-shadow(0 30px 60px rgba(0,0,0,0.2))
        drop-shadow(0 10px 20px rgba(0,0,0,0.12));
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
    background: var(--surface);
    padding: 100px 24px 0;
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 60px;
    padding-bottom: 40px;
}

.footer-left { max-width: 420px; }

.footer-logo { margin-bottom: 16px; }

.footer-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.7;
}

.footer-right h4 {
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-right ul { list-style: none; }
.footer-right li { margin-bottom: 12px; }

.footer-right a {
    font-size: 0.92rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-right a:hover { color: var(--primary); }

.arrow { font-size: 0.75rem; opacity: 0.5; }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    max-width: 900px;
    margin: 0 auto;
}

.footer-bottom p {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 700;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
    .ip-1 img, .ip-2 img, .ip-3 img, .ip-4 img, .ip-5 img { width: 195px; }

    .ip-1, .ip-5 { margin-left: -40px; margin-right: -40px; }
    .ip-2, .ip-4 { margin-left: -50px; margin-right: -50px; }
}

@media (max-width: 768px) {
    .hero { padding: 32px 20px 0; }
    
    .hero-mascot-img { height: 90px; } /* Shrink mascot slightly for tablets */
    .headline { font-size: 2.2rem; }

    .form-row { flex-direction: column; }

    .ip-1 img, .ip-2 img, .ip-3 img, .ip-4 img, .ip-5 img { width: 155px; }
    
    .ip-1, .ip-5 { margin-left: -35px; margin-right: -35px; }
    .ip-2, .ip-4 { margin-left: -45px; margin-right: -45px; }

    .countdown-row { gap: 6px; }
    .cd-block { min-width: 50px; padding: 8px 10px; }
    .cd-num { font-size: 1.3rem; }

    .footer-inner { flex-direction: column; gap: 32px; }
    .footer { padding-top: 80px; }
}

@media (max-width: 480px) {
    .ip-1, .ip-5 { display: none; }
    .ip-2 img, .ip-3 img, .ip-4 img { width: 140px; }
    
    .ip-2, .ip-4 { margin-left: -40px; margin-right: -40px; }

    .hero-mascot-img { height: 80px; } /* Shrink mascot further for small mobile */
    .headline { font-size: 1.8rem; }
    .subtitle { font-size: 0.95rem; }
    
    /* Ensure the phones still have breathing room and don't bleed off on mobile */
    .phones-stage { margin-bottom: 20px; margin-top: 30px; }
}
