/* ==========================================================================
   VAULTARA LANDING (loads after style.css and reuses its tokens)
   One idea: the folder of documents. Real interface fragments (data-ui) sit
   beside large serif type. Whole fields of tone separate sections, not lines.
   ========================================================================== */

.wrap { width: min(1240px, 100% - 64px); margin-inline: auto; }

/* --- Top bar: wordmark, three links, one action --------------------------- */
.topbar { position: sticky; top: 0; z-index: var(--z-nav); background: var(--paper); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.topbar nav { display: flex; align-items: center; gap: 28px; }
.topbar nav a:not(.btn) { color: var(--ink-2); font-size: 0.9375rem; font-weight: 500; transition: color 0.2s; }
.topbar nav a:not(.btn):hover { color: var(--ink); }

/* --- Hero ----------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 96px) 0 clamp(72px, 9vw, 140px); }
.hero > .wrap { position: relative; z-index: 1; }

/* Ambient background: flat document sheets in the category tints drifting slowly.
   Transform and opacity only. Paused for reduced-motion users. */
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.sheet {
    --sheet: var(--paper-2);
    position: absolute; left: var(--x); top: var(--y); width: var(--w); aspect-ratio: 3 / 4;
    display: flex; flex-direction: column; gap: max(5px, 0.55vw);
    padding: calc(var(--w) * 0.13) calc(var(--w) * 0.12); border-radius: clamp(6px, 0.8vw, 12px);
    background: var(--sheet);
    transform: rotate(var(--r));
    will-change: transform;
}
.sheet i { display: block; height: max(4px, 0.42vw); border-radius: 99px; background: rgba(30, 28, 24, 0.07); }
.sheet i:first-child { width: 55%; background: rgba(30, 28, 24, 0.11); margin-bottom: max(3px, 0.3vw); }
.sheet i:nth-child(3) { width: 80%; }
.sheet i:nth-child(4) { width: 65%; }
.s-id { --sheet: #D9E7F1; }
.s-edu { --sheet: #F1E6BE; }
.s-health { --sheet: #F1D8D2; }
.s-green { --sheet: #D3E4DA; }
.s-family { --sheet: #E3DAEF; }
@media (prefers-reduced-motion: no-preference) {
    .sheet { animation: sheet-in 1.4s var(--ease-out) backwards, sheet-drift var(--t, 20s) ease-in-out var(--d, 0s) infinite alternate; }
    .sheet:nth-child(2) { animation-delay: 0.1s, var(--d); }
    .sheet:nth-child(3) { animation-delay: 0.2s, var(--d); }
    .sheet:nth-child(4) { animation-delay: 0.3s, var(--d); }
    .sheet:nth-child(5) { animation-delay: 0.4s, var(--d); }
    .sheet:nth-child(6) { animation-delay: 0.5s, var(--d); }
    .sheet:nth-child(7) { animation-delay: 0.6s, var(--d); }
    .sheet:nth-child(8) { animation-delay: 0.7s, var(--d); }
    @keyframes sheet-in { from { opacity: 0; } to { opacity: 1; } }
    @keyframes sheet-drift {
        from { transform: translate3d(0, 0, 0) rotate(var(--r)); }
        to { transform: translate3d(var(--dx), var(--dy), 0) rotate(calc(var(--r) + var(--dr))); }
    }
}
.hero-bg.paused .sheet { animation-play-state: paused; }
.motion-toggle { display: inline-flex; align-items: center; gap: 8px; margin-top: 28px; padding: 8px 10px; border-radius: var(--radius); color: var(--ink-2); font-size: 0.8125rem; font-weight: 500; transition: background-color 0.2s, color 0.2s; }
.motion-toggle:hover { background: var(--paper-2); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .motion-toggle { display: none; } }
@media (max-width: 860px) {
    .sheet:nth-child(n+6) { display: none; }
    .sheet { --w: 22vw !important; }
}
.hero h1 {
    font-size: clamp(2.6rem, 9.2vw, 9rem);
    line-height: 0.92; letter-spacing: -0.04em; font-weight: 400;
    max-width: 16ch;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); margin-top: clamp(40px, 6vw, 88px); align-items: start; }
.hero-copy p { font-size: 1.1875rem; line-height: 1.6; color: var(--ink); max-width: 34ch; }
.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 32px; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1rem; }
.text-link { font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; color: var(--ink); }
.text-link:hover { color: var(--accent); }

/* Interface fragments */
[data-ui] { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.frag-stack { display: grid; gap: 14px; }
.frag-stack .doc-card { padding: 18px 20px; gap: 16px; }
.frag-stack .doc-card:nth-child(2) { margin-left: clamp(0px, 4vw, 56px); }
.frag-stack .doc-card:nth-child(3) { margin-left: clamp(0px, 8vw, 112px); }
.frag-stack .doc-card { transform: none; }
.frag-label { font-size: 0.8125rem; color: var(--ink-2); margin-top: 12px; }

/* --- Story rows ------------------------------------------------------------ */
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 7vw, 120px); align-items: center; padding: clamp(56px, 8vw, 120px) 0; }
.row.flip .row-text { order: 2; }
.row h2 { font-size: clamp(2.5rem, 5vw, 4.25rem); line-height: 1; letter-spacing: -0.035em; max-width: 14ch; }
.row p { margin-top: 24px; font-size: 1.125rem; color: var(--ink); max-width: 40ch; }
.facts { list-style: none; margin-top: 28px; display: grid; gap: 12px; max-width: 42ch; }
.facts li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); }
.facts .ph-bold { color: var(--accent); margin-top: 4px; }

/* Fragment: category tiles */
.tile-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.tile-row div { display: flex; align-items: center; gap: 8px; padding: 14px 12px; border-radius: var(--radius); font-size: 0.875rem; font-weight: 500; }
.tile-row .ph-bold { font-size: 1.25rem; }
.tile-id { background: var(--identity-bg); color: var(--identity-fg); }
.tile-edu { background: var(--education-bg); color: var(--education-fg); }
.tile-health { background: var(--health-bg); color: var(--health-fg); }
.frag .dropzone { padding: 22px 16px; }

/* Fragment: share form and log */
.frag .form-group { margin-bottom: 16px; }
.frag .btn { pointer-events: none; }
.frag input, .frag select { pointer-events: none; }
.frag .log-row { grid-template-columns: auto 1fr; gap: 6px 12px; padding: 14px 2px; }
.frag .log-detail { grid-column: 1 / -1; }

/* --- Security band: a full field of tone ------------------------------------ */
.band { background: var(--paper-2); padding: clamp(72px, 9vw, 140px) 0; }
.band h2 { font-size: clamp(2.5rem, 5.4vw, 4.75rem); line-height: 1; letter-spacing: -0.035em; max-width: 14ch; }
.band-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px clamp(32px, 7vw, 120px); margin-top: clamp(40px, 6vw, 80px); }
.band-grid h3 { font-family: var(--font-ui); font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; margin-bottom: 10px; }
.band-grid p { color: var(--ink); max-width: 44ch; }
.band-note { margin-top: clamp(40px, 6vw, 72px); color: var(--ink-2); max-width: 64ch; font-size: 0.9375rem; }

