/* ============================================================
   Fundacja Polka — editorial studio layout
   Palette: paper #FFE9E9 / ink #48446D / accent #F57070
   Fonts loaded from the HTML (Outfit + Inter + IBM Plex Mono)
   ============================================================ */

/* ---------- tokens ---------- */
:root {
    --paper: #FFE9E9;
    --ink: #48446D;
    --accent: #F57070;
    --white: #FFFFFF;

    --ink-70: rgba(72, 68, 109, 0.70);
    --ink-55: rgba(72, 68, 109, 0.55);
    --hairline: rgba(72, 68, 109, 0.16);
    --hairline-soft: rgba(72, 68, 109, 0.10);

    --font-display: "Outfit", "Segoe UI", sans-serif;
    --font-brand: "Switzer", "Outfit", "Segoe UI", sans-serif;
    --font-body: "Inter", "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

    --gut: clamp(18px, 4vw, 56px);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-io: cubic-bezier(0.62, 0.05, 0.16, 1);
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

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

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.menu-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

::selection {
    background: var(--accent);
    color: var(--white);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 2px;
}

.skip-link {
    position: fixed;
    top: -200px;
    left: var(--gut);
    z-index: 999;
    padding: 12px 20px;
    background: var(--ink);
    color: var(--paper);
    font: 500 0.8rem/1 var(--font-mono);
    transition: top 0.25s var(--ease);
}

.skip-link:focus { top: 16px; }

/* ---------- shared bits ---------- */
.label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    line-height: 1.5;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-55);
}

.label .sep { opacity: 0.45; }
.label-invert { color: rgba(255, 255, 255, 0.9); }

.accent { color: var(--accent); }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ---------- logotype ---------- */
.wordmark {
    display: block;
    container-type: inline-size;
}

.wordmark-top {
    display: flex;
    justify-content:space-between;
    font-family: var(--font-brand);
    font-size: clamp(0.72rem, 2vw, 2rem);
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.35em;
    /* 500px przy szerokości 1440px, skalowane razem z ekranem */
    margin-inline: 37.65%;
}

@supports (container-type: inline-size) {
    .wordmark-top { margin-inline: 37.65cqw; }
}

.wordmark-main {
    display: block;
    margin-left: -1.57%;
    font-family: var(--font-brand);
    font-size: 27.6vw;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.833;
    text-transform: uppercase;
    color: var(--ink);
}

@supports (container-type: inline-size) {
    .wordmark-main { font-size: 31.47cqw; }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    padding: 1.05em 1.8em;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: background 0.4s var(--ease), color 0.4s var(--ease),
                border-color 0.4s var(--ease), transform 0.35s var(--ease);
}

.btn-arrow { transition: transform 0.4s var(--ease); }
.btn:hover .btn-arrow { transform: translate(2px, -2px); }
.btn-line:hover .btn-arrow { transform: translateY(3px); }

.btn-solid {
    background: var(--accent);
    color: var(--white);
}

.btn-solid:hover {
    background: var(--ink);
    color: var(--paper);
}

.btn-line {
    border-color: var(--hairline);
    color: var(--ink);
}

.btn-line:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
}

.btn-ghost {
    border-color: rgba(255, 255, 255, 0.45);
    color: var(--white);
}

.btn-ghost:hover {
    background: var(--white);
    color: var(--accent);
    border-color: var(--white);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    padding-bottom: 3px;
    border-bottom: 1px solid currentColor;
    transition: gap 0.35s var(--ease), color 0.3s var(--ease);
}

.link-arrow:hover {
    gap: 0.8em;
    color: var(--ink);
}

/* reveal */
.rv {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}

.rv.in {
    opacity: 1;
    transform: none;
}

/* ---------- overlays ---------- */
.grain {
    position: fixed;
    inset: -60%;
    z-index: 900;
    pointer-events: none;
    opacity: 0.2;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
    animation: grainShift 7s steps(6) infinite;
}

