/* gabs.review — brutalist criticism platform
   warm-earthy palette, slab-serif typography, scroll-snap stacked slabs
*/

:root {
    --raw-linen: #F5EDE3;
    --kiln-clay: #E8D5C0;
    --espresso: #2E1A0E;
    --terracotta: #C4713B;
    --raw-sienna: #8B5E3C;
    --burnt-umber: #5C3A21;
    --desert-gold: #D4A04A;
    --charcoal-earth: #3B2618;

    --slab-gap: 6px;
    --left-margin: clamp(24px, 10vw, 120px);
    --content-max: 680px;
    --snap-duration: 400ms;
    --zoom-scale: 1.03;
    --zoom-duration: 300ms;
    --baseline: 8px;

    --nav-height: 64px;

    --font-display: "Roboto Slab", "Rockwell", "Courier New", serif;
    --font-body: "Arvo", "Rockwell", Georgia, serif;
    --font-grotesque: "Archivo Black", "Impact", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: 0 !important;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.75;
    color: var(--espresso);
    background-color: var(--raw-linen);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ============================================
   TOP NAV BAR
   ============================================ */

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: var(--charcoal-earth);
    color: var(--raw-linen);
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 var(--left-margin) 0 var(--left-margin);
    border-bottom: 0 solid var(--terracotta);
}

.top-bar .brand {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--raw-linen);
}

.top-bar .nav-categories {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    flex-wrap: nowrap;
}

.nav-item {
    font-family: var(--font-grotesque);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--raw-linen);
    cursor: pointer;
    transition: color var(--zoom-duration) ease-out, transform var(--zoom-duration) ease-out;
    display: inline-block;
}

.nav-item:hover {
    color: var(--terracotta);
    transform: scale(var(--zoom-scale));
}

.nav-pipe {
    color: var(--terracotta);
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 14px;
    user-select: none;
}

.nav-underline {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    width: 0;
    background-color: var(--terracotta);
    transition: width 800ms ease-out;
}

.top-bar.scrolled .nav-underline {
    width: 100%;
}

@media (max-width: 720px) {
    .top-bar {
        padding: 0 24px;
    }
    .top-bar .nav-categories {
        display: none;
    }
}

/* ============================================
   SLAB CONTAINER (scroll snap)
   ============================================ */

.slab-container {
    margin-top: var(--nav-height);
    scroll-snap-type: y proximity;
}

.slab {
    position: relative;
    min-height: calc(100vh - var(--nav-height));
    width: 100%;
    padding: 96px var(--left-margin);
    scroll-snap-align: start;
    overflow: hidden;
    border-bottom: var(--slab-gap) solid var(--burnt-umber);
}

.slab:nth-of-type(odd) {
    background-color: var(--raw-linen);
}

.slab:nth-of-type(even) {
    background-color: var(--kiln-clay);
}

/* zoom-focus entrance pattern */
.slab > * {
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 500ms ease-out, transform 500ms ease-out;
}

.slab.in-view > * {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   SLAB 1 — THE HERO / SLAB
   ============================================ */

.slab-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto 1fr auto auto auto;
    column-gap: 48px;
    align-content: start;
}

.slab-meta {
    grid-column: 1 / 2;
    font-family: var(--font-grotesque);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--burnt-umber);
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 32px;
}

.meta-pipe,
.byline-pipe,
.card-pipe {
    color: var(--terracotta);
    font-family: var(--font-display);
    font-weight: 900;
}

.slab-headline {
    grid-column: 1 / 2;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(3rem, 9vw, 8rem);
    line-height: 0.92;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--espresso);
    margin-bottom: 40px;
    max-width: 14ch;
}

.slab-deck {
    grid-column: 1 / 2;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    line-height: 1.55;
    color: var(--charcoal-earth);
    max-width: 56ch;
    margin-bottom: 40px;
    border-left: 4px solid var(--terracotta);
    padding-left: 24px;
}

.slab-byline {
    grid-column: 1 / 2;
    font-family: var(--font-grotesque);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--burnt-umber);
    display: flex;
    gap: 16px;
    align-items: center;
}

.byline-name {
    color: var(--espresso);
}

/* score block — clip-path numeral on terracotta rectangle */
.score-block-wrap {
    grid-column: 2 / 3;
    grid-row: 1 / 5;
    align-self: center;
    justify-self: end;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-right: -8vw;
}

