/* ============================================================
   Peter's Travel Log — hub page (travel.peterpham.tech)
   Display type: Fraunces · Body type: Outfit (Google Fonts)
   ============================================================ */

:root {
    --bg-0: #070b16;
    --bg-1: #0d1428;
    --ink: #eef1fb;
    --ink-dim: #9aa3c0;
    --ink-faint: #6b7494;
    --line: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(255, 255, 255, 0.045);
    --accent: #8fb7ff;
    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Outfit", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--ink);
    background:
        radial-gradient(1100px 700px at 85% -10%, rgba(94, 116, 255, 0.18), transparent 60%),
        radial-gradient(900px 650px at -15% 110%, rgba(255, 143, 181, 0.1), transparent 60%),
        linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 60%);
    overflow-x: hidden;
}

/* --- starfield (two slowly drifting layers) ------------------- */
body::before,
body::after {
    content: "";
    position: fixed;
    inset: -50%;
    z-index: 0;
    pointer-events: none;
}

body::before {
    background-image:
        radial-gradient(1px 1px at 25px 35px, rgba(255, 255, 255, 0.5), transparent 60%),
        radial-gradient(1px 1px at 120px 90px, rgba(255, 255, 255, 0.3), transparent 60%),
        radial-gradient(1.5px 1.5px at 210px 160px, rgba(200, 215, 255, 0.4), transparent 60%),
        radial-gradient(1px 1px at 300px 55px, rgba(255, 255, 255, 0.28), transparent 60%);
    background-size: 340px 340px;
    animation: stars-drift-a 160s linear infinite;
}

body::after {
    background-image:
        radial-gradient(1px 1px at 65px 205px, rgba(255, 255, 255, 0.38), transparent 60%),
        radial-gradient(2px 2px at 265px 305px, rgba(190, 210, 255, 0.45), transparent 60%),
        radial-gradient(1px 1px at 185px 345px, rgba(255, 255, 255, 0.25), transparent 60%);
    background-size: 430px 430px;
    animation: stars-drift-b 220s linear infinite;
}

@keyframes stars-drift-a { to { transform: translate3d(-340px, -340px, 0); } }
@keyframes stars-drift-b { to { transform: translate3d(430px, -430px, 0); } }

::selection { background: rgba(143, 183, 255, 0.35); }

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

/* --- header ---------------------------------------------------- */
.site-header {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
    padding: 26px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--ink);
    text-decoration: none;
}

.wordmark svg { color: var(--accent); }

.header-note {
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

/* --- hero -------------------------------------------------------- */
.hero {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(48px, 9vh, 96px) 24px 0;
}

.eyebrow {
    margin: 0 0 16px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
}

.hero h1 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2.7rem, 7vw, 4.9rem);
    line-height: 1.04;
    letter-spacing: -0.015em;
}

.hero h1 em {
    font-style: italic;
    color: #f6b6cd;
}

.lede {
    margin: 22px 0 0;
    max-width: 54ch;
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    line-height: 1.75;
    color: var(--ink-dim);
}

/* decorative flight path */
.flight-path {
    display: block;
    width: min(640px, 100%);
    margin-top: clamp(28px, 6vh, 56px);
}

.fp-line {
    stroke: rgba(143, 183, 255, 0.5);
    stroke-width: 2;
    stroke-dasharray: 1 13;
    stroke-linecap: round;
    animation: fp-march 26s linear infinite;
}

@keyframes fp-march { to { stroke-dashoffset: -540; } }

.fp-dot { fill: #8fb7ff; }

.fp-halo {
    fill: none;
    stroke: rgba(246, 182, 205, 0.9);
    stroke-width: 2;
    animation: fp-pulse 2.8s ease-out infinite;
}

@keyframes fp-pulse {
    0%   { r: 7; opacity: 0.9; }
    75%  { r: 24; opacity: 0; }
    100% { r: 24; opacity: 0; }
}

/* --- trips --------------------------------------------------------- */
.trips {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(44px, 8vh, 80px) 24px 24px;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.section-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.count {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-faint);
    white-space: nowrap;
}

.trip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 22px;
}

/* trip card — each card sets --accent / --accent-glow inline */
.trip-card {
    --accent: #8fb7ff;
    --accent-glow: rgba(143, 183, 255, 0.35);
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 26px 26px 24px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 45%), var(--card-bg);
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.trip-card::before {
    content: "";
    position: absolute;
    left: -40%;
    right: -40%;
    bottom: -70%;
    height: 90%;
    background: radial-gradient(50% 100% at 50% 100%, var(--accent-glow), transparent 72%);
    opacity: 0.45;
    transition: opacity 0.35s ease;
}

.trip-card:hover,
.trip-card:focus-visible {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 24px 60px -24px var(--accent-glow);
}

.trip-card:hover::before { opacity: 1; }

.flag {
    font-size: 2.7rem;
    line-height: 1;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
}

.dest {
    margin: 16px 0 2px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.9rem;
}

.dates {
    margin: 0;
    color: var(--ink-dim);
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.blurb {
    margin: 14px 0 20px;
    flex-grow: 1;
    color: #c3cae4;
    font-size: 0.97rem;
    line-height: 1.65;
}

.cta {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--accent);
}

.cta svg { transition: transform 0.3s ease; }
.trip-card:hover .cta svg { transform: translateX(5px); }

/* --- footer --------------------------------------------------------- */
.site-footer {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 26px 24px 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--ink-faint);
    font-size: 0.87rem;
}

.site-footer p { margin: 0; }

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

.site-footer a:hover { color: var(--accent); }

/* --- reveal on scroll ------------------------------------------------ */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}

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

/* --- small screens ----------------------------------------------------- */
@media (max-width: 560px) {
    .header-note { display: none; }
    .trip-grid { grid-template-columns: 1fr; }
    .site-footer { flex-direction: column; align-items: flex-start; gap: 6px; }
}

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