/* ============================================
   Orvia Hotels - Base Styles
   Reset, Typography, Grid, Utilities
   ============================================ */

/* ── Reset ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--fe-font-body);
    font-size: var(--fe-text-base);
    font-weight: var(--fe-weight-normal);
    line-height: var(--fe-leading-normal);
    color: var(--fe-text);
    background-color: var(--fe-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

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

a {
    color: var(--fe-text-link);
    text-decoration: none;
    transition: color var(--fe-transition-fast);
}

a:hover {
    color: var(--fe-text-link-hover);
}

ul, ol {
    list-style: none;
}

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

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--fe-font-heading);
    font-weight: var(--fe-weight-semibold);
    line-height: var(--fe-leading-tight);
    color: var(--fe-text);
    letter-spacing: var(--fe-tracking-tight);
}

h1 { font-size: var(--fe-text-5xl); }
h2 { font-size: var(--fe-text-4xl); }
h3 { font-size: var(--fe-text-3xl); }
h4 { font-size: var(--fe-text-2xl); }
h5 { font-size: var(--fe-text-xl); }
h6 { font-size: var(--fe-text-lg); }

p {
    margin-bottom: var(--fe-space-4);
    color: var(--fe-text-secondary);
}

p:last-child {
    margin-bottom: 0;
}

.text-accent {
    color: var(--fe-accent);
}

.text-muted {
    color: var(--fe-text-muted);
}

.text-small {
    font-size: var(--fe-text-sm);
}

.text-xs {
    font-size: var(--fe-text-xs);
}

.text-lg {
    font-size: var(--fe-text-lg);
}

.text-center { text-align: center; }
.text-right { text-align: right; }

.eyebrow {
    font-family: var(--fe-font-body);
    font-size: var(--fe-text-xs);
    font-weight: var(--fe-weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--fe-tracking-wider);
    color: var(--fe-accent);
}

.section-title {
    font-family: var(--fe-font-heading);
    font-size: var(--fe-text-4xl);
    font-weight: var(--fe-weight-semibold);
    margin-bottom: var(--fe-space-2);
}

.section-subtitle {
    font-size: var(--fe-text-lg);
    color: var(--fe-text-secondary);
    max-width: 600px;
}

/* ── Layout ── */
.container {
    width: 100%;
    max-width: var(--fe-max-width);
    margin: 0 auto;
    padding: 0 var(--fe-space-6);
}

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

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

.section {
    padding: var(--fe-space-20) 0;
}

.section-sm {
    padding: var(--fe-space-12) 0;
}

.section-lg {
    padding: var(--fe-space-32) 0;
}

/* ── Grid System ── */
.grid {
    display: grid;
    gap: var(--fe-space-6);
}

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

.grid-auto {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.grid-auto-sm {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* ── Flexbox Utilities ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--fe-space-1); }
.gap-2 { gap: var(--fe-space-2); }
.gap-3 { gap: var(--fe-space-3); }
.gap-4 { gap: var(--fe-space-4); }
.gap-6 { gap: var(--fe-space-6); }
.gap-8 { gap: var(--fe-space-8); }

/* ── Spacing Utilities ── */
.mt-1 { margin-top: var(--fe-space-1); }
.mt-2 { margin-top: var(--fe-space-2); }
.mt-4 { margin-top: var(--fe-space-4); }
.mt-6 { margin-top: var(--fe-space-6); }
.mt-8 { margin-top: var(--fe-space-8); }
.mb-1 { margin-bottom: var(--fe-space-1); }
.mb-2 { margin-bottom: var(--fe-space-2); }
.mb-4 { margin-bottom: var(--fe-space-4); }
.mb-6 { margin-bottom: var(--fe-space-6); }
.mb-8 { margin-bottom: var(--fe-space-8); }

/* ── Divider ── */
.divider {
    height: 1px;
    background: var(--fe-border);
    border: none;
    margin: var(--fe-space-8) 0;
}

.divider-accent {
    width: 60px;
    height: 2px;
    background: var(--fe-accent);
    border: none;
    margin: var(--fe-space-4) 0;
}

/* ── Visibility ── */
.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;
}

.hidden { display: none !important; }

/* ── Animations ── */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-fade-in { animation: fadeIn var(--fe-transition-slow) both; }
.animate-fade-in-up { animation: fadeInUp var(--fe-transition-slow) both; }
.animate-slide-in-right { animation: slideInRight var(--fe-transition-slow) both; }

/* Staggered animation delays */
.delay-1 { animation-delay: 100ms; }
.delay-2 { animation-delay: 200ms; }
.delay-3 { animation-delay: 300ms; }
.delay-4 { animation-delay: 400ms; }
.delay-5 { animation-delay: 500ms; }

/* Scroll-triggered reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Skeleton Loading ── */
.skeleton {
    background: linear-gradient(90deg, var(--fe-gray-100) 25%, var(--fe-gray-200) 50%, var(--fe-gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--fe-radius);
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 16/10;
}
