/* Homepage: the color-flood tour. Every view's color is its app mark's color. */

.state-hero {
    --hero-bg: var(--slab);
    --hero-fg: var(--on-ink);
    --hero-soft: rgba(255, 255, 255, .76);
    --hero-rule: rgba(255, 255, 255, .18);
    --cta-bg: var(--lime);
    --cta-fg: var(--accent-ink);
    --glyph: rgba(255, 255, 255, .08);
    --focus: var(--on-ink);
    --media-x: 0px;
    --media-y: 0px;
    --proof-x: 0px;
    --proof-y: 0px;
    position: relative;
    margin: 0 20px;
    padding: clamp(48px, 6vw, 80px) clamp(30px, 5.5vw, 72px);
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr);
    align-items: center;
    gap: 32px;
    border-radius: var(--radius-l);
    background: var(--hero-bg);
    color: var(--hero-fg);
    isolation: isolate;
    transition: background-color .55s cubic-bezier(.2, .8, .2, 1), color .35s ease;
}
.state-hero[data-view="docs"] { --hero-bg: var(--docs); --hero-fg: var(--accent-ink); --hero-soft: rgba(14, 17, 22, .78); --hero-rule: rgba(14, 17, 22, .2); --cta-bg: var(--accent-ink); --cta-fg: var(--on-ink); --glyph: rgba(14, 17, 22, .08); --focus: var(--accent-ink); }
.state-hero[data-view="tasks"] { --hero-bg: var(--tasks); --hero-fg: var(--accent-ink); --hero-soft: rgba(14, 17, 22, .78); --hero-rule: rgba(14, 17, 22, .2); --cta-bg: var(--accent-ink); --cta-fg: var(--on-ink); --glyph: rgba(14, 17, 22, .08); --focus: var(--accent-ink); }
.state-hero[data-view="forms"] { --hero-bg: var(--forms); --hero-fg: var(--accent-ink); --hero-soft: rgba(14, 17, 22, .88); --hero-rule: rgba(14, 17, 22, .26); --cta-bg: var(--accent-ink); --cta-fg: var(--on-ink); --glyph: rgba(14, 17, 22, .09); --focus: var(--accent-ink); }
.state-hero[data-view="engage"] { --hero-bg: var(--engage); --hero-fg: var(--on-ink); --hero-soft: rgba(255, 255, 255, .84); --hero-rule: rgba(255, 255, 255, .26); --cta-bg: var(--on-ink); --cta-fg: var(--accent-ink); --glyph: rgba(255, 255, 255, .1); --focus: var(--on-ink); }

/* The app's own mark, drawn huge behind the phone. On the Suite view: four
   tally strokes, one for each app, in each app's color. */
.hero-glyph {
    position: absolute;
    z-index: 0;
    right: -14%;
    top: 50%;
    width: min(79%, 980px);
    aspect-ratio: 1;
    transform: translateY(-50%);
    pointer-events: none;
}
.hero-glyph g { display: none; }
.stroke-docs { fill: var(--docs); }
.stroke-tasks { fill: var(--tasks); }
.stroke-forms { fill: var(--forms); }
.stroke-engage { fill: var(--engage); }
.state-hero[data-view="suite"] .hero-glyph [data-glyph="suite"],
.state-hero[data-view="docs"] .hero-glyph [data-glyph="docs"],
.state-hero[data-view="tasks"] .hero-glyph [data-glyph="tasks"],
.state-hero[data-view="forms"] .hero-glyph [data-glyph="forms"],
.state-hero[data-view="engage"] .hero-glyph [data-glyph="engage"] { display: block; }
.hero-glyph [data-glyph="docs"] path { fill: var(--glyph); }
.hero-glyph [data-glyph="tasks"] > *, .hero-glyph [data-glyph="forms"] > *, .hero-glyph [data-glyph="engage"] > * { stroke: var(--glyph); fill: none; }

.hero-copy { position: relative; z-index: 5; max-width: 660px; transition: opacity .18s ease, transform .28s ease; }
.hero-copy .kicker { margin-bottom: 24px; }
.hero-copy h1 { margin: 0; font-size: var(--t-display); line-height: .97; letter-spacing: -.05em; }
.hero-lede { max-width: 470px; margin: 24px 0 30px; color: var(--hero-soft); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.5; transition: color .35s ease; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; }
.hero-cta { --btn-bg: var(--cta-bg); --btn-fg: var(--cta-fg); --btn-ring: var(--cta-bg); min-height: 52px; padding: 0 26px; font-size: 15px; }
.hero-meta {
    max-width: 560px;
    margin-top: 34px;
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 20px;
    border-top: 1px solid var(--hero-rule);
    color: var(--hero-soft);
    font-size: var(--t-micro);
    font-weight: 600;
    letter-spacing: .06em;
    transition: color .35s ease, border-color .35s ease;
}

.hero-media { position: relative; z-index: 3; align-self: stretch; min-height: 560px; transition: opacity .18s ease, transform .28s ease; }

