/* =============================================================
   perso.news — fairycore broken-grid editorial
   palette: deep-burgundy with mossy + lavender accents
   ============================================================= */

:root {
    /* Palette (exact hex values from DESIGN.md) */
    --c-primary:      #6e2a34; /* deep burgundy */
    --c-secondary:    #a8566a; /* dried rose */
    --c-tertiary:     #5e7a62; /* moss chapel */
    --c-bg:           #f7f0e8; /* parchment cream */
    --c-surface:      #fdfaf6; /* petal white */
    --c-text:         #3d1f24; /* dark briar */
    --c-text-soft:    #8a6070; /* dusk mauve */
    --c-accent:       #9b7eb4; /* twilight lavender */
    --c-highlight:    #d4849a; /* foxglove pink */

    /* Fonts */
    --f-display: "Fraunces", "Lora", Georgia, serif;
    --f-body:    "Recursive", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --f-meta:    "Recursive", "Inter", system-ui, -apple-system, sans-serif;

    /* Variable axes */
    --display-vars: "opsz" 144, "wght" 700, "SOFT" 100, "WONK" 1;
    --body-vars:    "MONO" 0, "CASL" 0.5, "wght" 400;
    --meta-vars:    "MONO" 0, "CASL" 1, "wght" 300;

    /* Sizes */
    --fs-display: clamp(2.2rem, 5vw + 1rem, 4.8rem);
    --fs-md:      clamp(1.8rem, 3vw + 0.8rem, 3rem);
    --fs-sm:      clamp(1.4rem, 2vw + 0.6rem, 2.1rem);
    --fs-body:    clamp(1rem, 1.2vw + 0.5rem, 1.25rem);
    --fs-meta:    clamp(0.75rem, 1vw, 0.95rem);

    --shadow-card:  8px 12px 24px rgba(110, 42, 52, 0.12);
    --shadow-soft:  4px 6px 18px rgba(61, 31, 36, 0.08);
    --shadow-bloom: 0 0 0 0 rgba(212, 132, 154, 0.45);
}

/* ---------- reset (minimal) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ---------- base ---------- */
html { scroll-behavior: smooth; }

body {
    font-family: var(--f-body);
    font-variation-settings: var(--body-vars);
    font-size: var(--fs-body);
    line-height: 1.65;
    color: var(--c-text);
    background: var(--c-bg);
    overflow-x: clip;
    position: relative;
    min-height: 100vh;
    /* fine paper grain */
    background-image:
        radial-gradient(circle at 18% 22%, rgba(110, 42, 52, 0.04) 0 1px, transparent 1px),
        radial-gradient(circle at 73% 61%, rgba(94, 122, 98, 0.04) 0 1px, transparent 1px);
    background-size: 7px 7px, 9px 9px;
}

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- decorative paper grid (z-0) ---------- */
.paper-grid {
    position: fixed; inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='56' height='56'><filter id='w'><feTurbulence baseFrequency='0.9' numOctaves='1' seed='3'/><feDisplacementMap in='SourceGraphic' scale='0.8'/></filter><g filter='url(%23w)' stroke='%236e2a34' stroke-width='0.6' fill='none' opacity='0.06'><path d='M0 0.5 H56'/><path d='M0.5 0 V56'/></g></svg>");
    background-size: 56px 56px;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: multiply;
    opacity: 0.85;
}

