/* Nestdose website — shared stylesheet.
   Tokens mirror Nestdose/DesignSystem Tokens.swift so the website
   reads as the app on landing. Keep in sync when the app tokens
   move. */

:root {
    --paper:      #F4F6F3;
    --card:       #FFFFFF;
    --line:       #E2E6E0;
    --ink:        #141D26;
    --ink-med:    #46525D;
    --ink-mute:   #7B858F;
    --teal:       #157D70;
    --teal-deep:  #0E5F55;
    --teal-soft:  #DCEFEA;
    --attend:     #C2621D;
    --attend-sft: #FBE9DA;
    --coral:      #D1543F;
}

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
                 "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 20px 64px;
}

/* ---------- Nav ---------- */

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    max-width: 1120px;
    margin: 0 auto;
}
.nav a.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
}
.nav a.brand:hover { text-decoration: none; }
.nav .brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    display: block;
}
.nav .brand-name {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.5px;
    color: var(--ink);
}
.nav .brand-name em { color: var(--teal); font-style: normal; }
.nav ul { display: flex; gap: 20px; list-style: none; }
.nav ul a {
    color: var(--ink-med);
    font-size: 15px;
    font-weight: 500;
}

/* ---------- Hero ---------- */

.hero {
    background: var(--teal);
    color: #fff;
    padding: 72px 24px 0;
    overflow: hidden;
}
.hero-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}
.hero-copy { padding-bottom: 80px; }
.hero h1 {
    font-size: 56px;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
    color: #fff;
}
.hero p.tag {
    font-size: 20px;
    color: rgba(255,255,255,0.86);
    font-weight: 500;
    max-width: 480px;
    margin-bottom: 28px;
    line-height: 1.5;
}
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .cta {
    display: inline-block;
    padding: 14px 24px;
    background: var(--teal-deep);
    color: #fff;
    font-weight: 700;
    border-radius: 999px;
    font-size: 16px;
    transition: background 160ms ease;
}
.hero .cta:hover { background: #0a4e46; text-decoration: none; }
.hero .cta.outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.4);
}
.hero .cta.outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.7);
}
/* Hero devices — V-shape: two phones tilted toward each other, patient
   on the left + caregiver on the right. Each gets a staggered entrance
   animation (slide up from below + fade in) and a gentle idle float
   that honours prefers-reduced-motion. */
.hero-devices {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 0;
    padding-top: 20px;
    height: 100%;
}
.hero-devices .phone {
    width: 48%;
    max-width: 280px;
    display: block;
    border-radius: 26px;
    box-shadow:
        0 30px 60px rgba(0,0,0,0.28),
        0 2px 6px rgba(0,0,0,0.08);
    opacity: 0;  /* until entrance animation runs */
}
.hero-devices .phone-left {
    margin-right: -36px;
    z-index: 2;
    transform-origin: bottom right;
    animation:
        heroPhoneLeftEntrance 1.1s cubic-bezier(0.2, 0.9, 0.3, 1) 0.25s both,
        heroPhoneLeftFloat 7s ease-in-out 1.5s infinite;
}
.hero-devices .phone-right {
    margin-left: -36px;
    z-index: 1;
    transform-origin: bottom left;
    animation:
        heroPhoneRightEntrance 1.1s cubic-bezier(0.2, 0.9, 0.3, 1) 0.5s both,
        heroPhoneRightFloat 7s ease-in-out 1.75s infinite;
}

@keyframes heroPhoneLeftEntrance {
    from {
        opacity: 0;
        transform: translateY(80px) rotate(-2deg);
    }
    to {
        opacity: 1;
        transform: translateY(40px) rotate(-8deg);
    }
}
@keyframes heroPhoneRightEntrance {
    from {
        opacity: 0;
        transform: translateY(80px) rotate(2deg);
    }
    to {
        opacity: 1;
        transform: translateY(60px) rotate(8deg);
    }
}
@keyframes heroPhoneLeftFloat {
    0%, 100% { transform: translateY(40px) rotate(-8deg); }
    50%      { transform: translateY(28px) rotate(-8deg); }
}
@keyframes heroPhoneRightFloat {
    0%, 100% { transform: translateY(60px) rotate(8deg); }
    50%      { transform: translateY(48px) rotate(8deg); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-devices .phone-left,
    .hero-devices .phone-right {
        animation: none;
        opacity: 1;
    }
    .hero-devices .phone-left  { transform: translateY(40px) rotate(-8deg); }
    .hero-devices .phone-right { transform: translateY(60px) rotate(8deg); }
}

/* ---------- Section base ---------- */

section { padding: 72px 24px; }
section .inner { max-width: 1120px; margin: 0 auto; }
section h2 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.75px;
    margin-bottom: 16px;
    color: var(--ink);
}
section p.lede {
    font-size: 18px;
    color: var(--ink-med);
    margin-bottom: 36px;
    max-width: 640px;
    line-height: 1.55;
}

