/* =========================================================================
   Gathered — landing page
   Palette: white / light grey / dark grey / black + #EA4D3D orange accent
   ========================================================================= */

:root {
    --white: #ffffff;
    --grey-50: #fafafa;
    --grey-100: #f5f5f7;
    --grey-200: #ececef;
    --grey-300: #d2d2d7;
    --grey-500: #86868b;
    --grey-700: #3f3f46;
    --grey-900: #1d1d1f;
    --black: #000000;

    --accent: #EA4D3D;
    --accent-hover: #d13f30;
    --accent-soft: rgba(234, 77, 61, 0.10);
    --accent-softer: rgba(234, 77, 61, 0.04);

    --text: var(--grey-900);
    --text-muted: var(--grey-500);
    --text-strong: var(--black);

    --bg: var(--white);
    --bg-alt: var(--grey-100);
    --border: var(--grey-200);
    --border-strong: var(--grey-300);

    --radius-sm: 10px;
    --radius: 18px;
    --radius-lg: 28px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
    --shadow: 0 2px 6px rgba(0,0,0,0.04), 0 20px 40px -12px rgba(0,0,0,0.12);
    --shadow-lg: 0 30px 80px -20px rgba(0,0,0,0.25), 0 2px 6px rgba(0,0,0,0.06);

    --container: 1160px;
    --section-pad: clamp(64px, 10vw, 140px);

    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
}

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
blockquote { margin: 0; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus {
    position: fixed;
    left: 16px;
    top: 16px;
    width: auto;
    height: auto;
    padding: 10px 16px;
    background: var(--black);
    color: var(--white);
    border-radius: var(--radius-sm);
    z-index: 1000;
}

/* --- Typography helpers --------------------------------------------------- */
.eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 18px;
}

.section-title {
    font-size: clamp(32px, 4.4vw, 52px);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-strong);
    max-width: 22ch;
}

.section-sub {
    font-size: clamp(17px, 1.4vw, 19px);
    color: var(--text-muted);
    margin-top: 16px;
    max-width: 60ch;
}

.accent-text {
    background: linear-gradient(135deg, var(--accent), #ff7a55);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* --- Header / Nav --------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.88);
    border-bottom-color: var(--border);
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: var(--container);
    margin: 0 auto;
    padding: 14px 24px;
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 17px;
    color: var(--text-strong);
    letter-spacing: -0.01em;
}
.nav-brand img { border-radius: 8px; }

.nav-links {
    display: flex;
    gap: 28px;
    margin-left: auto;
}
.nav-links a {
    font-size: 15px;
    color: var(--grey-700);
    transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--accent); }

.nav-cta {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1.5px solid var(--accent);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.15s ease, transform 0.15s ease;
}
.nav-cta:hover {
    background: rgba(234, 77, 61, 0.18);
    transform: translateY(-1px);
}

@media (max-width: 720px) {
    .nav-links { display: none; }
}

/* --- Hero ----------------------------------------------------------------- */
.hero {
    position: relative;
    padding: clamp(72px, 11vw, 140px) 0 clamp(40px, 7vw, 80px);
    overflow: hidden;
    background: var(--bg);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
    opacity: 0.7;
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    left: 50%;
    top: -200px;
    width: 900px;
    height: 900px;
    transform: translateX(-50%);
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 860px;
}

.hero-title {
    font-size: clamp(44px, 7vw, 84px);
    line-height: 1.02;
    font-weight: 700;
    letter-spacing: -0.035em;
    color: var(--text-strong);
    margin-top: 4px;
}

.hero-sub {
    margin: 24px auto 0;
    max-width: 56ch;
    font-size: clamp(17px, 1.5vw, 20px);
    color: var(--grey-700);
}

