﻿/* ==========================================================================
   Heritage Gala 2024 — design tokens + component styles
   (Bootstrap 5 handles layout/flex/grid utilities; this file carries the theme)
   ========================================================================== */

:root {
    /* Color roles */
    --primary: #000a1e;
    --on-primary: #ffffff;
    --primary-container: #002147;
    --on-primary-container: #708ab5;
    --on-primary-container-rgb: 112, 138, 181;
    --secondary: #6c5e06;
    --secondary-container: #f7e382;
    --on-secondary-fixed: #211b00;
    --tertiary-container: #202222;
    --background: #fcf9f8;
    --surface: #fcf9f8;
    --on-surface: #1c1b1b;
    --on-surface-variant: #44474e;
    --surface-container-lowest: #ffffff;
    --surface-container-low: #f6f3f2;
    --surface-container-highest: #e5e2e1;
    --outline-variant: #c4c6cf;
    --outline-variant-rgb: 196, 198, 207;
    /* Type */
    --font-display: "Libre Caslon Text", Georgia, serif;
    --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
    /* Spacing */
    --margin-mobile: 20px;
    --gutter: 24px;
    --container-max: 1200px;
    /* Radii */
    --radius-default: 0.125rem;
    --radius-lg: 0.25rem;
    --radius-xl: 0.5rem;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

.page {
    min-height: max(884px, 100dvh);
    margin: 0;
    background-color: var(--surface);
    color: var(--on-surface);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    overflow-x: hidden;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    font-family: "Material Symbols Outlined";
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.container-max {
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
}

/* --------------------------------------------------------------------------
   Type scale
   -------------------------------------------------------------------------- */

.display-title {
    font-family: var(--font-display);
    font-size: 32px;
    line-height: 40px;
    letter-spacing: -0.01em;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 8px;
}

.headline-md {
    font-family: var(--font-display);
    font-size: 32px;
    line-height: 40px;
    font-weight: 600;
}

.headline-sm {
    font-family: var(--font-display);
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
}

.body-md {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
}

.label-caps {
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.lh-relaxed {
    line-height: 1.625;
}

.text-variant {
    color: var(--on-surface-variant);
}

.text-primary-ink {
    color: var(--primary);
}

/* --------------------------------------------------------------------------
   Top navigation
   -------------------------------------------------------------------------- */

.site-nav {
    z-index: 50;
    background-color: rgba(252, 249, 248, 0.8);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(var(--outline-variant-rgb), 0.3);
}

.nav-inner {
    height: 80px;
    padding-left: var(--margin-mobile);
    padding-right: var(--margin-mobile);
}

.nav-brand {
    font-family: var(--font-display);
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
    color: var(--primary-container);
}

.btn-cta {
    background-color: var(--primary);
    color: var(--on-primary);
    border: none;
    padding: 8px 16px;
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 150ms ease;
}

    .btn-cta:active {
        transform: scale(0.95);
    }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
    min-height: 530px;
}

.hero-media {
    height: 320px;
}

.hero-image {
    background-size: cover;
    background-position: center;
    filter: grayscale(20%) brightness(0.75);
}

.hero-scrim {
    background-image: linear-gradient(to top, var(--surface), transparent);
}

.hero-card-shift {
    padding-left: var(--margin-mobile);
    padding-right: var(--margin-mobile);
    margin-top: -80px;
    z-index: 10;
}

.hero-card {
    background-color: var(--surface-container-lowest);
    padding: 32px;
    border: 1px solid rgba(var(--outline-variant-rgb), 0.2);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.chip-eyebrow {
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--secondary-container);
    background-color: var(--primary-container);
    padding: 4px 12px;
    margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   Booking section
   -------------------------------------------------------------------------- */

.booking-section {
    padding: 48px var(--margin-mobile);
}

.booking-card {
    background-color: var(--primary-container);
    color: var(--on-primary-container);
    padding: 24px;
    border-left: 4px solid var(--secondary-container);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.booking-card-head {
    margin-bottom: 32px;
}

.booking-subtitle {
    color: rgba(var(--on-primary-container-rgb), 0.7);
    font-size: 14px;
    line-height: 20px;
    margin-top: 4px;
}

.icon-accent {
    color: var(--secondary-container);
    font-size: 30px;
    line-height: 36px;
}

.icon-accent-sm {
    color: var(--secondary-container);
}

.booking-stack > * + * {
    margin-top: 24px;
}

.seat-selector {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border: 1px solid rgba(var(--on-primary-container-rgb), 0.1);
    border-radius: var(--radius-default);
}

.seat-stepper {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border-radius: var(--radius-default);
}

.stepper-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid rgba(var(--on-primary-container-rgb), 0.4);
    border-radius: var(--radius-default);
    color: #ffffff;
    font-size: 20px;
    line-height: 28px;
    cursor: pointer;
    transition: background-color 150ms ease;
}

    .stepper-btn:hover {
        background-color: rgba(var(--on-primary-container-rgb), 0.1);
    }

.seat-count {
    min-width: 2ch;
    font-size: 20px;
    line-height: 28px;
}

.seat-note {
    font-size: 12px;
    line-height: 16px;
    color: rgba(var(--on-primary-container-rgb), 0.6);
}

.price-row {
    border-bottom: 1px solid rgba(var(--on-primary-container-rgb), 0.2);
    padding-top: 8px;
    padding-bottom: 16px;
}

.total-row {
    padding-top: 8px;
}

.total-label {
    color: var(--secondary-container);
    font-size: 14px;
    line-height: 20px;
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.1em;
}

.total-value {
    color: var(--secondary-container);
}

.btn-confirm {
    margin-top: 32px;
    background-color: var(--secondary-container);
    color: var(--on-secondary-fixed);
    border: none;
    padding: 16px 0;
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter 150ms ease, transform 150ms ease;
}

    .btn-confirm:hover {
        filter: brightness(1.1);
    }

    .btn-confirm:active {
        transform: scale(0.95);
    }

/* Assistance card */

.assist-card {
    background-color: var(--surface-container-highest);
    padding: 24px;
    border: 1px solid rgba(var(--outline-variant-rgb), 0.3);
}

.assist-title {
    margin: 0 0 8px;
}

.assist-copy {
    margin: 0 0 24px;
}

.contact-link {
    color: var(--primary);
    text-decoration: none;
}

    .contact-link:hover {
        color: var(--primary);
    }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
    background-color: var(--primary-container);
    border-top: 1px solid rgba(var(--on-primary-container-rgb), 0.2);
}

.footer-grid {
    padding: 48px var(--margin-mobile);
    --bs-gutter-x: var(--gutter);
    --bs-gutter-y: var(--gutter);
}

.footer-brand {
    color: var(--secondary-container);
}

.footer-blurb {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 20px;
    color: rgba(var(--on-primary-container-rgb), 0.8);
}

.footer-label {
    color: var(--on-primary-container);
    opacity: 0.5;
    margin-bottom: 8px;
}

.footer-link {
    color: var(--on-primary-container);
    text-decoration: none;
    display: inline-block;
    transition: color 150ms ease;
}

    .footer-link:hover {
        color: var(--on-primary);
    }

.footer-legal {
    padding: 24px var(--margin-mobile);
    border-top: 1px solid rgba(var(--on-primary-container-rgb), 0.1);
}

.footer-copyright {
    font-family: var(--font-body);
    font-size: 10px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(var(--on-primary-container-rgb), 0.6);
}

/* --------------------------------------------------------------------------
   Dark mode hook (kept from the original .dark class behaviour)
   -------------------------------------------------------------------------- */

.dark .site-nav {
    background-color: rgba(240, 237, 237, 0.8);
}

.dark .nav-brand {
    color: #d6e3ff;
}

.dark .site-footer {
    background-color: var(--tertiary-container);
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}


/* ---------- Reservation modal ---------- */

.gala-modal {
    background-color: var(--primary-container);
    color: var(--on-primary-container);
    border: none;
    border-left: 4px solid var(--secondary-container);
    border-radius: 0;
}

.gala-modal-header {
    border-bottom: 1px solid rgba(var(--on-primary-container-rgb), 0.2);
    padding: 24px;
    align-items: flex-start;
}

.gala-modal-body {
    padding: 24px;
}

.gala-modal-footer {
    border-top: 1px solid rgba(var(--on-primary-container-rgb), 0.2);
    padding: 16px 24px;
    gap: 12px;
}

.field-block {
    margin-bottom: 24px;
}

.field-label {
    display: block;
    color: var(--secondary-container);
    margin-bottom: 8px;
}

.gala-input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(var(--on-primary-container-rgb), 0.4);
    border-radius: var(--radius-default);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 24px;
    padding: 12px 14px;
    transition: border-color 150ms ease;
}

    .gala-input::placeholder {
        color: rgba(var(--on-primary-container-rgb), 0.6);
    }

    .gala-input:focus {
        outline: none;
        border-color: var(--secondary-container);
    }

    .gala-input.is-invalid {
        border-color: #ffb4ab;
    }

.field-error {
    display: none;
    font-size: 12px;
    line-height: 16px;
    color: #ffb4ab;
    margin-top: 6px;
}

    .field-error.show {
        display: block;
    }

.modal-summary {
    border-top: 1px solid rgba(var(--on-primary-container-rgb), 0.2);
    padding-top: 16px;
}

.modal-submit {
    margin-top: 0;
    width: auto;
    padding: 14px 28px;
}
    .modal-submit:disabled {
        opacity: 0.7;
        cursor: progress;
    }

.btn-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(33, 27, 0, 0.25);
    border-top-color: var(--on-secondary-fixed);
    border-radius: 50%;
    animation: gala-spin 700ms linear infinite;
}

