/* =========================================================
   Amma — Landing Page
   Direction: "Calm daily companion"
   Surfaces derived from the app's own soft lavender/peach
   canvases; Fraunces serif voice; Space Mono clinical labels;
   the one saturated gradient reserved for the closing card.
   ========================================================= */

:root {
    --ink: #091042;          /* headings / deep navy */
    --body: #565c77;         /* body copy */
    --blue: #1036ff;         /* brand accent */
    --blue-700: #0d2bd1;     /* accent hover */
    --violet: #5b23b0;       /* gradient partner (from logo) */

    --base: #f6f3fc;         /* page canvas */
    --lavender: #ede9fa;     /* soft panel — most screens */
    --lavender-soft: #f3f0fb;
    --peach: #fdefec;        /* warm panel — filter screen */
    --surface: #ffffff;
    --line: #e7e2f4;         /* hairline */

    /* Latin faces first, Chinese (Noto SC) as per-glyph fallback:
       "Amma" stays in Fraunces; Chinese renders in Noto Serif/Sans SC. */
    /* Latin self-hosted (see fonts.css); Chinese uses the OS font —
       Song serif for headings, PingFang/YaHei sans for body. No web CJK. */
    --font-display: "Fraunces", Georgia, "Songti SC", "STSong", "SimSun", serif;
    --font-body: "Hanken Grotesk", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-mono: "Space Mono", ui-monospace, "PingFang SC", "Microsoft YaHei", monospace;

    --radius-lg: 40px;
    --radius-md: 26px;
    --shadow-soft: 0 24px 60px rgba(15, 12, 60, 0.10);
    --shadow-phone: 0 30px 70px rgba(15, 12, 60, 0.18);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--base);
    color: var(--body);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.65;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}

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

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

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-variation-settings: "SOFT" 30, "WONK" 0;
    color: var(--ink);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -0.015em;
    margin: 0;
}

.list-reset {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Shared clinical micro-label */
.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 18px;
}

/* ---- Layout helpers ---- */
.body-wrap {
    background: var(--base);
    max-width: 1320px;
    margin: 0 auto;
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 28px;
}

.container-sm {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 0 28px;
}

/* Focus visibility (quality floor) */
a:focus-visible,
.button:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ---- Scroll reveal (gentle) ---- */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.65, 0.2, 1),
        transform 0.7s cubic-bezier(0.2, 0.65, 0.2, 1);
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

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

    * {
        animation: none !important;
    }
}

/* ---- Header ---- */
.site-header {
    padding: 26px 0 10px;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-lockup .brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(15, 12, 60, 0.20);
}

.brand-lockup .brand-name {
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-weight: 600;
    font-size: 24px;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink);
    padding: 10px 4px;
    transition: color 0.15s ease;
}

.nav-link:hover {
    color: var(--blue);
}

/* ---- Buttons ---- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 17px 40px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button-primary {
    color: #fff;
    background: var(--blue);
    box-shadow: 0 14px 30px rgba(16, 54, 255, 0.30);
}

.button-primary:hover {
    background: var(--blue-700);
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(16, 54, 255, 0.38);
}

/* ---- Hero ---- */
.hero {
    padding: 20px 0 40px;
}

.hero-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1080px;
    margin: 0 auto;
    padding: 78px 28px 0;
    text-align: center;
    background: linear-gradient(158deg, #f1ecfb 0%, #f5eff9 46%, #fdefec 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    animation: rise 0.9s cubic-bezier(0.2, 0.65, 0.2, 1) both;
}

/* faint concentric echo of the logo's rounded form */
.hero-panel::before {
    content: "";
    position: absolute;
    top: -120px;
    left: 50%;
    width: 620px;
    height: 620px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(91, 35, 176, 0.10) 0%, rgba(91, 35, 176, 0) 62%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 620px;
    margin: 0 auto;
}

.hero-icon {
    width: 82px;
    height: 82px;
    margin: 0 auto 30px;
    border-radius: 20px;
    box-shadow: 0 16px 36px rgba(15, 12, 60, 0.28);
}

.hero-title {
    font-size: clamp(3.4rem, 8vw, 5.2rem);
    font-weight: 500;
    margin-bottom: 20px;
}

.hero-tagline {
    font-size: clamp(1.1rem, 2.4vw, 1.3rem);
    line-height: 1.55;
    color: var(--body);
    max-width: 460px;
    margin: 0 auto 34px;
}

.hero-cta {
    margin-bottom: 56px;
}

