/* ==========================================================================
   Invertor Landing Page — style.css
   ========================================================================== */

/* Reset & Base
   ========================================================================== */

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

:root {
    --bg: #f5f1f8;
    --bg-fade-from: #ffffff;
    --bg-fade-to: rgba(255, 255, 255, 0);
    --text: #1a1a1a;
    --muted: #4a4a4a;
    --meta: #9a9a9a;
    --footer: #999999;
    --btn-bg: #1a1a1a;
    --btn-bg-hover: #333333;
    --btn-fg: #ffffff;
    --apple-icon-filter: invert(1);
    --logo-filter: none;
    --toggle-bg: #ffffff;
    --toggle-bg-hover: rgba(0, 0, 0, 0.05);
    --toggle-border: rgba(0, 0, 0, 0.02);
    --toggle-icon-filter: none;
}

html[data-theme="dark"] {
    --bg: #0d0e10;
    --bg-fade-from: rgba(255, 255, 255, 0.06);
    --bg-fade-to: rgba(255, 255, 255, 0);
    --text: rgba(255, 255, 255, 0.92);
    --muted: rgba(255, 255, 255, 0.72);
    --meta: rgba(255, 255, 255, 0.5);
    --footer: rgba(255, 255, 255, 0.42);
    --btn-bg: #ffffff;
    --btn-bg-hover: rgba(255, 255, 255, 0.9);
    --btn-fg: #0d0e10;
    --apple-icon-filter: invert(0);
    --logo-filter: invert(1);
    --toggle-bg: rgba(255, 255, 255, 0.08);
    --toggle-bg-hover: rgba(255, 255, 255, 0.2);
    --toggle-border: rgba(255, 255, 255, 0.12);
    --toggle-icon-filter: invert(1);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    /* Bottom white fade as part of the background (30% viewport) */
    background-image: linear-gradient(to top, var(--bg-fade-from) 0%, var(--bg-fade-to) 100%);
    background-repeat: no-repeat;
    background-position: bottom;
    background-size: 100% 30vh;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

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

/* Header
   ========================================================================== */

.site-header {
    position: relative;
    z-index: 10;
    padding: 24px 40px;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.7;
}

.logo-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    filter: var(--logo-filter);
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Download Buttons
   ========================================================================== */

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--btn-bg);
    color: var(--btn-fg);
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-download:hover {
    background-color: var(--btn-bg-hover);
}

.btn-download:active {
    transform: scale(0.97);
}

.btn-download--small {
    font-size: 14px;
    padding: 10px 22px;
    border-radius: 50px;
}

.btn-download--large {
    font-size: 16px;
    padding: 14px 32px;
    border-radius: 50px;
}

.apple-icon {
    flex-shrink: 0;
    position: relative;
    top: -2px;
    display: block;
    height: auto;
    /* SVG is black; invert it for dark button */
    filter: var(--apple-icon-filter);
}

.header-actions {
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--toggle-bg);
    border: 1px solid var(--toggle-border);
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
    background-color: var(--toggle-bg-hover);
}

.theme-toggle:active {
    transform: translateY(0) scale(0.98);
}

.theme-toggle__icon {
    width: 18px;
    height: 18px;
    display: block;
    filter: var(--toggle-icon-filter);
}

.apple-icon--small {
    width: 14px;
}

.apple-icon--large {
    width: 16px;
}

/* Hero
   ========================================================================== */

.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px 80px;
}

.hero-inner {
    max-width: 700px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-icon {
    margin-bottom: 40px;
}

.hero-icon img {
    width: 200px;
    height: 200px;
    border-radius: 40px;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.1));
}

.hero-headline {
    font-size: 62px;
    font-weight: 800;
    font-style: normal;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 32px;
}

.hero-subtitle {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--muted);
    max-width: 480px;
    margin-bottom: 40px;
}

.hero-meta {
    margin-top: 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--meta);
    letter-spacing: -0.01em;
}

/* Intro Animation (Home)
   ========================================================================== */