.modal-submit.is-loading .btn-spinner {
    display: inline-block;
}

@keyframes gala-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-spinner {
        animation-duration: 2s;
    }
}

.btn-outline-light-ink {
    background: transparent;
    border: 1px solid rgba(var(--on-primary-container-rgb), 0.4);
    color: #ffffff;
    padding: 14px 24px;
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 150ms ease;
}

    .btn-outline-light-ink:hover {
        background-color: rgba(var(--on-primary-container-rgb), 0.1);
    }
/* ---------- intl-tel-input on the dark card ---------- */

.gala-phone .iti {
    display: block;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(var(--on-primary-container-rgb), 0.4);
    border-radius: var(--radius-default);
    transition: border-color 150ms ease;
}

/* the box moved to the wrapper, so the input itself goes bare */
.gala-phone .iti__tel-input {
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 0;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 24px;
    padding: 12px 14px 12px var(--iti-offset, 104px);
    letter-spacing: 0.02em;
}

    .gala-phone .iti__tel-input::placeholder {
        color: rgba(var(--on-primary-container-rgb), 0.5);
    }

    .gala-phone .iti__tel-input:focus {
        outline: none;
        box-shadow: none;
    }

.gala-phone .iti:focus-within {
    border-color: var(--secondary-container);
}

.gala-phone .iti.is-invalid,
.gala-phone .iti:has(.is-invalid) {
    border-color: #ffb4ab;
}

