/* =========================================================================
   hangul.name -- v2 / chrome edition
   Y2K-Korean burgundy-cream with chrome accents and slide-reveal narratives.
   Implementation notes:
     - reveal animations are driven by IntersectionObserver in script.js.
     - Web fonts loaded from (Google Fonts): DM Serif Display, Noto Serif KR,
       Noto Sans KR, Space Mono.
   ========================================================================= */

:root {
    --burgundy-deep: #5A1A2A;
    --burgundy-mid:  #8A3A4A;
    --cream-light:   #FFF5F0;
    --cream-mid:     #F0E0D8;
    --chrome-silver: #C0C8D0;
    --chrome-hi:     #E8EEF4;
    --chrome-lo:     #8090A0;
    --text-dark:     #2A1018;
    --gold:          #D4A060;

    --el-wood:  #4A8A4A;
    --el-fire:  #C04040;
    --el-earth: #D4A060;
    --el-metal: #C0C8D0;
    --el-water: #4060A0;

    --font-display: 'DM Serif Display', 'Lora', Georgia, serif;
    --font-kr:      'Noto Serif KR', 'Lora', Georgia, serif;
    --font-body:    'Noto Sans KR', 'Inter', system-ui, sans-serif;
    --font-mono:    'Space Mono', 'Roboto Mono', Menlo, monospace;
}

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

html, body { height: 100%; }

body {
    background: var(--cream-light);
    color: var(--text-dark);
    font-family: var(--font-body);
    font-size: clamp(15px, 1.05vw, 17px);
    line-height: 1.85;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

input { font: inherit; color: inherit; background: transparent; border: 0; outline: 0; }

.page-wrapper { position: relative; }

/* =========================================================================
   1. HERO -- split-screen (cream-left / burgundy-right)
   ========================================================================= */
.hero {
    display: grid;
    grid-template-columns: 55% 45%;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-cream {
    background: var(--cream-light);
    padding: clamp(28px, 5vw, 80px);
    display: flex;
    align-items: center;
    transform: translateX(-100%);
    animation: hero-cream-in 800ms cubic-bezier(.2,.7,.2,1) 200ms both;
    will-change: transform;
}

.hero-burgundy {
    background: #000;
    padding: clamp(28px, 5vw, 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: hero-burg-in 800ms ease-out both;
    will-change: background-color;
}

.hero-burgundy::before {
    content: "";
    position: absolute; inset: 0;
    background:
      repeating-linear-gradient(45deg,
        rgba(255,245,240,0.04) 0 1px,
        transparent 1px 22px);
    pointer-events: none;
}

@keyframes hero-cream-in {
    from { transform: translateX(-100%); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}

@keyframes hero-burg-in {
    from { background-color: #000; }
    to   { background-color: var(--burgundy-deep); }
}

.hero-cream-inner {
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 2vw, 28px);
}

.hero-burgundy-inner {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(20px, 3vw, 40px);
    position: relative;
    z-index: 1;
}

.brand-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--chrome-silver);
    padding-bottom: 10px;
}

.logotype {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(24px, 3.5vw, 48px);
    letter-spacing: 0.03em;
    color: var(--burgundy-deep);
}

.logotype .dot { color: var(--gold); }

.brand-meta {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--burgundy-mid);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-heading {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 64px);
    line-height: 1.08;
    color: var(--text-dark);
    font-weight: 400;
    letter-spacing: -0.005em;
}

.hero-heading .kr-accent {
    font-family: var(--font-kr);
    font-weight: 700;
    color: var(--burgundy-deep);
    background: linear-gradient(180deg, transparent 65%, rgba(212,160,96,0.35) 65%);
    padding: 0 4px;
}

.hero-description {
    color: var(--text-dark);
    max-width: 56ch;
    font-size: clamp(15px, 1.05vw, 17px);
    line-height: 1.85;
}

/* ----- Y2K chrome input ----- */
.input-chrome {
    position: relative;
    display: flex;
    align-items: stretch;
    background: var(--cream-light);
    border: 2px solid var(--chrome-silver);
    padding: 4px;
    box-shadow: 0 0 0 1px var(--chrome-hi) inset;
    transition: box-shadow 220ms ease, border-color 220ms ease;
}

/* sequential bezel border-draw -- 4 edge spans animate in turn */
.bezel-edge {
    position: absolute;
    background: var(--chrome-hi);
    transform-origin: 0 0;
    pointer-events: none;
}
.edge-top    { left: 0; top: 0;     height: 1px; width: 100%; transform: scaleX(0); animation: draw-x 360ms ease-out 600ms forwards; }
.edge-right  { right: 0; top: 0;    width: 1px;  height: 100%; transform: scaleY(0); transform-origin: 0 0; animation: draw-y 360ms ease-out 960ms forwards; }
.edge-bottom { left: 0; bottom: 0;  height: 1px; width: 100%; transform: scaleX(0); transform-origin: 100% 0; animation: draw-x-rev 360ms ease-out 1320ms forwards; }
.edge-left   { left: 0; top: 0;     width: 1px;  height: 100%; transform: scaleY(0); transform-origin: 0 100%; animation: draw-y-rev 360ms ease-out 1680ms forwards; }

@keyframes draw-x     { to { transform: scaleX(1); } }
@keyframes draw-x-rev { to { transform: scaleX(1); } }
@keyframes draw-y     { to { transform: scaleY(1); } }
@keyframes draw-y-rev { to { transform: scaleY(1); } }

.input-chrome:focus-within {
    box-shadow: 0 0 0 1px var(--chrome-hi) inset, 0 0 12px rgba(192,200,208,0.55);
    border-color: var(--burgundy-mid);
}

.name-input {
    flex: 1;
    padding: 14px 16px;
    font-family: var(--font-kr);
    font-size: clamp(16px, 1.4vw, 20px);
    color: var(--text-dark);
    caret-color: var(--burgundy-deep);
}

.name-input::placeholder { color: rgba(42,16,24,0.4); font-family: var(--font-body); }

.generate-btn {
    background: var(--burgundy-deep);
    color: var(--cream-light);
    font-family: var(--font-mono);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background 220ms ease, transform 180ms ease;
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%);
}

