/* --- Korean-inspired design tokens --- */
:root {
    --color-ink: #0f1c2e;
    --color-ink-soft: #2a3f5c;
    --color-bg: #f4f1ea;
    --color-bg-warm: #ebe6dc;
    --color-surface: #ffffff;
    --color-text: #1a2332;
    --color-text-muted: #5a6578;

    /* Taeguk red + celadon + gold accents */
    --color-red: #c8102e;
    --color-red-deep: #9b0b24;
    --color-red-soft: #fce8ec;
    --color-celadon: #5b8a72;
    --color-celadon-soft: #e8f2ed;
    --color-gold: #b8860b;
    --color-gold-soft: #f5edd8;
    --color-navy: #0f1c2e;
    --color-border: #ddd8ce;

    --font-display: "Playfair Display", Georgia, serif;
    --font-kr: "Noto Serif KR", serif;
    --font-body: "DM Sans", system-ui, sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 999px;

    --shadow-sm: 0 2px 8px rgba(15, 28, 46, 0.06);
    --shadow-md: 0 12px 40px rgba(15, 28, 46, 0.1);
    --shadow-nav: 0 4px 24px rgba(15, 28, 46, 0.08);

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 5.5rem;

    --max-content: 1140px;
    --nav-height: 4.25rem;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Reset & base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    margin: 0;
    padding-top: var(--nav-height);
    background-color: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
}

body.nav-open {
    overflow: hidden;
}

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

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

p {
    margin: 0;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

a {
    color: inherit;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Skip link --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-sm);
    z-index: 1000;
    padding: 0.75rem 1rem;
    background: var(--color-red);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: top 0.2s var(--ease-out);
}

.skip-link:focus {
    top: var(--space-sm);
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

/* --- Fixed header / nav --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.site-header.is-scrolled {
    border-bottom-color: var(--color-border);
    box-shadow: var(--shadow-nav);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: calc(var(--max-content) + 3rem);
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--space-md);
    gap: var(--space-md);
}

.site-nav__brand {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 700;
    color: var(--color-ink);
}

.site-nav__hangul {
    font-family: var(--font-kr);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-red);
}

.site-nav__name {
    font-family: var(--font-display);
    font-size: 1.25rem;
}

.site-nav__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.site-nav__toggle:focus-visible {
    outline: 2px solid var(--color-red);
    outline-offset: 2px;
}

.site-nav__toggle-bar {
    display: block;
    width: 1.35rem;
    height: 2px;
    background: var(--color-ink);
    border-radius: 1px;
    transition: transform 0.25s var(--ease-out), opacity 0.25s;
    margin: 0 auto;
}

body.nav-open .site-nav__toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

body.nav-open .site-nav__toggle-bar:nth-child(2) {
    opacity: 0;
}

body.nav-open .site-nav__toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-nav__panel {
    display: none;
}

.site-nav__links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.site-nav__links a {
    display: block;
    padding: 0.65rem 0;
    text-decoration: none;
    font-weight: 500;
    color: var(--color-ink-soft);
    transition: color 0.2s;
}

.site-nav__links a:hover,
.site-nav__links a:focus-visible {
    color: var(--color-red);
}

.site-nav__actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-surface);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lang-toggle:focus-visible {
    outline: 2px solid var(--color-red);
    outline-offset: 2px;
}

.lang-toggle__opt--active {
    color: var(--color-red);
}

.lang-toggle__sep {
    opacity: 0.4;
    user-select: none;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.35rem;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s, background 0.2s, color 0.2s;
}

.btn:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn--primary {
    background: linear-gradient(135deg, var(--color-red) 0%, var(--color-red-deep) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(200, 16, 46, 0.35);
}

.btn--primary:hover {
    box-shadow: 0 6px 20px rgba(200, 16, 46, 0.45);
}

.btn--ghost {
    background: transparent;
    color: var(--color-ink);
    border-color: var(--color-border);
}

.btn--ghost:hover {
    border-color: var(--color-celadon);
    color: var(--color-celadon);
    background: var(--color-celadon-soft);
}

.btn--light {
    background: #fff;
    color: var(--color-red-deep);
}

.btn--light:hover {
    box-shadow: var(--shadow-md);
}

.btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* --- Page shell --- */
#page {
    max-width: var(--max-content);
    margin: var(--space-lg) auto;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* --- Headline eyebrow --- */
.headline {
    color: var(--color-red);
    text-transform: uppercase;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    margin-bottom: var(--space-xs);
}

/* --- Hero --- */
.hero {
    position: relative;
    padding: var(--space-xl) var(--space-lg);
    background: linear-gradient(160deg, var(--color-red-soft) 0%, var(--color-surface) 45%, var(--color-celadon-soft) 100%);
    overflow: hidden;
}

.hero__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image:
        radial-gradient(circle at 20% 80%, var(--color-red) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, var(--color-celadon) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.hero__inner {
    position: relative;
    display: grid;
    gap: var(--space-xl);
    align-items: center;
}

.hero__content {
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.35rem, 5.5vw, 3.5rem);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
    color: var(--color-ink);
}

.hero__subtitle {
    display: block;
    font-family: var(--font-kr);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 500;
    color: var(--color-celadon);
    margin-top: 0.35rem;
    letter-spacing: 0.02em;
}

.hero .description {
    color: var(--color-text-muted);
    font-size: 1.0625rem;
    max-width: 36rem;
    margin: 0 auto var(--space-md);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}

.hero__figure {
    margin: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 3px solid rgba(255, 255, 255, 0.8);
}

.hero__figure img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--color-bg-warm), var(--color-celadon-soft));
}

