/* renai.review -- Memphis editorial broadside, Sub-tropical Branch
   Palette (terracotta-warm, 7):
     #c25e3c sun-baked clay
     #e89865 adobe apricot
     #f4ead8 cream plaster
     #2a1f1a burnt earth
     #5b8a72 memphis sage
     #e9c75a cadmium yellow
     #3d4f8a lapis postcard
   Typography: Fraunces (display + body, variable opsz/SOFT), Space Grotesk (geometric-sans spine).
   No gradients, no glassmorphism, no drop-shadow blurs. Hard edges, flat fills, solid 4-6px offset shadows.
*/

:root {
    --clay:    #c25e3c;
    --apricot: #e89865;
    --cream:   #f4ead8;
    --earth:   #2a1f1a;
    --sage:    #5b8a72;
    --yellow:  #e9c75a;
    --lapis:   #3d4f8a;

    --tier-back:  0.3;
    --tier-mid:   0.6;
    --tier-front: 0.9;

    --max-w: 1180px;
    --gutter: clamp(16px, 2.4vw, 32px);

    --shadow-hard:   6px 6px 0 var(--earth);
    --shadow-hard-s: 4px 4px 0 var(--earth);

    --font-display: "Fraunces", "Times New Roman", serif;
    --font-spine:   "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--cream);
    color: var(--earth);
    font-family: var(--font-display);
    font-size: 17px;
    line-height: 1.55;
    overflow-x: hidden;
}

body {
    position: relative;
    min-height: 100vh;
}

/* Hide the SVG defs container completely */
.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* Plaster overlay -- procedural noise via inline SVG turbulence */
.plaster-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.16 0 0 0 0 0.12 0 0 0 0 0.10 0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 320px 320px;
    mix-blend-mode: multiply;
    opacity: 1;
}

/* Floating field of Memphis primitives -- parallax tiers */
.floating-field {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 220%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.float-glyph {
    position: absolute;
    display: block;
    height: auto;
    will-change: transform;
    transform: translate3d(var(--px, 0px), var(--py, 0px), 0) rotate(var(--rot, 0deg));
    transition: transform 60ms linear;
    animation: drift 11s ease-in-out infinite alternate;
}

.float-glyph.tier-back  { opacity: 0.55; animation-duration: 14s; }
.float-glyph.tier-mid   { opacity: 0.72; animation-duration: 11s; }
.float-glyph.tier-front { opacity: 0.88; animation-duration: 8s;  }

@keyframes drift {
    0%   { transform: translate3d(0, 0, 0) rotate(0deg); }
    50%  { transform: translate3d(8px, -10px, 0) rotate(2deg); }
    100% { transform: translate3d(-6px, 6px, 0) rotate(-1.5deg); }
}

/* All layout sits on top of the floating field and plaster */
.masthead, main { position: relative; z-index: 10; }

/* ============================================================
   MASTHEAD
   ============================================================ */
.masthead {
    padding: clamp(48px, 10vh, 132px) var(--gutter) clamp(36px, 6vh, 64px);
    max-width: var(--max-w);
    margin: 0 auto;
}

.masthead-inner {
    position: relative;
}

.masthead-folio {
    font-family: var(--font-spine);
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--earth);
    margin: 0 0 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.folio-disc {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--clay);
    box-shadow: var(--shadow-hard-s);
}

.wordmark {
    font-family: var(--font-display);
    font-weight: 900;
    font-variation-settings: "opsz" 144, "SOFT" 100;
    font-size: clamp(3rem, 8.4vw, 6.75rem);
    line-height: 0.92;
    letter-spacing: -0.02em;
    color: var(--clay);
    margin: 0 0 1.6rem;
    word-break: keep-all;
    text-shadow: 4px 4px 0 var(--earth);
}

.wordmark .char {
    display: inline-block;
    opacity: 0;
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
}

.wordmark .char.period {
    font-style: italic;
    color: var(--lapis);
}