.generate-btn:hover { background: var(--burgundy-mid); transform: translateX(2px); }
.generate-btn .btn-arrow { transition: transform 220ms ease; }
.generate-btn:hover .btn-arrow { transform: translateX(4px); }

/* ----- result panel with curtain reveal ----- */
.name-result {
    position: relative;
    background: var(--cream-mid);
    border-left: 3px solid var(--burgundy-deep);
    padding: clamp(14px, 1.6vw, 22px) clamp(16px, 2vw, 28px);
    overflow: hidden;
    min-height: 140px;
}

.result-cover {
    position: absolute;
    inset: 0;
    background: var(--burgundy-deep);
    transform: translateX(0);
    transition: transform 500ms cubic-bezier(.65,0,.35,1);
}
.name-result.revealed .result-cover { transform: translateX(-100%); }

.name-result-inner {
    display: grid;
    grid-template-columns: 110px 1fr;
    row-gap: 6px;
    column-gap: 18px;
    opacity: 0;
    transition: opacity 400ms ease 200ms;
}
.name-result.revealed .name-result-inner { opacity: 1; }

.result-line { display: contents; }

.result-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--burgundy-mid);
    align-self: center;
    padding-top: 4px;
}

.result-hangul { font-family: var(--font-kr); font-weight: 700; font-size: clamp(22px, 3vw, 34px); color: var(--burgundy-deep); line-height: 1.2; }
.result-roman  { font-family: var(--font-display); font-size: clamp(18px, 1.6vw, 22px); color: var(--text-dark); }
.result-meaning{ font-size: 15px; color: var(--text-dark); }
.result-element{ font-family: var(--font-mono); font-size: 13px; color: var(--burgundy-deep); display: inline-flex; align-items: center; gap: 8px; }
.result-element .el-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.scroll-hint {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--burgundy-mid);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.scroll-arrow {
    display: inline-block;
    animation: bob 1600ms ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ----- Burgundy stage ----- */
.chrome-stage {
    text-align: center;
    color: var(--cream-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.chrome-character {
    perspective: 1200px;
    padding: 18px 24px;
    border: 1px solid rgba(192,200,208,0.35);
    background: rgba(0,0,0,0.18);
    box-shadow:
      inset 0 1px 0 rgba(232,238,244,0.25),
      inset 0 -1px 0 rgba(0,0,0,0.45);
}

.chrome-text {
    font-family: var(--font-kr);
    font-weight: 900;
    font-size: clamp(80px, 14vw, 200px);
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(180deg, var(--chrome-hi) 0%, var(--chrome-silver) 50%, var(--chrome-lo) 100%);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
    -webkit-text-stroke: 1px rgba(232,238,244,0.5);
    filter: drop-shadow(0 6px 8px rgba(0,0,0,0.45));
    display: inline-block;
    transform: rotateX(0deg) rotateY(0deg);
    transition: transform 200ms ease;
    position: relative;
}

.chrome-text::after {
    content: attr(data-text);
    position: absolute; inset: 0;
    background: linear-gradient(0deg, transparent 0%, rgba(255,255,255,0.5) 48%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0.5) 52%, transparent 100%);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
    background-size: 100% 300%;
    background-position: 0 -200%;
    animation: shimmer 4500ms ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% { background-position: 0 -200%; }
    50%      { background-position: 0 200%; }
}

.chrome-romaji {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--cream-light);
    opacity: 0.78;
    letter-spacing: 0.16em;
    text-transform: lowercase;
}
.chrome-romaji em { color: var(--gold); font-style: normal; }

.surname-rail {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.surname-pill {
    font-family: var(--font-kr);
    font-weight: 700;
    font-size: 22px;
    color: var(--cream-light);
    border: 1px solid var(--chrome-silver);
    background: linear-gradient(180deg, rgba(232,238,244,0.16), rgba(0,0,0,0.18));
    padding: 6px 14px;
    transition: transform 180ms ease, background 180ms ease;
    cursor: default;
}
.surname-pill:hover { transform: translateY(-2px); background: linear-gradient(180deg, rgba(232,238,244,0.3), rgba(192,200,208,0.18)); }

.hero-stamp {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--cream-light);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.78;
}
.stamp-num   { font-size: 22px; color: var(--gold); }
.stamp-line  { width: 60px; height: 1px; background: var(--chrome-silver); display: inline-block; }
.stamp-label { }

/* =========================================================================
   2. TRENDS
   ========================================================================= */
.trends-section {
    background: var(--cream-light);
    padding: clamp(60px, 8vw, 120px) clamp(28px, 5vw, 80px);
    position: relative;
}

.slash-divider {
    height: 24px;
    background:
      repeating-linear-gradient(45deg,
        var(--burgundy-deep) 0 14px,
        transparent 14px 26px);
    opacity: 0.85;
}
.slash-top    { margin-bottom: clamp(40px, 5vw, 70px); }
.slash-bottom { margin-top: clamp(40px, 5vw, 70px); }

.trends-container { max-width: 1200px; margin: 0 auto; }

.section-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: clamp(28px, 4vw, 60px);
    border-left: 3px solid var(--burgundy-deep);
    padding-left: 18px;
}

