:root {
    /* VELA - Brand Palette */
    --midnight: #0D1A3E;
    --midnight-2: #162050;
    --ivory: #F5EFE6;
    --snow: #FAFAF8;
    --rose: #C4647A;
    --rose-light: #E8A0AE;
    --rose-dark: #9E4A5E;
    --sage: #3D9E8A;
    --sage-light: #7DC4B8;
    --sage-dark: #2A7062;
    --gold: #C9913A;
    --gold-light: #E2B96A;
    --gold-dark: #9A6E28;
    --charcoal: #1C2540;
    --slate: #4A5570;
    --silver: #8A95A3;
    --fog: #D5D9E2;

    /* Theme Mappings */
    --primary-color: var(--midnight);
    --secondary-color: var(--ivory);
    --accent-color: var(--rose);
    --text-color: var(--charcoal);
    --text-light: var(--slate);
    --bg-color: var(--snow);
    --card-bg: var(--ivory);
    --border-color: var(--fog);
    --success-color: var(--sage);
    --warning-color: var(--gold);
    --error-color: var(--rose);

    /* Fonts */
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Outfit', system-ui, sans-serif;
    --mono: 'DM Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

/* ── PREMIUM TEXTURES ─────────────────────────────── */
.glow-bg {
    position: relative;
    overflow: hidden;
}

.glow-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 30%, rgba(196, 100, 122, 0.08), transparent),
        radial-gradient(ellipse 50% 60% at 80% 70%, rgba(61, 158, 138, 0.06), transparent),
        radial-gradient(ellipse 40% 40% at 50% 50%, rgba(201, 145, 58, 0.04), transparent);
    pointer-events: none;
    z-index: 0;
}

/* ── LAYOUT ───────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 24px 20px;
}

.flex-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

/* ── TYPOGRAPHY ───────────────────────────────────── */
h1, .t-display {
    font-family: var(--serif);
    font-weight: 300;
    line-height: 1.0;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    font-size: clamp(34px, 10vw, 56px);
}

h2, .t-headline {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.015em;
    margin-bottom: 1rem;
    font-size: clamp(26px, 6vw, 36px);
}

h3, .t-title {
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    font-size: clamp(18px, 4vw, 24px);
}

.label {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--silver);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.label::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 1px;
    background: var(--silver);
    opacity: 0.5;
}

/* ── COMPONENTS ────────────────────────────────────── */
.card {
    background: var(--ivory);
    border-radius: 20px;
    border: 1px solid var(--fog);
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

/* Inputs & Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select {
    width: 100%;
    padding: 16px 24px;
    border-radius: 100px; /* pill styling matching buttons */
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-color);
    font-family: var(--sans);
    font-size: 0.95rem;
    margin-bottom: 16px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-appearance: none;
    appearance: none;
}

/* Specific styling for dates and selects which need a bit more space or different radius */
input[type="date"],
select {
    border-radius: 16px; /* slightly less rounded for date pickers/dropdowns to look better */
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus {
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(13, 26, 62, 0.08);
}

input::placeholder {
    color: var(--silver);
    opacity: 0.8;
}

.clickable {
    cursor: pointer;
}

.card:active {
    transform: scale(0.98);
    background: #EDE8DF;
}

.ghost-text {
    position: absolute;
    bottom: -5px;
    right: 15px;
    font-family: var(--serif);
    font-size: clamp(40px, 15vw, 80px);
    font-weight: 600;
    color: rgba(13, 26, 62, 0.04);
    line-height: 1;
    user-select: none;
    pointer-events: none;
}

.btn {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 16px 24px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-block;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    width: auto;
}

.btn-full {
    display: block;
    width: 100%;
}

.btn-primary {
    background: var(--midnight);
    color: var(--ivory);
}

.btn-primary:hover {
    background: var(--midnight-2);
}

/* ── NAVIGATION ───────────────────────────────────── */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(245, 239, 230, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(13, 26, 62, 0.08);
    display: flex;
    justify-content: space-around;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 10px));
    z-index: 1000;
}

.tab-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex: 1;
    color: var(--slate);
    transition: all 0.3s ease;
    gap: 6px;
}

.tab-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.tab-btn.active {
    color: var(--midnight);
}

.tab-btn.active .tab-icon {
    transform: translateY(-2px);
    opacity: 1;
}

.tab-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ── ANIMATIONS ────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes scrollLine {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.5); opacity: 0.4; }
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--silver), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

/* ── UTILITIES ─────────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.p-relative { position: relative; }