/* ==========================================================================
   VRI Base — Design System, Reset, Typography
   ========================================================================== */

/* --- Design System Custom Properties --- */
:root {
    /* Typography */
    --vri-font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Helvetica, Arial, sans-serif;
    /* IMPORTANT: the VBO plugin's vri-vikbooking.css defines --vri-font-body
       as the font-SIZE (14px), so we can't use that name for the family.
       We use --vri-font-family-body / --vri-font-family-nav here instead.

       Stack rationale (in order):
         -apple-system, BlinkMacSystemFont, 'SF Pro Text'
           → Apple platforms render SF Pro Text natively, no download.
         'Inter'
           → cross-platform fallback for Android/Windows/Linux. Inter was
             designed by Rasmus Andersson to look like SF Pro and is the
             industry-standard SF lookalike (loaded from Google Fonts).
         system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif
           → final fallbacks if the Inter request fails entirely. */
    --vri-font-family-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --vri-font-family-nav:  -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    /* Brand Colors — Number Nine blue palette */
    --vri-color-primary: #006B9D;
    --vri-color-secondary: #3E8FBB;
    --vri-color-accent: #C8DCE8;
    --vri-color-cream: #E6F0F6;

    /* Functional Colors */
    --vri-color-link: #006B9D;
    --vri-color-link-hover: #004E73;
    --vri-color-active-nav: #006B9D;
    --vri-color-success: #4CAF50;
    --vri-color-error: #dc3545;
    --vri-color-warning: #f5a623;

    /* Surfaces */
    --vri-color-header-bg: #EDF4F9;
    --vri-color-header-fixed-bg: rgba(237, 244, 249, 0.97);
    --vri-color-top-header-bg: #FFFFFF;
    --vri-color-dropdown-bg: #3E8FBB;
    --vri-color-footer-bg: #3E8FBB;
    --vri-color-footer-text: #EDF4F9;
    --vri-color-footer-heading: #EDF4F9;
    --vri-color-footer-bottom-bg: #004E73;
    --vri-color-mobile-nav-text: #004E73;
    --vri-color-border: #C8DCE8;
    --vri-color-border-light: #E2ECF3;
    --vri-color-grey-bg: #F5F8FB;
    --vri-color-page-bg: #fff;

    /* Tinted Neutrals (blue-tinted for brand cohesion) */
    --vri-sand-50: #F5F9FC;
    --vri-sand-100: #EDF4F9;
    --vri-sand-200: #DDE9F2;
    --vri-sand-300: #C8DCE8;
    --vri-sand-400: #A8C5D8;

    /* Spacing Scale */
    --vri-gap-xs: 8px;
    --vri-gap-sm: 12px;
    --vri-gap-md: 16px;
    --vri-gap-lg: 24px;
    --vri-gap-xl: 32px;
    --vri-gap-2xl: 48px;
    --vri-gap-3xl: 64px;
    --vri-gap-4xl: 96px;

    /* Shadows */
    --vri-shadow-sm: 0 1px 3px rgba(0, 107, 157, 0.06);
    --vri-shadow-md: 0 4px 12px rgba(0, 107, 157, 0.08);
    --vri-shadow-lg: 0 10px 30px rgba(0, 107, 157, 0.10);
    --vri-shadow-xl: 0 20px 50px rgba(0, 107, 157, 0.14);
    --vri-shadow-glow: 0 4px 14px rgba(0, 107, 157, 0.35);

    /* Border Radius */
    --vri-radius-sm: 6px;
    --vri-radius-md: 10px;
    --vri-radius-lg: 16px;
    --vri-radius-xl: 24px;
    --vri-radius-full: 9999px;

    /* Transitions */
    --vri-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --vri-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --vri-duration: 0.25s;
    --vri-duration-slow: 0.4s;

    /* River wave textures — inline SVGs for subtle water surface texture */
    --vri-wave-light: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='80' viewBox='0 0 240 80'%3E%3Cg fill='none' stroke='%23A8C5D8' stroke-linecap='round'%3E%3Cpath d='M0 22 Q 30 6, 60 22 T 120 22 T 180 22 T 240 22' stroke-width='1.2' opacity='0.45'/%3E%3Cpath d='M0 44 Q 30 28, 60 44 T 120 44 T 180 44 T 240 44' stroke-width='1' opacity='0.35'/%3E%3Cpath d='M0 66 Q 30 50, 60 66 T 120 66 T 180 66 T 240 66' stroke-width='0.9' opacity='0.25'/%3E%3C/g%3E%3C/svg%3E");
    --vri-wave-dark: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='80' viewBox='0 0 240 80'%3E%3Cg fill='none' stroke='%23ffffff' stroke-linecap='round'%3E%3Cpath d='M0 22 Q 30 6, 60 22 T 120 22 T 180 22 T 240 22' stroke-width='1.2' opacity='0.22'/%3E%3Cpath d='M0 44 Q 30 28, 60 44 T 120 44 T 180 44 T 240 44' stroke-width='1' opacity='0.16'/%3E%3Cpath d='M0 66 Q 30 50, 60 66 T 120 66 T 180 66 T 240 66' stroke-width='0.9' opacity='0.12'/%3E%3C/g%3E%3C/svg%3E");

    /* Layout */
    --vri-container-max: 1920px;
    --vri-container-narrow: 1200px;
    --vri-container-text: 800px;
    --vri-header-height: 70px;
    --vri-section-padding: 80px;

    /* Heading Sizes (fluid) */
    --vri-h1: clamp(2.2rem, 5vw, 3.2rem);
    --vri-h2: clamp(1.6rem, 3.5vw, 2.5rem);
    --vri-h3: clamp(1.3rem, 2.5vw, 1.8rem);
    --vri-h4: clamp(1.1rem, 2vw, 1.5rem);
    --vri-h5: clamp(1rem, 1.5vw, 1.25rem);
    --vri-h6: clamp(0.9rem, 1.2vw, 1.1rem);

    /* Overlay */
    --vri-overlay: rgba(0, 107, 157, 0.55);
    --vri-overlay-light: rgba(0, 107, 157, 0.3);
}

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

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--vri-font-family-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--vri-color-primary);
    background-color: var(--vri-sand-50);
    background-image: var(--vri-wave-light);
    background-repeat: repeat;
    background-size: 240px 80px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Soft river-wave texture utility — apply to any sand-50 or #3E8FBB surface */
