/* ══════════════════════════════════════════════════════════════
   VALLY & IVY AROUND · TRAVEL BLOG — shared stylesheet
   Editorial refresh: warm paper background, serif display type,
   boarding-pass ticket cards kept as the brand motif.
   Brand system: sand / clay / gold, Cormorant Garamond + Jost.
   Reason (design decisions):
   · Palette: core = terra + deep neutrals on sand/cream; gold is
     the single accent, reserved for hairline rules and hover.
   · Type: Cormorant Garamond for display (serif = journal feel),
     Jost for UI; uppercase reserved for genuine ticket labels.
   · Motion dial MOTION 1: hover states + one-time page entrance,
     no loops.
   · Contrast: small text uses darkened browns (AA on cream & sand).
   ══════════════════════════════════════════════════════════════ */

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

:root {
    --sand: #DFD7CC;     /* page base */
    --linen: #D0C6B8;    /* placeholder surfaces */
    --cream: #FDFAF6;    /* cards */
    --clay: #C4A882;     /* decorative lines (non-text) */
    --terra: #A0785A;    /* borders, large text only */
    --terra-ink: #6E4E38;/* small text, AA on cream & sand */
    --deep: #2C1E14;     /* headings */
    --ink: #3D2B1F;      /* body text */
    --gold: #D4A853;     /* accent: hairlines + hover only      */
                         /* (reason: single deliberate accent)   */
    --radius-lg: 18px;
    --radius-sm: 10px;
    --shadow-rest: 0 4px 18px rgba(60, 40, 25, 0.08);
    --shadow-lift: 0 10px 28px rgba(60, 40, 25, 0.14);
}

html {
    font-size: 112%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Jost', sans-serif;
    background: var(--sand);
    color: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── BACKGROUND: warm paper wash (matches the main site) ── */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
    background:
        radial-gradient(ellipse 80% 60% at 15% 20%, rgba(196, 168, 130, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 100% 100% at 50% 50%, var(--sand) 0%, #D8CEBE 100%);
}

/* keyboard focus: always visible (replaces any lost outline) */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--terra);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ── TOPBAR (the only blurred surface, kept for stickiness) ── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
    background: rgba(223, 215, 204, 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(160, 120, 90, 0.18);
    animation: fadeDown .6s ease both;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.95rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(160, 120, 90, 0.35);
    background: rgba(253, 250, 246, 0.6);
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--terra-ink);
    text-decoration: none;
    letter-spacing: 0.03em;
    white-space: nowrap;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.back-link:hover {
    background: var(--cream);
    border-color: var(--terra);
    color: var(--deep);
}

.brand-mini {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: var(--deep);
    min-width: 0;
}

.brand-mini img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cream);
    flex-shrink: 0;
}

.brand-name {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 1.02rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-tag {
    display: block;
    font-family: 'Jost', sans-serif;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--terra-ink);
}

/* ── HERO (editorial image banner) ── */
.hero {
    position: relative;
    z-index: 1;
    max-width: 1080px;
    margin: 0 auto;
    padding: clamp(1.4rem, 3.5vw, 2.4rem) 1.25rem 0;
    animation: fadeUp .7s ease both;
}

.hero-media {
    position: relative;
    height: clamp(300px, 44vw, 430px);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(160, 120, 90, 0.25);
    box-shadow: var(--shadow-rest);
    /* fallback scenery until a real photo exists */
    background:
        radial-gradient(ellipse 90% 70% at 80% 15%, rgba(212, 168, 83, 0.85) 0%, transparent 55%),
        linear-gradient(160deg, #C4A882 0%, #A0785A 48%, #54739E 100%);
}

.hero-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 0.55rem;
    padding: clamp(1.4rem, 4vw, 2.6rem);
    background: linear-gradient(to top,
            rgba(30, 20, 12, 0.78) 0%,
            rgba(30, 20, 12, 0.38) 46%,
            rgba(30, 20, 12, 0.05) 75%);
}

.hero-eyebrow {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
}

.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.9rem, 5vw, 2.9rem);
    font-weight: 600;
    color: var(--cream);
    line-height: 1.12;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.hero-sub {
    max-width: 480px;
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.65;
    color: rgba(253, 250, 246, 0.94);
}

.hero-rule {
    width: 64px;
    height: 2px;
    margin-top: 0.5rem;
    /* accent moment: the hairline under the hero statement */
    background: var(--gold);
}

/* ── QUICK PLACES NAV ── */
.places-nav {
    position: relative;
    z-index: 1;
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.9rem 1.25rem 0;
    animation: fadeUp .7s ease .06s both;
}

.places-label {
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--terra-ink);
    margin-bottom: 0.85rem;
}

.places-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    max-width: 100%;
}

