/* ═══════════════════════════════════════════════════════
   Rochester Smart AI — Shared Theme CSS (V4)
   See docs/STYLE-GUIDE.md for usage documentation
   ═══════════════════════════════════════════════════════ */

/* ── RESET & VARIABLES ───────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #6366f1; --primary-dark: #4f46e5; --primary-light: #a5b4fc; --primary-50: #eef2ff;
    --accent: #06b6d4; --accent-light: #67e8f9;
    --navy: #06050e; --navy-2: #0f0d1a; --navy-3: #1a1630; --surface: #13111e;
    --gray-50: #f8fafc; --gray-100: #f1f5f9; --gray-200: #e2e8f0; --gray-300: #cbd5e1;
    --gray-400: #94a3b8; --gray-500: #64748b; --gray-600: #475569; --gray-700: #334155; --gray-900: #0f172a;
    --green: #10b981; --green-50: #ecfdf5; --white: #ffffff;
    --radius: 16px; --radius-lg: 24px; --radius-xl: 32px;
}
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-900); line-height: 1.6; -webkit-font-smoothing: antialiased;
    overflow-x: hidden; background: var(--white);
}

/* ── GLOBAL GRAIN TEXTURE ────────────────────────────── */
body::after {
    content: ''; position: fixed; inset: 0; z-index: 9998; pointer-events: none; opacity: 0.12;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat; background-size: 512px 512px;
}

/* ── ANIMATIONS ──────────────────────────────────────── */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse-ring { 0% { opacity: 0.6; transform: scale(1); } 100% { opacity: 0; transform: scale(2.2); } }
@keyframes glow-pulse { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
@keyframes orb-drift-1 { 0% { transform: translate(0,0) scale(1); } 33% { transform: translate(30px,-40px) scale(1.05); } 66% { transform: translate(-20px,20px) scale(0.95); } 100% { transform: translate(0,0) scale(1); } }
@keyframes orb-drift-2 { 0% { transform: translate(0,0) scale(1); } 33% { transform: translate(-40px,30px) scale(0.95); } 66% { transform: translate(20px,-20px) scale(1.05); } 100% { transform: translate(0,0) scale(1); } }
@keyframes morph { 0% { border-radius: 60% 40% 30% 70%/60% 30% 70% 40%; } 50% { border-radius: 30% 60% 70% 40%/50% 60% 30% 60%; } 100% { border-radius: 60% 40% 30% 70%/60% 30% 70% 40%; } }
@keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes geo-float-1 { 0%, 100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(15px,-20px) rotate(8deg); } }
@keyframes geo-float-2 { 0%, 100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(-12px,18px) rotate(-6deg); } }
@keyframes geo-float-3 { 0%, 100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(20px,10px) rotate(12deg); } }

/* ── SCROLL REVEAL ───────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(20px); transition: all 0.65s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; } .reveal-d2 { transition-delay: 0.2s; } .reveal-d3 { transition-delay: 0.3s; }

/* ── ICON SYSTEM ─────────────────────────────────────── */
.icon { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-lg { width: 28px; height: 28px; }
.icon-xl { width: 32px; height: 32px; }

/* ── TEXTURE LAYERS ──────────────────────────────────── */
.grid-lines {
    position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(99,102,241,0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,0.12) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 75%);
}
.topo-bg {
    position: absolute; inset: 0; pointer-events: none; overflow: hidden; opacity: 0.18;
    background-image:
        repeating-radial-gradient(circle at 20% 50%, transparent 0, transparent 40px, rgba(99,102,241,0.18) 40px, rgba(99,102,241,0.18) 41.5px, transparent 41.5px, transparent 80px),
        repeating-radial-gradient(circle at 80% 30%, transparent 0, transparent 60px, rgba(6,182,212,0.15) 60px, rgba(6,182,212,0.15) 61.5px, transparent 61.5px, transparent 120px),
        repeating-radial-gradient(circle at 50% 80%, transparent 0, transparent 50px, rgba(99,102,241,0.12) 50px, rgba(99,102,241,0.12) 51.5px, transparent 51.5px, transparent 100px);
}
.mesh-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.mesh-blob { position: absolute; border-radius: 50%; filter: blur(80px); }
.dot-grid {
    position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 20%, transparent 70%);
}

/* ── GEOMETRIC ACCENTS ───────────────────────────────── */
.geo-shape { position: absolute; pointer-events: none; opacity: 0.2; z-index: 0; }
.geo-circle { border: 2px solid var(--primary); border-radius: 50%; }
.geo-diamond { border: 2px solid var(--accent); transform: rotate(45deg); }
.geo-cross { width: 24px; height: 24px; }
.geo-cross::before, .geo-cross::after { content: ''; position: absolute; background: var(--primary); border-radius: 2px; }
.geo-cross::before { width: 100%; height: 2px; top: 50%; transform: translateY(-50%); }
.geo-cross::after { width: 2px; height: 100%; left: 50%; transform: translateX(-50%); }
.geo-ring { border: 1.5px solid var(--primary); border-radius: 50%; opacity: 0.15; }
.geo-dots { width: 160px; height: 160px; background-image: radial-gradient(circle, var(--primary) 1.5px, transparent 1.5px); background-size: 14px 14px; opacity: 0.15; }

