/* ============================
   Design tokens — Matter-inspired dark
   ============================ */
:root {
    --bg:          #0a0a0b;
    --bg-alt:      #0f0f11;
    --bg-elev:     #17171a;
    --fg:          #f7f7f8;
    --fg-muted:    #9a9aa2;
    --fg-dim:      #5a5a62;
    --border:      rgba(255,255,255,.07);
    --border-strong: rgba(255,255,255,.14);
    --accent:      #ffd96a;
    --accent-hot:  #ff4d2e;
    --radius:      14px;
    --radius-lg:   24px;
    --max:         1180px;
    --ease:        cubic-bezier(.2,.7,.2,1);

    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    font-feature-settings: 'cv11', 'ss01', 'ss03';
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ============================
   Buttons (Matter-style pill)
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 30px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 15px;
    transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
    cursor: pointer;
    border: 0;
    white-space: nowrap;
    line-height: 1;
}
.btn--primary {
    background: var(--accent);
    color: #0a0a0b;
}
.btn--primary:hover {
    transform: translateY(-1px);
    background: #ffe48f;
    box-shadow: 0 12px 32px -8px rgba(255,217,106,.45);
}
.btn--ghost {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--border-strong);
}
.btn--ghost:hover { border-color: var(--fg); }
.btn--large { padding: 18px 36px; font-size: 16px; }

/* ============================
   Navigation
   ============================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    background: rgba(10,10,11,.55);
    transition: border-color .3s var(--ease), background .3s var(--ease);
    border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
    border-bottom-color: var(--border);
    background: rgba(10,10,11,.85);
}
.nav__inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    gap: 40px;
}
.nav__logo {
    font-weight: 600;
    letter-spacing: -.015em;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.nav__logo-mark {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--fg);
    color: var(--bg);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: -.02em;
}
.nav__menu {
    display: flex;
    gap: 32px;
    align-items: center;
    margin-right: auto;
}
.nav__link {
    font-size: 14px;
    color: var(--fg-muted);
    transition: color .15s var(--ease);
    font-weight: 500;
}
.nav__link:hover { color: var(--fg); }
.nav__cta {
    padding: 11px 22px;
    background: var(--accent);
    color: #0a0a0b;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    transition: background .15s var(--ease);
}
.nav__cta:hover { background: #ffe48f; }

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}
.nav__toggle span {
    width: 22px;
    height: 2px;
    background: var(--fg);
}

/* ============================
   Hero — centered, massive
   ============================ */
.hero {
    padding: 150px 28px 60px;
    text-align: center;
    position: relative;
}
.hero__inner {
    max-width: 880px;
    margin: 0 auto;
}
.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--fg);
    font-weight: 500;
    margin-bottom: 36px;
    transition: background .2s var(--ease), border-color .2s var(--ease);
}
.hero__badge:hover {
    background: rgba(255,255,255,.08);
    border-color: var(--border-strong);
}
.hero__badge-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-hot);
    display: inline-block;
    box-shadow: 0 0 0 4px rgba(255,77,46,.18);
}
.hero__title {
    font-size: clamp(54px, 8.5vw, 116px);
    line-height: 0.98;
    letter-spacing: -0.05em;
    font-weight: 700;
    margin: 0 auto 28px;
    max-width: 14ch;
    animation: hero-up .9s var(--ease) .1s both;
}
.hero__br { display: none; }
.hero__subtitle {
    font-size: clamp(16px, 1.25vw, 19px);
    color: var(--fg-muted);
    margin: 0 auto 36px;
    max-width: 52ch;
    line-height: 1.6;
    animation: hero-up .9s var(--ease) .25s both;
}
.hero__actions {
    display: inline-flex;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
    justify-content: center;
    animation: hero-up .9s var(--ease) .4s both;
}
.hero__meta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 auto 88px;
    color: var(--fg-dim);
    font-size: 13px;
    font-weight: 500;
    animation: hero-up .9s var(--ease) .55s both;
}
.hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hero__meta svg {
    color: var(--fg-muted);
}
.hero__meta-divider {
    color: rgba(255,255,255,.15);
}