.hero-ctas {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 16px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.hero-platforms {
    margin-top: 22px;
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* Hero device */
.hero-device-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    margin-top: clamp(48px, 7vw, 88px);
    padding: 0 24px;
}

.hero-device {
    transform: translateZ(0);
    animation: float 6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .hero-device { animation: none; }
    html { scroll-behavior: auto; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* --- Buttons -------------------------------------------------------------- */
.btn-appstore {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px 12px 18px;
    background: var(--black);
    color: var(--white);
    border-radius: 14px;
    font-weight: 500;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.15s ease;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.3);
}
.btn-appstore:hover {
    transform: translateY(-2px);
    background: var(--grey-900);
    box-shadow: 0 18px 40px -12px rgba(0,0,0,0.35);
}

.btn-appstore svg { flex-shrink: 0; }
.btn-appstore-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-align: left;
}
.btn-appstore-top {
    font-size: 11px;
    letter-spacing: 0.02em;
    opacity: 0.85;
}
.btn-appstore-bottom {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.btn-appstore-lg {
    padding: 16px 28px 16px 22px;
}
.btn-appstore-lg .btn-appstore-bottom { font-size: 22px; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 12px 18px;
    color: var(--text-strong);
    font-weight: 500;
    font-size: 15px;
    border-radius: 14px;
    border: 1px solid var(--border-strong);
    background: var(--white);
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn-ghost:hover {
    background: var(--grey-100);
    border-color: var(--grey-500);
    transform: translateY(-2px);
}

/* --- Features ------------------------------------------------------------- */
.features {
    padding: var(--section-pad) 0;
    background: var(--bg-alt);
}

.features .section-title {
    margin-bottom: 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 56px;
}

.feature-card {
    padding: 32px 28px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 12px;
}
.feature-icon svg { width: 24px; height: 24px; }

.feature-card h3 {
    font-size: 19px;
    font-weight: 600;
    color: var(--text-strong);
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--grey-700);
    font-size: 15.5px;
    line-height: 1.6;
}

/* --- Devices section ------------------------------------------------------ */
.devices {
    padding: var(--section-pad) 0;
    background: var(--bg);
    text-align: center;
}

.devices .eyebrow,
.devices .section-title,
.devices .section-sub {
    margin-left: auto;
    margin-right: auto;
}

.devices .section-title { text-align: center; }

.device-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(16px, 3vw, 40px);
    margin-top: 72px;
    flex-wrap: wrap;
}

.device-figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.device-figure figcaption {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* --- Device frames -------------------------------------------------------- */
.device { position: relative; }

.device-frame {
    background: var(--grey-900);
    padding: 10px;
    border-radius: 40px;
    box-shadow:
        0 0 0 2px var(--grey-700),
        var(--shadow-lg);
    position: relative;
}

.device-screen {
    background: var(--white);
    border-radius: 30px;
    overflow: hidden;
    position: relative;
}

.device-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* iPhone */
.device-iphone .device-frame {
    width: 260px;
    padding: 8px;
    border-radius: 44px;
}
.device-iphone .device-screen {
    width: 244px;
    height: 524px;
    border-radius: 36px;
}
.device-iphone .device-notch {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 96px;
    height: 28px;
    background: var(--black);
    border-radius: 999px;
    z-index: 2;
}
.hero-device .device-iphone .device-frame,
.hero-device.device-iphone .device-frame {
    width: 300px;
}
.hero-device .device-iphone .device-screen,
.hero-device.device-iphone .device-screen {
    width: 284px;
    height: 608px;
}

/* iPad (landscape) */
.device-ipad .device-frame {
    width: 484px;
    padding: 14px;
    border-radius: 28px;
}
.device-ipad .device-screen {
    width: 456px;
    height: 314px;
    border-radius: 14px;
}

/* Mac */
.device-mac .device-frame {
    width: 520px;
    padding: 12px 12px 0;
    border-radius: 14px;
}
.device-mac .device-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 4px 10px;
}
.device-mac .device-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.device-dot-red { background: #ff5f57; }
.device-dot-yellow { background: #febc2e; }
.device-dot-green { background: #28c840; }
.device-mac .device-screen {
    width: 496px;
    height: 312px;
    border-radius: 4px;
}
.device-mac .device-stand {
    width: 120px;
    height: 14px;
    margin: 0 auto;
    background: linear-gradient(180deg, var(--grey-500), var(--grey-700));
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 18px -6px rgba(0,0,0,0.2);
}

/* Vision Pro — dream-bubble fade, no visible bezel */
.device-vision .device-frame {
    width: 600px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    clip-path: inset(3% round 35%);
}
.device-vision .device-screen {
    width: 600px;
    height: 400px;
    border-radius: 0;
    background: #0c0c0e;
}
.device-vision {
    mask-image: radial-gradient(ellipse 62% 62% at 50% 50%, black 40%, rgba(0,0,0,0.7) 60%, rgba(0,0,0,0.15) 80%, transparent 92%);
    -webkit-mask-image: radial-gradient(ellipse 62% 62% at 50% 50%, black 40%, rgba(0,0,0,0.7) 60%, rgba(0,0,0,0.15) 80%, transparent 92%);
}

/* Responsive device sizing */
@media (max-width: 1100px) {
    .device-mac .device-frame { width: 440px; }
    .device-mac .device-screen { width: 416px; height: 262px; }
}
@media (max-width: 900px) {
    .device-row { gap: 24px; }
    .device-ipad .device-frame { width: 372px; }
    .device-ipad .device-screen { width: 344px; height: 237px; }
    .device-mac .device-frame { width: 380px; }
    .device-mac .device-screen { width: 356px; height: 224px; }
}
@media (max-width: 560px) {
    .device-mac .device-frame { width: 320px; }
    .device-mac .device-screen { width: 296px; height: 186px; }
    .device-ipad .device-frame { width: 344px; }
    .device-ipad .device-screen { width: 316px; height: 218px; }
    .device-vision .device-frame { width: 340px; }
    .device-vision .device-screen { width: 340px; height: 218px; }
}

/* --- Mood grids (placeholder content inside devices) --------------------- */
.mood-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 12px;
    height: 100%;
    background: var(--grey-50);
}
.mood-grid-lg { gap: 8px; padding: 16px; }
.mood-grid-ipad { grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 14px; }
.mood-grid-mac { grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 10px; }
.mood-grid-vision { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 12px; }

.mood-tile {
    border-radius: 8px;
    aspect-ratio: 1 / 1;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.mood-grid-lg .mood-tile { border-radius: 10px; }

/* --- Reviews -------------------------------------------------------------- */
.reviews {
    padding: var(--section-pad) 0;
    background: var(--bg-alt);
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 56px;
}

.review-card {
    margin: 0;
    padding: 32px 28px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}
.review-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--border-strong);
}

.stars {
    color: var(--accent);
    letter-spacing: 3px;
    font-size: 15px;
}

.review-card blockquote {
    font-size: 17px;
    line-height: 1.55;
    color: var(--text-strong);
    font-weight: 500;
    letter-spacing: -0.005em;
}

.review-card figcaption {
    margin-top: auto;
    font-size: 13px;
    color: var(--text-muted);
}

/* --- CTA ------------------------------------------------------------------ */
.cta {
    padding: var(--section-pad) 0;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(900px, 90%);
    height: 600px;
    background: radial-gradient(ellipse at center, var(--accent-soft) 0%, transparent 65%);
    pointer-events: none;
}

.cta-inner {
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.cta h2 {
    font-size: clamp(36px, 5vw, 60px);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-strong);
}

.cta p {
    font-size: clamp(16px, 1.4vw, 19px);
    color: var(--grey-700);
    max-width: 52ch;
}

.cta .btn-appstore {
    margin-top: 12px;
}

/* --- Footer --------------------------------------------------------------- */
.site-footer {
    padding: 48px 0 56px;
    background: var(--white);
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-strong);
}
.footer-brand img { border-radius: 7px; }

.footer-nav {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}
.footer-nav a {
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.15s ease;
}
.footer-nav a:hover { color: var(--accent); }

.btn-testflight {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px 16px 22px;
    background: linear-gradient(135deg, #0d96f6, #0a6cd0);
    color: var(--white);
    border-radius: 14px;
    font-weight: 500;
    box-shadow: 0 10px 30px -10px rgba(13, 108, 208, 0.5);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
}
.btn-testflight:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 18px 40px -12px rgba(13, 108, 208, 0.6);
}
.btn-testflight svg { flex-shrink: 0; }
.btn-testflight-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-align: left;
}
.btn-testflight-top {
    font-size: 11px;
    letter-spacing: 0.02em;
    opacity: 0.85;
}
.btn-testflight-bottom {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* CTA actions: stack the App Store + TestFlight buttons at equal width */
.cta-actions {
    display: grid;
    gap: 14px;
    margin-top: 12px;
    justify-items: stretch;
}
.cta-actions .btn-appstore,
.cta-actions .btn-testflight {
    margin-top: 0;
    width: 100%;
    justify-content: flex-start;
}
.cta-or {
    display: block;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* --- Reveal-on-scroll (used by main.js) ---------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