/* ---------- watercolor wash backgrounds ---------- */
.wash {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
    filter: blur(60px);
    will-change: transform, opacity;
    mix-blend-mode: multiply;
}
.wash--burgundy {
    width: 70vw; height: 70vw; max-width: 1200px; max-height: 1200px;
    left: -10vw; top: -20vh;
    background: radial-gradient(closest-side, rgba(110, 42, 52, 0.16), rgba(110, 42, 52, 0) 70%);
    animation: drift-a 28s ease-in-out infinite alternate;
}
.wash--moss {
    width: 60vw; height: 60vw; max-width: 1000px; max-height: 1000px;
    right: -10vw; top: 40vh;
    background: radial-gradient(closest-side, rgba(94, 122, 98, 0.14), rgba(94, 122, 98, 0) 70%);
    animation: drift-b 32s ease-in-out infinite alternate;
}
.wash--lavender {
    width: 55vw; height: 55vw; max-width: 900px; max-height: 900px;
    left: 20vw; bottom: -10vh;
    background: radial-gradient(closest-side, rgba(155, 126, 180, 0.12), rgba(155, 126, 180, 0) 70%);
    animation: drift-c 36s ease-in-out infinite alternate;
}
@keyframes drift-a {
    0%   { transform: translate(0,0) scale(1); }
    100% { transform: translate(6vw, 4vh) scale(1.05); }
}
@keyframes drift-b {
    0%   { transform: translate(0,0) scale(1); }
    100% { transform: translate(-5vw, -3vh) scale(1.08); }
}
@keyframes drift-c {
    0%   { transform: translate(0,0) scale(1); }
    100% { transform: translate(4vw, -5vh) scale(1.04); }
}

/* opening bloom — runs once on load via .booting class */
.booting::after {
    content: "";
    position: fixed; inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(110,42,52,0.12), transparent 0%);
    pointer-events: none;
    z-index: 30;
    animation: open-bloom 1400ms ease-out 200ms forwards;
}
@keyframes open-bloom {
    0%   { background: radial-gradient(circle at 50% 50%, rgba(110,42,52,0.0), transparent 0%); }
    20%  { background: radial-gradient(circle at 50% 50%, rgba(110,42,52,0.18), transparent 18%); }
    100% { background: radial-gradient(circle at 50% 50%, rgba(110,42,52,0.0), transparent 100%); }
}

/* ---------- splatters (z-20 decorative) ---------- */
.splatters {
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 20;
}
.splatter {
    position: absolute;
    left: var(--x); top: var(--y);
    width: var(--s); height: var(--s);
    border-radius: 50%;
    filter: url(#watercolor-edge) blur(2px);
    opacity: 0.08;
    animation: pulse-attention 4s ease-in-out infinite;
    animation-delay: var(--d);
    transform: translate(-50%, -50%);
    mix-blend-mode: multiply;
}
.splatter--pink     { background: radial-gradient(closest-side, var(--c-highlight), transparent 70%); }
.splatter--lavender { background: radial-gradient(closest-side, var(--c-accent),    transparent 70%); }

.splatter.is-near { animation-name: pulse-attention-strong; }

@keyframes pulse-attention {
    0%, 100% { opacity: 0.05; transform: translate(-50%, -50%) scale(1); }
    50%      { opacity: 0.15; transform: translate(-50%, -50%) scale(1.08); }
}
@keyframes pulse-attention-strong {
    0%, 100% { opacity: 0.15; transform: translate(-50%, -50%) scale(1.05); }
    50%      { opacity: 0.30; transform: translate(-50%, -50%) scale(1.16); }
}

/* ---------- top wisp navigation ---------- */
.wisp-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: 1.1rem clamp(1rem, 4vw, 3rem);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: linear-gradient(to bottom, rgba(247, 240, 232, 0.78), rgba(247, 240, 232, 0.32));
    border-bottom: 1px dashed rgba(110, 42, 52, 0.22);
}
.brand {
    display: inline-flex; align-items: center; gap: 0.55rem;
    font-family: var(--f-display);
    font-variation-settings: var(--display-vars);
    font-size: 1.25rem;
    color: var(--c-primary);
}
.brand-name { letter-spacing: 0.005em; }
.brand-mark { display: inline-flex; }

.primary-nav {
    margin-left: auto;
    display: flex;
    gap: clamp(0.6rem, 2vw, 1.6rem);
}
.nav-link {
    font-family: var(--f-meta);
    font-variation-settings: var(--meta-vars);
    font-size: var(--fs-meta);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--c-text-soft);
    padding: 0.35rem 0.2rem;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1px;
    background-repeat: no-repeat;
    background-position: 0% 100%;
    transition: color 280ms ease, background-size 320ms ease;
}
.nav-link:hover { color: var(--c-highlight); background-size: 100% 1px; }

