/* ============================================================
   SAYTASTES — Stylesheet
   Author: Seoyun Kim
   Direction: Korean food-zine / print-shop.
   Cream paper, warm ink, Berkeley blue + California gold.
   Hard rules, big type, mono labels, index numbers.
   No gradients, no glow, no glass.
   ============================================================ */

/* ------------------------------------------------------------
   TOKENS
   ------------------------------------------------------------ */
:root {
    --paper: #f2e8d5;
    --ink: #201409;
    --blue: #0e4173;   /* Berkeley blue */
    --gold: #fdb515;   /* California gold */
    --hero: #0e4173;   /* fixed hero plate color, both themes */

    --bg: var(--paper);
    --fg: var(--ink);

    --font-display: 'Anton', 'Black Han Sans', Impact, sans-serif;
    --font-body: 'Archivo', 'Noto Sans KR', 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

    --rule: 2px solid var(--fg);
    --rule-thin: 1px solid var(--fg);
    --pad: clamp(1rem, 3vw, 2.5rem);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] {
    --bg: #171008;
    --fg: #f2e8d5;
    --blue: #6ea3e0;   /* accents need to be lighter on ink */
}

/* ------------------------------------------------------------
   RESET & BASE
   ------------------------------------------------------------ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--fg);
    background: var(--bg);
    border: 10px solid var(--fg);   /* the printed frame around every page */
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
}

::selection {
    background: var(--gold);
    color: var(--ink);
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.star {
    color: var(--gold);
    display: inline-block;
    padding: 0 0.08em;
}

/* Korean text inside body copy */
:lang(ko) {
    font-family: 'Noto Sans KR', var(--font-body);
}

/* ------------------------------------------------------------
   SKIP LINK + SCROLL PROGRESS
   ------------------------------------------------------------ */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--fg);
    color: var(--bg);
    padding: 0.5rem 1rem;
    z-index: 3000;
}

.skip-link:focus {
    left: 0;
}

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    z-index: 2000;
    background: var(--gold);
    pointer-events: none;
}

/* ------------------------------------------------------------
   SITE BAR (header) — boxed cells, like a press sheet
   ------------------------------------------------------------ */
.site-bar {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: stretch;
    border-bottom: var(--rule);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 900;
}

.site-bar .cell {
    display: flex;
    align-items: center;
    padding: 0.9rem 1.1rem;
    border-right: var(--rule);
    transition: padding 0.3s var(--ease-out);
}

.site-bar .cell:last-child {
    border-right: 0;
}

.site-bar.scrolled .cell {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.brand {
    font-family: var(--font-display);
    font-size: 1.35rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    line-height: 1;
}

.brand .star {
    font-size: 0.8em;
}

.status {
    overflow: hidden;
    white-space: nowrap;
    color: var(--fg);
    opacity: 0.75;
    min-width: 0;
}

.status::after {
    content: '_';
    animation: blink 1s steps(1) infinite;
}

.site-nav {
    gap: 0.25rem;
}

.site-nav a {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.45rem 0.7rem;
    border: 2px solid transparent;
    transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
    border-color: var(--fg);
}

.site-nav a.active {
    background: var(--fg);
    color: var(--bg);
}

.theme-toggle {
    font-size: 1.05rem;
    line-height: 1;
    background: none;
    border: 0;
    border-right: var(--rule);
    cursor: pointer;
    color: var(--fg);
}

.theme-toggle:hover {
    background: var(--fg);
    color: var(--bg);
}

.bar-note {
    flex-direction: column;
    align-items: flex-start !important;
    justify-content: center;
    gap: 0.1rem;
    line-height: 1.35;
    font-size: 0.78rem;
}

.bar-note .hire {
    color: var(--blue);
    font-weight: 600;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

@media (max-width: 860px) {
    .site-bar {
        grid-template-columns: auto 1fr auto;
    }
    .status, .bar-note {
        display: none !important;
    }
    .site-nav {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

/* ------------------------------------------------------------
   HERO — blue plate with reactive line field + title band
   ------------------------------------------------------------ */
.hero-lines {
    position: relative;
    height: clamp(300px, 52vh, 560px);
    background: var(--hero);
    border-bottom: var(--rule);
    overflow: hidden;
}

.hero-lines canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.hero-kicker {
    position: absolute;
    top: 1rem;
    left: 1.25rem;
    z-index: 2;
    color: var(--paper);
}

.hero-kicker-right {
    left: auto;
    right: 1.25rem;
    text-align: right;
}

.hero-band {
    padding: clamp(1.5rem, 4vw, 3rem) var(--pad);
    border-bottom: var(--rule);
    text-align: center;
    overflow: hidden;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(3.2rem, 13.5vw, 11rem);
    line-height: 0.95;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    white-space: nowrap;
}

.hero-sub {
    margin-top: 0.75rem;
    font-size: clamp(1rem, 2.4vw, 1.5rem);
    font-family: 'Black Han Sans', var(--font-display);
    letter-spacing: 0.06em;
}

/* Sub-page hero (smaller, same voice) */
.page-hero {
    position: relative;
    background: var(--hero);
    color: var(--paper);
    border-bottom: var(--rule);
    padding: clamp(3rem, 8vw, 6rem) var(--pad) clamp(1.5rem, 4vw, 3rem);
    overflow: hidden;
}

.page-hero .page-kicker {
    display: block;
    margin-bottom: 1rem;
}

.page-hero h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.8rem, 9vw, 7.5rem);
    line-height: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.page-hero .page-count {
    position: absolute;
    right: 1.25rem;
    bottom: 1rem;
}

/* ------------------------------------------------------------
   TICKER — marquee strips between sections
   ------------------------------------------------------------ */
.ticker {
    border-bottom: var(--rule);
    overflow: hidden;
    background: var(--bg);
    padding: 0.45rem 0;
    white-space: nowrap;
}

.ticker-track {
    display: inline-flex;
    animation: ticker var(--ticker-dur, 40s) linear infinite;
    will-change: transform;
}

.ticker-track span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding-right: 2rem;
    flex-shrink: 0;
}

.ticker--ink {
    background: var(--fg);
}

.ticker--ink span {
    color: var(--bg);
}

@keyframes ticker {
    to { transform: translateX(-50%); }
}

/* ------------------------------------------------------------
   SHEET — a ruled content section
   ------------------------------------------------------------ */
.sheet {
    border-bottom: var(--rule);
}

.sheet-head {
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
    padding: 1rem var(--pad);
    border-bottom: var(--rule-thin);
}

.sheet-no {
    color: var(--blue);
    font-weight: 600;
}

.sheet-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.6rem, 4.5vw, 3rem);
    line-height: 1;
    text-transform: uppercase;
}