@keyframes grainShift {
    0%   { transform: translate(0, 0); }
    20%  { transform: translate(-3%, 2%); }
    40%  { transform: translate(2%, -3%); }
    60%  { transform: translate(-2%, -1%); }
    80%  { transform: translate(2%, 2%); }
    100% { transform: translate(0, 0); }
}

.progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 800;
    pointer-events: none;
}

.progress span {
    display: block;
    height: 100%;
    background: var(--accent);
    transform-origin: 0 50%;
    transform: scaleX(0);
}

.cursor { display: none; }

.has-cursor .cursor {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 950;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    pointer-events: none;
    mix-blend-mode: multiply;
    transition: width 0.3s var(--ease), height 0.3s var(--ease), opacity 0.3s ease;
}

.has-cursor .cursor.is-hot {
    width: 44px;
    height: 44px;
    opacity: 0.5;
}

/* ---------- topbar ---------- */
/* the bar is permanently visible, so anchored sections need to clear it */
#about,
#projects,
#support,
#statut,
#sprawozdania,
#contact,
.doc .row { scroll-margin-top: clamp(72px, 8vh, 92px); }

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 700;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 18px var(--gut);
    border-bottom: 1px solid transparent;
    transition: background 0.4s ease, border-color 0.4s ease, padding 0.4s ease;
}

.topbar.is-stuck {
    padding-top: 12px;
    padding-bottom: 12px;
    background: rgba(255, 233, 233, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--hairline-soft);
}

body.menu-open .topbar,
body.menu-open .topbar.is-stuck {
    color: var(--paper);
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
}

body.menu-open .brand-mark-tile { fill: var(--paper); }
body.menu-open .brand-mark-p { fill: var(--ink); }
body.menu-open .brand-mark-dot { fill: var(--accent); }
body.menu-open .menu-btn { border-color: rgba(255, 233, 233, 0.32); }

