/* Modern styles for LearnSpeakly landing page */
:root {
    --color-primary: #4946ea;
    --color-secondary: #11ee92;
    --color-tertiary: #1f2122;
    --primary-gradient: linear-gradient(135deg, var(--color-primary) 0%, #6b73ff 100%);
    --header-gradient: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    --accent-gradient: linear-gradient(135deg, var(--color-secondary) 0%, #00d4aa 100%);
    --text-primary: var(--color-tertiary);
    --text-secondary: #525252;
    --text-muted: #737373;
    --bg-light: #f9fafb;
    --bg-card: rgba(255, 255, 255, 0.98);
    --shadow-soft: 0 10px 25px -5px rgba(73, 70, 234, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 25px -5px rgba(73, 70, 234, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    --border-radius: 16px;
    --animation-duration: 0.3s;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Animated gradient background behind content */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(120deg, #2b2a7b 0%, #4946ea 25%, #11ee92 50%, #1f2122 75%);
    background-size: 400% 400%;
    filter: saturate(1.05) contrast(1.02);
    animation: gradientShift 15s ease infinite;
}

/* subtle vignette for depth */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(0,0,0,0.12) 100%);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    body::before {
        animation: none;
        background-size: cover;
    }
}

@media (max-width: 768px) {
    body::before {
        animation-duration: 30s;
        filter: saturate(0.95) contrast(1);
    }
    body::after {
        background: radial-gradient(ellipse at center, rgba(0,0,0,0) 60%, rgba(0,0,0,0.08) 100%);
    }
}

.container {
    max-width: 900px;
    width: 92%;
    background: var(--bg-card);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transform: translateY(0);
    transition: all var(--animation-duration) ease;
    animation: slideInUp 0.8s ease-out;
}

/* Desktop two-column layout: left = hero/countdown, right = form */
@media (min-width: 980px) {
    .container { max-width: 1100px; }

    .content {
        /* display: grid; */
        grid-template-columns: 1fr 420px;
        gap: 36px;
        align-items: start;
        padding: 36px 40px;
    }

    /* Place the form in the right column */
    .form-section {
        grid-column: 2;
        margin-top: 0;
    }

    /* Let benefits span full width below */
    .benefits-section {
        grid-column: 1 / -1;
        margin-top: 18px;
    }

    /* Slightly reduce visual size of countdown in left column */
    .countdown-container { max-width: 100%; }

    /* Ensure form fits nicely in the right column */
    #mc_embed_signup { max-width: 100% !important; }
    #mc_embed_signup .button { max-width: 100% !important; margin: 12px 0 0 !important; }
}

.container:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    text-align: center;
    /* reduced vertical padding so form appears without scrolling */
    padding: 40px 30px 30px;
    background: var(--header-gradient);
    color: white;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.logo {
    max-height: 72px;
    width: auto;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.18));
    transition: transform var(--animation-duration) ease;
    animation: fadeInScale 1s ease-out 0.2s both;
}

.logo:hover {
    transform: scale(1.05);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tagline {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.95;
    margin-top: 10px;
    animation: fadeInUp 1s ease-out 0.6s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content {
    /* tighter content spacing so form appears sooner */
    padding: 30px 30px;
    text-align: center;
    animation: fadeInUp 1s ease-out 0.9s both;
}

.welcome {
    margin-bottom: 20px;
}

.welcome h2 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-primary);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.welcome p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.countdown-container {
    margin: 30px 0;
    padding: 20px 16px;
    /* background: linear-gradient(135deg, var(--bg-light) 0%, rgba(255, 255, 255, 0.8) 100%); */
    border-radius: calc(var(--border-radius) - 4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* box-shadow: var(--shadow-soft); */
    /* backdrop-filter: blur(6px); */
    animation: scaleIn 0.8s ease-out 1.2s both;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.countdown-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--text-primary);
    background: var(--header-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 24px;
    max-width: 500px;
    margin: 0 auto;
}

.countdown-item {
    background: white;
    padding: 18px 14px;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all var(--animation-duration) ease;
    position: relative;
    overflow: hidden;
}

.countdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--header-gradient);
    transform: scaleX(0);
    transition: transform var(--animation-duration) ease;
}

.countdown-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.countdown-item:hover::before {
    transform: scaleX(1);
}

.countdown-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: transparent;
    background: var(--header-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    display: block;
    line-height: 1;
    margin-bottom: 8px;
}

.countdown-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

#mc_embed_signup form{
    text-align: center !important;
}

#mc_embed_signup .foot{
    display: block !important;
}

.form-section {
    margin-top: 20px;
    animation: fadeInUp 1s ease-out 1.5s both;
}