/* ── WAVE DIVIDERS ───────────────────────────────────── */
.wave-divider { position: absolute; bottom: -2px; left: 0; width: 100%; overflow: hidden; line-height: 0; }
.wave-divider svg { display: block; width: 100%; height: 60px; }
.wave-divider-top { position: absolute; top: -2px; left: 0; width: 100%; overflow: hidden; line-height: 0; transform: rotate(180deg); }
.wave-divider-top svg { display: block; width: 100%; height: 60px; }

/* ── SHIMMER ON HOVER ────────────────────────────────── */
.shimmer-hover { position: relative; overflow: hidden; }
.shimmer-hover::before { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent); transition: none; pointer-events: none; z-index: 1; }
.shimmer-hover:hover::before { animation: shimmer 0.8s ease forwards; }

/* ── NAV ─────────────────────────────────────────────── */
.t-nav { position: fixed; top: 0; width: 100%; z-index: 100; padding: 0.75rem 0; background: rgba(6,5,14,0.8); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border-bottom: 1px solid rgba(255,255,255,0.05); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 2rem; display: flex; justify-content: space-between; align-items: center; }
.logo { display: inline-flex; align-items: center; gap: 0.8rem; text-decoration: none; }
.logo-mark-img { height: 42px; width: auto; display: block; flex-shrink: 0; filter: drop-shadow(0 0 18px rgba(121,167,255,0.22)); transform-origin: center; }
.logo-text { display: inline-flex; align-items: baseline; gap: 0.35rem; font-size: 1.1rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: #ffffff; text-shadow: 0 0 24px rgba(121,167,255,0.08); white-space: nowrap; }
.logo-text span { background: linear-gradient(90deg, #6dbd96 0%, #5c99c2 60%, #9759c8 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-link { color: rgba(255,255,255,0.5); text-decoration: none; font-weight: 500; font-size: 0.85rem; transition: color 0.2s; }
.nav-link:hover { color: white; }
.nav-cta { background: var(--primary); color: white; padding: 0.5rem 1.3rem; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 0.85rem; transition: all 0.2s; }
.nav-cta:hover { background: var(--primary-dark); box-shadow: 0 0 20px rgba(99,102,241,0.4); }

/* ── HERO (generic, reusable) ────────────────────────── */
.t-hero { padding: 11rem 2rem 6rem; background: var(--navy); color: white; position: relative; overflow: hidden; text-align: center; }
.t-hero-inner { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.t-hero-glow { position: absolute; width: 900px; height: 600px; top: 40%; left: 50%; transform: translate(-50%, -55%); background: radial-gradient(ellipse, rgba(99,102,241,0.18) 0%, rgba(6,182,212,0.06) 40%, transparent 70%); pointer-events: none; animation: glow-pulse 6s ease infinite; }
.t-hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 900; line-height: 1.1; letter-spacing: -0.04em; margin-bottom: 1.5rem; }
.t-hero h1 .glow-text { background: linear-gradient(135deg, #818cf8 0%, var(--accent-light) 50%, #818cf8 100%); background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.t-hero p { font-size: 1.15rem; color: rgba(255,255,255,0.45); max-width: 560px; margin: 0 auto 2.5rem; line-height: 1.75; }
.t-hero .badge { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); padding: 0.4rem 1rem; border-radius: 100px; margin-bottom: 2rem; font-size: 0.8rem; font-weight: 500; color: rgba(255,255,255,0.6); }

/* ── SECTION COMMON ──────────────────────────────────── */
.t-section { padding: 6rem 2rem; position: relative; overflow: hidden; }
.t-section-inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }
.sec-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.2em; margin-bottom: 0.75rem; text-align: center; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.sec-label-light { color: var(--primary-light); }
.sec-label-light .icon { stroke: var(--primary-light); }
.sec-label-dark { color: var(--primary); }
.sec-label-dark .icon { stroke: var(--primary); }
.sec-title { text-align: center; font-size: clamp(2rem, 3.5vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; margin-bottom: 1rem; }
.sec-sub { text-align: center; color: var(--gray-500); font-size: 1.05rem; max-width: 520px; margin: 0 auto 3rem; line-height: 1.7; }

/* ── LIGHT SECTION VARIANTS ──────────────────────────── */
.t-section.light { background: white; }
.t-section.light-tinted { background: linear-gradient(180deg, var(--gray-50) 0%, white 100%); }
.t-section.light-indigo { background: linear-gradient(180deg, white 0%, #f8f9ff 40%, #f0f2ff 100%); }
.t-section.light-purple { background: linear-gradient(180deg, #f0f2ff 0%, #f6f5ff 50%, var(--gray-50) 100%); }
.t-section.light-deep { background: linear-gradient(180deg, white 0%, #f3f4ff 50%, #eef0ff 100%); }

/* ── DARK SECTION VARIANT ────────────────────────────── */
.t-section.dark { background: var(--navy); color: white; }
.t-section.dark .sec-title { color: white; }
.t-section.dark .sec-sub { color: rgba(255,255,255,0.4); }

/* ── GLASS CARD (light bg) ───────────────────────────── */
.glass-card {
    background: rgba(255,255,255,0.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(226,232,240,0.6); border-radius: var(--radius-lg); padding: 2rem;
    position: relative; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent); pointer-events: none; }
.glass-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(99,102,241,0.08), 0 4px 12px rgba(0,0,0,0.04); border-color: rgba(99,102,241,0.2); }

/* ── GLASS CARD (dark bg) ────────────────────────────── */
.glass-card-dark {
    background: rgba(255,255,255,0.03); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius-lg); padding: 2rem;
    position: relative; transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-card-dark::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, transparent 50%, rgba(6,182,212,0.04) 100%); pointer-events: none; }
.glass-card-dark:hover { background: rgba(255,255,255,0.06); transform: translateY(-4px); border-color: rgba(99,102,241,0.2); box-shadow: 0 20px 40px rgba(0,0,0,0.2), 0 0 60px rgba(99,102,241,0.08); }

/* ── GRADIENT BORDER CARD ────────────────────────────── */
.gradient-border { position: relative; }
.gradient-border::before { content: ''; position: absolute; inset: -1px; border-radius: calc(var(--radius-xl) + 1px); background: linear-gradient(135deg, rgba(99,102,241,0.12), transparent 40%, rgba(6,182,212,0.08)); z-index: -1; pointer-events: none; }

/* ── BUTTONS ─────────────────────────────────────────── */
.btn-glow { background: var(--primary); color: white; padding: 0.9rem 2rem; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 0.5rem; box-shadow: 0 0 30px rgba(99,102,241,0.4), inset 0 1px 0 rgba(255,255,255,0.1); transition: all 0.3s; border: none; cursor: pointer; }
.btn-glow:hover { box-shadow: 0 0 50px rgba(99,102,241,0.6); transform: translateY(-2px); }
.btn-glow .icon { width: 18px; height: 18px; stroke: white; }
.btn-outline { color: rgba(255,255,255,0.7); padding: 0.9rem 2rem; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 0.95rem; border: 1px solid rgba(255,255,255,0.12); transition: all 0.3s; display: inline-flex; align-items: center; gap: 0.5rem; background: transparent; cursor: pointer; }
.btn-outline:hover { border-color: rgba(255,255,255,0.3); color: white; background: rgba(255,255,255,0.04); }
.btn-primary { background: var(--primary); color: white; padding: 0.85rem 2rem; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: 0.92rem; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.5rem; transition: all 0.2s; box-shadow: 0 4px 16px rgba(99,102,241,0.3); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 8px 28px rgba(99,102,241,0.4); transform: translateY(-1px); }

/* ── FORMS ────────────────────────────────────────────── */
.t-form { display: flex; flex-direction: column; gap: 1rem; text-align: left; }
.t-form label { font-weight: 600; font-size: 0.82rem; color: var(--gray-600); }
.t-form input, .t-form select, .t-form textarea { width: 100%; padding: 0.8rem 1rem; border: 1.5px solid var(--gray-200); border-radius: 12px; font-size: 0.92rem; font-family: inherit; transition: all 0.2s; background: var(--gray-50); }
.t-form input:focus, .t-form select:focus, .t-form textarea:focus { outline: none; border-color: var(--primary); background: white; box-shadow: 0 0 0 3px rgba(99,102,241,0.08); }
.form-group { display: flex; flex-direction: column; gap: 0.3rem; }

/* ── TRUST BAR ───────────────────────────────────────── */
.t-trust { padding: 2.5rem 2rem; background: var(--gray-50); border-top: 1px solid var(--gray-100); }
.t-trust-inner { display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap; }
.trust-item { font-size: 0.85rem; color: var(--gray-400); font-weight: 500; display: flex; align-items: center; gap: 0.4rem; }
.trust-item .icon { width: 16px; height: 16px; stroke: var(--gray-400); }

/* ── FOOTER ──────────────────────────────────────────── */
.t-footer { padding: 3rem 2rem; text-align: center; background: var(--navy); color: rgba(255,255,255,0.3); font-size: 0.8rem; }
.t-footer a { color: rgba(255,255,255,0.45); text-decoration: none; transition: color 0.2s; }
.t-footer a:hover { color: white; }
.footer-row { margin-top: 0.75rem; display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 768px) {
    .t-nav { padding: 0.65rem 0; }
    .nav-inner { padding: 0 1rem; justify-content: flex-start; }
    .t-hero { padding: 8rem 1.25rem 4rem; }
    .t-hero h1 { font-size: 2.2rem; }
    .logo { gap: 0.55rem; }
    .logo-mark-img { height: 34px; width: auto; }
    .logo-text { font-size: 0.92rem; }
    .nav-links { display: none; }
    .t-section { padding: 4rem 1.25rem; }
    .geo-shape.hide-mobile { display: none; }
}