.brand {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.brand-mark {
    display: block;
    width: clamp(30px, 2.6vw, 38px);
    height: auto;
    transition: transform 0.4s var(--ease);
}

.brand-mark-tile,
.brand-mark-p,
.brand-mark-dot {
    transform-box: fill-box;
    transform-origin: center;
}

.brand-mark-tile {
    fill: var(--ink);
    transition: fill 0.35s var(--ease);
    animation: brand-tile-in 0.7s var(--ease) backwards;
}

.brand-mark-p {
    fill: var(--paper);
    transform-origin: left bottom;
    transition: fill 0.35s var(--ease), transform 0.4s var(--ease);
    animation: brand-p-in 0.8s var(--ease) 0.15s backwards;
}

.brand-mark-dot {
    fill: var(--accent);
    transition: fill 0.35s var(--ease);
    animation:
        brand-dot-in 0.9s linear 0.55s backwards,
        brand-dot-hop 2.2s linear 1.45s infinite;
}

.brand:hover .brand-mark { transform: scale(1.06); }
.brand:hover .brand-mark-tile { fill: var(--accent); }
.brand:hover .brand-mark-p { fill: #fff; transform: skewX(-6deg); }
.brand:hover .brand-mark-dot { fill: #fff; }

@keyframes brand-tile-in {
    from { transform: scale(0.4) rotate(-12deg); opacity: 0; }
}

@keyframes brand-p-in {
    from { transform: translateY(40%); opacity: 0; }
}

/* kropka spada i odbija się jak piłka */
@keyframes brand-dot-in {
    0%   { transform: translateY(-420%); opacity: 0; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
    10%  { opacity: 1; }
    45%  { transform: translateY(0) scale(1.25, 0.75); animation-timing-function: cubic-bezier(0, 0.55, 0.45, 1); }
    65%  { transform: translateY(-80%) scale(0.95, 1.05); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
    82%  { transform: translateY(0) scale(1.12, 0.88); animation-timing-function: cubic-bezier(0, 0.55, 0.45, 1); }
    92%  { transform: translateY(-18%); }
    100% { transform: translateY(0); }
}

/* po wejściu kropka podskakuje w pętli */
@keyframes brand-dot-hop {
    0%, 50% { transform: translateY(0); animation-timing-function: ease-in; }
    56%  { transform: translateY(0) scale(1.18, 0.82); animation-timing-function: cubic-bezier(0, 0.55, 0.45, 1); }
    72%  { transform: translateY(-110%) scale(0.94, 1.06); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
    86%  { transform: translateY(0) scale(1.15, 0.85); animation-timing-function: cubic-bezier(0, 0.55, 0.45, 1); }
    93%  { transform: translateY(-14%); }
    100% { transform: translateY(0); }
}

.topbar-meta {
    justify-self: center;
    text-align: center;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.topnav a {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background 0.35s var(--ease), color 0.35s var(--ease);
}

.topnav a .idx {
    font-size: 0.6rem;
    color: var(--accent);
}

.topnav a:hover { background: rgba(72, 68, 109, 0.07); }

.topnav-cta {
    background: var(--ink);
    color: var(--paper);
    margin-left: 8px;
}

.topnav-cta:hover {
    background: var(--accent);
    color: var(--white);
}

.menu-btn {
    display: none;
    justify-self: end;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.menu-btn-bars {
    display: grid;
    gap: 4px;
    width: 16px;
}

.menu-btn-bars i {
    display: block;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.4s var(--ease);
}

body.menu-open .menu-btn-bars i:first-child { transform: translateY(2.75px) rotate(20deg); }
body.menu-open .menu-btn-bars i:last-child { transform: translateY(-2.75px) rotate(-20deg); }

/* ---------- fullscreen menu ---------- */
.menu {
    position: fixed;
    inset: 0;
    z-index: 650;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    padding: 120px var(--gut) var(--gut);
    background: var(--ink);
    color: var(--paper);
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.75s var(--ease-io);
}

.menu.is-open { clip-path: inset(0 0 0 0); }

.menu-nav {
    display: flex;
    flex-direction: column;
}

.menu-nav a {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 233, 233, 0.14);
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 9vw, 3.4rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
    transition: color 0.3s ease, padding-left 0.45s var(--ease);
}

.menu-nav a:hover {
    color: var(--accent);
    padding-left: 12px;
}

.menu-nav .idx {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--accent);
}

.menu-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: rgba(255, 233, 233, 0.6);
}

/* ---------- hero ---------- */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: clamp(24px, 4vh, 48px);
    padding: clamp(92px, 13vh, 130px) var(--gut) clamp(26px, 5vh, 46px);
    border-bottom: 1px solid var(--hairline);
}

.hero-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-wordmark {
    margin: 0;
    animation: heroIn 1.1s var(--ease) 0.15s both;
}

@keyframes heroIn {
    from { opacity: 0; transform: translateY(40px) scale(0.985); }
    to { opacity: 1; transform: none; }
}

.hero-foot {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) auto;
    align-items: end;
    gap: clamp(20px, 4vw, 56px);
    padding-top: clamp(16px, 3vh, 28px);
    border-top: 1px solid var(--hairline);
    animation: heroIn 1.1s var(--ease) 0.35s both;
}

.hero-claim {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 2.2rem);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.12;
}

.hero-claim .accent { color: var(--accent); }

.hero-note {
    max-width: 46ch;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--ink-70);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    display: inline-flex;
    gap: 8px;
}

.scroll-cue span { animation: nudge 1.8s ease-in-out infinite; }

@keyframes nudge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* ---------- statement ---------- */
.statement-section { padding: clamp(80px, 14vh, 160px) var(--gut); }

.sticky-label {
    position: sticky;
    top: 96px;
}

.statement-section .sticky-label { margin-bottom: clamp(26px, 5vh, 52px); }

.statement {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 7.4vw, 6rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1;
    max-width: 18ch;
}

.statement .line {
    display: block;
    opacity: 0;
    transform: translateY(0.35em);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.statement .line.in {
    opacity: 1;
    transform: none;
}

.statement .accent { color: var(--accent); }

.statement-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    margin-top: clamp(40px, 7vh, 72px);
    padding-top: 18px;
    border-top: 1px solid var(--hairline);
}

/* ---------- stats ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: clamp(28px, 4vw, 48px) clamp(18px, 2.4vw, 32px);
    border-left: 1px solid var(--hairline);
}

.stat:first-child { border-left: 0; }

.stat-num {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5.4vw, 4.4rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 0.95;
    color: var(--accent);
}

.stat .label { max-width: 22ch; }

/* ---------- about ---------- */
.about {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr);
    gap: clamp(32px, 6vw, 88px);
    padding: clamp(80px, 14vh, 150px) var(--gut);
}