.section-num {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--burgundy-mid);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.section-num.light { color: var(--cream-mid); }

.section-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(28px, 3.5vw, 44px);
    color: var(--burgundy-deep);
    letter-spacing: -0.005em;
}
.section-title em { font-family: var(--font-kr); font-style: normal; color: var(--text-dark); font-size: 0.85em; }
.section-title.light { color: var(--cream-light); }
.section-title.light em { color: var(--cream-mid); }

.section-kicker {
    color: var(--text-dark);
    opacity: 0.78;
    max-width: 64ch;
    font-size: 14px;
}

.trends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(16px, 2vw, 28px);
}

.trend-card {
    background: var(--cream-mid);
    border: 1px solid var(--chrome-silver);
    box-shadow: 0 0 0 1px var(--chrome-hi) inset;
    padding: 20px 22px;
    position: relative;
    overflow: hidden;
}

.trend-decade {
    font-family: var(--font-display);
    font-size: 26px;
    color: var(--burgundy-deep);
    margin-bottom: 4px;
}

.trend-sub {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--burgundy-mid);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.trend-bars { display: flex; flex-direction: column; gap: 10px; }

.trend-bar-row {
    display: grid;
    grid-template-columns: 32px 1fr 50px;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.trend-bar-row:hover .trend-bar-fill { background: var(--burgundy-mid); }

.trend-bar-label {
    font-family: var(--font-kr);
    font-weight: 700;
    font-size: 18px;
    color: var(--text-dark);
}

.trend-bar-track {
    position: relative;
    height: 12px;
    background: rgba(90,26,42,0.08);
    overflow: hidden;
}

.trend-bar-fill {
    position: absolute;
    inset: 0;
    background: var(--burgundy-deep);
    transform-origin: left center;
    transform: scaleX(0);
    transition: background 200ms ease;
}

.trend-bar-row.in-view .trend-bar-fill {
    transform: scaleX(var(--scale, 1));
    transition: transform 420ms ease-out var(--delay, 0ms), background 200ms ease;
}

.trend-bar-pct {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--burgundy-mid);
    text-align: right;
    opacity: 0;
    transition: opacity 320ms ease var(--delay, 0ms);
}
.trend-bar-row.in-view .trend-bar-pct { opacity: 1; transition-delay: calc(var(--delay, 0ms) + 420ms); }

