:root {
    --blue: #007aff;
    --white: #ffffff;
    --gray-100: #f5f7fb;
    --gray-200: #e2e8f0;
    --gray-600: #5f6c86;
    --gray-900: #101623;
    font-size: 16px;
}

/* Dark mode support for macOS and iOS */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1c1c1e;
        --gray-100: #2c2c2e;
        --gray-200: #3a3a3c;
        --gray-600: #98989d;
        --gray-900: #f5f5f7;
    }

    body {
        background-color: var(--white);
        color: var(--gray-900);
    }

    .site-header {
        background: rgba(28, 28, 30, 0.9);
        border-bottom-color: var(--gray-200);
    }

    .device-card,
    .benefit-card,
    .preview-grid figure {
        background: var(--gray-100);
        border-color: var(--gray-200);
    }

    .about {
        background: var(--gray-100);
    }

    .footer-bottom {
        border-top-color: rgba(255, 255, 255, 0.1);
    }

    .social-icon {
        background: var(--gray-100);
        border-color: var(--gray-200);
    }

    .site-footer {
        background: linear-gradient(180deg, #0a0e1a 0%, #05070d 100%);
    }
}

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

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--white);
    color: var(--gray-900);
    line-height: 1.6;
    scroll-behavior: smooth;
    /* Apple-specific optimizations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 5vw;
    padding-top: calc(1.5rem + env(safe-area-inset-top, 0px));
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--gray-200);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-img {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0, 122, 255, 0.25);
}

.brand-name {
    font-weight: 600;
    margin: 0;
}

.brand-tagline {
    margin: 0;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-weight: 500;
}

.main-nav a {
    color: var(--gray-900);
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav .active {
    color: var(--blue);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--gray-900);
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.btn {
    padding: 0.65rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--blue);
    color: var(--white);
    box-shadow: 0 15px 30px rgba(0, 122, 255, 0.35);
}

.btn-outline {
    border: 1px solid var(--gray-200);
    color: var(--gray-900);
    background: transparent;
}

.btn-ghost {
    border: 1px solid transparent;
    color: var(--blue);
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 5rem 5vw 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 6vw, 3.8rem);
    line-height: 1.1;
    margin: 0.5rem 0 1rem;
}

.hero-subtext {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--blue);
}

.countdown {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.countdown div {
    background: var(--gray-100);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    text-align: center;
    min-width: 70px;
}

.countdown span {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
}

.countdown small {
    font-size: 0.8rem;
    color: var(--gray-600);
    text-transform: uppercase;
}

.hero-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.device-card {
    margin: 0;
    border-radius: 24px;
    border: 1px solid rgba(0, 122, 255, 0.2);
    background: var(--white);
    box-shadow: 0 25px 40px rgba(3, 8, 20, 0.12);
    position: relative;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.device-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 520px;
}

.device-card figcaption {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
    padding: 0.6rem 0.9rem;
    border-radius: 14px;
    background: rgba(0, 122, 255, 0.08);
    color: var(--gray-900);
    font-weight: 600;
    font-size: 0.95rem;
}

.about {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    padding: 4rem 5vw;
    background: var(--gray-100);
    border-radius: 32px;
    margin: 2rem 5vw;
}

.about h2 {
    margin: 0.5rem 0 1rem;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.app-preview {
    padding: 4rem 5vw 5rem;
}

.benefits {
    padding: 4rem 5vw;
}

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.benefit-card {
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid var(--gray-200);
    background: var(--white);
    box-shadow: 0 20px 40px rgba(16, 22, 35, 0.08);
}

.benefit-card h3 {
    margin-top: 0;
}

.benefit-card ul {
    padding-left: 1.2rem;
    margin-bottom: 0;
}

.section-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.preview-grid figure {
    margin: 0;
    border-radius: 24px;
    position: relative;
    background: var(--white);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    padding: 1.25rem;
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.preview-grid img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 420px;
    transition: transform 0.4s ease;
}

.preview-grid figure:hover img {
    transform: translateY(-4px);
}

.preview-grid figure:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 45px rgba(3, 8, 20, 0.15);
}

.preview-grid figcaption {
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: rgba(0, 122, 255, 0.12);
    color: var(--blue);
    font-size: 0.85rem;
}

.site-footer {
    padding: 4rem 5vw 2.5rem;
    margin-top: 5rem;
    background: linear-gradient(180deg, var(--gray-900) 0%, #0a0e1a 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 122, 255, 0.5), transparent);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2.5rem;
    align-items: flex-start;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 380px;
}

.footer-brand .logo-img {
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.3);
}

.footer-brand p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.footer-cta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-heading {
    font-weight: 700;
    margin: 0 0 1.25rem;
    color: var(--white);
    font-size: 1rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.footer-columns a {
    display: block;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
    font-size: 0.95rem;
}

.footer-columns a:hover {
    color: var(--blue);
    transform: translateX(4px);
}

.footer-connect {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
    font-size: 0.95rem;
    padding: 0.5rem 0;
}

.footer-link span {
    display: inline-block;
}

.footer-link:hover {
    color: var(--blue);
    transform: translateX(4px);
}

.footer-link .contact-icon {
    transition: transform 0.2s ease;
}

.footer-link:hover .contact-icon {
    transform: scale(1.1);
}

.contact-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.contact-icon path {
    fill: currentColor;
}

.gmail-icon {
    color: #ea4335;
}

.instagram-icon {
    color: #e1306c;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    font-size: 0.9rem;
}

.social-icons {
    display: flex;
    gap: 0.75rem;
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-4px) scale(1.05);
    border-color: var(--blue);
    background: rgba(0, 122, 255, 0.1);
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.3);
}

.social-icon .contact-icon {
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.social-icon:hover .contact-icon {
    opacity: 1;
    transform: scale(1.1);
}

.social-icon .gmail-icon {
    filter: brightness(0) saturate(100%) invert(27%) sepia(95%) saturate(1352%) hue-rotate(346deg) brightness(98%) contrast(92%);
}

.social-icon .instagram-icon {
    filter: brightness(0) saturate(100%) invert(25%) sepia(98%) saturate(7151%) hue-rotate(320deg) brightness(95%) contrast(92%);
}

.social-icon .contact-icon path {
    fill: currentColor;
}

main {
    padding-bottom: 3rem;
}

.about-page,
.contact-page,
.signup-page,
.faq-page {
    padding: 4rem 5vw 5rem;
}

.about-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.about-summary article {
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    padding: 2rem;
    background: var(--gray-100);
}

.split-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.panel {
    border-radius: 24px;
    padding: 2rem;
    color: var(--white);
    background: var(--gray-900);
}

.panel.coach {
    background: var(--blue);
}

.panel ul {
    padding-left: 1.2rem;
}

.how-it-works {
    margin-top: 4rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.steps article {
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 1.5rem;
}

.step-number {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(0, 122, 255, 0.15);
    color: var(--blue);
    display: grid;
    place-items: center;
    font-weight: 700;
    margin-bottom: 1rem;
}

.founder {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    align-items: center;
}

.founder-photo {
    width: 100%;
    height: 320px;
    border-radius: 28px;
    background: url('images/App-Photo-5.png') center/cover no-repeat;
}

.contact-links {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-weight: 600;
    transition: transform 0.2s ease, border 0.2s ease;
}

.contact-card span {
    font-size: 2rem;
}

.contact-card:hover {
    transform: translateY(-4px);
    border-color: var(--blue);
}

.signup-page section {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.btn-large {
    padding: 0.85rem 2.5rem;
    font-size: 1.125rem;
}

.incentive {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--gray-600);
}

/* Social Proof Section */
.social-proof {
    padding: 4rem 5vw;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.05), rgba(0, 122, 255, 0.02));
    border-radius: 32px;
    margin: 2rem 5vw;
}