.about-aside {
    align-self: start;
    position: sticky;
    top: 110px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.about-aside .sticky-label { position: static; }

.about-heading {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.6vw, 3.2rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.02;
}

.about-intro {
    max-width: 34ch;
    color: var(--ink-70);
    font-size: 0.95rem;
}

.rows {
    display: flex;
    flex-direction: column;
}

.row {
    display: grid;
    grid-template-columns: 54px minmax(150px, 0.8fr) minmax(0, 1.6fr);
    gap: clamp(16px, 2.6vw, 40px);
    padding: clamp(26px, 4vh, 44px) 0;
    border-top: 1px solid var(--hairline);
}

.row:last-child { border-bottom: 1px solid var(--hairline); }

.row-idx {
    color: var(--accent);
    padding-top: 0.35em;
}

.row-title {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.1vw, 1.85rem);
    font-weight: 600;
    letter-spacing: -0.028em;
    line-height: 1.12;
}

.row-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 62ch;
    color: var(--ink-70);
}

.row-body p { font-size: 0.98rem; }
.row-body .link-arrow { align-self: flex-start; margin-top: 4px; }

.fig-svg { width: 100%; height: auto; }
.fig-bulb { max-width: 240px; }
.fig-hands { max-width: 210px; }

.deflist { display: grid; }

.deflist > div {
    display: grid;
    grid-template-columns: minmax(150px, 0.55fr) minmax(0, 1fr);
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--hairline-soft);
}

.deflist > div:first-child {
    border-top: 0;
    padding-top: 0;
}

.deflist dt {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
}

.deflist dd { font-size: 0.95rem; }

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}

.tags li {
    padding: 8px 15px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
    transition: background 0.35s var(--ease), color 0.35s var(--ease),
                border-color 0.35s var(--ease);
}

.tags li:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

.checks {
    display: grid;
    gap: 10px;
    list-style: none;
}

.checks li {
    position: relative;
    padding-left: 26px;
    font-size: 0.96rem;
    color: var(--ink-70);
}

.checks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 14px;
    height: 2px;
    background: var(--accent);
}

/* ---------- projects ---------- */
.projects {
    padding: clamp(70px, 12vh, 130px) var(--gut) clamp(80px, 14vh, 150px);
    border-top: 1px solid var(--hairline);
}

.section-head {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: clamp(32px, 6vh, 64px);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 8vw, 6.5rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 0.95;
}

.index { list-style: none; }

.index-row {
    display: grid;
    grid-template-columns: 54px minmax(160px, 0.85fr) minmax(0, 1.5fr) auto;
    align-items: center;
    gap: clamp(14px, 2.6vw, 36px);
    padding: clamp(18px, 2.6vh, 26px) clamp(10px, 1.6vw, 22px);
    margin-inline: clamp(-22px, -1.6vw, -10px);
    border-top: 1px solid var(--hairline);
    border-radius: 14px;
    transition: background 0.45s var(--ease), color 0.45s var(--ease);
}

.index-row:last-child { border-bottom: 1px solid var(--hairline); }

.index-name {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.4vw, 2.75rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1;
}

.index-desc {
    font-size: 0.95rem;
    color: var(--ink-70);
}

.index-num { color: var(--accent); }

.index-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    white-space: nowrap;
}

.index-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