.sheet-meta {
    margin-left: auto;
    opacity: 0.6;
}

.sheet-body {
    padding: clamp(1.5rem, 4vw, 3rem) var(--pad);
}

.sheet-body > p,
.prose > p {
    max-width: 62ch;
    margin-bottom: 1rem;
    font-size: 1.02rem;
}

/* Two-column: prose + gallery */
.split {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

@media (min-width: 820px) {
    .split {
        grid-template-columns: 3fr 2fr;
    }
}

/* ------------------------------------------------------------
   TRANSLATION SLIPS
   ------------------------------------------------------------ */
.slip {
    border-top: 1px dashed var(--fg);
    padding: 0.9rem 0 0.25rem;
    margin-top: 1.25rem;
    max-width: 62ch;
}

.slip-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--paper);
    background: var(--hero);
    padding: 0.1rem 0.5rem;
    margin-bottom: 0.6rem;
}

.slip p {
    font-size: 0.92rem;
    opacity: 0.85;
}

/* ------------------------------------------------------------
   PHOTO FRAMES
   ------------------------------------------------------------ */
.frames {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.frame {
    border: var(--rule);
    background: var(--bg);
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.frame img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-bottom: var(--rule);
    filter: saturate(0.94) contrast(1.04);
}

.frame figcaption {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.45rem 0.7rem;
    display: flex;
    justify-content: space-between;
}

.frame:hover {
    transform: translate(-3px, -3px);
    box-shadow: 6px 6px 0 var(--fg);
}

/* ------------------------------------------------------------
   DIRECTORY — the menu of pages (home)
   ------------------------------------------------------------ */
.dir-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: clamp(1rem, 3vw, 2rem);
    padding: clamp(1.1rem, 3vw, 1.8rem) var(--pad);
    border-bottom: var(--rule);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.dir-row:last-of-type {
    border-bottom: 0;
}

.dir-no {
    color: var(--blue);
    font-weight: 600;
}

.dir-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.8rem, 6vw, 4.2rem);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.dir-meta {
    opacity: 0.6;
    text-align: right;
}

.dir-arrow {
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    transition: transform 0.25s var(--ease-out);
}

.dir-row:hover {
    background: var(--fg);
    color: var(--bg);
}

.dir-row:hover .dir-no {
    color: var(--gold);
}

.dir-row:hover .dir-arrow {
    transform: translateX(8px);
}

@media (max-width: 640px) {
    .dir-meta { display: none; }
}

/* ------------------------------------------------------------
   MENU BOARD — jump links on review pages
   ------------------------------------------------------------ */
.board {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem var(--pad);
    border-bottom: var(--rule);
}

.board-label {
    color: var(--blue);
    font-weight: 600;
    margin-right: 0.5rem;
}

.board a {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border: var(--rule-thin);
    padding: 0.3rem 0.65rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.board a:hover {
    background: var(--fg);
    color: var(--bg);
}

/* ------------------------------------------------------------
   TICKET — one review
   ------------------------------------------------------------ */
.ticket {
    margin: clamp(1.5rem, 4vw, 3rem) var(--pad);
    border: var(--rule);
    background: var(--bg);
    scroll-margin-top: 90px;
}

.ticket-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: stretch;
    border-bottom: var(--rule);
}