.social-proof .subtext {
    color: var(--gray-600);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.proof-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.stat-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--gray-200);
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 122, 255, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--blue);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Early Access Section */
.early-access {
    padding: 5rem 5vw;
    background: linear-gradient(135deg, var(--blue), rgba(0, 122, 255, 0.8));
    color: var(--white);
    margin: 4rem 0;
    border-radius: 32px;
}

.early-access-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.early-access .eyebrow {
    color: rgba(255, 255, 255, 0.9);
}

.early-access h2 {
    color: var(--white);
    margin: 0.5rem 0 2rem;
}

.perks-list {
    list-style: none;
    padding: 0;
    text-align: left;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.perks-list li {
    padding: 0.8rem 0;
    font-size: 1.1rem;
    color: var(--white);
    font-weight: 500;
}

.urgency-text {
    margin-top: 1.5rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
}

.urgency-text strong {
    color: #ffd700;
    font-weight: 700;
}

/* Enhanced Signup Page */
.signup-subtitle {
    font-size: 1.2rem;
    color: var(--gray-600);
    margin: 1rem 0 2rem;
}

.signup-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.benefit-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: 16px;
    border: 1px solid var(--gray-200);
    transition: transform 0.2s ease, border 0.2s ease;
}

.benefit-item:hover {
    transform: translateY(-2px);
    border-color: var(--blue);
}

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