.vri-wave-texture-light {
    background-image: var(--vri-wave-light);
    background-repeat: repeat;
    background-size: 240px 80px;
}
.vri-wave-texture-dark {
    background-image: var(--vri-wave-dark);
    background-repeat: repeat;
    background-size: 240px 80px;
}

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

a {
    color: var(--vri-color-link);
    text-decoration: none;
    transition: color var(--vri-duration) var(--vri-ease);
}

a:hover,
a:focus {
    color: var(--vri-color-link-hover);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--vri-font-heading);
    font-weight: 700;
    color: var(--vri-color-primary);
    line-height: 1.2;
    margin: 0 0 0.5em;
    letter-spacing: 0.08em;
}

h1 { font-size: var(--vri-h1); }
h2 { font-size: var(--vri-h2); }
h3 { font-size: var(--vri-h3); }
h4 { font-size: var(--vri-h4); }
h5 { font-size: var(--vri-h5); }
h6 { font-size: var(--vri-h6); }

p {
    margin: 0 0 1em;
}

blockquote {
    margin: 1.5em 0;
    padding: 1.2em 1.8em;
    border-left: 4px solid var(--vri-color-secondary);
    background: var(--vri-sand-50);
    border-radius: 0 var(--vri-radius-sm) var(--vri-radius-sm) 0;
    font-style: italic;
}

ul, ol {
    margin: 0 0 1em;
    padding-left: 1.5em;
}

hr {
    border: none;
    height: 1px;
    background: var(--vri-color-border-light);
    margin: var(--vri-gap-2xl) 0;
}

/* --- Selection --- */
::selection {
    background: var(--vri-color-secondary);
    color: var(--vri-color-primary);
}

/* --- Focus Styles --- */
:focus-visible {
    outline: 2px solid var(--vri-color-active-nav);
    outline-offset: 2px;
}

/* --- Buttons --- */
.vri-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--vri-font-family-nav);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: none;
    border-radius: var(--vri-radius-full);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--vri-duration) var(--vri-ease);
    white-space: nowrap;
}

.vri-btn--primary {
    background: var(--vri-color-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 107, 157, 0.3);
}

.vri-btn--primary:hover {
    background: #004E73;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 107, 157, 0.4);
}

.vri-btn--secondary {
    background: var(--vri-color-secondary);
    color: var(--vri-color-primary);
    box-shadow: var(--vri-shadow-glow);
}