/* Hero phones — overlapping pair (Matter-style staggered) */
.hero__shots {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin: 0 auto;
    max-width: 820px;
    height: 820px;
    --phone-back-y: 0px;
    --phone-front-y: -110px;
}
.hero__shots .phone {
    position: absolute;
    bottom: 0;
    width: 340px;
    height: 700px;
    border-radius: 54px;
}
.hero__shots .phone__notch {
    width: 120px;
    height: 32px;
}
.hero__shots .phone__screen {
    border-radius: 42px;
}
.hero__shots .phone--back {
    left: 50%;
    transform: translateX(-95%) translateY(var(--phone-back-y)) rotate(-4deg);
    z-index: 1;
    animation: phone-in-left 1.1s var(--ease) .7s both;
}
.hero__shots .phone--front {
    left: 50%;
    transform: translateX(-5%) translateY(var(--phone-front-y)) rotate(4deg);
    z-index: 2;
    animation: phone-in-right 1.1s var(--ease) .85s both;
}

/* ============================
   Phone mockup
   ============================ */
.phone {
    width: 300px;
    height: 612px;
    background: linear-gradient(180deg, #1c1c1f 0%, #0d0d0f 100%);
    border-radius: 48px;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow:
        0 60px 100px -30px rgba(0,0,0,.7),
        0 30px 60px -20px rgba(0,0,0,.5),
        inset 0 0 0 1px rgba(255,255,255,.04);
    padding: 12px;
    position: relative;
    flex-shrink: 0;
}
.phone__notch {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 30px;
    background: #000;
    border-radius: 999px;
    z-index: 3;
}
.phone__screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1f 0%, #2a2a32 100%);
    border-radius: 36px;
    overflow: hidden;
    position: relative;
}
.phone__screen img,
.phone__screen video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.phone__screen.is-empty::after {
    content: "screenshot";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255,255,255,.18);
    font-size: 12px;
    letter-spacing: .2em;
    text-transform: uppercase;
    font-weight: 500;
}

/* ============================
   Bridge intro section
   ============================ */
.bridge {
    padding: 60px 28px 120px;
    text-align: center;
}
.bridge__inner {
    max-width: 820px;
    margin: 0 auto;
}
.bridge__title {
    font-size: clamp(40px, 6vw, 84px);
    line-height: 1.02;
    letter-spacing: -0.045em;
    font-weight: 700;
    margin: 14px auto 24px;
    max-width: 16ch;
}
.bridge__desc {
    font-size: clamp(15px, 1.15vw, 18px);
    color: var(--fg-muted);
    margin: 0 auto 40px;
    max-width: 52ch;
    line-height: 1.65;
}

/* ============================
   Feature sections (per app) — Matter card style
   ============================ */
.feat {
    padding: 80px 0;
    position: relative;
}
.feat__inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 28px;
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 64px;
    align-items: center;
}
.feat__inner--reverse .feat__copy { order: 2; }
.feat__inner--reverse .feat__visual { order: 1; }

.feat__copy {
    padding: 24px 0;
}
.feat__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--accent);
    margin-bottom: 28px;
}
.feat__title {
    font-size: clamp(36px, 4.5vw, 60px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    font-weight: 700;
    margin: 0 0 24px;
}
.feat__desc {
    font-size: 16px;
    color: var(--fg-muted);
    margin: 0 0 32px;
    max-width: 38ch;
    line-height: 1.7;
}
.feat__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 600;
    font-size: 15px;
    transition: gap .2s var(--ease), color .2s var(--ease);
}
.feat__link span {
    transition: transform .2s var(--ease);
    display: inline-block;
}
.feat__link:hover {
    color: #ffe48f;
}
.feat__link:hover span {
    transform: translateX(4px);
}