@keyframes introHeroIcon {
    0% {
        opacity: 0;
        transform: translateY(64px) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translateY(64px) scale(1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@keyframes introSlideDownFadeIn {
    0% {
        opacity: 0;
        transform: translate3d(0, -14px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes introSlideUpFadeIn {
    0% {
        opacity: 0;
        transform: translate3d(0, 14px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes introCta {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.page-home .hero-icon,
.page-home .hero-headline,
.page-home .hero-subtitle,
.page-home .hero-cta,
.page-home .hero-meta {
    opacity: 0;
    will-change: transform, opacity;
}

.page-home .hero-icon {
    animation: introHeroIcon 1100ms cubic-bezier(0.22, 1, 0.36, 1) 60ms both;
}

.page-home .hero-headline {
    animation: introFadeUp 450ms cubic-bezier(0.22, 1, 0.36, 1) 640ms both;
}

.page-home .hero-subtitle {
    animation: introFadeUp 450ms cubic-bezier(0.22, 1, 0.36, 1) 780ms both;
}

.page-home .hero-cta {
    animation: introCta 420ms cubic-bezier(0.22, 1, 0.36, 1) 980ms both;
}

.page-home .hero-meta {
    animation: introSlideUpFadeIn 600ms cubic-bezier(0.42, 0, 1, 1) 1500ms forwards;
}

.page-home .site-header,
.page-home .site-footer {
    opacity: 0;
    will-change: transform, opacity;
}

.page-home .site-header {
    animation: introSlideDownFadeIn 600ms cubic-bezier(0.42, 0, 1, 1) 1500ms forwards;
}

.page-home .site-footer {
    animation: introSlideUpFadeIn 600ms cubic-bezier(0.42, 0, 1, 1) 1500ms forwards;
}

@media (prefers-reduced-motion: reduce) {
    .page-home .hero-icon,
    .page-home .hero-headline,
    .page-home .hero-subtitle,
    .page-home .hero-cta,
    .page-home .hero-meta,
    .page-home .site-header,
    .page-home .site-footer {
        opacity: 1;
        animation: none !important;
        transform: none !important;
    }
}

/* Footer
   ========================================================================== */

.site-footer {
    padding: 24px 40px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-copyright {
    font-size: 14px;
    font-weight: 500;
    color: var(--footer);
}

.footer-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--footer);
    transition: color 0.2s ease;
}

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

/* Privacy Policy Page
   ========================================================================== */

.privacy-content {
    flex: 1;
    padding: 60px 24px 80px;
}

.privacy-inner {
    max-width: 640px;
    margin: 0 auto;
}

.privacy-inner h1 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 8px;
}

.privacy-inner h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-top: 32px;
    margin-bottom: 12px;
}

.privacy-inner p {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.7;
    color: var(--muted);
    margin-bottom: 16px;
}

.privacy-inner p.privacy-updated {
    font-size: 15px;
    color: var(--footer);
    margin-bottom: 20px;
}

.privacy-inner a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.privacy-inner a:hover {
    opacity: 0.75;
}

/* Responsive
   ========================================================================== */

@media (max-height: 940px) {
    .site-header {
        padding: 18px 28px;
    }

    .logo-text {
        font-size: 16px;
    }

    .btn-download--small {
        padding: 9px 18px;
    }

    .hero {
        padding: 44px 24px 48px;
    }

    .hero-icon {
        margin-bottom: 28px;
    }

    .hero-icon img {
        width: 160px;
        height: 160px;
        border-radius: 34px;
    }

    .hero-headline {
        font-size: 52px;
        margin-bottom: 22px;
    }

    .hero-subtitle {
        margin-bottom: 28px;
    }

    .hero-meta {
        margin-top: 12px;
    }

    .site-footer {
        padding: 18px 28px;
    }
}

@media (max-height: 720px) {
    .site-header {
        padding: 16px 24px;
    }

    .hero {
        padding: 34px 24px 38px;
    }

    .hero-icon {
        margin-bottom: 22px;
    }

    .hero-icon img {
        width: 130px;
        height: 130px;
        border-radius: 28px;
    }

    .hero-headline {
        font-size: 42px;
        margin-bottom: 18px;
    }

    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 22px;
    }

    .btn-download--large {
        padding: 12px 28px;
    }

    .site-footer {
        padding: 16px 24px;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 20px 24px;
    }

    .hero {
        padding: 40px 24px 60px;
    }

    .hero-icon img {
        width: 150px;
        height: 150px;
        border-radius: 32px;
    }

    .hero-headline {
        font-size: 38px;
        margin-bottom: 20px;
    }

    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 32px;
    }

    .btn-download--large {
        font-size: 15px;
        padding: 12px 28px;
    }

    .site-footer {
        padding: 20px 24px;
    }
}

@media (max-width: 480px) {
    .hero-headline {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 14px;
        max-width: 320px;
    }

    .hero-icon img {
        width: 120px;
        height: 120px;
        border-radius: 26px;
    }
}