.score-block {
    width: 280px;
    height: 360px;
    background-color: var(--terracotta);
    position: relative;
    cursor: pointer;
    transition: transform 600ms ease-out;
}

.score-numeral {
    position: absolute;
    inset: 0;
    background-color: var(--raw-linen);
    transition: clip-path 600ms ease-out;
}

/* digit 9 — carved by negative space */
.score-numeral-9 {
    /* This polygon outlines the area OUTSIDE the digit '9'.
       On hover the polygon collapses to a full rectangle, "filling" the digit. */
    clip-path: polygon(
        0% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 0%,
        18% 12%, 18% 88%, 82% 88%, 82% 12%, 18% 12%,
        18% 12%,
        32% 22%, 32% 44%, 68% 44%, 68% 22%, 32% 22%,
        32% 22%, 18% 12%
    );
}

.slab-hero:hover .score-numeral,
.score-block.hovered .score-numeral {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.score-caption {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-family: var(--font-grotesque);
    color: var(--burnt-umber);
}

.score-of {
    font-size: 12px;
    letter-spacing: 0.2em;
}

.score-ten {
    font-size: 28px;
    color: var(--espresso);
}

@media (max-width: 900px) {
    .slab-hero {
        grid-template-columns: 1fr;
    }
    .score-block-wrap {
        grid-column: 1 / 2;
        grid-row: auto;
        justify-self: start;
        margin: 24px 0 0 0;
    }
    .score-block {
        width: 200px;
        height: 260px;
    }
}

/* scroll cue */
.scroll-cue {
    grid-column: 1 / 3;
    grid-row: 5 / 6;
    margin-top: 64px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: var(--font-grotesque);
    font-size: 11px;
    letter-spacing: 0.3em;
    color: var(--burnt-umber);
}

.cue-line {
    flex: 1;
    height: 2px;
    background-color: var(--burnt-umber);
    max-width: 240px;
}

/* ============================================
   EDGE SHAPES — right-edge intrusions
   ============================================ */

.edge-shape {
    position: absolute;
    right: -10vw;
    pointer-events: none;
    border: 2px solid var(--raw-sienna);
    background: transparent;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 700ms ease-out, opacity 700ms ease-out;
    z-index: 1;
}

.slab.in-view .edge-shape {
    transform: translateX(40%);
    opacity: 1;
}

.edge-shape-circle {
    width: 360px;
    height: 360px;
    border-radius: 50% !important;
    top: 18%;
}

.edge-shape-rect {
    width: 320px;
    height: 240px;
    top: 25%;
}

.edge-shape-triangle {
    width: 0;
    height: 0;
    border-left: 200px solid transparent;
    border-right: 200px solid transparent;
    border-bottom: 360px solid transparent;
    /* triangle drawn with outlines via additional pseudo */
    border: 0;
    background: none;
    top: 20%;
}

.edge-shape-triangle::before {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    border-left: 2px solid var(--raw-sienna);
    border-bottom: 2px solid var(--raw-sienna);
    transform: translate(-50%, -50%) rotate(-45deg);
    top: 50%;
    left: 50%;
}

@media (max-width: 720px) {
    .edge-shape {
        display: none;
    }
}

/* ============================================
   SECTION DIVIDER — circle / triangle / square trio
   ============================================ */

.section-divider {
    background-color: var(--burnt-umber);
    height: var(--slab-gap);
    /* trio rendered via flex layer overlay */
    position: relative;
    width: 100%;
    display: none; /* the slab itself already has bottom border; trio rendered separately */
}

.divider-shape {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: var(--burnt-umber);
}

.divider-circle {
    border-radius: 50% !important;
}

.divider-triangle {
    width: 0;
    height: 0;
    background: transparent;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 22px solid var(--burnt-umber);
}

.divider-square {
    background-color: var(--burnt-umber);
}

/* ============================================
   SLAB 2 — THE COLUMN
   ============================================ */

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

.column-eyebrow,
.grid-eyebrow {
    font-family: var(--font-grotesque);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--burnt-umber);
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 32px;
}

.column-title,
.grid-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.05;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--espresso);
    max-width: 18ch;
    margin-bottom: 56px;
}