/* the daily log, peeking — the hero's thesis */
.hero-phone {
    position: relative;
    z-index: 2;
    width: 258px;
    margin-bottom: 0;
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -6px 60px rgba(15, 12, 60, 0.16);
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ---- Lead intro ---- */
.lead {
    padding: clamp(72px, 12vw, 128px) 0 clamp(40px, 6vw, 64px);
    text-align: center;
}

.lead-title {
    font-size: clamp(2rem, 4.6vw, 3rem);
    margin-bottom: 22px;
}

.lead-text {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--body);
}

.lead-text .accent {
    color: var(--ink);
    font-weight: 700;
}

/* ---- Story: alternating feature rows ---- */
.story {
    padding: 20px 0 40px;
}

.story-row {
    display: flex;
    align-items: center;
    gap: clamp(32px, 6vw, 84px);
    max-width: 1000px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 52px) 28px;
}

.story-row:nth-child(even) {
    flex-direction: row-reverse;
}

/* tinted rounded canvas — matches each screen's own background */
.story-frame {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 336px;
    padding: 34px 34px 0;
    background: var(--lavender);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.story-frame--peach {
    background: var(--peach);
}

.story-frame img {
    width: 232px;
    border-radius: 26px 26px 0 0;
    box-shadow: 0 18px 40px rgba(15, 12, 60, 0.14);
}

.story-body {
    flex: 1 1 auto;
}

.story-title {
    font-size: clamp(1.7rem, 3.4vw, 2.2rem);
    margin-bottom: 16px;
}

.story-text {
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--body);
    margin: 0;
    max-width: 30ch;
}

/* ---- Benefits ---- */
.grid {
    padding: clamp(64px, 9vw, 104px) 0;
    text-align: center;
}

.grid-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: clamp(40px, 6vw, 60px);
}

.cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 26px;
    max-width: 1000px;
    margin: 0 auto;
}

.card {
    flex: 1 1 262px;
    max-width: 320px;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 38px 32px;
    box-shadow: 0 14px 40px rgba(15, 12, 60, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 52px rgba(15, 12, 60, 0.12);
}

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 16px;
    margin-bottom: 24px;
    background: linear-gradient(140deg, var(--violet) 0%, var(--blue) 100%);
}

.card-icon svg {
    width: 27px;
    height: 27px;
    stroke: #fff;
}

.card h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--body);
    margin: 0;
}

/* ---- Closing card — the one saturated moment ---- */
.closing {
    padding: 20px 0 clamp(48px, 7vw, 80px);
}

.closing-card {
    position: relative;
    max-width: 1080px;
    margin: 0 auto;
    padding: clamp(64px, 9vw, 100px) 28px;
    text-align: center;
    color: #fff;
    background: linear-gradient(150deg, #091042 0%, #2a1fd6 56%, #1036ff 100%);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.closing-card::after {
    content: "";
    position: absolute;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    top: -260px;
    right: -170px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 68%);
    pointer-events: none;
}

.closing-inner {
    position: relative;
    z-index: 2;
    max-width: 620px;
    margin: 0 auto;
}

.closing-title {
    color: #fff;
    font-size: clamp(2rem, 4.6vw, 3rem);
    margin-bottom: 18px;
}

.closing-text {
    font-size: 1.15rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
    margin: 0;
}

/* ---- Compliance / ICP ---- */
.compliance {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 40px 28px 28px;
}

.compliance a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: #9a94b3;
    transition: color 0.15s ease;
}

.compliance-icon {
    width: 14px;
    height: 14px;
    display: block;
}

.compliance a:hover {
    color: var(--blue);
}

/* ---- Footer ---- */
.site-footer {
    border-top: 1px solid var(--line);
}

.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 30px 0;
}

.footer-copy {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.03em;
    color: #9a94b3;
}

/* ---- Responsive ---- */
@media (max-width: 820px) {
    .story-row,
    .story-row:nth-child(even) {
        flex-direction: column;
        gap: 32px;
        text-align: center;
        padding: 28px;
    }

    .story-body {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .story-text {
        max-width: 42ch;
    }
}

@media (max-width: 560px) {
    body {
        font-size: 17px;
    }

    .hero-panel {
        padding-top: 56px;
        border-radius: 30px;
    }

    .story-frame {
        width: 100%;
        max-width: 300px;
    }

    .card {
        text-align: center;
    }

    .card-icon {
        margin-left: auto;
        margin-right: auto;
    }

    .site-footer-inner {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}