.wordmark .char.is-in {
    animation: char-snap 520ms cubic-bezier(.18, .89, .32, 1.28) both;
}

@keyframes char-snap {
    0%   { opacity: 0; }
    60%  { opacity: 1; transform: translate3d(var(--snap-x, 0), var(--snap-y, 0), 0); }
    80%  { transform: translate3d(0, 0, 0) scale(1.04); }
    100% { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
}

.masthead-deck {
    font-family: var(--font-display);
    font-variation-settings: "opsz" 60, "SOFT" 50;
    font-weight: 400;
    font-size: clamp(1.05rem, 1.6vw, 1.32rem);
    line-height: 1.45;
    color: var(--earth);
    max-width: 38em;
    margin: 0 0 1.2rem;
}

.masthead-byline {
    font-family: var(--font-spine);
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--earth);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.byline-asterisk {
    color: var(--clay);
    font-size: 1.1em;
    line-height: 1;
}

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */
.section {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: clamp(36px, 6vh, 80px) var(--gutter);
}

.section-head {
    position: relative;
    margin-bottom: clamp(28px, 4vh, 56px);
    border-top: 2px solid var(--clay);
    padding-top: 1.4rem;
}

.section-head .head-tab {
    position: absolute;
    top: -1px;
    left: 0;
    width: 64px;
    height: 18px;
    background: var(--clay);
    transform-origin: top left;
}

.section-title {
    font-family: var(--font-spine);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--earth);
    margin: 0 0 0.5rem;
}

.section-rubric {
    font-family: var(--font-display);
    font-variation-settings: "opsz" 60, "SOFT" 50;
    font-weight: 400;
    font-style: italic;
    font-size: 1.0625rem;
    color: var(--earth);
    margin: 0;
    max-width: 52ch;
}

/* ============================================================
   EDITOR'S WALL -- mismatched silhouette mosaic
   ============================================================ */
.editors-wall .wall-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(120px, auto);
    gap: clamp(24px, 3.4vw, 56px);
}

.tile {
    position: relative;
    background: transparent;
    transform: rotate(var(--rot, 0deg)) translateY(40px);
    opacity: 0;
    transition: transform 520ms cubic-bezier(.18, .89, .32, 1.28),
                opacity 380ms ease-out;
    will-change: transform, opacity;
}

.tile.is-in {
    opacity: 1;
    transform: rotate(var(--rot, 0deg)) translateY(0);
}

.tile:hover {
    transform: rotate(calc(var(--rot, 0deg) + 1.5deg)) translateY(-4px);
    transition: transform 240ms ease-out;
}

.tile-frame {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 3;
    padding: 0;
    background: var(--clay);
    box-shadow: var(--shadow-hard);
    overflow: hidden;
}