/* ---------- Gallery ---------- */

.gallery { background: var(--paper); padding-top: 100px; }
.shots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}
.shots figure {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.shots img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 24px;
    background: var(--card);
    filter: drop-shadow(0 12px 24px rgba(16, 36, 44, 0.08));
}
.shots figcaption {
    font-size: 15px;
    color: var(--ink-med);
    line-height: 1.5;
    padding: 0 4px;
}
.shots figcaption strong {
    display: block;
    color: var(--ink);
    font-weight: 700;
    margin-bottom: 4px;
}

/* ---------- Plans ---------- */

.plans { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 28px;
}
.card h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--ink);
    letter-spacing: -0.3px;
}
.card .price {
    color: var(--teal);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: block;
}
.card ul {
    list-style: none;
    margin-top: 14px;
}
.card ul li {
    padding-left: 24px;
    position: relative;
    margin-bottom: 10px;
    color: var(--ink-med);
    font-size: 15.5px;
    line-height: 1.5;
}
.card ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--teal);
    font-weight: 800;
    font-size: 16px;
}

/* ---------- Privacy + disclaimer callouts ---------- */

.privacy-callout { background: var(--paper); }
.privacy-callout .link-row { margin-top: 0; }
.privacy-callout .link-row a { font-weight: 600; }
.disclaimer {
    background: var(--card);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

/* ---------- Legal pages ---------- */

.legal h1 {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
    color: var(--ink);
}
.legal .meta {
    color: var(--ink-mute);
    font-size: 14px;
    margin-bottom: 36px;
}
.legal h2 {
    font-size: 22px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 14px;
    color: var(--ink);
}
.legal h3 {
    font-size: 18px;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 8px;
}
.legal p { margin-bottom: 14px; color: var(--ink-med); }
.legal ul { margin-left: 24px; margin-bottom: 14px; color: var(--ink-med); }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--ink); }

/* ---------- Footer ---------- */

.footer {
    background: #e9ede6;
    padding: 40px 24px;
    border-top: 1px solid var(--line);
    margin-top: 0;
}
.footer .inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--ink-med);
    font-size: 14px;
}
.footer a { color: var(--ink-med); }
.footer a:hover { color: var(--teal); }
.footer ul { list-style: none; display: flex; gap: 20px; }

/* ---------- Responsive ---------- */

@media (max-width: 920px) {
    .hero-inner { grid-template-columns: 1fr; gap: 20px; text-align: left; }
    .hero-copy { padding-bottom: 10px; }
    .hero-devices { padding-top: 0; justify-content: center; }
    .hero-devices .phone { max-width: 230px; }
    .shots { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .nav { padding: 12px 16px; }
    .hero { padding: 48px 20px 0; }
    .hero h1 { font-size: 40px; }
    .hero p.tag { font-size: 17px; }
    /* On narrow screens two tilted phones cramp each other; hide the
       second one and reset the first to a clean upright pose. */
    .hero-devices .phone-right { display: none; }
    .hero-devices .phone-left {
        margin-right: 0;
        max-width: 260px;
        animation:
            heroPhoneCenterEntrance 1s cubic-bezier(0.2,0.9,0.3,1) 0.25s both,
            heroPhoneCenterFloat 7s ease-in-out 1.5s infinite;
    }
    section { padding: 48px 20px; }
    section h2 { font-size: 28px; }
    .shots { grid-template-columns: 1fr; gap: 32px; }
    .shots img { max-width: 320px; margin: 0 auto; }
    .shots figcaption { text-align: center; }
    .cards { grid-template-columns: 1fr; }
    .legal h1 { font-size: 30px; }
    .footer .inner { flex-direction: column; }

    @keyframes heroPhoneCenterEntrance {
        from { opacity: 0; transform: translateY(60px); }
        to   { opacity: 1; transform: translateY(28px); }
    }
    @keyframes heroPhoneCenterFloat {
        0%, 100% { transform: translateY(28px); }
        50%      { transform: translateY(18px); }
    }
}