/* --- Closing ------------------------------------------------------------------ */
.close { padding: clamp(72px, 9vw, 140px) 0 24px; }
.close h2 { font-size: clamp(2.5rem, 5.4vw, 4.75rem); line-height: 1; letter-spacing: -0.035em; max-width: 14ch; }
.close .hero-actions { margin-top: 36px; }
.wordmark { display: block; margin-top: clamp(56px, 9vw, 128px); font-family: var(--font-display); font-weight: 400; font-size: clamp(5rem, 24vw, 22rem); line-height: 0.8; letter-spacing: -0.05em; color: var(--accent); user-select: none; overflow: hidden; }
.foot { padding: 28px 0 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; color: var(--ink-2); font-size: 0.875rem; }
.foot nav { display: flex; gap: 24px; flex-wrap: wrap; }
.foot a:hover { color: var(--ink); }

/* --- Phone ------------------------------------------------------------------- */
@media (max-width: 860px) {
    .wrap { width: calc(100% - 40px); }
    .topbar nav a:not(.btn) { display: none; }
    .hero-grid, .row, .band-grid { grid-template-columns: 1fr; }
    .row.flip .row-text { order: 0; }
    .row { gap: 36px; }
    .frag-stack .doc-card:nth-child(2) { margin-left: 18px; }
    .frag-stack .doc-card:nth-child(3) { margin-left: 36px; }
    .band-grid { gap: 40px; }
}

/* --- Scroll reveal (only when JS has marked the page) ------------------------ */
@media (prefers-reduced-motion: no-preference) {
    .js .rv { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms); }
    .js .rv.in { opacity: 1; transform: none; }
}