.form-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.benefits-section {
    margin-top: 20px;
    padding: 20px 16px;
    /* background: linear-gradient(135deg, var(--bg-light) 0%, rgba(255, 255, 255, 0.8) 100%); */
    border-radius: calc(var(--border-radius) - 4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* box-shadow: var(--shadow-soft); */
    /* backdrop-filter: blur(6px); */
    animation: fadeInUp 1s ease-out 1.8s both;
}

.benefits-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 700px;
    margin: 0 auto;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: all var(--animation-duration) ease;
}

.benefit-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.benefit-text {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
}

/* Modern Mailchimp form styling */
#mc_embed_signup {
    background: transparent !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    width: 100% !important;
    max-width: 500px !important;
    margin: 0 auto !important;
}

#mc_embed_signup .mc-field-group {
    margin-bottom: 25px;
    position: relative;
}

#mc_embed_signup label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: block;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

#mc_embed_signup input[type="email"],
#mc_embed_signup input[type="text"],
#mc_embed_signup input[type="tel"] {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--animation-duration) ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

#mc_embed_signup input[type="email"]:focus,
#mc_embed_signup input[type="text"]:focus,
#mc_embed_signup input[type="tel"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(73, 70, 234, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    background: white;
}

/* Responsive iframe wrapper for Zoho form */
#zoho-form-wrapper {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

#zoho-form-wrapper iframe {
    width: 100%;
    border: none;
    min-height: 520px;
}

/* Zoho inline form - make layout relative/responsive (no fixed widths) */
.form-wrapper {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 18px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(16,24,40,0.06);
}

.form-wrapper .wf_customMessageBox {
    position: absolute; /* will be positioned within .form-wrapper */
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 40;
}

.zcwf_form {
    width: 100%;
    display: block;
}

.zcwf_row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 12px 0;
    flex-wrap: wrap;
}

.zcwf_col_lab {
    flex: 0 0 28%;
    min-width: 110px;
    font-size: 0.95rem;
    color: var(--text-primary);
    align-self: center;
}

.zcwf_col_fld {
    flex: 1 1 60%;
    min-width: 160px;
}

.zcwf_col_fld input[type="text"],
.zcwf_col_fld input[ftype="email"],
.zcwf_col_fld textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}

.formsubmit.zcwf_button {
    background: var(--header-gradient);
    color: #fff !important;
    border: none;
    padding: 12px 20px !important;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    width: auto;
    box-shadow: var(--shadow-soft);
}

/* make labels stack on narrow viewports */
@media (max-width: 600px) {
    .zcwf_row { flex-direction: column; }
    .zcwf_col_lab { flex: 0 0 auto; min-width: 0; }
    .zcwf_col_fld { flex: 1 1 auto; }
    .form-wrapper { padding: 12px; }
    .form-wrapper .wf_customMessageBox { top: 8px; }
}

@media (min-width: 980px) {
    /* ensure form sits nicely in right column */
    .form-wrapper { max-width: 420px; }
}

    /* Inline splash message (shown after submit) */
    .wf_customMessageBox {
        display: none; /* toggled via inline style */
        align-items: center;
        gap: 10px;
        margin-top: 12px;
        padding: 10px 12px;
        background: #F5FAF5;
        border: 1px solid #A9D3AB;
        border-radius: 8px;
        color: #132C14;
        box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    }
    .wf_customMessageBox .wf_customCircle { width: 18px; height: 18px; background: #12AA67; border-radius: 50%; display:inline-block; position:relative }
    .wf_customMessageBox .wf_customCheckMark { position:absolute; left:6px; top:6px; width:3px; height:8px; border-right:2px solid #fff; border-bottom:2px solid #fff; transform:rotate(45deg); }

    /* Reset button / secondary action styles */
    .zcwf_button[type="reset"], .zcwf_button[role="button"][value="Reset"] {
        background: transparent;
        color: var(--text-primary);
        border: 1px solid rgba(16,24,40,0.06);
        padding: 10px 16px;
        border-radius: 10px;
        margin-left: 10px;
        cursor: pointer;
        font-weight: 600;
        transition: all var(--animation-duration) ease;
    }

    .zcwf_button[type="reset"]:hover, .zcwf_button[role="button"][value="Reset"]:hover {
        background: rgba(16,24,40,0.03);
        transform: translateY(-1px);
    }

    .zcwf_button[type="reset"]:focus {
        outline: 3px solid rgba(73,70,234,0.12);
    }

@media (min-width: 980px) {
    /* on desktop, iframe should fill right column */
    #zoho-form-wrapper { max-width: 420px; margin: 0; }
    #zoho-form-wrapper iframe { min-height: 640px; }
}

#mc_embed_signup .button {
    background: var(--header-gradient) !important;
    border: none !important;
    padding: 18px 50px !important;
    border-radius: 12px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: white !important;
    cursor: pointer !important;
    transition: all var(--animation-duration) ease !important;
    width: 100% !important;
    max-width: 280px !important;
    margin: 20px auto !important;
    display: block !important;
    box-shadow: var(--shadow-soft) !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    font-size: 0.95rem !important;
    height: auto !important;
}

#mc_embed_signup .button:hover {
    transform: translateY(-3px) !important;
    box-shadow: var(--shadow-hover) !important;
    filter: brightness(1.05) !important;
}

