/* === matchumnews.com === */
/* Corporate-couture bespoke news experience */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root {
    --linen: #f2f0ed;
    --charcoal: #2c2c2c;
    --basting: #b8b4ad;
    --light-gray: #d4d0c9;
    --pencil: #9b9b9b;
    --chalk: #c8c4bd;
    --brass: #b8956a;
    --ink: #3d3d3d;
    --pin-cushion: #8b4049;

    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
    --font-ui: 'Inter', -apple-system, sans-serif;
    --font-mono: 'Space Mono', monospace;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

body {
    background: var(--linen);
    color: var(--charcoal);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    overflow-x: hidden;
}

/* === MEASURING TAPE HEADER === */
#measuring-tape {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--linen);
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

#measuring-tape.compressed .header-nav {
    padding: 4px 40px;
}

#measuring-tape.compressed .tape-track {
    height: 2px;
}

.tape-track {
    height: 6px;
    background: var(--light-gray);
    position: relative;
    overflow: hidden;
    transition: height 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.tape-marks {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        var(--pencil) 0px,
        var(--pencil) 1px,
        transparent 1px,
        transparent 10px
    );
    opacity: 0.4;
}

.tape-track::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0%;
    background: var(--brass);
    opacity: 0.5;
    transition: width 0.15s linear;
}

.header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 40px;
    border-bottom: 1px solid var(--light-gray);
    transition: padding 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--charcoal);
    letter-spacing: -0.02em;
}

.logo-eng {
    font-family: var(--font-ui);
    font-weight: 300;
    font-size: 1rem;
    color: var(--pencil);
}

.nav-categories {
    display: flex;
    gap: 24px;
}

.cat-btn {
    background: none;
    border: none;
    font-family: var(--font-ui);
    font-size: clamp(0.7rem, 0.9vw, 0.82rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pencil);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
    transition: color 0.3s, border-color 0.3s;
}

.cat-btn:hover,
.cat-btn.active {
    color: var(--charcoal);
    border-bottom-color: var(--brass);
}

/* Category shapes */
.shape {
    display: inline-block;
    width: 8px;
    height: 8px;
}

.shape.circle {
    border-radius: 50%;
    background: var(--brass);
}

.shape.diamond {
    width: 7px;
    height: 7px;
    background: var(--brass);
    transform: rotate(45deg);
}

.shape.triangle {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 8px solid var(--brass);
    background: none;
}

.shape.hexagon {
    width: 10px;
    height: 8px;
    background: var(--brass);
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.shape.cross {
    position: relative;
    background: none;
}

.shape.cross::before,
.shape.cross::after {
    content: '';
    position: absolute;
    background: var(--brass);
}

.shape.cross::before {
    width: 2px;
    height: 8px;
    left: 3px;
    top: 0;
}

.shape.cross::after {
    width: 8px;
    height: 2px;
    left: 0;
    top: 3px;
}

.reader-tag {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.tag-label {
    font-family: var(--font-ui);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--pencil);
}

.tag-time {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--brass);
    font-variant-numeric: tabular-nums;
}

/* === OPENING PANEL === */
.panel-opening {
    min-height: 100vh;
    background: var(--charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    scroll-snap-align: start;
    opacity: 1;
    transform: none;
    /* Chalk dust noise texture */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

.opening-content {
    text-align: center;
    position: relative;
}

.opening-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 8vw, 7rem);
    color: var(--linen);
    letter-spacing: -0.02em;
    line-height: 1.1;
    opacity: 0;
}