.place-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(160, 120, 90, 0.35);
    background: var(--cream);
    font-size: 0.74rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--terra-ink);
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s ease, border-color .2s ease, transform .2s ease;
}

.place-link:hover {
    border-color: var(--terra);
    color: var(--deep);
    transform: translateY(-1px);
}

/* ── SECTION HEADER (journal index heading) ── */
.posts-wrap {
    position: relative;
    z-index: 1;
    max-width: 1080px;
    margin: 0 auto;
    padding: 2.6rem 1.25rem 3.5rem;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1.2rem;
    margin-bottom: 1.8rem;
    position: relative;
    animation: fadeUp .7s ease .05s both;
}

/* accent moment: gold hairline closing the section header */
.section-head::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 64px;
    height: 2px;
    background: var(--gold);
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    font-style: italic;
    color: var(--deep);
    line-height: 1.1;
}

.section-meta {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--terra-ink);
}

/* ══════════════════════════════════════════════════════════════
   BOARDING-PASS TICKETS
   Desktop (≥1000px): 2 columns · smaller: one per row.
   Structure: .ticket > .ticket-main (story) + .ticket-stub (date,
   duration, barcode). Perforation notches punched by the
   ::before/::after circles on the stub.
   ══════════════════════════════════════════════════════════════ */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1000px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

.ticket {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    background: var(--cream);
    border: 1px solid rgba(160, 120, 90, 0.22);
    box-shadow: var(--shadow-rest);
    text-decoration: none;
    color: var(--ink);
    transition: transform .25s ease, box-shadow .25s ease;
    animation: fadeUp .5s ease both;
}

.ticket:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
}

.ticket:active { transform: translateY(-1px); }

/* main (top) section of the ticket */
.ticket-main {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1.35rem 1.45rem 1.5rem;
    flex: 1;
}

.ticket-top {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.35rem;
}

/* IATA airport code, the travel-native stand-in for the old
   emoji badge (reason: authentic boarding-pass typography) */
.route-code {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(160, 120, 90, 0.3);
    background: var(--linen);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--terra-ink);
}

.ticket-place {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--terra-ink);
    margin-right: auto;
    min-width: 0;
}

.ticket-no {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--terra-ink);
}

.card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.32rem;
    font-weight: 600;
    color: var(--deep);
    line-height: 1.22;
    text-wrap: balance;
}

.card-excerpt {
    font-size: 0.86rem;
    font-weight: 300;
    line-height: 1.65;
    color: var(--ink);
}

.card-link {
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--terra-ink);
    text-decoration: none;
}

/* hover: darken + gold hairline underline (accent stays out of
   the resting state) */
.ticket:hover .card-link {
    color: var(--deep);
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

/* stub (bottom) section: perforation + date/duration + barcode */
.ticket-stub {
    position: relative;
    padding: 1.15rem 1.45rem 1.3rem;
    border-top: 2px dashed rgba(160, 120, 90, 0.38);
    border-radius: 0 0 calc(var(--radius-lg) - 3px) calc(var(--radius-lg) - 3px);
    background: rgba(208, 198, 184, 0.25);
}

/* punched notches at the perforation line, matching page bg */
.ticket-stub::before,
.ticket-stub::after {
    content: '';
    position: absolute;
    top: -15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #DAD2C8;
    box-shadow: inset 0 2px 5px rgba(160, 120, 90, 0.22);
}

.ticket-stub::before { left: -16px; }
.ticket-stub::after  { right: -16px; }

.stub-row {
    display: flex;
    align-items: stretch;
    gap: 1.25rem;
}

.stub-field { min-width: 0; }

.stub-field + .stub-field {
    padding-left: 1.25rem;
    border-left: 1px solid rgba(160, 120, 90, 0.25);
}

.stub-label {
    display: block;
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--terra-ink);
    margin-bottom: 0.15rem;
}

.stub-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--deep);
    white-space: nowrap;
}

.barcode {
    height: 28px;
    margin-top: 0.95rem;
    border-radius: 4px;
    opacity: 0.55;
    background: repeating-linear-gradient(90deg,
        var(--ink) 0 2px,   transparent 2px 5px,
        var(--ink) 5px 8px, transparent 8px 11px,
        var(--ink) 11px 12px, transparent 12px 17px,
        var(--ink) 17px 19px, transparent 19px 23px,
        var(--ink) 23px 24px, transparent 24px 29px,
        var(--ink) 29px 31px, transparent 31px 34px);
}

.stub-code {
    margin-top: 0.45rem;
    text-align: center;
    font-size: 0.56rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--terra-ink);
}

/* ═══ ARTICLE PAGES ═══ */
.article-wrap {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    padding: 2.6rem 1.25rem 3.5rem;
    animation: fadeUp .7s ease both;
}

.post-header {
    text-align: center;
    margin-bottom: 2.1rem;
}

