/* =========================================================
   1. GLOBAL RESET + VARIABLES
========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Roboto", sans-serif;
    transition: background-color 0.4s ease, color 0.4s ease, 
                border-color 0.4s ease, box-shadow 0.4s ease;
}

main {
    margin-top: 100px;
}

/* Light theme defaults */
:root {
    --bg: #ffffff;
    --text: #000000;
    --header-bg: rgba(255, 255, 255, 0.72);
    --panel-bg: #f5f5f7;
}

/* Dark theme overrides */
body.dark {
    --bg: #0b0b0d;
    --text: #e4e4e7;
    --header-bg: rgba(0,0,0,0.60);
    --panel-bg: #141416;
}

html, body {
    height: 100%;
}

/* Main flex layout to push footer down */
body {
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.4s ease, background-color 0.4s ease, color 0.4s ease;
}
body.loaded { opacity: 1; }

main {
    flex: 1;
}

/* =========================================================
   2. GLOBAL MEDIA + IMAGE RULES
========================================================= */
img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* =========================================================
   3. HEADER — APPLE SHRINKING NAV
========================================================= */
.site-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 999;
    backdrop-filter: saturate(180%) blur(20px);
    background: var(--header-bg);
    transition: padding 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.large {
    padding: 26px 0;
}
.site-header.small {
    padding: 8px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}

.nav-container {
    width: 90%;
    display: flex;
    margin: auto;
    justify-content: space-between;
    align-items: center;
}

.main-nav a {
    margin: 0 24px;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
}

/* Logo size */
.logo img {
    max-width: 120px;
    height: auto;
    transition: opacity 0.3s ease;
}

/* =========================================================
   4. CUPERTINO TOGGLE SWITCH
========================================================= */
.cupertino-toggle {
    width: 52px;
    height: 30px;
    background: #e5e5ea;
    border-radius: 30px;
    position: relative;
    cursor: pointer;
    transition: background 0.25s ease;
}

.cupertino-toggle .toggle-thumb {
    width: 26px;
    height: 26px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.25s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

body.dark .cupertino-toggle {
    background: #34c759;
}
body.dark .cupertino-toggle .toggle-thumb {
    transform: translateX(22px);
}

/* =========================================================
   5. HERO SECTION
========================================================= */
/* Unified hero for ALL pages, including Home */
.page-hero {
    text-align: center;
    padding: 50px 20px 60px;
    width: 90%;
    max-width: 900px;
    margin: 0 auto;
}

.page-hero h1 {
    margin-bottom: 20px;
    font-size: 2.4rem;
    font-weight: 700;
}

.page-hero p {
    margin: 0 auto;
    margin-top: 10px;
    font-size: 1.2rem;
    max-width: 700px;
    line-height: 1.5;
}

/* =========================================================
   PROMOTIONAL HERO (Home Page Only)
========================================================= */

.promo-hero {
    text-align: center;
    padding: 80px 20px 140px;  /* large dramatic spacing */
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Title style — large, bold, premium */
.promo-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
}

/* Subtitle — cleaner line height & spacing */
.promo-subtitle {
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0.85;
}

/* LIGHT MODE soft fade */
body:not(.dark) .promo-hero {
    color: #000;
}

/* DARK MODE brightness adjustment */
body.dark .promo-hero {
    color: #e4e4e7;
}

/* Subtle parallax effect */
.promo-hero {
    transform: translateY(0);
    transition: transform 0.6s ease;
}

body.scrolled .promo-hero {
    transform: translateY(-20px); /* slight upward drift */
}

/* =========================================================
   6. PANELS (Home Page)
========================================================= */
.split-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    background: var(--panel-bg);
}

.panel-text {
    width: 40%;
    padding: 20px;
}

.panel-text h2 {
    font-size: 2.4rem;
}

.panel-text p {
    margin-top: 12px;
    font-size: 1.2rem;
}

.panel-image img {
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
}

/* =========================================================
   CALL TO ACTION (Home Page)
========================================================= */