.tile-border {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.tile-body {
    position: absolute;
    inset: 8%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1;
    color: var(--earth);
}

/* Silhouette-specific tile setups -- clip-path, fill color, grid placement */
.tile-trapezoid {
    grid-column: 1 / span 5;
}
.tile-trapezoid .tile-frame {
    background: var(--clay);
    aspect-ratio: 4 / 3;
    clip-path: polygon(12% 100%, 88% 100%, 95% 5%, 5% 5%);
}
.tile-trapezoid .tile-body { inset: 14% 14% 10%; }

.tile-ziggurat {
    grid-column: 6 / span 4;
    grid-row: span 2;
}
.tile-ziggurat .tile-frame {
    background: var(--yellow);
    aspect-ratio: 4 / 5;
    clip-path: polygon(
        6% 100%, 94% 100%,
        94% 76%, 80% 76%,
        80% 55%, 62% 55%,
        62% 32%, 38% 32%,
        38% 55%, 20% 55%,
        20% 76%, 6% 76%
    );
}
.tile-ziggurat .tile-body { inset: 36% 22% 8%; }

.tile-oval {
    grid-column: 10 / span 3;
}
.tile-oval .tile-frame {
    background: var(--apricot);
    aspect-ratio: 4 / 3;
    clip-path: ellipse(48% 46% at 50% 50%);
}
.tile-oval .tile-body { inset: 12% 14%; }

.tile-triangle {
    grid-column: 1 / span 3;
    grid-row: span 2;
}
.tile-triangle .tile-frame {
    background: var(--sage);
    aspect-ratio: 4 / 5;
    clip-path: polygon(50% 4%, 96% 96%, 4% 96%);
}
.tile-triangle .tile-body { inset: 36% 12% 6%; }

.tile-awning {
    grid-column: 4 / span 5;
}
.tile-awning .tile-frame {
    background: var(--cream);
    aspect-ratio: 4 / 3;
    clip-path: polygon(
        4% 100%, 4% 50%,
        15% 28%, 30% 14%, 50% 6%, 70% 14%, 85% 28%, 96% 50%,
        96% 100%
    );
}
.tile-awning .tile-body { inset: 24% 10% 6%; color: var(--earth); }

.tile-dodecagon {
    grid-column: 9 / span 4;
}
.tile-dodecagon .tile-frame {
    background: var(--lapis);
    aspect-ratio: 1 / 1;
    clip-path: polygon(
        50% 4%, 75% 10%, 92% 25%, 98% 50%, 92% 75%, 75% 90%,
        50% 96%, 25% 90%, 8% 75%, 2% 50%, 8% 25%, 25% 10%
    );
    color: var(--cream);
}
.tile-dodecagon .tile-body { inset: 18% 16%; color: var(--cream); }
.tile-dodecagon .tile-folio,
.tile-dodecagon .tile-author,
.tile-dodecagon .tile-silhouette,
.tile-dodecagon .tile-title,
.tile-dodecagon .tile-excerpt { color: var(--cream); }
.tile-dodecagon .author-chip { background: var(--yellow); color: var(--earth); }

.tile-chamfered {
    grid-column: 1 / span 12;
    max-width: 720px;
    justify-self: end;
}
.tile-chamfered .tile-frame {
    background: var(--apricot);
    aspect-ratio: 4 / 3;
    clip-path: polygon(
        0 0, 80% 0, 100% 16%, 100% 100%, 0 100%
    );
}
.tile-chamfered .tile-body { inset: 10% 8%; }

/* Tile typography */
.tile-folio {
    font-family: var(--font-spine);
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0;
    padding: 0.2rem 0.5rem 0.2rem 0;
    color: var(--earth);
    border-bottom: 2px solid var(--lapis);
    display: inline-block;
    align-self: flex-start;
}

.tile-title {
    font-family: var(--font-display);
    font-variation-settings: "opsz" 96, "SOFT" 80;
    font-weight: 900;
    font-size: clamp(1.05rem, 1.6vw, 1.42rem);
    line-height: 1.05;
    margin: 0;
    color: var(--earth);
    letter-spacing: -0.01em;
}

.tile-excerpt {
    font-family: var(--font-display);
    font-variation-settings: "opsz" 14, "SOFT" 50;
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
    color: var(--earth);
    max-width: 32ch;
    flex: 1;
    overflow: hidden;
}

.tile-author { margin: 0; }

.author-chip {
    display: inline-block;
    background: var(--earth);
    color: var(--cream);
    font-family: var(--font-spine);
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.25rem 0.55rem;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.tile-silhouette {
    font-family: var(--font-spine);
    font-weight: 500;
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0;
    color: var(--earth);
    opacity: 0.7;
}

/* ============================================================
   CRITICS' COLONNADE
   ============================================================ */
.colonnade-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: clamp(16px, 2vw, 28px);
}

.pillar {
    background: var(--cream);
    border: 4px solid var(--earth);
    padding: 1.2rem 1rem 1.4rem;
    box-shadow: var(--shadow-hard);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    position: relative;
    transform: rotate(0);
    transition: transform 240ms ease-out;
}

.pillar:nth-child(odd)  { transform: rotate(-0.8deg); }
.pillar:nth-child(even) { transform: rotate(0.6deg); }

.pillar:hover { transform: rotate(0); }

.pillar-capital {
    margin: -2.2rem -1rem 0.4rem;
    padding: 0.4rem 0.8rem;
    background: var(--clay);
    border-bottom: 4px solid var(--earth);
}

.pillar-capital svg {
    display: block;
    width: 100%;
    height: 56px;
}

.pillar-strip {
    background: var(--earth);
    color: var(--cream);
    margin: 0 -1rem;
    padding: 0.5rem 1rem;
}

.pillar-strip-lapis { background: var(--lapis); }

.pillar-name {
    font-family: var(--font-display);
    font-variation-settings: "opsz" 96, "SOFT" 100;
    font-weight: 900;
    font-size: 1.15rem;
    margin: 0;
    line-height: 1;
    color: var(--cream);
}

.pillar-role {
    font-family: var(--font-spine);
    font-weight: 500;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0.3rem 0 0;
    color: var(--cream);
    opacity: 0.85;
}

.pillar-bio {
    font-family: var(--font-display);
    font-variation-settings: "opsz" 14, "SOFT" 50;
    font-weight: 400;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--earth);
    margin: 0;
}

