/* =====================================================================
   StillCrusin site.css — global resets + base typography + a11y baseline
   ---------------------------------------------------------------------
   Imports design-tokens.css (font faces + CSS custom properties), then
   applies the minimum global rules every page inherits.

   Component-specific styles live in scoped .razor.css files alongside
   each component. This file stays small on purpose.

   F16 Plan 16-03 (TD-035): Migrated 10 residual raw var(--color-*) refs
   to F14 semantic tokens (2026-05-18). Zero visible change — semantics
   resolve to the same raw values per F14 design. The semantic layer is
   the architectural source-of-truth for component-level color decisions.
   ===================================================================== */

@import url('./design-tokens.css');

/* ---------------------------------------------------------------------
   Reset (Josh Comeau-style minimal modern reset)
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, picture, svg, video { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; background: none; border: none; padding: 0; }
a { color: inherit; text-decoration: none; }
html { font-size: 16px; }

/* ---------------------------------------------------------------------
   Body — cream-pearl canvas (V1.3 light-mode flip), humanist body type
   --------------------------------------------------------------------- */
body {
    background-color: var(--surface-page-bg);
    color: var(--text-body);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------------------------------------------------------------------
   Headings — Big Shoulders Display, ALL CAPS at display sizes
   --------------------------------------------------------------------- */
h1, h2 {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: var(--tracking-tight);
    color: var(--text-heading);
    line-height: 1.05;
}
h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-normal);
    color: var(--text-heading);
    line-height: 1.15;
}
h5, h6 {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-heading);
    line-height: 1.3;
}

/* ---------------------------------------------------------------------
   Links — hot-rod-red at rest on cream canvas, neon-cyan on hover
   --------------------------------------------------------------------- */
a {
    color: var(--link-on-light);
    transition: color var(--duration-fast) var(--easing-standard);
}
a:hover { color: var(--link-hover); }

/* ---------------------------------------------------------------------
   Focus ring — 2-layer (lacquer-black inner + chrome outer)
   matches DESIGN.md focus token; honors :focus-visible
   --------------------------------------------------------------------- */
:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 2px var(--focus-ring-outline),
        0 0 0 4px var(--focus-ring);
    border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------------
   Utilities
   --------------------------------------------------------------------- */
.mono { font-family: var(--font-mono); }

/* Visually-hidden but screen-reader accessible */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip-to-content link (revealed on focus) */
.skip-link {
    position: absolute;
    top: -120%;
    left: var(--space-6);
    background: var(--gradient-chrome-polish);
    color: var(--accent-primary);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    z-index: 9999;
    transition: top var(--duration-fast) var(--easing-standard);
}
.skip-link:focus { top: var(--space-3); }

/* ---------------------------------------------------------------------
   Flyer lightbox (V02 F01 plan 01-05)

   GLOBAL styles (not scoped to Cruises.razor.css) because the detail panel
   contents are cloned from a <template> via JS, and cloned nodes do NOT
   inherit Blazor scoped-CSS b-xxxx attributes — same root cause as the
   plan 01-02 pin SVG fix. Keeping these rules in site.css guarantees the
   detail markup styles regardless of which page injected the template.
   --------------------------------------------------------------------- */
.flyer-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    align-items: center;
    justify-content: center;
}
.flyer-lightbox.is-open { display: flex; }
.flyer-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.74);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.flyer-lightbox-panel {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    max-width: min(1100px, 95vw);
    max-height: 90vh;
    background: var(--surface-elevated, #fffdf6);
    color: var(--text-body, #1a1a1a);
    border-radius: var(--radius-lg, 12px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}
.flyer-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
}
.flyer-lightbox-close:hover,
.flyer-lightbox-close:focus-visible {
    background: var(--accent-primary, #c8102e);
    outline: none;
}
.flyer-lightbox-media {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 60%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.flyer-lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
}
.flyer-lightbox-detail {
    flex: 0 0 40%;
    max-width: 40%;
    overflow-y: auto;
    padding: var(--space-6, 24px) var(--space-6, 24px) var(--space-7, 32px);
}
.flyer-lightbox-detail h2 {
    font-family: var(--font-display);
    color: var(--accent-primary, #c8102e);
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: 0.01em;
    margin: 0 0 var(--space-3, 12px);
}
.flyer-lightbox-detail .ld-meta {
    color: var(--text-muted, #555);
    font-size: 14px;
    margin: 0 0 var(--space-4, 16px);
}
.flyer-lightbox-detail dl {
    margin: 0 0 var(--space-4, 16px);
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: var(--space-4, 16px);
    row-gap: var(--space-2, 8px);
    font-size: 14.5px;
    line-height: 1.4;
}
.flyer-lightbox-detail dt {
    font-weight: 600;
    color: var(--text-muted, #555);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 11.5px;
    padding-top: 2px;
}
.flyer-lightbox-detail dd {
    margin: 0;
    color: var(--text-body, #1a1a1a);
}
.flyer-lightbox-detail .ld-description {
    margin: var(--space-4, 16px) 0 0;
    padding-top: var(--space-4, 16px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-body, #1a1a1a);
    font-size: 14.5px;
    line-height: 1.5;
}
body.flyer-lightbox-open { overflow: hidden; }
[data-flyer-lightbox-trigger] { cursor: zoom-in; }
[data-flyer-lightbox-trigger]:focus-visible {
    outline: 3px solid var(--accent-primary, #c8102e);
    outline-offset: 3px;
}
@media (max-width: 768px) {
    .flyer-lightbox-panel {
        flex-direction: column;
        max-height: 95vh;
    }
    .flyer-lightbox-media {
        max-width: 100%;
        max-height: 45vh;
    }
    .flyer-lightbox-image { max-height: 45vh; }
    .flyer-lightbox-detail {
        flex: 1 1 auto;
        max-width: 100%;
    }
}
@media (prefers-reduced-motion: reduce) {
    .flyer-lightbox,
    .flyer-lightbox * {
        transition: none !important;
        animation: none !important;
    }
}

/* ---------------------------------------------------------------------
   Reduced motion
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
