/*
 * MeetCASI - Main Stylesheet
 * Luxury marketing site design inspired by Option-O and Weber Workshops
 */

/* ============================================
   FONTS
   ============================================ */

@font-face {
    font-family: 'Miller Banner';
    src: url('../fonts/MILLER-BANNER-LIGHT-01.TTF') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Miller Banner';
    src: url('../fonts/MILLER-BANNER-LIGHT-ITALIC-01.TTF') format('truetype');
    font-weight: 300;
    font-style: italic;
}

/* ============================================
   CSS VARIABLES (Design Tokens)
   ============================================ */

:root {
    /* Colors */
    --color-bg: #ffffff;
    --color-bg-alt: #fafafa;
    --color-text: #1a1a1a;
    --color-text-light: #666;
    --color-accent: #f5b800;           /* Golden key yellow */
    --color-accent-dark: #d9a000;

    /* Layout */
    --page-gutter: 6vw;
    --max-width: 1400px;

    /* Animation */
    --transition-speed: 0.9s;
    --transition-delay: 0.6s;
}

@media (min-width: 768px) {
    :root {
        --page-gutter: 8vw;
    }
}

/* ============================================
   GLOBAL RESETS & BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Miller Banner', Georgia, serif;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text);
    background: var(--color-bg);
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn var(--transition-speed) ease var(--transition-delay) forwards;
}

h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.subtitle {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    color: var(--color-text-light);
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.6;
    opacity: 0;
    animation: fadeIn var(--transition-speed) ease calc(var(--transition-delay) + 0.2s) forwards;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
    padding: 1.5rem var(--page-gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(26, 26, 26, 0.08);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 32px;
    width: auto;
}

nav a {
    margin-left: 2rem;
    color: var(--color-text);
    text-decoration: none;
    font-size: 1rem;
    transition: opacity var(--transition-speed) ease;
}

nav a:hover {
    opacity: 0.6;
}

/* ============================================
   BUTTONS
   ============================================ */

.button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--color-text);
    color: var(--color-bg);
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 0.05em;
    transition: all var(--transition-speed) ease;
    border: 1px solid var(--color-text);
    opacity: 0;
    animation: fadeIn var(--transition-speed) ease calc(var(--transition-delay) + 0.4s) forwards;
}

.button:hover {
    background: transparent;
    color: var(--color-text);
}

.button-accent {
    background: var(--color-accent);
    color: var(--color-text);
    border-color: var(--color-accent);
}

.button-accent:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: var(--color-text);
}

/* ============================================
   SECTIONS & LAYOUTS
   ============================================ */

.hero {
    padding: 12rem var(--page-gutter) 8rem;
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.section {
    padding: 8rem var(--page-gutter);
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-centered {
    text-align: center;
}

/* ============================================
   GRID SYSTEM
   ============================================ */

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    margin-top: 4rem;
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
}

/* ============================================
   COMPONENTS
   ============================================ */

/* Cards */
.card {
    padding: 2rem 0;
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.card p {
    color: var(--color-text-light);
    line-height: 1.7;
}

/* Hero with Image (Two-column layout) */
.hero-with-image {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
    padding: 8rem var(--page-gutter);
    max-width: var(--max-width);
    margin: 0 auto;
}

@media (min-width: 768px) {
    .hero-with-image {
        grid-template-columns: 1fr 1fr;
        gap: 6rem;
    }
}

/* CASI Portrait - Gallery Frame Style */
.casi-portrait {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 0 auto;
    display: block;
    border: 1px solid rgba(26, 26, 26, 0.08);
    background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%);
    padding: 2rem 2rem 3rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

@media (max-width: 767px) {
    .casi-portrait {
        padding: 1.5rem 1.5rem 2rem 1.5rem;
    }
}

/* ============================================
   STATS SECTION
   ============================================ */

.stats {
    background: var(--color-bg-alt);
    color: var(--color-text);
    padding: 8rem var(--page-gutter);
    border-top: 1px solid rgba(26, 26, 26, 0.08);
    border-bottom: 1px solid rgba(26, 26, 26, 0.08);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stat-number {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 300;
    line-height: 1;
    margin-bottom: 1rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.6;
    letter-spacing: 0.05em;
}

/* ============================================
   ACCENT UTILITIES
   ============================================ */

.highlight {
    color: var(--color-accent-dark);
    font-weight: 300;
}

.accent-border {
    border-left: 3px solid var(--color-accent);
    padding-left: 2rem;
}

/* ============================================
   VIDEO & DEMO SECTIONS
   ============================================ */

.video-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

video {
    width: 100%;
    height: auto;
    border: 1px solid rgba(26, 26, 26, 0.1);
    background: #000;
}

/* Interactive Demo Container */
.demo-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--color-bg-alt);
    padding: 3rem;
    border: 1px solid rgba(26, 26, 26, 0.08);
}

@media (max-width: 767px) {
    .demo-container {
        padding: 2rem 1.5rem;
    }
}

.demo-iframe {
    width: 100%;
    height: 500px;
    border: 1px solid rgba(26, 26, 26, 0.1);
    background: #fff;
    margin: 2rem 0;
}

@media (max-width: 767px) {
    .demo-iframe {
        height: 450px;
    }
}

.demo-note {
    font-size: 0.875rem;
    color: var(--color-text-light);
    text-align: center;
    margin-top: 1rem;
    font-style: italic;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    padding: 4rem var(--page-gutter);
    text-align: center;
    color: var(--color-text-light);
    border-top: 1px solid rgba(26, 26, 26, 0.1);
}

footer p {
    font-size: 0.875rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 767px) {
    nav {
        display: none;
    }

    .hero {
        padding: 8rem var(--page-gutter) 6rem;
    }
}
