/* ============================================
   InvestYum — Design System
   Palette: Obsidian + Gold  |  Fonts: Playfair + Inter + JetBrains Mono
   ============================================ */

:root {
    --bg:          #0A0A0A;
    --bg-card:     #0F0F0F;
    --bg-hover:    #141414;
    --border:      #1E1E24;
    --gold:        #C8A951;
    --gold-light:  #F7EF8A;
    --gold-dim:    rgba(200, 169, 81, 0.12);
    --text:        #E8E4DE;
    --text-muted:  #8A8A8A;
    --text-dim:    #555555;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body:    'Inter', system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', monospace;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* --- Body --- */
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* --- Noise Overlay --- */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.035;
    filter: url(#noise);
    width: 100%;
    height: 100%;
}

/* --- Ambient Glow --- */
.ambient-glow {
    position: fixed;
    top: 15%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--gold-dim) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transition: transform 1.5s ease-out;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hero-content {
    text-align: center;
    max-width: 800px;
}

/* --- Logo --- */
.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.2s forwards;
}

.logo {
    width: 80px;
    height: 80px;
}

/* Stroke-draw: hexagons */
.hex-outer {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: strokeDraw 1.8s ease-in-out 0.3s forwards;
}

.hex-inner {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: strokeDraw 1.2s ease-in-out 0.6s forwards;
}

/* Stroke-draw: Y letterform */
.y-left {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: strokeDraw 0.6s ease-out 1.2s forwards;
}

.y-right {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: strokeDraw 0.6s ease-out 1.5s forwards;
}

.y-stem {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: strokeDraw 0.5s ease-out 1.8s forwards;
}

/* Accent dot: fade in then pulse */
.accent-dot {
    opacity: 0;
    animation: fadeIn 0.5s ease-out 2.2s forwards, pulse 3s ease-in-out 2.7s infinite;
}

@keyframes strokeDraw {
    to { stroke-dashoffset: 0; }
}

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

/* --- Brand Name --- */
.brand {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.brand-word {
    display: inline-block;
    transform: translateY(110%);
    animation: revealUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.brand-word:nth-child(1) { animation-delay: 1s; }
.brand-word:nth-child(2) { animation-delay: 1.15s; }

.brand-accent {
    background: linear-gradient(135deg, var(--gold), var(--gold-light), var(--gold));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes revealUp {
    to { transform: translateY(0); }
}

/* --- Headline --- */
.headline {
    font-family: var(--font-body);
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideUp 0.8s ease-out 1.6s forwards;
}

/* --- Divider --- */
.divider {
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 2.5rem auto 0;
    animation: expandLine 1s ease-out 2s forwards;
}

@keyframes expandLine {
    to { width: 120px; }
}

/* ============================================
   SERVICES
   ============================================ */
.services {
    position: relative;
    z-index: 2;
    padding: 4rem 2rem 6rem;
    max-width: 1100px;
    margin: 0 auto;
}

.section-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    text-align: center;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(16px);
}

.section-label.visible {
    animation: fadeSlideUp 0.6s ease-out forwards;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.service-card {
    background: var(--bg-card);
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    transition: background-color 0.4s ease;
    opacity: 0;
    transform: translateY(20px);
}

.service-card.visible {
    animation: fadeSlideUp 0.6s ease-out forwards;
}

.service-card:nth-child(2).visible { animation-delay: 0.15s; }
.service-card:nth-child(3).visible { animation-delay: 0.3s; }

/* Gold top-border on hover */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover { background: var(--bg-hover); }
.service-card:hover::before { transform: scaleX(1); }

.service-number {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 1rem;
}

.service-title {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 400;
    color: var(--text);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.service-desc {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 36ch;
}

/* ============================================
   CTA
   ============================================ */
.cta {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 4rem 2rem 6rem;
    opacity: 0;
    transform: translateY(20px);
}

.cta.visible {
    animation: fadeSlideUp 0.8s ease-out forwards;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 8px var(--gold-dim);
}

.cta-headline {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 400;
    color: var(--text);
    line-height: 1.2;
    max-width: 600px;
    margin: 0 auto 1rem;
}

.cta-sub {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.cta-email {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text);
    text-decoration: none;
    padding: 0.875rem 2rem;
    border: 1px solid var(--gold);
    position: relative;
    overflow: hidden;
    transition: color 0.6s ease;
}

.cta-email::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}

.cta-email:hover { color: var(--bg); }
.cta-email:hover::before { transform: scaleX(1); }

.cta-email .arrow { transition: transform 0.3s ease; }
.cta-email:hover .arrow { transform: translateX(4px); }

.cta-email:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.8125rem;
    color: var(--text-dim);
}

/* ============================================
   SHARED KEYFRAMES
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr 1fr;
    }
    .service-card:last-child {
        grid-column: 1 / -1;
    }
    .logo { width: 90px; height: 90px; }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .service-card:last-child {
        grid-column: auto;
    }
    .logo { width: 100px; height: 100px; }
    .services { padding: 6rem 2rem 8rem; }
}

/* ============================================
   ACCESSIBILITY: Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hex-outer, .hex-inner, .y-left, .y-right, .y-stem {
        stroke-dashoffset: 0;
    }

    .brand-word { transform: translateY(0); }

    .headline, .logo-container, .accent-dot,
    .section-label, .service-card, .cta {
        opacity: 1;
        transform: none;
    }

    .divider { width: 120px; }
}