.hero__caption {
    padding: 0.65rem var(--space-sm);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
}

/* --- Facts strip --- */
.facts {
    background: var(--color-ink);
    color: #fff;
    padding: var(--space-md) var(--space-lg);
}

.facts__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    max-width: 56rem;
    margin: 0 auto;
}

.facts__item {
    text-align: center;
    padding: var(--space-sm);
}

.facts__value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: 0.2rem;
}

.facts__label {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.75;
}

/* --- Section headers --- */
.section-header {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto var(--space-xl);
}

.section-header h2 {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    margin-bottom: var(--space-md);
    color: var(--color-ink);
    letter-spacing: -0.02em;
}

.section-header__lead {
    color: var(--color-text-muted);
}

/* --- Main sections --- */
main {
    padding: var(--space-xl) var(--space-lg);
}

.gastronomy {
    margin-bottom: var(--space-2xl);
}

.gastronomy__highlights {
    display: grid;
    gap: var(--space-md);
}

.highlight-card {
    padding: var(--space-lg);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}

.highlight-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.highlight-card__icon {
    font-size: 1.75rem;
    display: block;
    margin-bottom: var(--space-sm);
}

.highlight-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--color-ink);
}

.highlight-card p {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
}

/* --- Destinations --- */
.destinations {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.destinations__grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

.destination-card {
    display: grid;
    gap: var(--space-lg);
    scroll-margin-top: calc(var(--nav-height) + 1rem);
}

.destination-card__media {
    margin: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.destination-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 28, 46, 0.15), transparent 40%);
    pointer-events: none;
}

.destination-card__media img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: linear-gradient(135deg, var(--color-bg-warm), var(--color-celadon-soft));
    transition: transform 0.5s var(--ease-out);
}

.destination-card:hover .destination-card__media img {
    transform: scale(1.03);
}

.destination-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.destination-card__number {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--color-red);
}

.destination-card h3 {
    font-size: 1.5rem;
    color: var(--color-ink);
}

.destination-card__name-ko {
    font-family: var(--font-kr);
    font-size: 0.9375rem;
    color: var(--color-celadon);
    margin-top: -0.25rem;
}

.destination-card__body > p:not(.bom-para):not(.destination-card__name-ko) {
    color: var(--color-text-muted);
}

.bom-para {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-ink);
    margin-top: var(--space-xs);
}