.wing-toggle {
    display: inline-flex; align-items: center; gap: 0.5rem;
    color: var(--c-primary);
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px dashed rgba(110, 42, 52, 0.35);
    transition: background 240ms ease, border-color 240ms ease;
}
.wing-toggle .wings { overflow: visible; }
.wing-toggle .wing { transform-origin: 50% 50%; transition: transform 320ms cubic-bezier(.42,.18,.32,1.2); }
.wing-toggle:hover .wing--left  { animation: beat-l 800ms ease-in-out infinite; }
.wing-toggle:hover .wing--right { animation: beat-r 800ms ease-in-out infinite; }
.wing-toggle.is-open .wing--left  { transform: translateX(-3px) rotate(-12deg); }
.wing-toggle.is-open .wing--right { transform: translateX(3px) rotate(12deg); }
.wing-toggle:hover { background: rgba(212, 132, 154, 0.08); border-color: var(--c-highlight); }

.wing-label {
    font-family: var(--f-meta);
    font-variation-settings: var(--meta-vars);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
}

@keyframes beat-l { 0%,100% { transform: rotate(0deg); } 50% { transform: rotate(-6deg); } }
@keyframes beat-r { 0%,100% { transform: rotate(0deg); } 50% { transform: rotate(6deg); } }

/* ---------- drawer ---------- */
.drawer {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(380px, 86vw);
    z-index: 60;
    transform: translateX(110%);
    transition: transform 520ms cubic-bezier(.25,.46,.45,.94);
    background: linear-gradient(180deg, rgba(253,250,246,0.97), rgba(247,240,232,0.97));
    border-left: 1px dashed rgba(110, 42, 52, 0.3);
    box-shadow: -18px 0 40px rgba(110, 42, 52, 0.15);
    backdrop-filter: blur(6px);
}
.drawer.is-open { transform: translateX(0); }
.drawer-inner { padding: 5rem 2rem 2rem; }
.drawer-title {
    font-family: var(--f-display);
    font-variation-settings: var(--display-vars);
    font-size: 2rem;
    color: var(--c-primary);
    margin: 0.4rem 0 1.4rem;
    line-height: 1.05;
}
.drawer-list { display: grid; gap: 0.6rem; margin-bottom: 2rem; }
.drawer-list a {
    display: block;
    padding: 0.55rem 0.2rem;
    border-bottom: 1px dashed rgba(110, 42, 52, 0.25);
    color: var(--c-text);
    font-size: 1.05rem;
    transition: color 240ms ease, padding-left 280ms ease;
}
.drawer-list a:hover { color: var(--c-highlight); padding-left: 0.6rem; }
.drawer-foot {
    font-family: var(--f-meta);
    font-variation-settings: var(--meta-vars);
    font-size: var(--fs-meta);
    color: var(--c-text-soft);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* ---------- generic typography ---------- */
.display {
    font-family: var(--f-display);
    font-variation-settings: var(--display-vars);
    color: var(--c-primary);
    font-size: var(--fs-display);
    line-height: 1.1;
    margin: 0;
}
.display--md { font-size: var(--fs-md); }
.display--sm { font-size: var(--fs-sm); }

.meta {
    font-family: var(--f-meta);
    font-variation-settings: var(--meta-vars);
    font-size: var(--fs-meta);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--c-text-soft);
    margin: 0 0 0.4rem;
}
.meta--center { text-align: center; }

