/* ============================================================================
   WiseCruise — design tokens
   ----------------------------------------------------------------------------
   Ported from the OceanVista prototype. The prototype sized everything in `vw`
   units (including font sizes), which breaks on very wide and very narrow
   viewports and makes text unreadable when a browser window is resized small.
   Here each value becomes a clamp(min, preferred, max) so the fluid feel is
   preserved but text always stays legible.
   ========================================================================== */

:root {
    /* Brand palette */
    --navy: #0b233d;
    --navy-deep: #061424;
    --navy-soft: #14395f;
    --gold: #efc878;
    --gold-light: #f6d995;
    --gold-dark: #dca136;
    --gold-deep: #c79431;

    /* Neutrals */
    --white: #ffffff;
    --off-white: #f7f8f9;
    --line: #e8ebef;
    --line-strong: #dfe5ec;
    --muted: #6a7482;
    --ink: #252817;

    /* Typography */
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    --font-serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    --font-script: 'Caveat', 'Segoe Script', cursive;

    /* Fluid type scale — every size has a hard floor and ceiling */
    --fs-xs: clamp(11px, 0.78vw, 13px);
    --fs-sm: clamp(12px, 0.86vw, 14px);
    --fs-base: clamp(13px, 0.95vw, 16px);
    --fs-md: clamp(14px, 1.05vw, 17px);
    --fs-lg: clamp(15px, 1.2vw, 19px);
    --fs-xl: clamp(17px, 1.5vw, 24px);
    --fs-2xl: clamp(20px, 2.1vw, 32px);
    --fs-3xl: clamp(26px, 2.6vw, 40px);
    --fs-4xl: clamp(30px, 4.1vw, 62px);

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;

    /* Radii */
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-pill: 50px;

    /* Elevation */
    --shadow-xs: 0 2px 6px rgba(24, 53, 74, 0.05);
    --shadow-sm: 0 4px 14px rgba(216, 176, 104, 0.15);
    --shadow: 0 8px 23px rgba(24, 53, 74, 0.07);
    --shadow-md: 0 14px 35px rgba(27, 48, 64, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.28);

    /* Layout */
    --container: 1440px;
    --container-wide: 1680px;
    --gutter: clamp(16px, 4vw, 64px);
    --header-h: 76px;

    --transition: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
    /* Offset anchored sections so the sticky header never covers a heading. */
    scroll-padding-top: calc(var(--header-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    color: var(--navy);
    background: var(--white);
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote {
    margin: 0;
}

h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.18;
    letter-spacing: -0.025em;
}

h1 { font-size: var(--fs-4xl); line-height: 1.05; letter-spacing: -0.035em; }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); }

a {
    color: inherit;
    text-decoration: none;
}

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

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: 0;
    background: none;
    padding: 0;
}

button,
a {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Visible focus for keyboard users only */
:focus-visible {
    outline: 3px solid var(--gold-deep);
    outline-offset: 3px;
    border-radius: 3px;
}

i.ti {
    display: inline-block;
    font-size: 1.35em;
    vertical-align: middle;
    line-height: 1;
}

button i,
a i {
    pointer-events: none;
}

/* ---------------------------------------------------------------------------
   Accessibility helpers
   ------------------------------------------------------------------------ */
.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 {
    position: absolute;
    top: -100px;
    left: var(--gutter);
    z-index: 200;
    background: var(--gold);
    color: var(--navy);
    padding: 12px 20px;
    border-radius: 0 0 var(--radius) var(--radius);
    font-weight: 700;
    transition: top var(--transition);
}

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

/* ---------------------------------------------------------------------------
   Layout primitives
   ------------------------------------------------------------------------ */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.container-wide {
    max-width: var(--container-wide);
}

.section {
    padding-block: clamp(36px, 5vw, 76px);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-5);
    margin-bottom: clamp(18px, 2vw, 32px);
}

.section-head p {
    color: var(--muted);
    font-size: var(--fs-md);
    margin-top: var(--space-2);
    max-width: 62ch;
}

.eyebrow,
.kicker {
    color: var(--gold);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    margin-bottom: var(--space-3);
}

.kicker {
    color: var(--gold-deep);
}

/* ---------------------------------------------------------------------------
   Grids — auto-fit so no breakpoint-specific column counts are needed
   ------------------------------------------------------------------------ */
.grid {
    display: grid;
    gap: clamp(12px, 1.2vw, 20px);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-5 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* ---------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------ */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 46px;
    padding: 12px 26px;
    border-radius: var(--radius-pill);
    font-size: var(--fs-base);
    font-weight: 700;
    white-space: nowrap;
    transition: background var(--transition), transform var(--transition), color var(--transition);
}