@media (hover: hover) {
    .index-row:hover {
        background: var(--ink);
        color: var(--paper);
    }
    .index-row:hover .index-desc { color: rgba(255, 233, 233, 0.72); }
    .index-row:hover .index-num,
    .index-row:hover .index-status { color: var(--paper); }
    .index-row:hover .index-status { border-color: rgba(255, 233, 233, 0.35); }
}

.projects-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 32px;
    margin-top: clamp(44px, 7vh, 80px);
}


.projects-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.projects-note {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2vw, 1.6rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.2;
    max-width: 22ch;
}

/* ---------- fundraiser ---------- */
.fundraiser {
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 3vh, 28px);
    margin-bottom: clamp(40px, 7vh, 72px);
    padding: clamp(24px, 4vw, 44px);
    background: var(--white);
    border: 1px solid var(--hairline-soft);
    border-radius: 24px;
}

.fundraiser-head { display: flex; flex-direction: column; gap: 12px; }
.fundraiser-head .link-arrow { align-self: flex-start; }

.fundraiser-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.4vw, 2.75rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.fundraiser-amounts {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.fundraiser-raised {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--accent);
}

.fundraiser-goal { color: var(--ink-70); }

.fundraiser-bar {
    height: 14px;
    border-radius: 999px;
    background: rgba(245, 112, 112, 0.14);
    overflow: hidden;
}

.fundraiser-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.4s var(--ease);
}

.fundraiser-pay {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.fundraiser-note {
    font-size: 0.85rem;
    color: var(--ink-55);
}

.fundraiser-note a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.fundraiser-note a:hover { color: var(--accent); }

.copy-card.copy-card-light {
    border-color: var(--hairline);
    color: var(--ink);
}

.copy-card.copy-card-light .copy-value { font-size: clamp(1.15rem, 2vw, 1.55rem); }

.copy-card.copy-card-light:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

.copy-card.copy-card-light:hover .label { color: rgba(255, 255, 255, 0.75); }
.copy-card.copy-card-light.is-copied .label { color: rgba(255, 233, 233, 0.7); }

/* ---------- landing page sections ---------- */
.lp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: end;
    gap: clamp(24px, 4vw, 64px);
}

.lp-hero-text {
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 4vh, 44px);
}

.lp-hero-text .section-head { margin-bottom: 0; }

.lp-hero-figure .fig-svg { max-width: 460px; margin-left: auto; }

.lp-section {
    padding: clamp(70px, 12vh, 130px) var(--gut);
    border-top: 1px solid var(--hairline);
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    list-style: none;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: clamp(24px, 3vw, 36px);
    background: var(--white);
    border: 1px solid var(--hairline-soft);
    border-radius: 20px;
}

.step p { color: var(--ink-70); font-size: 0.98rem; }
.step .btn, .step .link-arrow { margin-top: auto; }

.step-num { color: var(--accent); }

.step-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.faq {
    max-width: 860px;
    border-top: 1px solid var(--hairline);
}

.faq-item { border-bottom: 1px solid var(--hairline); }

.faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 22px 0;
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: "+";
    flex: none;
    font-family: var(--font-mono);
    font-weight: 400;
    color: var(--accent);
    transition: transform 0.35s var(--ease);
}

.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--accent); }

.faq-item p {
    max-width: 68ch;
    padding-bottom: 22px;
    color: var(--ink-70);
}

.faq-item a,
.fundraiser-head .link-arrow { color: var(--ink); }

.faq-item a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.faq-item a:hover { color: var(--accent); }

/* ---------- collab ---------- */
.collab {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.6fr);
    align-items: center;
    gap: clamp(32px, 6vw, 80px);
    padding: clamp(70px, 12vh, 130px) var(--gut);
    background: var(--white);
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
}

.collab-figure {
    display: flex;
    justify-content: center;
}

.collab-figure .fig-svg {
    max-width: 230px;
    animation: bob 7s ease-in-out infinite;
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

.collab-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 62ch;
}