.lista-categorias {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.tag {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
}

.tag--historia {
    background: #e8eef8;
    color: #1e4a8c;
}

.tag--casais {
    background: #f0e8f8;
    color: #5b3d8c;
}

.tag--familias {
    background: var(--color-red-soft);
    color: var(--color-red-deep);
}

.tag--orcamento {
    background: var(--color-gold-soft);
    color: #8b6914;
}

/* --- Summary --- */
.resumo {
    margin-top: var(--space-2xl);
}

.resumo blockquote {
    margin: 0;
    padding: var(--space-lg) var(--space-xl);
    background: linear-gradient(135deg, var(--color-red-soft), var(--color-gold-soft));
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-red);
    position: relative;
}

.resumo blockquote::before {
    content: "\201C";
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-family: var(--font-display);
    font-size: 3.5rem;
    line-height: 1;
    color: var(--color-red);
    opacity: 0.25;
}

.resumo p {
    position: relative;
    text-align: center;
    font-size: 1.125rem;
    font-style: italic;
    color: var(--color-ink-soft);
    max-width: 52ch;
    margin: 0 auto;
}

/* --- CTA banner --- */
.cta-banner {
    margin-top: var(--space-2xl);
    padding: var(--space-xl) var(--space-lg);
    background: linear-gradient(135deg, var(--color-ink) 0%, var(--color-ink-soft) 100%);
    border-radius: var(--radius-md);
    text-align: center;
    color: #fff;
}

.cta-banner h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: var(--space-sm);
    color: #fff;
}

.cta-banner p {
    opacity: 0.85;
    margin-bottom: var(--space-md);
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    background: var(--color-ink);
    color: #9aa8bc;
    padding: var(--space-lg) var(--space-md) var(--space-xl);
    font-size: 0.875rem;
}

.site-footer p {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.footer__heart {
    filter: brightness(0) saturate(100%) invert(35%) sepia(90%) saturate(2000%) hue-rotate(330deg);
}

.site-footer a {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.site-footer__copy {
    margin-top: var(--space-sm);
    font-size: 0.75rem;
    opacity: 0.6;
}

/* --- Back to top --- */
.back-to-top {
    position: fixed;
    bottom: var(--space-md);
    right: var(--space-md);
    z-index: 90;
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-full);
    background: var(--color-red);
    color: #fff;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s var(--ease-out), opacity 0.2s;
}

.back-to-top:hover {
    transform: translateY(-2px);
}

.back-to-top:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

.back-to-top[hidden] {
    display: none;
}

/* --- Desktop nav --- */
@media (min-width: 900px) {
    .site-nav__toggle {
        display: none;
    }

    .site-nav__panel {
        display: flex;
        align-items: center;
        gap: var(--space-xl);
        flex: 1;
        justify-content: flex-end;
    }

    .site-nav__links {
        flex-direction: row;
        gap: var(--space-md);
    }

    .site-nav__links a {
        padding: 0.25rem 0;
        font-size: 0.9375rem;
        position: relative;
    }

    .site-nav__links a::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -4px;
        width: 0;
        height: 2px;
        background: var(--color-red);
        transition: width 0.25s var(--ease-out);
    }

    .site-nav__links a:hover::after {
        width: 100%;
    }

    .site-nav__actions {
        flex-direction: row;
        align-items: center;
        margin: 0;
        padding: 0;
        border: none;
        gap: var(--space-sm);
    }

    .hero__inner {
        grid-template-columns: 1fr 1.05fr;
    }

    .hero__content {
        text-align: left;
    }

    .hero .description {
        margin-left: 0;
    }

    .hero__actions {
        justify-content: flex-start;
    }

    .facts__grid {
        grid-template-columns: repeat(4, 1fr);
    }

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

    .destination-card {
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: var(--space-xl);
    }

    .destination-card:nth-child(even) .destination-card__media {
        order: 2;
    }

    .destination-card:nth-child(even) .destination-card__body {
        order: 1;
    }
}

@media (max-width: 899px) {
    body.nav-open .site-nav__panel {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        padding: var(--space-lg) var(--space-md);
        background: var(--color-surface);
        overflow-y: auto;
        animation: slideDown 0.3s var(--ease-out);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 1024px) {
    #page {
        margin: var(--space-xl) auto;
    }

    .hero__figure img {
        max-height: 480px;
    }
}

/* --- Scroll reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