.button i {
    font-size: 1.1em;
}

.button.gold {
    background: var(--gold);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.button.gold:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
}

.button.dark {
    background: var(--navy);
    color: var(--white);
}

.button.dark:hover {
    background: var(--navy-soft);
    transform: translateY(-1px);
}

.button.outline {
    border: 1px solid var(--line-strong);
    background: var(--white);
    color: var(--navy);
}

.button.outline:hover {
    border-color: var(--gold);
    background: #fffaf0;
}

.button.small {
    min-height: 38px;
    padding: 9px 18px;
    font-size: var(--fs-sm);
}

.button.block {
    width: 100%;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--fs-base);
    font-weight: 600;
    white-space: nowrap;
}

.text-link:hover {
    text-decoration: underline;
}

.round {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--white);
    flex-shrink: 0;
    transition: background var(--transition), border-color var(--transition);
}

.round:hover {
    border-color: var(--gold);
    background: #fffaf0;
}

.round.gold {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ink);
}

/* ---------------------------------------------------------------------------
   Badges
   ------------------------------------------------------------------------ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    background: var(--white);
    color: var(--navy);
}

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

.badge.promo {
    background: var(--gold-dark);
    color: var(--white);
    text-transform: uppercase;
}

.badge.included {
    background: #eef7f0;
    color: #1f7a44;
    letter-spacing: 0;
    font-weight: 600;
    border-radius: var(--radius-pill);
}

/* ---------------------------------------------------------------------------
   Cards
   ------------------------------------------------------------------------ */
.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}

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

/* ---------------------------------------------------------------------------
   Forms
   ------------------------------------------------------------------------ */
.field {
    display: grid;
    gap: 6px;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--navy);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--white);
    font-size: var(--fs-base);
    font-weight: 400;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(239, 200, 120, 0.28);
}

.field textarea {
    resize: vertical;
    min-height: 120px;
}

.field .hint {
    font-size: var(--fs-xs);
    font-weight: 400;
    color: var(--muted);
}

.check-label {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    font-size: var(--fs-sm);
    font-weight: 400;
    cursor: pointer;
}

.check-label input {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    accent-color: var(--gold-dark);
    flex-shrink: 0;
}

/* Validation */
.field-error {
    color: #c0392b;
    font-size: var(--fs-xs);
    font-weight: 600;
}

.input-invalid {
    border-color: #e08b80 !important;
    background: #fff7f6;
}

/* ---------------------------------------------------------------------------
   Alerts
   ------------------------------------------------------------------------ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid;
    font-size: var(--fs-sm);
    margin-bottom: var(--space-4);
}

.alert-success { background: #f0faf3; border-color: #b7e3c6; color: #1f7a44; }
.alert-error   { background: #fdf3f2; border-color: #f0c4bd; color: #b03a2e; }
.alert-info    { background: #f2f7fd; border-color: #c3d9f0; color: #1d5c96; }
.alert-warning { background: #fdf8ec; border-color: #f0dfae; color: #8a6a12; }

/* ---------------------------------------------------------------------------
   Tables (admin)
   ------------------------------------------------------------------------ */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}

table.data th {
    text-align: left;
    padding: 13px 16px;
    background: var(--off-white);
    border-bottom: 1px solid var(--line);
    font-weight: 700;
    white-space: nowrap;
}

table.data td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

table.data tr:last-child td {
    border-bottom: 0;
}

table.data tbody tr:hover {
    background: #fbfcfd;
}

/* ---------------------------------------------------------------------------
   Pagination
   ------------------------------------------------------------------------ */
.pagination {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
    margin-top: var(--space-6);
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    min-width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding-inline: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    font-weight: 600;
}

.pagination .active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

.pagination a:hover {
    border-color: var(--gold);
    background: #fffaf0;
}

/* ---------------------------------------------------------------------------
   Utilities
   ------------------------------------------------------------------------ */
.text-muted { color: var(--muted); }
.text-gold { color: var(--gold-deep); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.stack { display: grid; gap: var(--space-4); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }

.empty-state {
    text-align: center;
    padding: clamp(40px, 6vw, 80px) var(--space-5);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted);
}

.empty-state i {
    font-size: 42px;
    color: var(--gold-dark);
    display: block;
    margin-bottom: var(--space-3);
}

/* ---------------------------------------------------------------------------
   Motion preferences
   ------------------------------------------------------------------------ */
@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;
    }
}