.benefit-item h3 {
    margin: 0 0 0.3rem;
    font-size: 1.1rem;
    color: var(--gray-900);
}

.benefit-item p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--gray-600);
}

.signup-cta {
    text-align: center;
    margin: 3rem 0;
}

.urgency-badge {
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--gray-600);
    font-weight: 600;
}

.trust-text {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.social-share-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--gray-200);
    text-align: center;
}

.social-share-section p {
    margin-bottom: 1.5rem;
    color: var(--gray-600);
    font-weight: 600;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.share-twitter {
    background: #1DA1F2;
    color: var(--white);
}

.share-twitter:hover {
    background: #1a8cd8;
    transform: translateY(-2px);
}

.share-facebook {
    background: #1877F2;
    color: var(--white);
}

.share-facebook:hover {
    background: #166fe5;
    transform: translateY(-2px);
}

/* FAQ Page */
.faq-page {
    padding: 4rem 5vw 5rem;
    max-width: 800px;
    margin: 0 auto;
}

.faq-container {
    margin: 3rem 0;
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    overflow: hidden;
    background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
    border-color: var(--blue);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.1);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-family: inherit;
}

.faq-question:hover {
    color: var(--blue);
}

.faq-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--blue);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    margin: 0;
    color: var(--gray-600);
    line-height: 1.7;
}

.faq-cta {
    margin-top: 4rem;
    padding: 3rem;
    background: var(--gray-100);
    border-radius: 24px;
    text-align: center;
}

.faq-cta h2 {
    margin: 0 0 0.5rem;
}

.faq-cta p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.faq-cta .btn {
    margin: 0 0.5rem;
}

/* Share icon in footer */
.share-twitter .contact-icon path {
    fill: currentColor;
}

/* Apple-specific touch optimizations */
@media (hover: none) and (pointer: coarse) {

    .btn,
    .main-nav a,
    .contact-card,
    .social-icon {
        -webkit-tap-highlight-color: rgba(0, 122, 255, 0.1);
        touch-action: manipulation;
    }
}

/* Improved scrolling for iOS */
@supports (-webkit-overflow-scrolling: touch) {
    body {
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 768px) {
    .site-header {
        flex-wrap: wrap;
        position: relative;
        padding-left: calc(5vw + env(safe-area-inset-left, 0px));
        padding-right: calc(5vw + env(safe-area-inset-right, 0px));
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--gray-200);
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav a {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--gray-200);
    }

    .main-nav a:last-child {
        border-bottom: none;
    }

    .main-nav .btn {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .countdown {
        flex-wrap: wrap;
    }

    .footer-columns {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .site-footer {
        padding: 3rem 5vw 2rem;
    }

    .footer-content {
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    /* Ensure content respects safe areas on mobile */
    main {
        padding-left: env(safe-area-inset-left, 0px);
        padding-right: env(safe-area-inset-right, 0px);
    }

    .hero,
    .about,
    .benefits,
    .app-preview {
        padding-left: calc(5vw + env(safe-area-inset-left, 0px));
        padding-right: calc(5vw + env(safe-area-inset-right, 0px));
    }
}