.collab-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.6vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.collab-text { color: var(--ink-70); }

.mail-link {
    align-self: flex-start;
    margin-top: 6px;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.6vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--accent);
    border-bottom: 2px solid transparent;
    transition: border-color 0.4s var(--ease), color 0.3s ease;
}

.mail-link:hover {
    border-bottom-color: var(--accent);
    color: var(--ink);
}

/* ---------- support ---------- */
.support {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(32px, 5vh, 56px);
    padding: clamp(70px, 13vh, 140px) var(--gut);
    background: var(--accent);
    color: var(--white);
}

.support-head {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.support-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 9vw, 7rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 0.92;
}

.support-sub {
    max-width: 48ch;
    color: rgba(255, 255, 255, 0.86);
}

.support-grid {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
    gap: 16px;
}

.copy-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    padding: clamp(22px, 3vw, 34px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--white);
    transition: background 0.4s var(--ease), color 0.4s var(--ease),
                border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

.copy-card:hover {
    background: var(--white);
    color: var(--accent);
    border-color: var(--white);
    transform: translateY(-3px);
}

.copy-card:hover .label-invert { color: rgba(245, 112, 112, 0.7); }

.copy-value {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 3vw, 2.2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
    word-break: break-word;
}

.copy-hint { margin-top: auto; }

/* account number: always one line, scaled to the card width (26 digits ≈ 15em) */
.copy-card-account { container-type: inline-size; }

.copy-card-account .copy-value {
    white-space: nowrap;
    word-break: normal;
    font-size: min(clamp(1.35rem, 3vw, 2.2rem), 6.2cqi);
}

.copy-card.copy-card-light.copy-card-account .copy-value {
    font-size: min(clamp(1.15rem, 2vw, 1.55rem), 6.2cqi);
}

.copy-card.is-copied {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}

.copy-card.is-copied .label-invert { color: rgba(255, 233, 233, 0.7); }

.support-figure {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
}

.support-figure .fig-svg {
    max-width: 180px;
    animation: bob 8s ease-in-out infinite;
}

/* ---------- footer ---------- */
.footer {
    padding: clamp(60px, 10vh, 110px) 0 24px;
    overflow: hidden;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
    padding: 0 var(--gut) clamp(40px, 8vh, 80px);
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 0.92rem;
    color: var(--ink-70);
}

.footer-col .label {
    margin-bottom: 8px;
    color: var(--ink);
}

.footer-link {
    width: fit-content;
    transition: color 0.3s ease, transform 0.35s var(--ease);
}

.footer-link:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.footer-wordmark {
    padding: 0 var(--gut);
    margin-bottom: clamp(20px, 4vh, 40px);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 14px;
    padding: 18px var(--gut) 0;
    border-top: 1px solid var(--hairline);
}

.to-top {
    display: inline-flex;
    gap: 7px;
    transition: color 0.3s ease;
}

.to-top:hover { color: var(--accent); }

/* ---------- toast ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    z-index: 960;
    transform: translate(-50%, 140%);
    padding: 13px 22px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 16px 40px rgba(72, 68, 109, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.5s var(--ease), opacity 0.4s ease;
}

.toast.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

/* ---------- statut page (statut.html) ---------- */
.doc-head {
    padding: clamp(92px, 13vh, 130px) var(--gut) clamp(40px, 7vh, 72px);
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 4vh, 44px);
}

.doc-head .section-head { margin-bottom: 0; }

.doc-lead {
    max-width: 62ch;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    line-height: 1.6;
    color: var(--ink-70);
}

.doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(20px, 4vw, 60px);
    padding-top: clamp(18px, 3vh, 28px);
    border-top: 1px solid var(--hairline);
}

.doc-meta div { display: flex; flex-direction: column; gap: 6px; }
.doc-meta dd { font-family: var(--font-mono); font-size: 0.95rem; }

.doc-note {
    max-width: 68ch;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px dashed var(--accent);
    background: rgba(245, 112, 112, 0.07);
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--ink-70);
}