.opening-title.animate {
    animation: titleReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes titleReveal {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.opening-subtitle {
    font-family: var(--font-ui);
    font-size: clamp(0.7rem, 0.9vw, 0.82rem);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--pencil);
    margin-top: 24px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.opening-subtitle.animate {
    opacity: 1;
}

.scroll-indicator {
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.scroll-indicator.animate {
    opacity: 1;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: var(--chalk);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(12px); opacity: 0.4; }
}

/* === FITTING PANELS === */
.fitting-panel {
    min-height: 100vh;
    padding: 120px 40px 80px;
    position: relative;
    scroll-snap-align: start;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fitting-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.panel-hero {
    display: flex;
    align-items: center;
}

/* Chalk lines */
.chalk-line {
    position: absolute;
    top: 100px;
    bottom: 40px;
    width: 1px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.chalk-line-left {
    left: 32px;
    background: repeating-linear-gradient(180deg, var(--basting) 0px, var(--basting) 4px, transparent 4px, transparent 8px);
}

.chalk-line-right {
    right: 32px;
    background: repeating-linear-gradient(180deg, var(--basting) 0px, var(--basting) 4px, transparent 4px, transparent 8px);
}

.fitting-panel.visible .chalk-line {
    opacity: 1;
}

.panel-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Pattern Grid - Hero */
.pattern-grid {
    display: grid;
    grid-template-columns: 62% 1fr;
    gap: 60px;
    align-items: start;
    position: relative;
}

.pattern-grid::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 62%;
    width: 1px;
    background: repeating-linear-gradient(180deg, var(--chalk) 0px, var(--chalk) 6px, transparent 6px, transparent 12px);
    transform-origin: top;
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.6s ease;
}

.fitting-panel.visible .pattern-grid::after {
    clip-path: inset(0 0 0% 0);
}

.category-marker {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-ui);
    font-size: clamp(0.7rem, 0.9vw, 0.82rem);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--pencil);
    margin-bottom: 24px;
}

.headline-display {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--charcoal);
    margin-bottom: 24px;
}

.story-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.stitch-line {
    display: inline-block;
    width: 40px;
    height: 1px;
    background: repeating-linear-gradient(90deg, var(--brass) 0px, var(--brass) 3px, transparent 3px, transparent 6px);
}

.meta-text {
    font-family: var(--font-ui);
    font-size: clamp(0.7rem, 0.9vw, 0.82rem);
    letter-spacing: 0.08em;
    color: var(--pencil);
}

.lead-excerpt {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    line-height: 1.72;
    color: var(--ink);
    max-width: 640px;
}

.body-text {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    line-height: 1.72;
    color: var(--ink);
}

/* Swatch Sidebar */
.swatch-sidebar {
    padding-top: 40px;
}

.swatch {
    position: relative;
}

.swatch::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-ui);
    font-size: clamp(0.7rem, 0.9vw, 0.82rem);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--pencil);
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--light-gray);
}

.swatch-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--light-gray);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.swatch-item:hover {
    transform: translateX(4px);
}

.pin {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brass);
    margin-top: 6px;
    flex-shrink: 0;
}

.swatch-item p {
    font-family: var(--font-body);
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--ink);
}

/* === SEAM STITCHES === */
.seam-stitch {
    height: 1px;
    margin: 0 40px;
    position: relative;
    background: repeating-linear-gradient(90deg, var(--basting) 0px, var(--basting) 6px, transparent 6px, transparent 12px);
}

.seam-stitch::before {
    content: '';
    position: absolute;
    inset: -3px 0;
    background: repeating-linear-gradient(90deg, transparent 0px, transparent 11px, var(--basting) 11px, var(--basting) 13px, transparent 13px, transparent 24px);
    height: 7px;
}

/* === SECTION HEADERS === */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: -0.01em;
}

.measurement-note {
    font-family: var(--font-ui);
    font-size: clamp(0.7rem, 0.9vw, 0.82rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--pencil);
    margin-left: auto;
}

/* Glitch effect for personalized headers */
.glitch-header h2 {
    position: relative;
}

.glitch-header.glitching h2 {
    animation: glitchSnap 0.2s ease forwards;
}

.glitch-header.glitching h2::before,
.glitch-header.glitching h2::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-header.glitching h2::before {
    color: var(--brass);
    animation: glitchLeft 0.2s ease forwards;
}

.glitch-header.glitching h2::after {
    color: var(--pin-cushion);
    animation: glitchRight 0.2s ease forwards;
}

@keyframes glitchLeft {
    0% { transform: translateX(-2px); opacity: 0.7; }
    100% { transform: translateX(0); opacity: 0; }
}