.feat__visual {
    border-radius: 36px;
    padding: 64px 28px 0;
    min-height: 680px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 16px;
    overflow: hidden;
    position: relative;
}
/* Per-app card gradients — concept-matched, paired with Matter Yellow accent */
.feat__visual--graphite {
    /* Tab Calendar — clean structure, calm productivity */
    background: linear-gradient(160deg, #34343a 0%, #1f1f23 100%);
}
.feat__visual--blue {
    /* DART — deep cobalt navy, financial gravitas */
    background: linear-gradient(160deg, #2742b8 0%, #142658 100%);
}
.feat__visual--lavender {
    /* Countdown — wine burgundy, milestone richness */
    background: linear-gradient(160deg, #5a2438 0%, #2a0d18 100%);
}
.feat__visual--sunset {
    /* Greeedy — forest teal, creative composition */
    background: linear-gradient(160deg, #1f4d40 0%, #0d2820 100%);
}

.phone--sm {
    width: 280px;
    height: 585px;
    border-radius: 44px;
    flex-shrink: 0;
}
.phone--sm .phone__notch {
    width: 100px;
    height: 26px;
    top: 14px;
}
.phone--sm .phone__screen {
    border-radius: 34px;
}
.phone--tilt-l { transform: translateY(48px) rotate(-3deg); }
.phone--tilt-r { transform: translateY(-16px) rotate(3deg); }
.phone--center { transform: translateY(-8px); }

/* Single-phone visual (e.g. Greeedy demo video) */
.feat__visual--solo {
    align-items: center;
    padding: 40px;
}
.feat__visual--solo .phone--sm {
    width: 320px;
    height: 670px;
}

/* ============================
   Sections (About / Contact)
   ============================ */
.section {
    padding: 140px 0;
}
.section--about {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.section--contact {
    background: var(--bg);
    text-align: center;
    padding: 160px 0;
}
.section__eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--fg-muted);
    margin-bottom: 18px;
}
.section__title {
    font-size: clamp(40px, 5vw, 64px);
    letter-spacing: -0.04em;
    font-weight: 700;
    margin: 0 0 24px;
    line-height: 1.05;
}
.section__lead {
    font-size: 18px;
    color: var(--fg-muted);
    max-width: 60ch;
    margin: 0 0 64px;
    line-height: 1.6;
}

/* ============================
   Pillars
   ============================ */
.pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: 24px;
}
.pillar {
    padding: 44px 36px;
    background: var(--bg-alt);
    transition: background .25s var(--ease);
}
.pillar:hover { background: var(--bg-elev); }
.pillar__num {
    font-size: 12px;
    font-weight: 500;
    color: var(--fg-dim);
    letter-spacing: .2em;
    margin-bottom: 32px;
}
.pillar h3 {
    font-size: 22px;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    font-weight: 600;
}
.pillar p {
    margin: 0;
    color: var(--fg-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* ============================
   Contact
   ============================ */
.contact__inner {
    max-width: 720px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.contact__lead {
    font-size: 18px;
    color: var(--fg-muted);
    margin: 0 0 48px;
}
.contact__mail {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 56px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-alt);
    margin-bottom: 32px;
    transition: border-color .2s var(--ease), background .2s var(--ease);
}
.contact__mail:hover {
    border-color: var(--border-strong);
    background: var(--bg-elev);
}
.contact__mail span {
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--fg-dim);
}
.contact__mail strong {
    font-size: 22px;
    font-weight: 500;
    color: var(--fg);
    letter-spacing: -.01em;
}

/* ============================
   Footer
   ============================ */
.footer {
    background: var(--bg);
    color: var(--fg-dim);
    padding: 40px 0;
    font-size: 13px;
    border-top: 1px solid var(--border);
}
.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--fg);
    font-weight: 500;
}
.footer__links {
    display: flex;
    gap: 24px;
}
.footer a { transition: color .15s var(--ease); }
.footer a:hover { color: var(--fg); }

/* ============================
   Legal pages (EULA / Privacy)
   ============================ */
.legal-body {
    background: var(--bg);
}
.nav.is-static {
    position: relative;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.legal {
    padding: 80px 28px 140px;
}
.legal__inner {
    max-width: 820px;
    margin: 0 auto;
    color: var(--fg);
}
.legal__title {
    font-size: clamp(32px, 4.4vw, 52px);
    line-height: 1.1;
    letter-spacing: -0.035em;
    font-weight: 700;
    margin: 0 0 32px;
}
.legal__updated {
    color: var(--fg-muted);
    font-size: 15px;
    margin: 0 0 40px;
}
.legal p,
.legal li {
    color: rgba(247,247,248,.78);
    font-size: 16px;
    line-height: 1.75;
}
.legal p { margin: 0 0 22px; }
.legal h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--fg);
    margin: 56px 0 20px;
}
.legal h3 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--fg);
    margin: 32px 0 14px;
}
.legal ul {
    margin: 0 0 22px;
    padding-left: 22px;
}
.legal li {
    margin-bottom: 10px;
}
.legal li::marker {
    color: var(--fg-dim);
}
.legal a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.legal a:hover {
    color: #ffe48f;
}
.legal strong {
    color: var(--fg);
    font-weight: 600;
}