.doc-note strong { color: var(--accent); }

.doc-toc {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
}

.doc-toc a {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-55);
    transition: color 0.3s ease, transform 0.35s var(--ease);
}

.doc-toc a:hover { color: var(--accent); transform: translateX(4px); }

.doc { padding-top: clamp(24px, 5vh, 56px); }

.doc .row-title { max-width: 14ch; }

.doc-todo {
    padding-left: 14px;
    border-left: 2px solid var(--accent);
    color: var(--ink-55);
}

.doc-par {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--accent);
    text-align: center;
}

.doc-par:not(:first-child) { margin-top: 12px; }

.doc-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 1.4em;
    font-size: 0.98rem;
}

.nowrap { white-space: nowrap; }

.doc-list a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.doc-list a:hover { color: var(--accent); }

.doc-list li::marker {
    font-family: var(--font-mono);
    font-size: 0.85em;
    color: var(--ink-55);
}

.doc-list .doc-list {
    gap: 6px;
    margin-top: 10px;
}

.row-body .doc-sign {
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--hairline-soft);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
}

.doc-sign strong { color: var(--ink); font-weight: 500; }

.doc-foot {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: clamp(40px, 8vh, 90px) var(--gut) clamp(60px, 10vh, 110px);
}

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 1180px) {
    .topbar-meta { display: none; }

    .hero-foot {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        row-gap: 26px;
    }
    .hero-actions { grid-column: 1 / -1; }

    .about { grid-template-columns: 1fr; }
    .about-aside { position: static; }

    .collab { grid-template-columns: 1fr; }
    .collab-figure { justify-content: flex-start; }
}

@media (max-width: 1080px) {
    .topnav { display: none; }
    .menu-btn { display: inline-flex; }
    .topbar { grid-template-columns: auto 1fr; }
}

@media (max-width: 900px) {

    .stats { grid-template-columns: repeat(2, 1fr); }
    .stat { border-left: 0; border-top: 1px solid var(--hairline); }
    .stat:nth-child(-n + 2) { border-top: 0; }
    .stat:nth-child(even) { border-left: 1px solid var(--hairline); }

    .row { grid-template-columns: 44px minmax(0, 1fr); }
    .row-body { grid-column: 2; }

    .index-row {
        grid-template-columns: 40px minmax(0, 1fr);
        row-gap: 8px;
    }
    .index-desc,
    .index-status { grid-column: 2; }
    .index-status { justify-self: start; }

    .support-grid { grid-template-columns: 1fr; }
    .fundraiser-pay { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .lp-hero { grid-template-columns: 1fr; }
    .lp-hero-figure .fig-svg { max-width: 320px; margin: 0 auto; }
    .support-figure { justify-content: flex-start; padding-left: 0; }

    .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
}

@media (max-width: 640px) {
    .hero { gap: clamp(22px, 4vh, 36px); }
    .hero-head .label:last-child { display: none; }
    .hero-wordmark { padding: clamp(10px, 3vh, 24px) 0; }
    .wordmark-top { margin-inline: 22cqw; }
    .hero-foot { grid-template-columns: 1fr; }
    .hero-claim { font-size: clamp(1.5rem, 7vw, 2rem); }
    .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
    .scroll-cue { display: none; }

    .statement { max-width: none; }
    .deflist > div { grid-template-columns: 1fr; gap: 6px; }

    .projects-foot {
        flex-direction: column;
        align-items: flex-start;
    }
    .projects-cta { width: 100%; }
    .projects-cta .btn { width: 100%; justify-content: center; }

    .footer-bottom { flex-direction: column; }
}

@media (max-width: 420px) {
    .stats { grid-template-columns: 1fr; }
    .stat {
        border-left: 0;
        border-top: 1px solid var(--hairline);
    }
    .stat:first-child { border-top: 0; }
}

/* ============================================================
   reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .grain { animation: none; }

    .rv,
    .statement .line {
        opacity: 1;
        transform: none;
    }
}