.cta {
    text-align: center;
    padding: 120px 20px;
    width: 100%;
}

.cta .container {
    max-width: 900px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 20px;
}

.cta-text {
    font-size: clamp(1.1rem, 1.7vw, 1.4rem);
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* CTA Button */
.cta-button {
    display: inline-block;
    padding: 14px 32px;
    background: #0071e3;
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    transition: background 0.25s ease;
}

.cta-button:hover {
    background: #0a66d8;
}

/* Dark mode tweaks */
body.dark .cta-text {
    opacity: 0.85;
}

/* =========================================================
   APPLE-STYLE GLOW BUTTON (UPGRADE)
========================================================= */

.cta-button {
    position: relative;
    display: inline-block;
    padding: 16px 36px;
    border-radius: 14px;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #0071e3, #0a84ff);
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.35); /* soft glow */
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

/* HOVER EFFECT */
.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 113, 227, 0.55);
    background: linear-gradient(135deg, #0a84ff, #1b9aff);
}

/* ACTIVE CLICK */
.cta-button:active {
    transform: translateY(1px);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

/* DARK MODE ENHANCEMENT */
body.dark .cta-button {
    background: linear-gradient(135deg, #1a73ff, #4da3ff);
    box-shadow: 0 8px 25px rgba(58, 139, 255, 0.45);
}

body.dark .cta-button:hover {
    background: linear-gradient(135deg, #4da3ff, #7bc0ff);
    box-shadow: 0 14px 40px rgba(58, 139, 255, 0.65);
}

/* =========================================================
   7. PAGE CONTENT
========================================================= */
.page-content,
.review-list,
.founder-grid,
.signup-form {
    width: 90%;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* =========================================================
   APPLE-STYLE JOB LISTINGS
========================================================= */

.job-list {
    width: 90%;
    max-width: 900px;
    margin: 0 auto 80px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.job-card {
    background: var(--panel-bg);
    padding: 32px;
    border-radius: 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.job-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.job-card h2 {
    font-size: 1.8rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.job-summary {
    font-size: 1.15rem;
    margin-bottom: 20px;
    opacity: 0.85;
    line-height: 1.6;
}

.job-tags {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.job-tags span {
    background: rgba(0,0,0,0.08);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.95rem;
}

body.dark .job-tags span {
    background: rgba(255,255,255,0.15);
}

.job-apply {
    display: inline-block;
    padding: 12px 26px;
    background: #0071e3;
    color: white;
    border-radius: 10px;
    font-size: 1.1rem;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.25s ease, transform 0.25s ease;
}

.job-apply:hover {
    background: #0a66d8;
    transform: translateY(-2px);
}

body.dark .job-apply {
    background: #1a73ff;
}

body.dark .job-apply:hover {
    background: #4da3ff;
}

/* =========================================================
   8. FOUNDERS PAGE
========================================================= */
.founder-grid {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
    padding-bottom: 60px;
}

.founder-card img {
    max-width: 340px;
    border-radius: 12px;
}

.founder-card h3 {
    margin-bottom: 6px;
    font-size: 1.3rem;
}

.founder-card p {
    font-size: 1rem;
    line-height: 1.5;
}

/* =========================================================
   9. REVIEWS PAGE
========================================================= */
.review-card {
    background: var(--panel-bg);
    padding: 24px;
    margin-bottom: 20px;
    border-radius: 12px;
    font-size: 1.2rem;
}

/* =========================================================
   10. JOBS PAGE FORM
========================================================= */
.signup-form {
    max-width: 550px;
    padding: 40px 20px;
}

.signup-form label {
    display: block;
    margin-top: 24px;
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.signup-form input[type="text"],
.signup-form input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 2px solid #d0d0d0;
    margin-bottom: 18px;
}

.signup-form input[type="file"] {
    margin-top: 20px;
    margin-bottom: 28px;
}

.signup-form button {
    width: 100%;
    padding: 16px 20px;
    background: #0071e3;
    color: white;
    border-radius: 12px;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}
.signup-form button:hover {
    background: #0a66d8;
}

/* =========================================================
   11. FOOTER
========================================================= */
.site-footer {
    text-align: center;
    padding: 40px 0;
    opacity: 0.7;
}

/* =========================================================
   12. ANIMATIONS
========================================================= */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   13. PAGE BACKGROUND LOGOS
========================================================= */
.page-background {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(500px, 70vw);
    opacity: 0.06;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
}

body.dark .page-background {
    opacity: 0.10;
}

body:not(.dark) .page-background {
    opacity: 0.05;
}

@media (max-width: 600px) {
    .page-background {
        width: 300px;
    }
}


/* MOBILE NAV BUTTON */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    width: 32px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--text);
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* BUTTON TURNS INTO "X" */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* MOBILE MENU PANEL
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;
    background: var(--panel);
    box-shadow: -3px 0 12px rgba(0,0,0,0.2);
    padding: 120px 20px;
    transition: right 0.35s cubic-bezier(.22,.61,.36,1);
    z-index: 9999;
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu nav a {
    display: block;
    font-size: 1.3rem;
    padding: 14px 0;
    text-decoration: none;
    color: var(--text);
} */

/* Show hamburger only on mobile */
@media (max-width: 900px) {
    .main-nav {
        display: none;
    }
    .menu-toggle {
        display: flex;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s ease, opacity 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.94);
    transition: all 0.7s ease;
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

.job-accordion {
    background: var(--panel);
    margin-bottom: 18px;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.job-header {
    width: 100%;
    padding: 20px;
    font-size: 1.2rem;
    background: none;
    border: none;
    color: var(--text);
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.job-body {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.job-accordion.open .job-body {
    max-height: 300px;
    padding: 20px;
}

.apply-btn {
    margin-top: 12px;
    padding: 12px 20px;
    background: #0071e3;
    color: white;
    border-radius: 10px;
    border: none;
    cursor: pointer;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(8px);
    z-index: 99999;
}

.modal.open {
    display: flex;
}

.modal-content {
    width: 90%;
    max-width: 480px;
    background: var(--panel);
    padding: 30px;
    border-radius: 14px;
    animation: fadeUp 0.3s ease;
}

.close-modal {
    float: right;
    cursor: pointer;
    font-size: 1.6rem;
    margin-bottom: 10px;
}

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


/* =========================================================
   JOB APPLICATION MODAL
========================================================= */

.application-modal {
    max-width: 720px;
    max-height: 85vh;
    overflow-y: auto;
}

.application-title {
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.application-subtitle {
    font-size: 0.98rem;
    margin-bottom: 18px;
    opacity: 0.85;
}

.application-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.application-section {
    padding: 14px 0;
    border-top: 1px solid rgba(0,0,0,0.06);
}

body.dark .application-section {
    border-top-color: rgba(255,255,255,0.07);
}

.application-section h3 {
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.form-row.two-col .form-field {
    flex: 1 1 220px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.application-form label {
    font-size: 0.9rem;
    font-weight: 600;
}

.application-form input,
.application-form select,
.application-form textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d0d0d0;
    font-size: 0.95rem;
    background: #fff;
}

body.dark .application-form input,
body.dark .application-form select,
body.dark .application-form textarea {
    background: #111115;
    border-color: #303038;
    color: var(--text);
}

.application-form textarea {
    resize: vertical;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px 14px;
    margin-bottom: 8px;
}

.skills-grid label {
    font-size: 0.9rem;
    font-weight: 500;
}

.help-text {
    font-size: 0.9rem;
    margin-bottom: 8px;
    opacity: 0.85;
}

.application-actions {
    margin-top: 6px;
}

.application-submit {
    width: 100%;
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    background: #0071e3;
    color: #fff;
    transition: background 0.25s ease, transform 0.25s ease,
                box-shadow 0.25s ease;
}

.application-submit:hover {
    background: #0a66d8;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

body.dark .application-submit {
    background: #1a73ff;
}

body.dark .application-submit:hover {
    background: #4da3ff;
}

.application-footnote {
    margin-top: 10px;
    font-size: 0.78rem;
    opacity: 0.75;
}

/* Mobile tweaks */
@media (max-width: 600px) {
    .application-modal {
        max-width: 95vw;
        padding: 22px 18px;
    }
}


/* Mobile menu wrapper */
.mobile-nav {
    position: fixed;
    top: 70px; /* always right under header */
    left: 0;
    width: 100%;
    background: var(--bg);
    padding: 30px 0;
    display: none;
    flex-direction: column;
    gap: 20px;
    z-index: 9000; /* above everything except modals */
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.mobile-nav.open {
    display: flex;
}

/* Ensure hero content sits below header */
header {
    position: relative;
    z-index: 1000;
}

main {
    margin-top: 80px; /* adjust as needed */
}

/* Hide desktop nav on mobile */
@media (max-width: 900px) {
    .main-nav {
        display: none;
    }
}

/* Reduce extra space between last job card and subscription form */
.job-list {
    margin-bottom: 20px !important;
    padding-bottom: 0 !important;
}

/* Tighten the last job card only on jobs page */
.job-list .job-card:last-of-type {
    margin-bottom: 20px !important;
}

/* Pull the subscription form upward just slightly */
.job-signup {
    margin-top: 10px !important;
}

/* ================================
   JOB PAGE SPACING FIX
   (Closes the gap below last job card)
   ================================ */

/* Reduce space under the entire job list */
.job-list {
    margin-bottom: 80px !important;
    padding-bottom: 0 !important;
}

/* Reduce spacing under the last card only */
.job-list .job-card:last-of-type {
    margin-bottom: 20px !important;
}

/* Pull the sign-up form upward */
.job-signup {
    margin-top: 10px !important;
}

.job-intro {
    text-align: center;
    margin-bottom: 10px; /* reduces the gap between text and form */
}

.job-intro-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.job-intro-text {
    font-size: 1.1rem;
    line-height: 1.5;
    opacity: 0.85;
}

  input {
    font-size: 16px; /* prevents iOS auto-zoom */
    -webkit-text-size-adjust: 100%; /* keeps consistent scaling */
  }

  /* =========================================================
   13. TYPEWRITER TEXT
   - Used with JS in main.js on elements with .typewriter
========================================================= */
.typewriter {
    position: relative;
}

/* Blinking caret */
.typewriter::after {
    content: "";
    position: absolute;
    width: 2px;
    top: 0;
    bottom: 0;
    margin-left: 2px;
    background: currentColor;
    animation: caretBlink 0.9s steps(1) infinite;
}

@keyframes caretBlink {
    0%, 50% { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

/* Hide caret once typing is finished */
.typewriter.typing-complete::after {
    opacity: 0;
    animation: none;
}

/* =========================================================
   APPLICATION MODAL
========================================================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.60);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal-overlay.open {
    display: flex;
}

.app-modal {
    background: var(--bg);
    color: var(--text);
    border-radius: 20px;
    max-width: 720px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px 28px 24px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    position: relative;
}

/* Close button */
.close-modal {
    position: absolute;
    top: 14px;
    right: 18px;
    border: none;
    background: transparent;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text);
}

.app-modal-title {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.app-modal-subtitle {
    font-size: 0.98rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

/* Sections */
.app-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.app-section h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.form-field label {
    font-size: 0.9rem;
    opacity: 0.85;
}

.form-field input,
.form-field select,
.form-field textarea {
    border-radius: 10px;
    border: 1px solid rgba(130, 130, 140, 0.5);
    padding: 10px 12px;
    font-size: 0.95rem;
    background: var(--panel-bg, #f5f5f7);
    color: var(--text);
}

.form-field textarea {
    resize: vertical;
}

/* Actions */
.app-actions {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-actions .cta-button {
    width: 100%;
    text-align: center;
}

.app-small-print {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .app-modal {
        padding: 24px 18px 18px;
    }

    .app-grid {
        grid-template-columns: 1fr;
    }
}