#mc_embed_signup .button:active {
    transform: translateY(-1px) !important;
}

.indicates-required {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 25px;
    text-align: center !important;
}

.asterisk {
    color: var(--color-secondary);
    font-weight: 600;
}

.footer {
    text-align: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, var(--bg-light) 0%, rgba(255, 255, 255, 0.9) 100%);
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer p {
    opacity: 0.8;
    transition: opacity var(--animation-duration) ease;
    margin-bottom: 10px;
}

.footer:hover p {
    opacity: 1;
}

.footer-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--animation-duration) ease;
}

.footer-link:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

/* Modern responsive design */
@media (max-width: 768px) {
    .container {
        width: 95%;
        border-radius: 20px;
    }

    .header {
        padding: 40px 20px 26px;
    }

    .logo {
        max-height: 80px;
    }

    .tagline {
        font-size: 1rem;
    }

    .content {
        padding: 20px 18px;
    }

    .welcome h2 {
        font-size: 1.7rem;
        line-height: 1.25;
    }

    .welcome p {
        font-size: 1rem;
    }

    .countdown-container {
        padding: 18px 12px;
        margin: 20px 0;
    }

    .countdown {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .countdown-item {
        padding: 24px 16px;
    }

    .countdown-number {
        font-size: 2rem;
    }

    .countdown-label {
        font-size: 0.8rem;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .form-subtitle {
        font-size: 1rem;
    }

    #mc_embed_signup {
        max-width: 100% !important;
        padding: 0 10px !important;
    }

    #mc_embed_signup input[type="email"],
    #mc_embed_signup input[type="text"],
    #mc_embed_signup input[type="tel"] {
        padding: 12px 12px;
    }

    #mc_embed_signup .button {
        padding: 12px 28px !important;
        max-width: 100% !important;
    }

    .benefits-section {
        margin-top: 40px;
        padding: 30px 20px;
    }

    .benefits-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .benefit-item {
        padding: 12px 16px;
    }

    .benefit-text {
        font-size: 0.95rem;
    }

    .footer {
        padding: 30px 25px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 40px 20px 30px;
    }

    .content {
        padding: 30px 20px;
    }

    .welcome h2 {
        font-size: 1.5rem;
    }

    .countdown {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .countdown-item {
        padding: 20px 12px;
    }

    .countdown-number {
        font-size: 1.8rem;
    }

    .countdown-container {
        padding: 25px 15px;
    }
}

/* Make the form the primary visible area - prioritize form visibility on all common viewports */
@media (max-height: 900px) {
    .header {
        padding: 15px 15px 8px;
    }
    .logo {
        max-height: 50px;
        margin-bottom: 8px;
    }
    .tagline {
        font-size: 1rem;
        margin-top: 5px;
    }
    .welcome {
        margin-bottom: 8px;
    }
    .welcome h2 {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }
    .welcome p {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }
    .countdown-container {
        margin: 8px 0;
        padding: 12px 8px;
    }
    .countdown-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    .countdown-item {
        padding: 12px 8px;
    }
    .countdown-number {
        font-size: 1.8rem;
    }
    .form-section {
        margin-top: 8px;
    }
    .form-title {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }
    .form-subtitle {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }
    .benefits-section {
        margin-top: 8px;
        padding: 12px 8px;
    }
    .content {
        padding: 15px 15px;
    }
    .footer {
        padding: 12px 15px;
    }
}

/* Ultra compact for shorter screens - ensure form is visible immediately */
@media (max-height: 750px) {
    .welcome,
    .countdown-container,
    .benefits-section {
        display: none !important;
    }
    .header {
        padding: 12px 12px 6px;
    }
    .form-section {
        margin-top: 4px !important;
    }
    .content {
        padding: 8px 12px !important;
    }
}

/* Also prioritize form on typical narrow screens (phones) */
@media (max-width: 420px) {
    .header { padding: 12px 8px 6px; }
    .logo { max-height: 45px; }
    .form-subtitle { margin-bottom: 8px; }
    .tagline { font-size: 0.9rem; }
}

/* Enhanced animations and micro-interactions */
@media (prefers-reduced-motion: no-preference) {
    .countdown-item {
        animation: bounceIn 0.6s ease-out;
        animation-delay: calc(var(--item-index, 0) * 0.1s);
    }

    .countdown-item:nth-child(1) { --item-index: 1; }
    .countdown-item:nth-child(2) { --item-index: 2; }
    .countdown-item:nth-child(3) { --item-index: 3; }
    .countdown-item:nth-child(4) { --item-index: 4; }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(30px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) translateY(-10px);
    }
    70% {
        transform: scale(0.9) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