/* ============================
   Hero entry animations
   ============================ */
@keyframes hero-up {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes phone-in-left {
    from {
        opacity: 0;
        transform: translateX(-180%) translateY(var(--phone-back-y)) rotate(-4deg);
    }
    to {
        opacity: 1;
        transform: translateX(-95%) translateY(var(--phone-back-y)) rotate(-4deg);
    }
}
@keyframes phone-in-right {
    from {
        opacity: 0;
        transform: translateX(90%) translateY(var(--phone-front-y)) rotate(4deg);
    }
    to {
        opacity: 1;
        transform: translateX(-5%) translateY(var(--phone-front-y)) rotate(4deg);
    }
}

/* ============================
   Reveal (scroll-triggered)
   ============================ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 960px) {
    .hero { padding: 130px 24px 60px; }
    .hero__br { display: inline; }
    .hero__meta {
        gap: 8px;
        font-size: 12px;
    }
    .hero__shots {
        --phone-front-y: -90px;
        height: 660px;
        max-width: 100%;
    }
    .hero__shots .phone { width: 270px; height: 552px; border-radius: 44px; }
    .hero__shots .phone__notch { width: 100px; height: 26px; }
    .hero__shots .phone__screen { border-radius: 34px; }

    .feat { padding: 60px 0; }
    .feat__inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .feat__inner--reverse .feat__copy { order: 1; }
    .feat__inner--reverse .feat__visual { order: 2; }
    .feat__visual { min-height: 600px; padding: 56px 24px 0; }
    .phone--sm { width: 250px; height: 520px; }
    .feat__visual--solo .phone--sm { width: 280px; height: 585px; }

    .pillars { grid-template-columns: 1fr; }
    .section { padding: 100px 0; }
    .section--contact { padding: 120px 0; }
}

@media (max-width: 640px) {
    .nav__toggle { display: flex; }
    .nav__cta { display: none; }
    .nav__menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        padding: 24px 28px;
        background: var(--bg-alt);
        border-top: 1px solid var(--border);
        gap: 18px;
        margin-right: 0;
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: transform .2s var(--ease), opacity .2s var(--ease);
    }
    .nav__menu.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .hero__meta {
        margin-bottom: 56px;
    }
    .hero__shots {
        --phone-front-y: -40px;
        height: 620px;
        transform: scale(0.72);
        transform-origin: top center;
    }
    .feat__visual {
        min-height: 540px;
        padding: 44px 14px 0;
        gap: 10px;
    }
    .phone--sm { width: 210px; height: 440px; border-radius: 36px; }
    .phone--sm .phone__notch { width: 78px; height: 22px; top: 12px; }
    .phone--sm .phone__screen { border-radius: 28px; }
    .feat__visual--solo .phone--sm { width: 240px; height: 500px; }

    .contact__mail { padding: 24px 32px; }
    .contact__mail strong { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001s !important;
        transition-duration: .001s !important;
    }
    .reveal { opacity: 1; transform: none; }
}
