/* Shared base for the round-3 homepage directions.
   Brand tokens come from the draft Vanaya Strategic Brand Book. Each direction
   page sets its own world on top of this file. */

@font-face {
    font-family: 'Mulish';
    font-style: normal;
    font-display: swap;
    font-weight: 200 1000;
    src: url('fonts/mulish-latin-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Mulish';
    font-style: normal;
    font-display: swap;
    font-weight: 200 1000;
    src: url('fonts/mulish-latin-ext-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Mulish';
    font-style: italic;
    font-display: swap;
    font-weight: 200 1000;
    src: url('fonts/mulish-latin-wght-italic.woff2') format('woff2-variations');
}

:root {
    --red: #E30621;
    --red-deep: #B31D2F;
    --ink: #1D1D1B;
    --text: #404041;
    --muted: #666666;
    --paper: #FFFFFF;
    --light: #F6F6F6;
    --font: 'Mulish', 'Helvetica Neue', Arial, sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --page: 1280px;
    --gutter: clamp(20px, 4.5vw, 56px);
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: lining-nums;
}

h1, h2, h3, h4 {
    margin: 0;
    color: var(--ink);
    font-family: var(--font);
    text-wrap: balance;
}

p { margin: 0; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
button, select { font: inherit; color: inherit; }

::selection { background: rgba(227, 6, 33, 0.18); color: var(--ink); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 0; }
html { scrollbar-color: #C9C8C5 transparent; }

/* Sections set their own display, which would otherwise beat the hidden
   attribute. A section with no live posts must really disappear. */
[hidden] { display: none !important; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.wrap {
    width: 100%;
    max-width: calc(var(--page) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.icon { width: 18px; height: 18px; flex: none; }

/* ---------- Buttons and links ---------- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 24px;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    text-decoration: none;
    /* Square corners: consultancy sites use sharp buttons, which read as sure of themselves. */
    border-radius: 0;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 220ms var(--ease-out), color 220ms var(--ease-out), border-color 220ms var(--ease-out);
}
.button .icon { transition: transform 260ms var(--ease-out); }
.button:hover .icon { transform: translateX(3px); }
.button--red { background: var(--red); color: var(--paper); }
.button--red:hover { background: var(--red-deep); }
.button--quiet { background: rgba(29, 29, 27, 0.06); color: var(--ink); }
.button--quiet:hover { background: rgba(29, 29, 27, 0.1); }
.button--small { min-height: 40px; padding: 0 18px; font-size: 14px; }

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
    color: var(--red-deep);
    text-decoration: none;
}
.text-link .icon { transition: transform 260ms var(--ease-out); }
.text-link:hover .icon { transform: translateX(4px); }

/* Article metadata, as on the live articles page: format, topic, date. */
.meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-size: 13px;
    line-height: 1.4;
}
.meta-kind { font-weight: 800; color: var(--ink); }
.meta-topic { font-weight: 700; color: var(--red); }
.meta-date { color: var(--muted); }
.meta--light .meta-kind { color: var(--paper); }
.meta--light .meta-topic { color: var(--paper); opacity: 0.92; }
.meta--light .meta-date { color: rgba(255, 255, 255, 0.78); }

/* ---------- Picker selects ---------- */
.select {
    appearance: none;
    -webkit-appearance: none;
    max-width: 100%;
    padding: 0 34px 2px 0;
    font-weight: 800;
    color: var(--ink);
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5l5 5 5-5' fill='none' stroke='%23E30621' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 4px center / 0.7em;
    border: 0;
    border-bottom: 2px solid rgba(227, 6, 33, 0.45);
    border-radius: 0;
    cursor: pointer;
    text-overflow: ellipsis;
    transition: border-color 200ms var(--ease-out);
}
.select:hover { border-bottom-color: var(--red); }
.select:focus-visible { border-radius: 2px; }

@keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}
.is-fresh > * { animation: rise 520ms var(--ease-out) both; }
.is-fresh > *:nth-child(2) { animation-delay: 70ms; }
.is-fresh > *:nth-child(3) { animation-delay: 140ms; }

/* ---------- Insight pods: shared mechanics ----------
   Hover or focus widens a pod, deepens its overlay and reveals the excerpt.
   Each direction sets --pod-radius, --pod-height and the overlay colours. */
.pods {
    display: flex;
    gap: 14px;
    height: var(--pod-height, 540px);
}
.pod {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 26px;
    color: var(--paper);
    text-decoration: none;
    border-radius: var(--pod-radius, 16px);
    overflow: hidden;
    isolation: isolate;
    background: #2B2B2A;
    transition: flex-grow 700ms var(--ease-out), box-shadow 500ms var(--ease-out);
}
.pod-image {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1400ms var(--ease-out);
}
.pod::before,
.pod::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    transition: opacity 650ms var(--ease-out);
}
.pod::before { background: var(--pod-shade, linear-gradient(180deg, rgba(29, 29, 27, 0) 30%, rgba(29, 29, 27, 0.55) 62%, rgba(29, 29, 27, 0.88) 100%)); }
.pod::after { opacity: 0; background: var(--pod-shade-open, linear-gradient(205deg, rgba(227, 6, 33, 0.5) 0%, rgba(150, 22, 36, 0.3) 32%, rgba(29, 29, 27, 0.92) 74%)); }
.pod .meta { margin-bottom: 10px; }
.pod-title {
    color: var(--paper);
    font-weight: 800;
    font-size: 21px;
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.pod-excerpt {
    max-width: 44ch;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 320ms var(--ease-out), max-height 600ms var(--ease-out), margin 600ms var(--ease-out);
}
.pod-read {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-weight: 700;
    font-size: 14px;
    color: var(--paper);
    opacity: 0.8;
}
.pod.is-open { flex-grow: 2.3; box-shadow: 0 30px 60px -32px rgba(29, 29, 27, 0.5); }
.pod.is-open::after { opacity: 1; }
.pod.is-open .pod-image { transform: scale(1.05); }
.pod.is-open .pod-excerpt { opacity: 1; max-height: 160px; margin-top: 12px; transition-delay: 160ms; }
.pod.is-open .pod-read { opacity: 1; }

/* Tablet and phone: the pods become a swipeable strip with the excerpt always shown.
   Same cards, same overlay; the motion becomes the swipe. */
@media (max-width: 1023px), (hover: none) {
    .pods {
        height: auto;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-left: var(--gutter);
        margin: 0 calc(-1 * var(--gutter));
        padding: 0 var(--gutter) 6px;
        scrollbar-width: none;
    }
    .pods::-webkit-scrollbar { display: none; }
    .pod {
        flex: 0 0 min(78vw, 400px);
        min-height: 440px;
        scroll-snap-align: start;
    }
    .pod::after { opacity: 1; }
    .pod-excerpt { opacity: 1; max-height: none; margin-top: 10px; }
    .pod-read { opacity: 1; }
}

/* ---------- Illustrative Vanaya AI session panel: shared parts ---------- */
.waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 56px;
}
.wave-bar {
    flex: 1 1 0;
    min-width: 2px;
    border-radius: 2px;
    background: currentColor;
    opacity: 0.32;
}
.wave-bar.is-marked { opacity: 1; color: var(--red); }

/* ---------- Hero progress animation (shared timing) ---------- */
@keyframes hero-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}
[data-progress] { transform-origin: left center; transform: scaleX(0); }
[data-tab].is-active [data-progress] { animation: hero-progress 7s linear forwards; }
.is-paused [data-tab].is-active [data-progress],
[data-hero]:hover [data-tab].is-active [data-progress],
[data-hero]:has(:focus-visible) [data-tab].is-active [data-progress] { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Back to top: shared by every page ----------
   Appears once the visitor has scrolled past the first screen. */
.to-top {
    position: fixed;
    z-index: 40;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: var(--paper);
    background: var(--ink);
    border-radius: 0;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 16px 34px -14px rgba(29, 29, 27, 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out), background-color 200ms var(--ease-out), visibility 0s linear 300ms;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out), background-color 200ms var(--ease-out); }
.to-top:hover { background: var(--red); }
.to-top .icon { width: 20px; height: 20px; transition: transform 260ms var(--ease-out); }
.to-top:hover .icon { transform: translateY(-2px); }
.to-top:focus-visible { outline-offset: 4px; border-radius: 0; }
@media (max-width: 680px) {
    .to-top { width: 46px; height: 46px; }
}