.ticket-head > * {
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem;
}

.ticket-no {
    border-right: var(--rule);
    color: var(--blue);
    font-weight: 600;
}

.ticket-name {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.5rem, 4vw, 2.6rem);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.ticket-tag {
    border-left: var(--rule);
    opacity: 0.7;
}

@media (max-width: 640px) {
    .ticket-tag { display: none; }
}

.ticket-body {
    padding: clamp(1.25rem, 3vw, 2rem);
}

.ticket-body .split {
    grid-template-columns: 1fr;
}

@media (min-width: 900px) {
    .ticket-body .split {
        grid-template-columns: 3fr 2fr;
    }
}

.ticket .frames {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-content: start;
}

.ticket .frame img {
    height: 220px;
}

/* ------------------------------------------------------------
   LANGUAGE TABS
   ------------------------------------------------------------ */
.lang-buttons {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.1rem;
}

.lang-btn {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.35rem 0.8rem;
    background: var(--bg);
    color: var(--fg);
    border: var(--rule);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.lang-btn:hover {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--paper);
}

.lang-btn.active {
    background: var(--fg);
    color: var(--bg);
}

.lang-content {
    display: none;
}

.lang-content.active {
    display: block;
}

.lang-content p {
    max-width: 62ch;
    margin-bottom: 1rem;
}

/* ------------------------------------------------------------
   CHEF — recipe steps
   ------------------------------------------------------------ */
.recipe-note {
    margin: clamp(1.5rem, 4vw, 3rem) var(--pad);
    border: var(--rule);
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: 8px 8px 0 var(--gold);
}

.recipe-note p {
    max-width: 68ch;
    margin-bottom: 1rem;
}

.recipe-note p:last-child {
    margin-bottom: 0;
}

.step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(1.25rem, 4vw, 3rem);
    padding: clamp(1.5rem, 4vw, 2.5rem) var(--pad);
    border-bottom: var(--rule);
    align-items: start;
}

.step:last-of-type {
    border-bottom: 0;
}

.step-no {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.step-no .mono {
    color: var(--blue);
    margin-bottom: 0.3rem;
}

.step-no strong {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.6rem, 7vw, 5.5rem);
}

.step-text h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.3rem, 3vw, 2rem);
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.step-text p {
    max-width: 62ch;
    margin-bottom: 0.9rem;
}

.step-media {
    grid-column: 2;
    max-width: 480px;
}

.step-media img {
    height: 260px;
}

@media (min-width: 900px) {
    .step.has-media {
        grid-template-columns: auto 1fr 320px;
    }
    .step-media {
        grid-column: auto;
        max-width: none;
    }
}

/* ------------------------------------------------------------
   CONTACT
   ------------------------------------------------------------ */
.stamp-btn {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--fg);
    background: var(--bg);
    border: var(--rule);
    padding: 0.7rem 1.2rem;
    cursor: pointer;
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background 0.15s ease, color 0.15s ease;
}

.stamp-btn:hover {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--paper);
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--fg);
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.copy-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translate(-50%, 20px);
    background: var(--fg);
    color: var(--bg);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.8rem 1.4rem;
    border: 2px solid var(--gold);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s var(--ease-out);
    z-index: 2100;
}

.copy-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ------------------------------------------------------------
   FOOTER — the big send-off
   ------------------------------------------------------------ */
.site-end {
    background: var(--ink);
    color: var(--paper);
}

html[data-theme="dark"] .site-end {
    background: var(--hero);
    color: var(--paper);
}

.end-hero {
    padding: clamp(2.5rem, 7vw, 5rem) var(--pad);
    text-align: center;
}

.end-kicker {
    display: block;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.end-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(3rem, 12vw, 9rem);
    line-height: 0.95;
    text-transform: uppercase;
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

html[data-theme="dark"] .end-title .star {
    color: var(--gold);
}

.end-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.site-end .stamp-btn {
    background: transparent;
    color: inherit;
    border-color: currentColor;
}

.site-end .stamp-btn:hover {
    background: var(--paper);
    border-color: var(--paper);
    color: var(--ink);
    box-shadow: 4px 4px 0 var(--gold);
}

html[data-theme="dark"] .site-end .stamp-btn:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
    box-shadow: 4px 4px 0 var(--paper);
}

.end-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding: 0.8rem var(--pad);
    border-top: 1px solid currentColor;
    opacity: 0.85;
}

.end-strip a {
    text-decoration: none;
}

.end-strip a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

/* ------------------------------------------------------------
   REVEAL ON SCROLL
   ------------------------------------------------------------ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ------------------------------------------------------------
   MISC
   ------------------------------------------------------------ */
.teaser {
    margin: 0 var(--pad) clamp(1.5rem, 4vw, 3rem);
    padding: 1rem 1.25rem;
    border: 1px dashed var(--fg);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.75;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ------------------------------------------------------------
   REDUCED MOTION
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    .ticker-track {
        animation: none;
    }
}