/* ============================================================
   SUBMISSIONS MEMO -- single tilted index-card with shake-error
   ============================================================ */
.submissions-memo {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.memo-card {
    background: var(--yellow);
    color: var(--earth);
    max-width: 560px;
    margin: 0 auto;
    padding: 2.4rem 2rem 2rem;
    transform: rotate(-3.4deg);
    box-shadow: var(--shadow-hard);
    border: 4px solid var(--earth);
    position: relative;
    /* perforated dotted border on inner edge */
}

.memo-perforations {
    position: absolute;
    inset: 8px;
    border: 2px dashed var(--earth);
    pointer-events: none;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.memo-card.shake {
    animation: shake-error 320ms cubic-bezier(.36, .07, .19, .97);
}

@keyframes shake-error {
    0%   { transform: rotate(-3.4deg); }
    20%  { transform: rotate(calc(-3.4deg - 3deg)); }
    45%  { transform: rotate(calc(-3.4deg + 3deg)); }
    70%  { transform: rotate(calc(-3.4deg - 1.5deg)); }
    100% { transform: rotate(-3.4deg); }
}

.memo-folio {
    font-family: var(--font-spine);
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 0.6rem;
    color: var(--earth);
    border-bottom: 2px solid var(--earth);
    padding-bottom: 0.4rem;
    display: inline-block;
}

.memo-title {
    font-family: var(--font-display);
    font-variation-settings: "opsz" 144, "SOFT" 90;
    font-weight: 900;
    font-size: clamp(1.4rem, 2.6vw, 1.95rem);
    line-height: 1.05;
    margin: 0.4rem 0 1rem;
    color: var(--earth);
}

.memo-title em {
    font-style: italic;
    color: var(--lapis);
    font-variation-settings: "opsz" 144, "SOFT" 100;
}

.memo-body {
    font-family: var(--font-display);
    font-variation-settings: "opsz" 14, "SOFT" 50;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--earth);
    margin: 0 0 1.2rem;
    max-width: 38ch;
}

.memo-cta-row {
    margin: 0 0 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.8rem;
    position: relative;
}

.memo-submit {
    font-family: var(--font-spine);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.7rem 1.1rem;
    background: var(--earth);
    color: var(--cream);
    border: none;
    cursor: pointer;
    position: relative;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    box-shadow: 4px 4px 0 var(--clay);
}

.memo-submit::after {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: -6px;
    height: 3px;
    background: var(--lapis);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 280ms ease-out;
}

.memo-card.shake .memo-submit::after {
    transform: scaleX(1);
}

.memo-mailto {
    font-family: var(--font-spine);
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--lapis);
    text-decoration: none;
    border-bottom: 2px solid var(--lapis);
    padding-bottom: 2px;
}