/* The phone and its screen dots move together; the phone alone is tilted. */
.device-stage {
    position: absolute;
    z-index: 3;
    width: 290px;
    right: 96px;
    top: 50%;
    transform: translate3d(var(--media-x), var(--media-y), 0) translateY(-50%);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1);
    will-change: transform;
}
.device-shell {
    position: relative;
    aspect-ratio: .473;
    overflow: hidden;
    border: 7px solid var(--bezel);
    border-radius: 46px;
    background: var(--soft);
    box-shadow: 0 32px 70px rgba(14, 17, 22, .28);
    transform: rotate(-4deg);
}
.device-shell .screen {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    opacity: 0;
    transition: opacity .55s ease;
}
.device-shell .screen.is-active { opacity: 1; z-index: 1; }

.screen-dots { margin-top: 20px; display: flex; justify-content: center; gap: 7px; min-height: 8px; }
.screen-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: currentColor;
    color: inherit;
    opacity: .32;
    cursor: pointer;
    transition: width .25s ease, opacity .25s ease;
}
.screen-dots button:hover { opacity: .7; }
.screen-dots button[aria-current="true"] { width: 24px; opacity: 1; }
.screen-dots:empty { display: none; }

.proof-card {
    position: absolute;
    z-index: 5;
    left: -6px;
    bottom: 44px;
    width: max-content;
    max-width: 340px;
    padding: 13px 15px 13px 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    --stack-ring: var(--raised);
    border-radius: 18px;
    background: var(--raised);
    color: var(--ink);
    box-shadow: 0 18px 44px rgba(14, 17, 22, .2);
    transform: translate3d(var(--proof-x), var(--proof-y), 0) rotate(1.5deg);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
    will-change: transform;
}
.proof-card .mark { width: 34px; height: 34px; }
.proof-card .mark-stack .mark + .mark { margin-left: -12px; }
/* Positioned so paint order stays the stack's order: a lifted icon never jumps in front. */
.proof-card .mark-stack .mark { position: relative; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.proof-card .mark-stack .mark.is-current { transform: translateY(-7px); }
/* Suite view: the icons are buttons, as the dots are. The taller hit area helps fingers. */
.proof-card button.mark { --focus: var(--ink); padding: 0; border: 0; background: none; cursor: pointer; }
.proof-card button.mark img { display: block; width: 100%; height: 100%; border-radius: 50%; }
.proof-card button.mark::after { content: ""; position: absolute; inset: -9px 0; }
.proof-card button.mark:hover:not(.is-current) { transform: translateY(-3px); }
.proof-card button.mark:focus-visible { z-index: 2; }
.proof-card > div { min-width: 0; }
.proof-card strong { display: block; font-size: 14px; line-height: 1.25; letter-spacing: -.01em; }
.proof-card small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; line-height: 1.3; text-wrap: balance; }

.state-hero.is-switching .hero-copy,
.state-hero.is-switching .hero-media { opacity: 0; transform: translateY(10px); }

/* Details ---------------------------------------------------------------- */
.state-details {
    padding: clamp(64px, 7.5vw, 96px) var(--pad) clamp(48px, 5.5vw, 72px);
    display: grid;
    grid-template-columns: .82fr 1.18fr;
    align-items: start;
    gap: clamp(40px, 7vw, 84px);
    transition: opacity .18s ease, transform .28s ease;
}
.state-details.is-switching { opacity: 0; transform: translateY(10px); }
.details-heading { min-width: 0; }
.details-heading h2 { margin: 0; max-width: 520px; font-size: var(--t-h2); line-height: 1.02; letter-spacing: -.04em; }
.details-heading > p:last-child { max-width: 500px; margin: 20px 0 0; color: var(--muted); }
.details-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.details-grid article { padding: 22px 22px 26px; border-radius: var(--radius-m); background: var(--soft); min-width: 0; }
.detail-number {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--detail-bg, var(--ink));
    color: var(--detail-fg, var(--on-fill));
    font-size: 12px;
    font-weight: 700;
    transition: background-color .35s ease, color .35s ease;
}
.details-grid h3 { margin: 30px 0 8px; font-size: var(--t-h3); letter-spacing: -.025em; }
.details-grid p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.state-details[data-view="docs"] { --detail-bg: var(--docs); --detail-fg: var(--accent-ink); }
.state-details[data-view="tasks"] { --detail-bg: var(--tasks); --detail-fg: var(--accent-ink); }
.state-details[data-view="forms"] { --detail-bg: var(--forms); --detail-fg: var(--accent-ink); }
.state-details[data-view="engage"] { --detail-bg: var(--engage); --detail-fg: var(--on-ink); }