/* selected-country button + the divider that separates code from number */
.gala-phone .iti__country-container {
    padding: 1px;
}

.gala-phone .iti__selected-country {
    background-color: transparent;
    border-radius: 0;
    border-right: 1px solid rgba(var(--on-primary-container-rgb), 0.28);
    padding: 0 12px;
    transition: background-color 150ms ease;
}

    .gala-phone .iti__selected-country:hover,
    .gala-phone .iti__selected-country:focus {
        background-color: rgba(255, 255, 255, 0.08);
    }

    .gala-phone .iti__selected-country:focus-visible {
        outline: 2px solid var(--secondary-container);
        outline-offset: -2px;
    }

.gala-phone .iti__selected-dial-code {
    color: #ffffff;
    font-size: 16px;
    margin-left: 8px;
    font-variant-numeric: tabular-nums;
}

.gala-phone .iti__arrow {
    border-top-color: rgba(var(--on-primary-container-rgb), 0.9);
    margin-left: 8px;
}

.gala-phone .iti__arrow--up {
    border-bottom-color: rgba(var(--on-primary-container-rgb), 0.9);
}

/* dropdown — rendered on <body>, so these stay unscoped */
.iti__dropdown-content {
    background-color: var(--primary-container);
    color: #ffffff;
    border: 1px solid rgba(var(--on-primary-container-rgb), 0.4);
    border-radius: var(--radius-default);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.iti__country-list {
    max-height: 260px;
    scrollbar-width: thin;
}

.iti__country {
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 15px;
}

    .iti__country.iti__highlight,
    .iti__country:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

.iti__country-name {
    color: #ffffff;
}

.iti__dial-code {
    color: rgba(var(--on-primary-container-rgb), 0.85);
}

.iti__divider {
    border-bottom-color: rgba(var(--on-primary-container-rgb), 0.25);
}

.iti__search-input {
    background-color: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border: none;
    border-bottom: 1px solid rgba(var(--on-primary-container-rgb), 0.25);
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: 15px;
}

    .iti__search-input::placeholder {
        color: rgba(var(--on-primary-container-rgb), 0.6);
    }

    .iti__search-input:focus {
        outline: none;
    }

/* mobile fullscreen variant */
.iti--fullscreen-popup .iti__dropdown-content {
    border-radius: 0;
}

.iti--show-flags {
    width: 100% !important;
}

/* ---------- Language dropdown ---------- */

.lang-toggle {
    background: transparent;
    border: 1px solid rgba(0, 10, 30, 0.25);
    border-radius: var(--radius-default);
    color: var(--primary);
    padding: 8px 12px;
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

    .lang-toggle:hover,
    .lang-toggle[aria-expanded="true"] {
        background-color: var(--primary);
        border-color: var(--primary);
        color: var(--on-primary);
    }

    .lang-toggle:focus-visible {
        outline: 2px solid var(--secondary-container);
        outline-offset: 2px;
    }

.lang-icon {
    font-size: 18px;
}

.lang-caret {
    font-size: 18px;
    transition: transform 150ms ease;
}

.lang-toggle[aria-expanded="true"] .lang-caret {
    transform: rotate(180deg);
}

.lang-menu {
    min-width: 190px;
    margin-top: 8px;
    padding: 4px 0;
    background-color: var(--surface-container-lowest);
    border: 1px solid rgba(var(--outline-variant-rgb), 0.6);
    border-radius: var(--radius-default);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

.lang-option {
    background: transparent;
    border: none;
    border-left: 2px solid transparent;
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 22px;
    color: var(--on-surface);
    text-align: start;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease;
}

    .lang-option:hover {
        background-color: var(--surface-container-low);
    }

    .lang-option:focus-visible {
        outline: none;
        background-color: var(--surface-container-low);
        border-left-color: var(--secondary-container);
    }

    .lang-option.is-active {
        border-left-color: var(--secondary-container);
        color: var(--primary-container);
        font-weight: 600;
    }

.lang-code {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(0, 10, 30, 0.45);
}

.lang-option.is-active .lang-code {
    color: var(--primary-container);
}

/* Arabic renders better with a touch more line height */
.lang-option[value="ar"] .lang-native {
    font-size: 16px;
    line-height: 24px;
}

/* ==========================================================================
   APPEND TO site.css — localization support
   1. Arabic typography
   2. Logical properties so the layout mirrors correctly in RTL
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Arabic font pair
   Libre Caslon and Source Sans 3 have no Arabic coverage, so swap the two
   font variables wholesale when the document language is Arabic.
   -------------------------------------------------------------------------- */

html[lang="ar"] {
    --font-display: "Amiri", "Libre Caslon Text", Georgia, serif;
    --font-body: "Noto Sans Arabic", "Source Sans 3", system-ui, sans-serif;
}

    /* Arabic script sits lower and needs more leading than Latin at the same size */
    html[lang="ar"] .display-title {
        line-height: 48px;
        letter-spacing: 0;
    }

    html[lang="ar"] .headline-md {
        line-height: 46px;
    }

    html[lang="ar"] .headline-sm {
        line-height: 38px;
    }

    html[lang="ar"] .body-md {
        line-height: 28px;
    }

    /* letter-spacing is meaningless in a connected script — it breaks the joins */
    html[lang="ar"] .label-caps,
    html[lang="ar"] .chip-eyebrow,
    html[lang="ar"] .btn-cta,
    html[lang="ar"] .btn-confirm,
    html[lang="ar"] .btn-outline-ink,
    html[lang="ar"] .btn-outline-light-ink,
    html[lang="ar"] .total-label,
    html[lang="ar"] .footer-label,
    html[lang="ar"] .footer-copyright,
    html[lang="ar"] .lang-toggle {
        letter-spacing: 0;
        text-transform: none;
    }

/* the native language name in the picker keeps its own font regardless */
.lang-native-ar {
    font-family: "Noto Sans Arabic", sans-serif;
    font-size: 16px;
}

/* --------------------------------------------------------------------------
   2. Logical properties — these replace the physical ones in site.css
   so everything mirrors automatically under dir="rtl".
   Keep them AFTER the original rules so they win on source order.
   -------------------------------------------------------------------------- */

.booking-card {
    border-left: none;
    border-inline-start: 4px solid var(--secondary-container);
}

.gala-modal {
    border-left: none;
    border-inline-start: 4px solid var(--secondary-container);
}

.section-heading-rule {
    border-left: none;
    border-inline-start: 2px solid var(--secondary-container);
    padding-left: 0;
    padding-inline-start: 16px;
}

.lang-option {
    border-left: none;
    border-inline-start: 2px solid transparent;
    text-align: start;
}

    .lang-option:focus-visible {
        border-inline-start-color: var(--secondary-container);
    }

    .lang-option.is-active {
        border-inline-start-color: var(--secondary-container);
    }

.field-label {
    text-align: start;
}

.gala-input {
    text-align: start;
}

/* --------------------------------------------------------------------------
   3. Phone field stays LTR in every language
   -------------------------------------------------------------------------- */

.gala-phone,
.gala-phone .iti,
.gala-phone .iti__tel-input {
    direction: ltr;
    text-align: left;
}

    .gala-phone .iti__tel-input {
        padding: 12px 14px 12px var(--iti-offset, 104px);
    }

    .gala-phone .iti__selected-country {
        border-right: 1px solid rgba(var(--on-primary-container-rgb), 0.28);
        border-left: none;
    }

/* the dropdown is appended to <body>, so force it LTR too */
.iti__dropdown-content {
    direction: ltr;
    text-align: left;
}

html[dir="rtl"] .iti--fullscreen-popup .iti__dropdown-content {
    direction: ltr;
}

/* --------------------------------------------------------------------------
   4. Misc RTL fixes
   -------------------------------------------------------------------------- */

/* Bootstrap's RTL sheet handles dropdown-menu-end, but the caret rotation
   and the modal close button need no mirroring — they are symmetric. */

html[dir="rtl"] .booking-subtitle,
html[dir="rtl"] .footer-blurb,
html[dir="rtl"] .seat-note {
    text-align: start;
}

/* keep prices and the seat counter in Latin reading order */
.total-value,
.seat-count,
#unit-price,
#modal-total {
    direction: ltr;
    unicode-bidi: isolate;
}

html[dir="rtl"] .total-row,
html[dir="rtl"] .price-row,
html[dir="rtl"] .modal-summary {
    text-align: start;
}