.vri-btn--secondary:hover {
    background: #9DB59A;
    color: var(--vri-color-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 107, 157, 0.45);
}

.vri-btn--outline {
    background: transparent;
    color: var(--vri-color-primary);
    border: 2px solid var(--vri-color-primary);
}

.vri-btn--outline:hover {
    background: var(--vri-color-primary);
    color: #fff;
    transform: translateY(-2px);
}

.vri-btn--sm {
    padding: 10px 20px;
    font-size: 12px;
}

.vri-btn--lg {
    padding: 18px 40px;
    font-size: 16px;
}

/* --- Cards (generic) --- */
.vri-card {
    background: #fff;
    border-radius: var(--vri-radius-md);
    box-shadow: var(--vri-shadow-sm);
    overflow: hidden;
    transition: transform var(--vri-duration) var(--vri-ease),
                box-shadow var(--vri-duration) var(--vri-ease);
}

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

.vri-card img {
    transition: transform 0.5s var(--vri-ease);
}

.vri-card:hover img {
    transform: scale(1.05);
}

/* --- Utilities --- */
.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    clip: auto !important;
    clip-path: none;
    display: block;
    height: auto;
    width: auto;
    z-index: 100000;
    background: #fff;
    padding: 15px 23px;
    font-size: 14px;
    font-weight: 700;
}

/* --- Scroll Reveal Animation --- */
.vri-fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--vri-ease), transform 0.6s var(--vri-ease);
}

.vri-fade-in.vri-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.vri-stagger > .vri-fade-in:nth-child(1) { transition-delay: 0s; }
.vri-stagger > .vri-fade-in:nth-child(2) { transition-delay: 0.08s; }
.vri-stagger > .vri-fade-in:nth-child(3) { transition-delay: 0.16s; }
.vri-stagger > .vri-fade-in:nth-child(4) { transition-delay: 0.24s; }
.vri-stagger > .vri-fade-in:nth-child(5) { transition-delay: 0.32s; }
.vri-stagger > .vri-fade-in:nth-child(6) { transition-delay: 0.40s; }

/* --- Frosted Glass Utility --- */
.vri-glass {
    background: rgba(240, 245, 238, 0.85);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.vri-glass--dark {
    background: rgba(0, 107, 157, 0.75);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* --- Section Spacing --- */
.vri-section {
    padding: var(--vri-section-padding) 0;
}

.vri-section--alt {
    background: var(--vri-sand-50);
}

.vri-section--dark {
    background: var(--vri-color-primary);
    color: var(--vri-color-footer-text);
}

.vri-section--secondary {
    background-color: var(--vri-color-secondary);
    background-image: var(--vri-wave-dark);
    background-repeat: repeat;
    background-size: 240px 80px;
}

/* --- Section Headers --- */
.vri-section__header {
    text-align: center;
    max-width: var(--vri-container-text);
    margin: 0 auto var(--vri-gap-2xl);
}

.vri-section__eyebrow {
    display: block;
    font-family: var(--vri-font-family-body);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--vri-color-active-nav);
    margin-bottom: var(--vri-gap-sm);
}

.vri-section__title {
    margin-bottom: var(--vri-gap-md);
}

.vri-section__subtitle {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
}

/* --- Grid Utilities --- */
.vri-grid {
    display: grid;
    gap: var(--vri-gap-lg);
}

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

@media (max-width: 1024px) {
    .vri-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .vri-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .vri-grid--4,
    .vri-grid--3,
    .vri-grid--2 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Phosphor icon helpers (replaces legacy inline SVG helpers in shortcodes)
   ========================================================================== */
.vri-svg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 1.1em;
    vertical-align: middle;
}
/* In contexts that previously used 14-20px SVGs, let the parent font-size
   dictate the icon scale. Callers can override via their own selector. */
.vri-card__amenity .vri-svg-icon,
.vri-spec-badge .vri-svg-icon { font-size: 18px; }
.vri-card__pill .vri-svg-icon { font-size: 14px; }
.vri-sb-icon .vri-svg-icon { font-size: 20px; }

/* Global Phosphor duotone colours — tie the two-tone effect to our brand. */
.ph-duotone {
    --ph-primary-color: currentColor;
    --ph-secondary-color: var(--vri-color-secondary, #3E8FBB);
    --ph-secondary-opacity: 0.35;
}
