/* Bubble Notes landing page: the hero. Page tokens (--yellow, --text-soft, ...)
   come from styles.css. The field is drawn by hero/stage.js.

   Full bleed, on the app's dark background (#1a1625), and pulled up under the
   top bar so the bubbles rise out through it. Phone: the copy, an open band
   of sky, then the timeline. Wide: the copy on the left, the timeline on the
   right, the bubbles rising in the column beside it. */

.hero {
    /* At least the top bar's height (80 to 86 px); the padding gives back
       exactly what the margin takes, so the copy does not move. */
    --under-topbar: 120px;
    position: relative;
    margin-top: calc(-1 * var(--under-topbar));
    padding-top: var(--under-topbar);
    background: linear-gradient(to bottom, var(--ground-deep) 88%, var(--ground));
    -webkit-tap-highlight-color: transparent;
}

/* Fades out toward the top so bubbles leave softly. */
.hero-field {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 16%);
}

.hero-inner {
    position: relative;
    max-width: var(--max);
    margin: 0 auto;
    padding: 12px var(--gutter) 0;
}

/* A soft scrim so the headline stays readable as bubbles pass behind it. */
.hero-copy {
    position: relative;
}

.hero-copy::before {
    content: '';
    position: absolute;
    inset: -24px -40px;
    background: radial-gradient(closest-side, rgba(26, 22, 37, 0.7), rgba(26, 22, 37, 0));
    pointer-events: none;
    z-index: -1;
}

.hero-headline {
    font-size: clamp(38px, 11vw, 64px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.025em;
}

.hero-sub {
    margin-top: 18px;
    font-size: 17px;
    color: var(--text-soft);
    max-width: 30em;
}

.hero-cta {
    margin-top: 28px;
}

.cta-note {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-faint);
}

.hero-sky {
    height: 168px;
}

@media (min-width: 940px) {
    .hero-inner {
        display: grid;
        grid-template-columns: 1fr 400px;
        align-items: center;
        column-gap: 72px;
        padding-top: 24px;
        padding-bottom: 40px;
    }

    .hero-headline {
        font-size: 64px;
    }

    .hero-sub {
        margin-top: 22px;
    }

    .hero-sky {
        display: none;
    }
}

/* ---- The timeline -------------------------------------------------------
   Copied from the app (bubble-notes-app components/timeline/): the Today
   section header, TimelineItem cards and TimelineNowIndicator, in the dark
   theme's tokens (constants/Colors.ts). The app sets type in the system
   font, so this does too. A fixed height, so cards coming and going never
   move the page below. */

.timeline {
    --tl-surface: #241b2f;
    --tl-border: #ffffff08;
    --tl-text: #ffffff;
    --tl-text-secondary: #ffffff99;
    --tl-text-tertiary: #ffffff60;
    --tl-amber: #fbbf24;
    --tl-red: #f87171;
    margin: 0 calc(-1 * var(--gutter));
    height: 470px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, sans-serif;
    line-height: normal;
    color: var(--tl-text);
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent);
}

@media (min-width: 940px) {
    .timeline {
        margin: 0;
        height: 600px;
    }
}

/* TimelineSectionHeader, the Today variant. */
.tl-day {
    padding: 8px 0 16px;
}

.tl-day-row {
    display: flex;
    align-items: center;
    margin: 0 10px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.tl-day-label {
    font-weight: 700;
    text-transform: uppercase;
    color: var(--tl-amber);
}

.tl-day-icon {
    width: 14px;
    height: 14px;
    margin: 1px 6px 0;
    fill: var(--tl-amber);
}

.tl-day-date {
    color: var(--tl-text-secondary);
}

.tl-count {
    margin-left: 8px;
    padding: 1px 6px;
    border-radius: 8px;
    background: #fbbf2420;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--tl-text-secondary);
}

.tl-day-line {
    height: 1px;
    margin-top: 8px;
    background: #fbbf2440;
}

/* Each item sits in a slot that folds to nothing, so the list closes up
   around a card that leaves and opens for one that arrives. */
.tl-slot {
    display: grid;
    grid-template-rows: 1fr;
    transition:
        grid-template-rows 0.5s cubic-bezier(0.22, 0.8, 0.3, 1),
        opacity 0.45s ease;
}

.tl-slot-inner {
    min-height: 0;
    overflow: hidden;
}

.tl-slot.is-entering,
.tl-slot.is-leaving {
    grid-template-rows: 0fr;
    opacity: 0;
}

/* TimelineItem. */
.tl-card {
    box-sizing: border-box;
    margin: 0 12px 8px;
    padding: 12px 16px;
    border: 1px solid var(--tl-border);
    border-radius: 20px;
    background: var(--tl-surface);
}

.tl-card--note {
    height: 128px;
}

.tl-card--task {
    height: 82px;
}

.tl-card--reminder {
    height: 100px;
}

.tl-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.tl-icon {
    flex: none;
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.tl-kind {
    margin-left: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tl-anchor {
    margin-left: 8px;
    min-width: 0;
    overflow: hidden;
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--tl-text-tertiary);
}

.tl-spacer {
    flex: 1;
}

.tl-pill {
    flex: none;
    max-width: 120px;
    margin-left: 8px;
    padding: 2px 8px;
    overflow: hidden;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    line-height: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #ffffff;
}

.tl-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    font-size: 15px;
    line-height: 20px;
}

.tl-card--note .tl-title {
    -webkit-line-clamp: 3;
}

.tl-card--reminder .tl-title {
    -webkit-line-clamp: 2;
}

/* TimelineNowIndicator. */
.tl-now {
    display: flex;
    align-items: center;
    height: 24px;
    margin-bottom: 8px;
    padding: 0 18px 0 12px;
}

.tl-now-dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: var(--tl-red);
}

.tl-now-dot--end {
    margin-left: 6px;
}

.tl-now-rule {
    flex: 1;
    height: 2px;
    margin-left: -1px;
    background: var(--tl-red);
}

.tl-now-time {
    margin-left: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--tl-red);
}

@media (prefers-reduced-motion: reduce) {
    .tl-slot {
        transition: none;
    }
}