.cat {
    font-family: var(--f-meta);
    font-variation-settings: var(--meta-vars);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--c-text-soft);
    border: 1px solid rgba(94, 122, 98, 0.5);
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    background: transparent;
    transition: background 280ms ease, color 280ms ease, border-color 280ms ease;
    display: inline-block;
}
.cat:hover {
    background: rgba(94, 122, 98, 0.10);
    color: var(--c-tertiary);
    border-color: var(--c-tertiary);
}
.cat--moss { color: var(--c-tertiary); border-color: rgba(94, 122, 98, 0.6); }
.cat--moss:hover { color: var(--c-tertiary); background: rgba(94,122,98,0.14); }

.link {
    color: var(--c-secondary);
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1px;
    background-repeat: no-repeat;
    background-position: 0% 100%;
    transition: color 320ms ease, background-size 320ms ease;
    padding-bottom: 2px;
}
.link:hover { color: var(--c-highlight); background-size: 100% 1px; }

.ts {
    font-family: var(--f-meta);
    font-variation-settings: var(--meta-vars);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    color: var(--c-text-soft);
}

/* ---------- canvas / main ---------- */
.canvas {
    position: relative;
    z-index: 10;
    padding: clamp(1rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem) 4rem;
    max-width: 1320px;
    margin: 0 auto;
}

/* ---------- clearing hero ---------- */
.clearing {
    position: relative;
    margin: 2rem auto 4rem;
    padding: clamp(2rem, 6vw, 5rem) 0;
    min-height: 80vh;
    display: grid;
    place-items: center;
}
.clearing-frame {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    aspect-ratio: 16 / 10;
    min-height: 540px;
}
.clearing-shape {
    position: absolute;
    inset: 8% 10%;
    background: radial-gradient(ellipse at 50% 50%,
        rgba(253, 250, 246, 0.95) 0%,
        rgba(253, 250, 246, 0.85) 55%,
        rgba(253, 250, 246, 0.0) 100%);
    clip-path: polygon(
        12% 4%, 28% 0%, 48% 6%, 66% 2%, 82% 10%,
        96% 26%, 100% 46%, 95% 66%, 84% 82%,
        66% 96%, 46% 100%, 28% 96%, 12% 86%,
        2% 70%, 0% 50%, 4% 28%
    );
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 5vw, 4rem);
    display: flex; flex-direction: column; justify-content: center;
    gap: 1rem;
    box-shadow: var(--shadow-soft);
    transform: scale(0.96);
    opacity: 0;
    transition: clip-path 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 800ms ease-out;
}
.clearing-shape.is-revealed { transform: scale(1); opacity: 1; }

.clearing-shape::before {
    content: "";
    position: absolute; inset: -3% -2%;
    background: radial-gradient(ellipse at 30% 30%, rgba(155, 126, 180, 0.10), transparent 60%),
                radial-gradient(ellipse at 75% 70%, rgba(212, 132, 154, 0.10), transparent 60%);
    z-index: -1;
    filter: blur(20px);
}

#feature-headline {
    text-align: center;
    text-wrap: balance;
    margin: 0;
}
#feature-headline .word {
    display: inline-block;
    font-variation-settings: "opsz" 144, "wght" 100, "SOFT" 100, "WONK" 1;
    transition: font-variation-settings 600ms ease-out;
    margin-right: 0.3em;
    color: var(--c-primary);
}
#feature-headline.is-inked .word {
    font-variation-settings: "opsz" 144, "wght" 700, "SOFT" 100, "WONK" 1;
}

.standfirst {
    max-width: 56ch;
    margin: 0 auto;
    text-align: center;
    color: var(--c-text);
    font-size: clamp(1rem, 1.1vw + 0.5rem, 1.2rem);
    line-height: 1.55;
    text-wrap: pretty;
}

.byline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    align-items: center;
    color: var(--c-text-soft);
    font-family: var(--f-meta);
    font-variation-settings: var(--meta-vars);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    margin: 0.4rem 0 0;
}
.byline .dot {
    width: 4px; height: 4px; border-radius: 50%;
    background: var(--c-highlight);
    display: inline-block;
}