.post-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--terra-ink);
    margin-bottom: 1.1rem;
}

.post-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.9rem, 5.5vw, 2.7rem);
    font-weight: 600;
    color: var(--deep);
    line-height: 1.18;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.post-meta {
    margin-top: 0.85rem;
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--terra-ink);
}

.post-hero {
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-rest);
    border: 1px solid rgba(160, 120, 90, 0.25);
    margin-bottom: 2.3rem;
    background: var(--linen);
}

.post-hero img,
.post-hero .cover-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.post-hero img { object-fit: cover; }

/* honest photo placeholder: labels itself, never fakes a photo */
.cover-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--linen);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
}

.article-body p {
    font-size: 0.96rem;
    font-weight: 300;
    line-height: 1.85;
    margin-bottom: 1.25rem;
    color: var(--ink);
}

.article-body .lead {
    font-size: 1.06rem;
    color: var(--deep);
}

.article-body h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.65rem;
    font-weight: 600;
    color: var(--deep);
    margin: 2.3rem 0 1rem;
    padding-bottom: 0.5rem;
    position: relative;
}

.article-body h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 54px;
    height: 2px;
    background: var(--gold);
}

.article-body h3 {
    font-family: 'Jost', sans-serif;
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--terra-ink);
    margin: 1.8rem 0 0.7rem;
}

/* callout box: the gold left edge marks it as a tips callout
   (reason: the stripe carries meaning here) */
.info-box {
    background: var(--cream);
    border: 1px solid rgba(160, 120, 90, 0.22);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius-sm);
    padding: 1.25rem 1.4rem;
    margin: 2rem 0;
}

.info-box h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--deep);
    margin: 0 0 0.65rem;
    text-transform: none;
    letter-spacing: 0;
}

.info-box ul { list-style: none; }

.info-box li {
    font-size: 0.86rem;
    font-weight: 300;
    line-height: 1.6;
    padding-left: 1.05rem;
    position: relative;
    margin-bottom: 0.45rem;
}

.info-box li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--terra);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
    margin: 2rem 0;
}

.gallery-item {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(160, 120, 90, 0.22);
    background: var(--linen);
}

.gallery-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item .cover-fallback {
    position: absolute;
    inset: 0;
    font-size: 0.62rem;
}

.gallery-item figcaption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 0.4rem 0.6rem;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cream);
    background: linear-gradient(to top, rgba(44, 30, 20, 0.65), transparent);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.4rem;
}

.tag-pill {
    display: inline-block;
    padding: 0.32rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(160, 120, 90, 0.35);
    background: var(--cream);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--terra-ink);
    text-decoration: none;
    transition: border-color .2s ease, color .2s ease;
}

.tag-pill:hover {
    border-color: var(--terra);
    color: var(--deep);
}

.post-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.6rem;
    position: relative;
}

.post-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(160, 120, 90, 0.3), transparent);
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    background: var(--deep);
    color: var(--cream);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .2s ease, transform .2s ease;
}

.nav-btn:hover {
    background: var(--ink);
    transform: translateY(-1px);
}

.nav-btn.ghost {
    background: var(--cream);
    border: 1px solid rgba(160, 120, 90, 0.35);
    color: var(--terra-ink);
}

.nav-btn.ghost:hover {
    border-color: var(--terra);
    color: var(--deep);
}

/* ── FOOTER ── */
.site-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 1.8rem 1rem 2.2rem;
    font-size: 0.74rem;
    font-weight: 300;
    color: #5C4230;   /* AA on sand */
    letter-spacing: 0.02em;
}

.site-footer a {
    color: var(--terra-ink);
    text-decoration: none;
    transition: color .2s ease;
}

.site-footer a:hover {
    color: var(--deep);
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-underline-offset: 4px;
}

.footer-rule {
    width: 180px;
    max-width: 60vw;
    height: 1px;
    margin: 0 auto 1.3rem;
    background: linear-gradient(to right, transparent, rgba(160, 120, 90, 0.35), transparent);
}

/* ── ANIMATIONS (one-time entrance only, MOTION 1) ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
    html { font-size: 104%; }

    .hero { padding-top: 1rem; }
    .hero-media { height: 340px; }
    .hero-sub { max-width: 100%; }

    .places-row {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.25rem;
    }

    .places-row::-webkit-scrollbar { display: none; }

    .brand-name { font-size: 0.92rem; }

    .ticket-main { padding: 1.2rem 1.2rem 1.3rem; }
    .ticket-stub { padding: 1.05rem 1.2rem 1.15rem; }
    .stub-row { gap: 1rem; }
    .stub-value { font-size: 0.95rem; }

    .post-nav { flex-direction: column-reverse; }
    .nav-btn { width: 100%; min-height: 44px; }

    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 420px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .ticket-top { flex-wrap: wrap; }
}