.memo-note {
    font-family: var(--font-display);
    font-variation-settings: "opsz" 60, "SOFT" 80;
    font-style: italic;
    font-weight: 400;
    font-size: 0.95rem;
    color: var(--lapis);
    margin: 0 0 0.8rem;
}

.memo-note[hidden] { display: none; }

.memo-foot {
    font-family: var(--font-spine);
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--earth);
    margin: 1rem 0 0;
    border-top: 2px solid var(--earth);
    padding-top: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================================
   COLOPHON AWNING -- striped half-circle footer
   ============================================================ */
.colophon-awning {
    padding-top: 0;
    padding-bottom: 0;
    max-width: 100%;
}

.awning {
    height: clamp(80px, 14vh, 160px);
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    overflow: hidden;
    border-top: 4px solid var(--earth);
    border-bottom: 4px solid var(--earth);
    clip-path: polygon(0 0, 100% 0, 96% 100%, 4% 100%);
}

.awning-stripe { height: 100%; }
.stripe-terracotta { background: var(--clay); }
.stripe-cream { background: var(--cream); }

.colophon-card {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: clamp(28px, 5vh, 64px) var(--gutter) clamp(40px, 8vh, 96px);
    text-align: left;
}

.colophon-title {
    font-family: var(--font-spine);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--earth);
    margin: 0 0 0.6rem;
}

.colophon-text {
    font-family: var(--font-display);
    font-variation-settings: "opsz" 14, "SOFT" 50;
    font-weight: 400;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--earth);
    max-width: 56ch;
    margin: 0 0 1rem;
}

.colophon-text em {
    font-style: italic;
    color: var(--clay);
}

.colophon-meta {
    font-family: var(--font-spine);
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--earth);
    margin: 0;
    opacity: 0.8;
}

/* ============================================================
   RESPONSIVE -- collapse the mosaic + colonnade
   ============================================================ */
@media (max-width: 1080px) {
    .editors-wall .wall-grid {
        grid-template-columns: repeat(8, 1fr);
    }
    .tile-trapezoid { grid-column: 1 / span 4; }
    .tile-ziggurat  { grid-column: 5 / span 4; grid-row: auto; }
    .tile-oval      { grid-column: 1 / span 4; }
    .tile-triangle  { grid-column: 5 / span 3; grid-row: auto; }
    .tile-awning    { grid-column: 1 / span 5; }
    .tile-dodecagon { grid-column: 6 / span 3; }
    .tile-chamfered { grid-column: 1 / span 8; max-width: none; justify-self: stretch; }

    .colonnade-row { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
    body { font-size: 16px; }

    .editors-wall .wall-grid {
        grid-template-columns: 1fr;
    }
    .tile-trapezoid,
    .tile-ziggurat,
    .tile-oval,
    .tile-triangle,
    .tile-awning,
    .tile-dodecagon,
    .tile-chamfered {
        grid-column: 1 / -1;
        grid-row: auto;
        max-width: none;
        justify-self: stretch;
    }

    .colonnade-row { grid-template-columns: 1fr; }

    .tile-frame { aspect-ratio: 4 / 3; }
    .tile-triangle .tile-frame,
    .tile-ziggurat .tile-frame { aspect-ratio: 1 / 1; }

    .memo-card { transform: rotate(-2deg); padding: 1.6rem 1.4rem 1.4rem; }

    .awning { grid-template-columns: repeat(7, 1fr); }
}

/* ============================================================
   Reduced motion -- keep static rotations, drop drift + parallax
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .float-glyph { animation: none; transition: none; }
    .tile        { transition: none; transform: rotate(var(--rot, 0deg)); opacity: 1; }
    .wordmark .char { opacity: 1; animation: none; }
}