.quiet-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    align-self: center;
    margin-top: 0.7rem;
    color: var(--c-secondary);
    font-family: var(--f-meta);
    font-variation-settings: "MONO" 0, "CASL" 1, "wght" 500;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    padding: 0.55rem 0.4rem;
    transition: color 320ms ease, transform 320ms ease;
}
.quiet-cta svg { transition: transform 320ms ease; }
.quiet-cta:hover { color: var(--c-highlight); }
.quiet-cta:hover svg { transform: translateX(4px); }

/* fragments around the clearing */
.fragment {
    position: absolute;
    width: clamp(180px, 22vw, 280px);
    font-family: var(--f-body);
    font-variation-settings: var(--body-vars);
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--c-text-soft);
    background: rgba(253, 250, 246, 0.7);
    border-radius: 16px 6px 14px 8px;
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(2px);
    transition: transform 360ms ease, color 360ms ease, background 360ms ease;
}
.fragment .cat { display: inline-block; margin-bottom: 0.35rem; }
.fragment:hover { color: var(--c-text); background: rgba(253, 250, 246, 0.95); transform: rotate(0deg) translateY(-2px); }

.frag--tl { top: 1%;  left: -1%;  transform: rotate(-2.4deg); }
.frag--tr { top: 4%;  right: -2%; transform: rotate(2.1deg);  }
.frag--bl { bottom: 4%; left: 2%;  transform: rotate(1.6deg); }
.frag--br { bottom: 0%; right: 1%; transform: rotate(-1.8deg); }

/* ---------- divider ---------- */
.divider {
    display: grid;
    place-items: center;
    margin: 3rem 0 3rem;
    color: var(--c-primary);
    opacity: 0.85;
}
.divider svg { filter: url(#hand-wobble); }

/* ---------- broken-grid scatter ---------- */
.scatter {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: clamp(0.6rem, 1.4vw, 1.2rem);
    grid-auto-rows: minmax(20px, auto);
    margin: 2rem 0;
    position: relative;
}
.card {
    position: relative;
    background: var(--c-surface);
    padding: clamp(1.2rem, 2.4vw, 2rem);
    box-shadow: var(--shadow-card);
    transform: rotate(var(--rot));
    transition: transform 380ms cubic-bezier(.25,.46,.45,.94),
                border-radius 380ms ease,
                box-shadow 380ms ease,
                background 380ms ease;
    z-index: 10;
    opacity: 0;
    will-change: transform, opacity;
}
.card.is-revealed { animation: pulse-reveal 800ms ease-out forwards; }
@keyframes pulse-reveal {
    0%   { opacity: 0; transform: translateY(20px) rotate(var(--rot)) scale(0.985); box-shadow: 0 0 0 0 rgba(212, 132, 154, 0.0); }
    40%  { opacity: 1; transform: translateY(0)    rotate(var(--rot)) scale(1.02);  box-shadow: 0 0 36px 8px rgba(212, 132, 154, 0.35); }
    100% { opacity: 1; transform: translateY(0)    rotate(var(--rot)) scale(1);     box-shadow: var(--shadow-card); }
}
.card:hover {
    transform: rotate(0deg) translateY(-2px);
    border-radius: 12px !important;
    box-shadow: 10px 14px 30px rgba(110, 42, 52, 0.18);
    background: #fff;
}
.card-meta {
    font-family: var(--f-meta);
    font-variation-settings: var(--meta-vars);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--c-text-soft);
    margin: 0 0 0.6rem;
    display: flex; gap: 0.6rem; align-items: center;
}
.card-title {
    font-family: var(--f-display);
    font-variation-settings: "opsz" 80, "wght" 600, "SOFT" 100, "WONK" 1;
    color: var(--c-primary);
    font-size: clamp(1.4rem, 2vw + 0.6rem, 2.05rem);
    line-height: 1.15;
    margin: 0 0 0.7rem;
    text-wrap: balance;
}
.card-body { margin: 0 0 1.2rem; color: var(--c-text); }
.card-foot {
    display: flex; flex-wrap: wrap; gap: 0.8rem;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding-top: 0.8rem;
    border-top: 1px dashed rgba(110, 42, 52, 0.18);
}

/* hand-laid card scatter — overlapping, irregular columns + custom border-radius */
.card--01 { grid-column: 2 / span 6;  border-radius: 18px 6px 14px 8px;  margin-top: 0.5rem; }
.card--02 { grid-column: 7 / span 5;  border-radius: 8px 18px 6px 14px;  margin-top: 3rem;  z-index: 11; }
.card--03 { grid-column: 1 / span 5;  border-radius: 12px 6px 22px 8px;  margin-top: 5rem; }
.card--04 { grid-column: 5 / span 6;  border-radius: 6px 16px 10px 18px; margin-top: 2rem; }
.card--05 { grid-column: 2 / span 5;  border-radius: 22px 8px 14px 6px;  margin-top: 4.5rem; z-index: 11; }
.card--06 { grid-column: 7 / span 5;  border-radius: 8px 22px 8px 16px;  margin-top: 1.5rem; }

/* ---------- almanac strip ---------- */
.almanac {
    margin: 4rem 0 3rem;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 2fr;
    gap: clamp(1rem, 3vw, 2.4rem);
    align-items: start;
}
.almanac-head { padding-top: 0.4rem; }
.almanac-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem 1.2rem;
}
.almanac-item {
    background: rgba(253, 250, 246, 0.72);
    backdrop-filter: blur(2px);
    border: 1px dashed rgba(110, 42, 52, 0.22);
    padding: 1.1rem 1.2rem;
    border-radius: 14px 6px 16px 8px;
    transform: rotate(var(--rot));
    transition: transform 360ms ease, background 360ms ease;
    box-shadow: var(--shadow-soft);
}
.almanac-item p {
    font-size: 1.02rem;
    margin: 0.5rem 0 0.6rem;
    color: var(--c-text);
    line-height: 1.45;
}
.almanac-item:hover { transform: rotate(0deg) translateY(-2px); background: var(--c-surface); }

