/* =========================================================================
   LAVACASCADE — css/components/layout.css
   Page width, section spacing, the editorial two-column section, grids,
   and the skip link. Every page is built from these.
   ========================================================================= */

/* =========================================
   SKIP LINK (first thing keyboard users hit)
   ========================================= */
.skip-link {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    z-index: calc(var(--z-menu) + 1);
    padding: var(--space-2) var(--space-4);
    font-weight: 600;
    color: #FFFFFF;
    background: var(--lava-600);
    border-radius: var(--radius-sm);
    transform: translateY(-200%);
    transition: transform var(--dur-fast) var(--ease);
}

.skip-link:focus {
    transform: translateY(0);
}

/* =========================================
   WRAP: centered content column with a 16px+ gutter
   ========================================= */
.wrap {
    width: 100%;
    max-width: calc(var(--maxw) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.wrap--narrow {
    max-width: calc(820px + var(--gutter) * 2);
}

/* =========================================
   SECTIONS: separated by thin full-width dividers
   ========================================= */
.section {
    position: relative;
    padding-block: var(--section-y);
}

.section + .section {
    border-top: 1px solid var(--line);
}

.section--tight {
    padding-block: var(--space-8);
}

.section--alt {
    background: var(--night-800);
}

/* heading block that opens a section */
.section-head {
    max-width: 720px;
    margin-bottom: var(--space-7);
}

.section-head h2 {
    margin-top: var(--space-3);
}

.section-head p {
    margin-top: var(--space-4);
    color: var(--text-soft);
    font-size: var(--fs-lead);
}

.section-head--center {
    margin-inline: auto;
    text-align: center;
}

/* =========================================
   EDITORIAL: narrow label column + wide content column
   (the notmalo.net pattern)
   ========================================= */
.editorial {
    display: grid;
    grid-template-columns: minmax(150px, 220px) 1fr;
    gap: var(--space-6) var(--space-7);
}

.editorial__label {
    padding-top: 0.4rem;
}

/* =========================================
   GRIDS (3/4 -> 2 -> 1 columns)
   ========================================= */
.grid {
    display: grid;
    gap: var(--space-5);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* =========================================
   SCROLL REVEAL (js/components/reveal.js adds .is-in)
   Content is visible by default; the hidden start state only applies once
   JS has confirmed it's running (html.js), so no-JS visitors see everything.
   ========================================= */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}

/* stagger: data-reveal="1", "2", "3" wait a beat longer than "0" */
.js [data-reveal="1"] { transition-delay: 0.08s; }
.js [data-reveal="2"] { transition-delay: 0.16s; }
.js [data-reveal="3"] { transition-delay: 0.24s; }

.js [data-reveal].is-in {
    opacity: 1;
    transform: none;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
    .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .editorial { grid-template-columns: 1fr; gap: var(--space-4); }
    .editorial__label { padding-top: 0; }
}

@media (max-width: 640px) {
    .grid--2,
    .grid--3,
    .grid--4 { grid-template-columns: 1fr; }
    .section-head { margin-bottom: var(--space-6); }
}

@media (prefers-reduced-motion: reduce) {
    .js [data-reveal] { opacity: 1; transform: none; }
}