/* The four apps ---------------------------------------------------------- */
.suite-apps { padding: 0 var(--pad) clamp(48px, 5.5vw, 72px); }
.suite-apps .section-head { margin-bottom: 26px; }
.app-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.app-card {
    display: flex;
    flex-direction: column;
    padding: 22px;
    border-radius: var(--radius-m);
    box-shadow: inset 0 0 0 1px var(--line);
    min-width: 0;
    transition: box-shadow .18s ease, transform .18s ease;
}
.app-card:hover { box-shadow: inset 0 0 0 1px var(--line-strong), 0 14px 34px rgba(14, 17, 22, .08); transform: translateY(-2px); }
.app-card[aria-current] { box-shadow: inset 0 0 0 2px var(--ink); }
.app-card .mark { width: 44px; height: 44px; }
.app-card h3 { margin: 18px 0 6px; font-size: var(--t-h3); letter-spacing: -.025em; }
.app-card p { margin: 0 0 18px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.app-card .app-go { margin-top: auto; font-size: var(--t-small); font-weight: 700; }

/* Pricing at a glance. Each panel says which apps its prices cover, and the
   rows run across, so a price can't be read as belonging to the card above it. */
.plans-glance { padding: 0 var(--pad) clamp(40px, 5vw, 64px); }
.plans-glance-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; margin-bottom: 26px; }
.plans-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.plans-apps { grid-column: span 3; padding: 22px 26px 12px; border-radius: var(--radius-m); background: var(--soft); min-width: 0; }
.plans-name { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.015em; }
.plans-rows { margin: 16px 0 0; padding: 0; list-style: none; }
.plans-rows li { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: baseline; gap: 2px 16px; padding: 13px 0; border-top: 1px solid var(--line); }
.plans-rows strong { font-size: 16px; letter-spacing: -.015em; }
.plans-what { color: var(--muted); font-size: var(--t-small); }
.plans-price { font-size: 24px; font-weight: 700; line-height: 1.1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.plans-price small { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.plans-engage { --focus: var(--on-ink); display: flex; flex-direction: column; padding: 22px; border-radius: var(--radius-m); background: var(--engage); color: var(--on-ink); min-width: 0; transition: box-shadow .18s ease, transform .18s ease; }
.plans-engage:hover { box-shadow: 0 14px 34px rgba(80, 0, 255, .28); transform: translateY(-2px); }
.plans-engage .mark { box-shadow: 0 0 0 2px var(--on-ink); }
.plans-engage .plans-price { margin: 18px 0 4px; font-size: 34px; }
.plans-fee { margin: 0 0 14px; font-size: 13px; font-weight: 600; line-height: 1.35; }
.plans-engage .plans-price small:first-child { margin-right: 6px; }
.plans-engage .plans-price small { color: rgba(255, 255, 255, .86); }
.plans-engage .plans-what { margin: 0 0 16px; color: rgba(255, 255, 255, .86); text-wrap: balance; }
.plans-engage .app-go { margin-top: auto; font-size: var(--t-small); font-weight: 700; }

@media (max-width: 1100px) {
    .state-hero { grid-template-columns: 1fr .8fr; }
    .state-details { grid-template-columns: 1fr; }
    .plans-grid { grid-template-columns: 1fr; }
    .plans-apps { grid-column: auto; }
}

@media (max-width: 1240px) and (min-width: 841px) {
    .device-stage { right: 40px; }
    .hero-glyph { right: -24%; width: 76%; }
    .hero-lede { max-width: 420px; }
}

@media (min-width: 841px) and (max-height: 860px) {
    .device-stage { width: 262px; }
    .hero-media { min-height: 500px; }
    .hero-copy h1 { font-size: clamp(42px, 4.7vw, 64px); }
    .hero-lede { margin: 20px 0 24px; }
    .hero-meta { margin-top: 26px; }
}

@media (min-width: 1241px) and (max-height: 860px) {
    .hero-glyph { right: -12%; width: min(70%, 860px); }
    .hero-meta { max-width: 490px; }
}

@media (max-width: 840px) {
    .state-hero { margin: 0 10px; padding: 44px 26px 0; grid-template-columns: 1fr; border-radius: 22px; gap: 28px; }
    .hero-copy h1 { font-size: clamp(42px, 11.5vw, 68px); }
    .hero-meta { max-width: 100%; }
    .hero-media { min-height: 430px; margin: 0 -26px; overflow: hidden; }
    .hero-glyph { right: -22%; top: auto; bottom: -6%; width: min(130%, 620px); transform: none; }
    .device-stage { width: 264px; right: 50%; top: 18px; transform: translateX(50%) translate3d(var(--media-x), var(--media-y), 0); }
    .device-shell { transform: rotate(-3deg); }
    .screen-dots { display: none; }
    .proof-card { left: 14px; bottom: 22px; max-width: calc(100% - 28px); }
    .proof-card button.mark { width: 38px; height: 38px; }
    .details-grid { grid-template-columns: 1fr; }
    .details-grid h3 { margin-top: 18px; }
    .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
    .app-grid { grid-template-columns: 1fr; }
    .app-card { padding: 18px 20px; }
    .plans-apps { padding: 20px 20px 8px; }
    .plans-rows li { grid-template-columns: minmax(0, 1fr) auto; }
    .plans-what { grid-column: 1 / -1; grid-row: 2; }
}