/* ---------- letters ---------- */
.letters {
    margin: 4rem 0 3rem;
    display: grid;
    place-items: center;
}
.letters-card {
    background: var(--c-surface);
    box-shadow: var(--shadow-card);
    padding: clamp(1.6rem, 4vw, 3rem);
    max-width: 720px;
    width: 100%;
    border-radius: 22px 8px 18px 10px;
    transform: rotate(var(--rot));
    transition: transform 360ms ease;
    text-align: center;
}
.letters-card:hover { transform: rotate(0deg); }
.letters-body { color: var(--c-text); margin: 0.5rem auto 1.6rem; max-width: 56ch; }

.letters-form { max-width: 480px; margin: 0 auto; }
.letters-form .meta { display: block; margin-bottom: 0.5rem; }
.field-row {
    display: flex; gap: 0.5rem; align-items: stretch;
    border: 1px dashed rgba(110, 42, 52, 0.4);
    border-radius: 999px;
    padding: 0.4rem 0.5rem 0.4rem 1.2rem;
    background: rgba(247, 240, 232, 0.6);
    transition: border-color 280ms ease, background 280ms ease;
}
.field-row:focus-within { border-color: var(--c-highlight); background: rgba(247, 240, 232, 0.95); }

.letters-form input {
    flex: 1;
    background: transparent;
    border: 0;
    font: inherit;
    color: var(--c-text);
    padding: 0.6rem 0.2rem;
    outline: none;
    font-variation-settings: var(--body-vars);
}
.letters-form input::placeholder { color: var(--c-text-soft); opacity: 0.8; }

.post-btn {
    display: inline-flex; align-items: center; gap: 0.3rem;
    background: var(--c-primary);
    color: var(--c-bg);
    border-radius: 999px;
    padding: 0.55rem 1rem;
    font-family: var(--f-meta);
    font-variation-settings: "MONO" 0, "CASL" 1, "wght" 500;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    transition: background 320ms ease, transform 320ms ease, box-shadow 320ms ease;
}
.post-btn:hover { background: var(--c-secondary); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(168, 86, 106, 0.4); }
.post-btn.is-sent { background: var(--c-tertiary); }