.review-body {
    max-width: var(--content-max);
}

.review-body p {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    line-height: 1.75;
    color: var(--charcoal-earth);
    margin-bottom: 2em;
}

.review-body .lede {
    font-weight: 700;
    font-size: clamp(1.1rem, 1.6vw, 1.3rem);
    color: var(--espresso);
}

.pull-quote {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1.15;
    letter-spacing: 0.02em;
    color: var(--espresso);
    margin: 2em 0 2em 40px;
    padding-left: 24px;
    border-left: 4px solid var(--terracotta);
    text-transform: none;
}

/* ============================================
   SLAB 3 — THE GRID
   ============================================ */

.slab-grid {
    position: relative;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent 0,
            transparent 47px,
            var(--kiln-clay) 47px,
            var(--kiln-clay) 48px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 47px,
            var(--kiln-clay) 47px,
            var(--kiln-clay) 48px
        );
    opacity: 0.55;
    z-index: 0;
}

.slab-grid > *:not(.grid-pattern):not(.edge-shape) {
    position: relative;
    z-index: 1;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 2px;
    background-color: var(--burnt-umber);
    border: 2px solid var(--burnt-umber);
    max-width: 1100px;
}

.review-card {
    background-color: var(--raw-linen);
    border-left: 3px solid var(--raw-sienna);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 300ms ease-out, border-color 300ms ease-out, background-color 300ms ease-out;
    min-height: 240px;
}

.review-card:hover {
    transform: scale(var(--zoom-scale));
    border-left-color: var(--terracotta);
    background-color: var(--kiln-clay);
    z-index: 2;
}

.review-card.featured {
    background-color: var(--desert-gold);
    border-left-color: var(--espresso);
}

.review-card.featured .card-meta {
    color: var(--espresso);
}

.review-card.featured .card-title {
    color: var(--espresso);
}

.card-meta {
    font-family: var(--font-grotesque);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--burnt-umber);
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.card-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.05rem, 1.6vw, 1.4rem);
    line-height: 1.15;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--espresso);
    margin-bottom: 24px;
}

.card-score {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--font-grotesque);
}

.card-score-number {
    font-size: 56px;
    line-height: 1;
    color: var(--terracotta);
}

.review-card.featured .card-score-number {
    color: var(--espresso);
}

.card-score-of {
    font-size: 14px;
    letter-spacing: 0.2em;
    color: var(--burnt-umber);
}

@media (max-width: 1000px) {
    .reviews-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .reviews-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   SLAB 4 — THE STAMP / FOOTER
   ============================================ */

.slab-stamp {
    background-color: var(--charcoal-earth) !important;
    color: var(--raw-linen);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: none;
    padding-top: 120px;
    padding-bottom: 120px;
}

.stamp-mark {
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 56px;
    transition: transform 600ms ease-out;
}

.stamp-mark:hover {
    transform: rotate(45deg);
}

.stamp-square {
    width: 100%;
    height: 100%;
    border: 4px solid var(--burnt-umber);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stamp-circle {
    width: 80%;
    height: 80%;
    border: 4px solid var(--burnt-umber);
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--charcoal-earth);
}

.stamp-glyph {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: var(--font-grotesque);
    color: var(--raw-linen);
}

.stamp-glyph-line {
    font-size: 56px;
    letter-spacing: 0.1em;
    line-height: 1;
}

.stamp-glyph-sub {
    font-size: 11px;
    letter-spacing: 0.3em;
    color: var(--terracotta);
}

.stamp-line {
    font-family: var(--font-grotesque);
    font-size: 12px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--raw-linen);
    margin-bottom: 32px;
}

.stamp-shapes {
    display: flex;
    gap: 24px;
    align-items: center;
}

.slab-stamp .divider-shape {
    background-color: var(--terracotta);
}

.slab-stamp .divider-circle {
    background-color: var(--terracotta);
}

.slab-stamp .divider-triangle {
    background: transparent;
    border-bottom-color: var(--terracotta);
}

.slab-stamp .divider-square {
    background-color: var(--terracotta);
}

/* ============================================
   GLOBAL ENTRANCE STATE — reveal once observed
   ============================================ */

.slab .edge-shape {
    opacity: 0;
}

.slab.in-view .edge-shape {
    opacity: 1;
}