@keyframes glitchRight {
    0% { transform: translateX(2px); opacity: 0.7; }
    100% { transform: translateX(0); opacity: 0; }
}

@keyframes glitchSnap {
    0% { text-shadow: -2px 0 var(--brass), 2px 0 var(--pin-cushion); }
    100% { text-shadow: none; }
}

/* Pulse-attention dot */
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brass);
    animation: pulseDot 1.2s ease-in-out 3;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.4); }
}

/* === STORY CARDS === */
.story-card {
    position: relative;
    cursor: pointer;
}

.card-inner {
    padding: 28px;
    border: 1px solid var(--light-gray);
    background: var(--linen);
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.story-card:hover .card-inner {
    border-color: var(--brass);
    transform: translateY(-2px);
    box-shadow: 0 2px 12px rgba(184, 149, 106, 0.08);
}

.card-number {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--brass);
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 12px;
}

.story-card h3 {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
    color: var(--charcoal);
}

.story-card p {
    font-family: var(--font-body);
    font-size: 0.88rem;
    line-height: 1.72;
    color: var(--ink);
    margin-bottom: 12px;
}

.read-time {
    font-family: var(--font-ui);
    font-size: clamp(0.7rem, 0.9vw, 0.82rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pencil);
}

.author {
    display: block;
    font-family: var(--font-ui);
    font-size: clamp(0.7rem, 0.9vw, 0.82rem);
    letter-spacing: 0.08em;
    color: var(--brass);
    margin-bottom: 8px;
}

/* === ASYMMETRIC GRID (Business) === */
.asymmetric-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: auto auto;
    gap: 24px;
}

.card-large {
    grid-row: 1 / 3;
}

.card-large .card-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-large h3 {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
}

/* === PATTERN CUTTING LAYOUT (Technology) === */
.pattern-cutting-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
}

.tech-feature .card-inner {
    padding: 40px;
    position: relative;
}

.dart-mark {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 20px;
    height: 20px;
    border-right: 1px solid var(--brass);
    border-top: 1px solid var(--brass);
    opacity: 0.5;
}

.tech-secondary {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* === CULTURE GRID === */
.culture-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 24px;
}

.culture-lead .card-inner {
    padding: 36px;
}

/* === OPINION LAYOUT === */
.opinion-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: auto auto;
    gap: 24px;
}

.opinion-feature {
    grid-row: 1 / 3;
}

.opinion-feature blockquote {
    border-left: 2px solid var(--brass);
    padding-left: 20px;
    margin-bottom: 24px;
}

.opinion-feature blockquote p {
    font-family: var(--font-display);
    font-size: 1.3rem;
    line-height: 1.4;
    color: var(--charcoal);
    font-style: italic;
}

/* === FOOTER === */
#footer {
    padding: 0 0 60px;
}

.footer-tape {
    height: 6px;
    background: var(--light-gray);
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.footer-content {
    text-align: center;
}

.footer-tagline {
    font-family: var(--font-ui);
    font-size: clamp(0.7rem, 0.9vw, 0.82rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pencil);
    margin-top: 8px;
}

.footer-meta {
    margin-top: 20px;
    font-family: var(--font-ui);
    font-size: clamp(0.7rem, 0.9vw, 0.82rem);
    letter-spacing: 0.1em;
    color: var(--chalk);
}

.footer-dot {
    margin: 0 8px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .header-nav {
        padding: 10px 20px;
    }

    .nav-categories {
        display: none;
    }

    .fitting-panel {
        padding: 100px 20px 60px;
    }

    .pattern-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .pattern-grid::after {
        display: none;
    }

    .asymmetric-grid,
    .pattern-cutting-layout,
    .culture-grid,
    .opinion-layout {
        grid-template-columns: 1fr;
    }

    .card-large,
    .opinion-feature {
        grid-row: auto;
    }

    .chalk-line {
        display: none;
    }

    .seam-stitch {
        margin: 0 20px;
    }

    .tape-track {
        height: 2px;
    }
}