.form-note {
    margin: 0.85rem 0 0;
    font-family: var(--f-meta);
    font-variation-settings: var(--meta-vars);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    color: var(--c-text-soft);
    transition: color 320ms ease;
}
.form-note.is-success { color: var(--c-tertiary); }
.form-note.is-error   { color: var(--c-secondary); }

/* ---------- archive ---------- */
.archive { margin: 4rem 0 2rem; max-width: 880px; }
.archive .display--sm { color: var(--c-primary); margin: 0 0 1.4rem; }
.archive-list {
    display: grid;
    gap: 0.4rem;
    counter-reset: archive;
}
.archive-list li {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    align-items: baseline;
    gap: 1.2rem;
    padding: 0.7rem 0.4rem;
    border-bottom: 1px dashed rgba(110, 42, 52, 0.2);
    transition: padding-left 320ms ease, background 320ms ease;
}
.archive-list li:hover { padding-left: 0.8rem; background: rgba(212, 132, 154, 0.06); }
.archive-list li .ts { color: var(--c-text-soft); }
.archive-list li .link { font-family: var(--f-display); font-variation-settings: "opsz" 80, "wght" 500, "SOFT" 100, "WONK" 1; font-size: 1.1rem; color: var(--c-text); }
.archive-list li .link:hover { color: var(--c-secondary); }
.archive-list li .cat { justify-self: end; }

/* ---------- footer ---------- */
.foot {
    position: relative;
    z-index: 10;
    margin-top: 4rem;
    padding: 3rem clamp(1rem, 4vw, 3rem) 2rem;
    background: linear-gradient(180deg, transparent, rgba(61, 31, 36, 0.04));
    border-top: 1px dashed rgba(110, 42, 52, 0.25);
}
.foot-wrap {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}
.foot-block .meta { color: var(--c-primary); }
.foot-body { color: var(--c-text); font-size: 0.96rem; line-height: 1.55; margin: 0; }
.foot-links { display: grid; gap: 0.4rem; }
.foot-links a { color: var(--c-text); }
.foot-line {
    max-width: 1200px; margin: 2rem auto 0;
    text-align: center;
    font-family: var(--f-meta);
    font-variation-settings: var(--meta-vars);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--c-text-soft);
    border-top: 1px dashed rgba(110, 42, 52, 0.2);
    padding-top: 1.4rem;
}

/* ---------- responsive ---------- */
@media (max-width: 920px) {
    .clearing-frame { aspect-ratio: auto; min-height: unset; }
    .clearing-shape { position: relative; inset: auto; padding: 2rem 1.6rem; }
    .fragment { position: relative; width: auto; margin: 0.6rem 0; transform: rotate(var(--frag-rot, -1.2deg)) translate(0,0); top: auto; left: auto; right: auto; bottom: auto; }
    .frag--tl { transform: rotate(-1.6deg); }
    .frag--tr { transform: rotate(1.4deg); }
    .frag--bl { transform: rotate(1deg); }
    .frag--br { transform: rotate(-1.2deg); }

    .scatter { grid-template-columns: 1fr; }
    .card--01,.card--02,.card--03,.card--04,.card--05,.card--06 { grid-column: 1 / -1; margin-top: 1.4rem; }

    .almanac { grid-template-columns: 1fr; }
    .almanac-list { grid-template-columns: 1fr; }

    .archive-list li { grid-template-columns: 1fr; gap: 0.3rem; }
    .archive-list li .cat { justify-self: start; }

    .primary-nav { display: none; }
}

@media (max-width: 540px) {
    .wisp-nav { gap: 0.6rem; padding: 0.8rem 1rem; }
    .brand-name { font-size: 1.05rem; }
    .wing-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