.bar-tooltip {
    position: fixed;
    pointer-events: none;
    background: var(--text-dark);
    color: var(--cream-light);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 6px 10px;
    border: 1px solid var(--chrome-silver);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    transform: translate(-50%, calc(-100% - 8px));
    opacity: 0;
    transition: opacity 160ms ease;
    z-index: 50;
    white-space: nowrap;
}
.bar-tooltip.visible { opacity: 1; }

/* =========================================================================
   3. GALLERY
   ========================================================================= */
.gallery-section {
    background: var(--cream-mid);
    padding: clamp(60px, 8vw, 120px) clamp(28px, 5vw, 80px);
    position: relative;
}

.gallery-container { max-width: 1200px; margin: 0 auto; }

.name-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: clamp(16px, 2vw, 28px);
    margin-top: clamp(28px, 4vw, 50px);
}

.name-card {
    position: relative;
    background: var(--cream-light);
    border: 2px solid var(--chrome-silver);
    box-shadow: 0 0 0 1px var(--chrome-hi) inset, 0 4px 0 var(--burgundy-deep);
    padding: 24px 22px 28px;
    overflow: hidden;
    cursor: pointer;
    perspective: 800px;
    min-height: 240px;
    transition: transform 220ms ease;
}
.name-card:hover { transform: translateY(-3px); }

.name-card-cover {
    position: absolute;
    inset: 0;
    background: var(--burgundy-deep);
    transform: translateX(0);
    transition: transform 500ms cubic-bezier(.65,0,.35,1);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.name-card-cover::after {
    content: "";
    position: absolute; inset: 0;
    background: repeating-linear-gradient(135deg,
        rgba(255,245,240,0.05) 0 1px,
        transparent 1px 16px);
}
.name-card.revealed .name-card-cover { transform: translateX(-100%); }

.name-card-inner {
    opacity: 0;
    transition: opacity 420ms ease 220ms, transform 420ms ease 220ms;
    transform: translateY(8px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
}
.name-card.revealed .name-card-inner { opacity: 1; transform: translateY(0); }

.card-hangul {
    font-family: var(--font-kr);
    font-weight: 700;
    font-size: clamp(36px, 4vw, 52px);
    color: var(--burgundy-deep);
    line-height: 1.1;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.card-roman {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--text-dark);
}

.card-hanja {
    font-family: var(--font-kr);
    font-size: 18px;
    color: var(--burgundy-mid);
    opacity: 0.85;
}

.card-meaning {
    font-size: 14px;
    color: var(--text-dark);
    opacity: 0.85;
    line-height: 1.6;
    margin-top: auto;
}

.card-element {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--burgundy-mid);
}

.el-dot {
    width: 10px; height: 10px; border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 1px var(--chrome-hi);
}
.el-wood  { background: var(--el-wood); }
.el-fire  { background: var(--el-fire); }
.el-earth { background: var(--el-earth); }
.el-metal { background: var(--el-metal); }
.el-water { background: var(--el-water); }

/* =========================================================================
   4. CONVENTIONS (split-screen returns)
   ========================================================================= */
.conventions-section {
    display: grid;
    grid-template-columns: 50% 50%;
    min-height: 100vh;
    position: relative;
}

.conv-left {
    background: var(--burgundy-deep);
    color: var(--cream-light);
    padding: clamp(40px, 6vw, 96px) clamp(28px, 5vw, 80px);
    position: relative;
}

.conv-left::before {
    content: "";
    position: absolute; right: -1px; top: 0; bottom: 0;
    width: 24px;
    background: repeating-linear-gradient(45deg,
        var(--cream-light) 0 6px,
        transparent 6px 14px);
    opacity: 0.18;
}

.conv-left-inner {
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.conv-block {
    border-top: 1px solid rgba(255,245,240,0.22);
    padding-top: 18px;
    margin-top: 6px;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 600ms ease, transform 600ms ease;
}
.conv-block.in-view { opacity: 1; transform: translateY(0); }

.conv-block h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(20px, 2vw, 26px);
    color: var(--cream-light);
    margin-bottom: 8px;
}
.conv-block p {
    color: var(--cream-mid);
    font-size: 15px;
    line-height: 1.85;
    max-width: 56ch;
}

.element-legend {
    list-style: none;
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--cream-light);
    opacity: 0.92;
}
.element-legend li { display: inline-flex; align-items: center; gap: 8px; }

.conv-right {
    background: var(--cream-light);
    padding: clamp(40px, 6vw, 96px) clamp(28px, 5vw, 80px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.conv-right-inner { width: 100%; max-width: 560px; }

.diagram { text-align: center; }
.five-svg {
    width: clamp(240px, 30vw, 360px);
    height: auto;
    margin: 0 auto 22px;
    filter: drop-shadow(0 4px 10px rgba(90,26,42,0.18));
}

.five-svg .el-node circle {
    transform-origin: center;
    transform-box: fill-box;
    transition: transform 260ms ease, filter 260ms ease;
}
.five-svg .el-node:hover circle {
    transform: scale(1.12);
    filter: brightness(1.1);
}

.diagram-caption {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    color: var(--text-dark);
}
.caption-en { font-family: var(--font-body); }
.caption-kr { font-family: var(--font-mono); font-size: 12px; color: var(--burgundy-mid); letter-spacing: 0.12em; }

/* =========================================================================
   5. FOOTER
   ========================================================================= */
.footer {
    background: var(--burgundy-deep);
    color: var(--cream-light);
    padding: clamp(36px, 5vw, 64px) clamp(28px, 5vw, 80px);
    position: relative;
}
.footer::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--chrome-silver), var(--chrome-hi), var(--chrome-silver));
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: clamp(20px, 3vw, 40px);
}

.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-logo { font-family: var(--font-display); font-size: 26px; letter-spacing: 0.02em; color: var(--cream-light); }
.footer-tag { font-family: var(--font-mono); font-size: 11px; color: var(--cream-mid); text-transform: uppercase; letter-spacing: 0.14em; }

.footer-surnames {
    list-style: none;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.surname-btn {
    font-family: var(--font-kr);
    font-weight: 700;
    font-size: 22px;
    color: var(--cream-light);
    padding: 8px 14px;
    border: 1px solid var(--chrome-silver);
    background: linear-gradient(180deg, rgba(232,238,244,0.18), rgba(0,0,0,0.18));
    transition: transform 180ms ease, background 220ms ease, color 220ms ease;
    cursor: pointer;
}
.surname-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(180deg, rgba(232,238,244,0.4), rgba(192,200,208,0.22));
}
.surname-btn.active {
    color: var(--burgundy-deep);
    background: linear-gradient(180deg, var(--chrome-hi), var(--chrome-silver));
}

.footer-meta {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--cream-mid);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.footer-meta .dot-sep { margin: 0 4px; opacity: 0.5; }
.footer-mono { color: var(--gold); }

/* =========================================================================
   SECTION TRANSITIONS / IN-VIEW HELPERS
   ========================================================================= */
.section-head, .name-card, .trend-card, .conv-block {
    will-change: transform, opacity;
}

.trend-card {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 600ms ease, transform 600ms ease;
}
.trend-card.in-view { opacity: 1; transform: translateY(0); }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 960px) {
    .hero, .conventions-section { grid-template-columns: 1fr; }
    .hero-burgundy { min-height: 60vh; }
    .footer-inner { grid-template-columns: 1fr; text-align: center; }
    .footer-meta { text-align: center; }
    .conv-left::before { display: none; }
}

@media (max-width: 560px) {
    .name-result-inner { grid-template-columns: 80px 1fr; }
    .input-chrome { flex-direction: column; padding: 6px; }
    .generate-btn { padding: 10px; clip-path: none; }
}
