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

:root {
    --bg: #f7f5f2;
    --fg: #1f1c18;
    --card: #f0ece6;
    --card-hover: #ebe6dd;
    --muted: #8a8279;
    --primary: #d4920a;
    --primary-light: rgba(212, 146, 10, 0.1);
    --primary-glow: rgba(212, 146, 10, 0.15);
    --primary-glow-strong: rgba(212, 146, 10, 0.25);
    --border: #e2ddd5;
    --hero-bg: linear-gradient(135deg, #1f1c18 0%, #302b22 100%);
    --hero-fg: #f7f5f2;
    --hero-muted: rgba(247, 245, 242, 0.6);
    --radius: 0.75rem;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--fg); -webkit-font-smoothing: antialiased; line-height: 1.6; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); line-height: 1.15; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.text-gradient { background: linear-gradient(135deg, #d4920a, #e6a520); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ===== Animations ===== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes underlineGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.35s; }
.stagger-5 { transition-delay: 0.4s; }
.stagger-6 { transition-delay: 0.45s; }
.stagger-7 { transition-delay: 0.5s; }
.stagger-8 { transition-delay: 0.55s; }
.stagger-9 { transition-delay: 0.6s; }
.stagger-10 { transition-delay: 0.65s; }

/* ===== Navbar ===== */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    background: rgba(247, 245, 242, 0.8);
    border-bottom: 1px solid rgba(226, 221, 213, 0.5);
    animation: slideDown 0.6s ease-out;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { font-size: 0.875rem; font-weight: 500; color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--fg); }

/* Nav dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a { cursor: pointer; display: flex; align-items: center; gap: 0.25rem; }
.nav-dropdown > a::after { content: ''; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 4px solid currentColor; margin-top: 1px; }
.nav-dropdown-menu {
    display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    background: rgba(247, 245, 242, 0.98); backdrop-filter: blur(16px);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 0.5rem; min-width: 220px; padding-top: 1.25rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}
.nav-dropdown-menu::before {
    content: ''; position: absolute; top: -0.5rem; left: 0; right: 0; height: 1.25rem;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    display: block; padding: 0.5rem 0.75rem; border-radius: 0.5rem;
    font-size: 0.8rem; white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--primary-light); color: var(--primary); }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--fg); margin: 5px 0; transition: all 0.3s; border-radius: 1px; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.mobile-menu { display: none; flex-direction: column; gap: 1rem; padding: 1.5rem; background: rgba(247,245,242,0.95); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.mobile-menu.open { display: flex; animation: fadeIn 0.3s ease; }
.mobile-menu a { font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.mobile-menu a:hover { color: var(--fg); }
.mobile-menu-group { display: flex; flex-direction: column; gap: 0.5rem; padding-left: 0.75rem; border-left: 2px solid var(--border); }
.mobile-menu-group-label { font-size: 0.75rem; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: 0.05em; }

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: block; }
}

/* ===== Hero ===== */
.hero {
    position: relative; min-height: 100vh; display: flex; align-items: center;
    background: var(--hero-bg); overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0; opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none; z-index: 1;
}
.hero-blob-1 { position: absolute; top: 5rem; right: 3rem; width: 18rem; height: 18rem; border-radius: 50%; background: rgba(212,146,10,0.08); filter: blur(60px); }
.hero-blob-2 { position: absolute; bottom: 5rem; left: 3rem; width: 24rem; height: 24rem; border-radius: 50%; background: rgba(212,146,10,0.04); filter: blur(60px); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; position: relative; z-index: 2; padding: 8rem 0 6rem; }
.hero-badge-pill {
    display: inline-block; padding: 0.375rem 1rem; border-radius: 9999px;
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    background: rgba(212,146,10,0.2); color: rgba(247,245,242,0.8); margin-bottom: 1.5rem;
    animation: fadeUp 0.6s ease-out 0.2s both;
}
.hero h1 { font-size: clamp(2.8rem, 6vw, 4.5rem); font-weight: 700; color: var(--hero-fg); letter-spacing: -0.03em; animation: fadeUp 0.8s ease-out both; }
.hero h1 .accent { color: var(--primary); position: relative; display: inline-block; }
.hero h1 .accent::after {
    content: ''; position: absolute; bottom: -4px; left: 0; right: 0; height: 4px;
    background: var(--primary); border-radius: 2px; transform-origin: left;
    animation: underlineGrow 0.6s ease-out 0.6s both;
}
.hero-subtitle { margin-top: 1.5rem; font-size: 1.15rem; line-height: 1.7; color: var(--hero-muted); max-width: 500px; animation: fadeUp 0.8s ease-out 0.15s both; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; animation: fadeUp 0.8s ease-out 0.3s both; }
.btn-hero-primary {
    display: inline-flex; align-items: center; padding: 0.875rem 2rem; border-radius: 9999px;
    background: var(--primary); color: var(--hero-fg); font-family: var(--font-display);
    font-weight: 600; font-size: 0.875rem; letter-spacing: 0.02em; border: none; cursor: pointer;
    box-shadow: 0 8px 24px rgba(212,146,10,0.25);
    transition: filter 0.2s, transform 0.2s;
}
.btn-hero-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-hero-secondary {
    display: inline-flex; align-items: center; padding: 0.875rem 2rem; border-radius: 9999px;
    border: 1px solid rgba(247,245,242,0.2); color: rgba(247,245,242,0.8);
    font-family: var(--font-display); font-weight: 500; font-size: 0.875rem; background: transparent;
    cursor: pointer; transition: background 0.2s;
}
.btn-hero-secondary:hover { background: rgba(247,245,242,0.05); }
.hero-visual { display: flex; justify-content: center; animation: fadeIn 0.8s ease-out 0.3s both; }
.hero-visual img { width: 16rem; height: 16rem; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3)); animation: float 6s ease-in-out infinite; }

/* Landing page hero (shorter) */
.hero-landing { min-height: auto; }
.hero-landing .hero-grid { padding: 7rem 0 4rem; }
.hero-landing .hero-subtitle { max-width: 560px; }

@media (max-width: 768px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; padding: 7rem 0 4rem; }
    .hero-subtitle { margin-left: auto; margin-right: auto; }
    .hero-cta { justify-content: center; }
    .hero-visual { display: none; }
    .hero-landing .hero-grid { padding: 6rem 0 3rem; }
}

/* ===== Breadcrumbs ===== */
.breadcrumbs { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; font-size: 0.8rem; }
.breadcrumbs li { display: flex; align-items: center; gap: 0.25rem; color: var(--muted); }
.breadcrumbs li + li::before { content: '/'; margin-right: 0.25rem; color: var(--border); }
.breadcrumbs a { color: var(--muted); transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .current { color: var(--fg); font-weight: 500; }

/* ===== Sections ===== */
.section { padding: 5rem 0; }
.section-alt { background: rgba(240, 236, 230, 0.3); }
.section-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; text-align: center; letter-spacing: -0.02em; margin-bottom: 1rem; }
.section-subtitle { text-align: center; color: var(--muted); max-width: 600px; margin: 0 auto 3.5rem; font-size: 1rem; }

/* Left-aligned section variant for landing pages */
.section-title-left { text-align: left; font-size: clamp(1.5rem, 3vw, 2rem); }
.section-subtitle-left { text-align: left; margin: 0 0 2rem; max-width: none; }

/* ===== Why Cards ===== */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: 960px; margin: 0 auto; }
.why-card {
    background: rgba(240,236,230,0.5); backdrop-filter: blur(12px);
    border: 1px solid rgba(226,221,213,0.5); border-radius: 1rem; padding: 2rem; text-align: center;
    box-shadow: 0 8px 32px -8px var(--primary-glow);
    transition: box-shadow 0.3s, transform 0.3s;
}
.why-card:hover { box-shadow: 0 16px 48px -12px var(--primary-glow-strong); transform: translateY(-3px); }
.why-icon { width: 3.5rem; height: 3.5rem; border-radius: 0.75rem; background: var(--primary-light); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.25rem; font-size: 1.5rem; }
.why-card h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.75rem; }
.why-card p { font-size: 0.875rem; color: var(--muted); line-height: 1.7; }

@media (max-width: 768px) { .why-grid { grid-template-columns: 1fr; max-width: 400px; } }

/* ===== Badge Cards ===== */
.badges-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.badge-card {
    background: rgba(240,236,230,0.5); backdrop-filter: blur(12px);
    border: 1px solid rgba(226,221,213,0.5); border-radius: 1rem; overflow: hidden;
    box-shadow: 0 8px 32px -8px var(--primary-glow);
    transition: box-shadow 0.3s, transform 0.3s;
}
.badge-card:hover { box-shadow: 0 16px 48px -12px var(--primary-glow-strong); transform: translateY(-3px); }
.badge-preview {
    display: flex; align-items: center; justify-content: center; padding: 2rem;
    min-height: 140px; background: rgba(226,221,213,0.2);
}
.badge-preview img { max-height: 80px; width: auto; transition: transform 0.5s; }
.badge-card:hover .badge-preview img { transform: scale(1.1); }
.badge-info { padding: 1.5rem; }
.badge-info h3 { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.5rem; }
.badge-info p { font-size: 0.75rem; color: var(--muted); line-height: 1.6; margin-bottom: 1.25rem; }
.badge-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.btn-sm {
    display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.5rem 0.875rem;
    border-radius: 0.5rem; font-size: 0.75rem; font-weight: 500; border: none; cursor: pointer;
    transition: background 0.2s;
}
.btn-dl { background: rgba(31,28,24,0.05); color: var(--fg); }
.btn-dl:hover { background: rgba(31,28,24,0.1); }
.btn-copy { background: var(--primary-light); color: var(--primary); }
.btn-copy:hover { background: rgba(212,146,10,0.2); }

@media (max-width: 1024px) { .badges-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .badges-grid { grid-template-columns: 1fr; } }

/* ===== Steps ===== */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: 800px; margin: 0 auto 4rem; }
.step { text-align: center; }
.step-icon { width: 4rem; height: 4rem; border-radius: 1rem; background: var(--primary-light); display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; font-size: 1.5rem; }
.step-num { font-family: var(--font-display); font-size: 0.75rem; font-weight: 600; color: var(--primary); letter-spacing: 0.1em; }
.step h3 { font-size: 1.1rem; font-weight: 600; margin: 0.25rem 0 0.5rem; }
.step p { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }

@media (max-width: 640px) { .steps-grid { grid-template-columns: 1fr; max-width: 320px; } }

/* ===== Code Example Box ===== */
.code-box {
    background: rgba(240,236,230,0.5); backdrop-filter: blur(12px);
    border: 1px solid rgba(226,221,213,0.5); border-radius: 1rem; overflow: hidden;
    max-width: 800px; margin: 0 auto;
    box-shadow: 0 8px 32px -8px var(--primary-glow);
}
.code-box-header { padding: 1.5rem; border-bottom: 1px solid var(--border); }
.code-box-header h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.tab-btns { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tab-btn {
    padding: 0.5rem 1rem; border-radius: 0.5rem; font-size: 0.75rem; font-weight: 500;
    border: none; cursor: pointer; transition: all 0.2s;
    background: rgba(226,221,213,0.5); color: var(--muted);
}
.tab-btn.active { background: var(--primary); color: var(--hero-fg); }
.tab-btn:hover:not(.active) { background: rgba(226,221,213,0.8); }
.code-box-body { padding: 1.5rem; }
.snippet-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.snippet-label { font-size: 0.75rem; font-weight: 500; color: var(--muted); min-width: 130px; flex-shrink: 0; }
.snippet-code {
    flex: 1; min-width: 0; font-size: 0.7rem; font-family: 'SF Mono', 'Fira Code', monospace;
    background: rgba(226,221,213,0.3); border-radius: 0.5rem; padding: 0.75rem 1rem;
    color: rgba(31,28,24,0.8); overflow-x: auto; white-space: nowrap;
}
.snippet-copy { flex-shrink: 0; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

@media (max-width: 640px) {
    .snippet-row { flex-direction: column; align-items: stretch; }
    .snippet-label { min-width: auto; }
}

/* ===== Content Prose (Landing Pages) ===== */
.prose { max-width: 800px; margin: 0 auto; }
.prose h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 1rem; letter-spacing: -0.01em; }
.prose h3 { font-size: 1.25rem; font-weight: 600; margin: 2rem 0 0.75rem; }
.prose p { font-size: 1rem; line-height: 1.8; color: var(--fg); margin-bottom: 1.25rem; }
.prose ul, .prose ol { margin: 0 0 1.25rem 1.5rem; }
.prose li { font-size: 1rem; line-height: 1.8; color: var(--fg); margin-bottom: 0.5rem; }
.prose strong { font-weight: 600; }
.prose a { color: var(--primary); font-weight: 500; transition: opacity 0.2s; }
.prose a:hover { opacity: 0.8; }

/* Instruction cards */
.instruction-card {
    background: rgba(240,236,230,0.5); border: 1px solid rgba(226,221,213,0.5);
    border-radius: 1rem; padding: 2rem; margin-bottom: 1.5rem;
}
.instruction-card h4 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.instruction-card ol { margin: 0 0 0 1.25rem; }
.instruction-card li { font-size: 0.9rem; line-height: 1.7; color: var(--fg); margin-bottom: 0.375rem; }
.instruction-card code {
    font-size: 0.8rem; font-family: 'SF Mono', 'Fira Code', monospace;
    background: rgba(226,221,213,0.4); border-radius: 0.25rem; padding: 0.125rem 0.375rem;
}

/* Best practices list */
.best-practices { display: grid; gap: 1rem; margin: 1.5rem 0; }
.best-practice-item {
    display: flex; gap: 0.75rem; padding: 1rem 1.25rem;
    background: rgba(240,236,230,0.5); border: 1px solid rgba(226,221,213,0.5);
    border-radius: var(--radius);
}
.best-practice-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: 0.1rem; }
.best-practice-item p { font-size: 0.9rem; line-height: 1.6; color: var(--fg); margin: 0; }
.best-practice-item strong { font-weight: 600; }

/* ===== FAQ Section ===== */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
    border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 0.75rem; overflow: hidden; background: rgba(240,236,230,0.3);
}
.faq-question {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 1.25rem 1.5rem; background: none; border: none; cursor: pointer;
    font-family: var(--font-display); font-size: 1rem; font-weight: 600;
    color: var(--fg); text-align: left; transition: background 0.2s;
}
.faq-question:hover { background: rgba(226,221,213,0.3); }
.faq-question::after { content: '+'; font-size: 1.25rem; color: var(--primary); transition: transform 0.3s; flex-shrink: 0; margin-left: 1rem; }
.faq-item.open .faq-question::after { content: '\2212'; }
.faq-answer { padding: 0 1.5rem; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; }
.faq-item.open .faq-answer { max-height: 500px; padding: 0 1.5rem 1.25rem; }
.faq-answer p { font-size: 0.9rem; line-height: 1.7; color: var(--muted); margin: 0; }

/* ===== Use Cases Grid (Homepage) ===== */
.use-cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.use-case-card {
    background: rgba(240,236,230,0.5); border: 1px solid rgba(226,221,213,0.5);
    border-radius: 1rem; padding: 2rem; text-align: center;
    transition: box-shadow 0.3s, transform 0.3s;
    display: flex; flex-direction: column; align-items: center;
}
.use-case-card:hover { box-shadow: 0 16px 48px -12px var(--primary-glow-strong); transform: translateY(-3px); }
.use-case-icon { font-size: 2rem; margin-bottom: 1rem; }
.use-case-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
.use-case-card p { font-size: 0.8rem; color: var(--muted); line-height: 1.6; margin-bottom: 1.25rem; flex-grow: 1; }
.use-case-link {
    display: inline-flex; align-items: center; gap: 0.375rem;
    font-size: 0.8rem; font-weight: 600; color: var(--primary);
    transition: gap 0.2s;
}
.use-case-link:hover { gap: 0.625rem; }

@media (max-width: 768px) { .use-cases-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; } }
@media (min-width: 769px) and (max-width: 1024px) { .use-cases-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== Cross Links ===== */
.cross-links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.cross-link-card {
    display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.25rem;
    background: rgba(240,236,230,0.5); border: 1px solid rgba(226,221,213,0.5);
    border-radius: var(--radius); transition: box-shadow 0.2s, transform 0.2s;
}
.cross-link-card:hover { box-shadow: 0 8px 24px -6px var(--primary-glow); transform: translateY(-2px); }
.cross-link-icon { font-size: 1.5rem; flex-shrink: 0; }
.cross-link-card span { font-size: 0.85rem; font-weight: 500; }

/* ===== Footer ===== */
.footer { background: var(--hero-bg); padding: 4rem 0 2rem; }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.footer-brand h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--hero-fg); }
.footer-brand p { margin-top: 0.5rem; font-size: 0.875rem; color: rgba(247,245,242,0.5); max-width: 280px; }
.footer-columns { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--font-display); font-size: 0.75rem; font-weight: 600; color: rgba(247,245,242,0.5); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; }
.footer-col { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col a { font-size: 0.8rem; color: rgba(247,245,242,0.4); transition: color 0.2s; }
.footer-col a:hover { color: rgba(247,245,242,0.7); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer-nav a { font-size: 0.875rem; color: rgba(247,245,242,0.4); transition: color 0.2s; }
.footer-nav a:hover { color: rgba(247,245,242,0.7); }
.footer-bottom { border-top: 1px solid rgba(247,245,242,0.08); padding-top: 1.5rem; }
.footer-bottom p { font-size: 0.75rem; color: rgba(247,245,242,0.3); }

/* ===== Toast ===== */
.toast {
    position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(100px);
    background: var(--fg); color: var(--bg); padding: 0.75rem 1.5rem; border-radius: 0.75rem;
    font-size: 0.875rem; font-weight: 500; z-index: 1000;
    opacity: 0; transition: all 0.3s ease; pointer-events: none;
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }

/* Skip link */
.skip-link { position: absolute; top: -100%; left: 0.5rem; padding: 0.5rem 1rem; background: var(--primary); color: var(--hero-fg); border-radius: 0.5rem; z-index: 200; font-size: 0.875rem; }
.skip-link:focus { top: 0.5rem; }

/* SVG icons inline */
.icon-svg { width: 1.5rem; height: 1.5rem; flex-shrink: 0; }

/* ===== Badge Builder ===== */
.builder-layout { display: grid; grid-template-columns: 340px 1fr; gap: 2.5rem; align-items: start; }
.builder-controls {
    background: rgba(240,236,230,0.5); border: 1px solid rgba(226,221,213,0.5);
    border-radius: 1rem; padding: 1.75rem; position: sticky; top: 80px;
}
.builder-controls h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1.25rem; }
.control-group { margin-bottom: 1.5rem; }
.control-group:last-child { margin-bottom: 0; }
.control-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--fg); margin-bottom: 0.5rem; }
.control-select {
    width: 100%; padding: 0.625rem 0.875rem; border: 1px solid var(--border); border-radius: 0.5rem;
    background: #fff; font-family: var(--font-body); font-size: 0.85rem; color: var(--fg);
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%238a8279' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.75rem center;
}
.control-select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.toggle-row { display: flex; gap: 0.5rem; }
.toggle-btn {
    flex: 1; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: 0.5rem;
    background: #fff; font-family: var(--font-body); font-size: 0.8rem; font-weight: 500;
    color: var(--muted); cursor: pointer; transition: all 0.2s; text-align: center;
}
.toggle-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.color-presets { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.color-preset {
    width: 32px; height: 32px; border-radius: 0.5rem; border: 2px solid transparent;
    cursor: pointer; transition: border-color 0.2s, transform 0.15s; position: relative;
}
.color-preset:hover { transform: scale(1.1); }
.color-preset.active { border-color: var(--primary); }
.color-preset[title]::after {
    content: attr(title); position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%);
    font-size: 0.6rem; color: var(--muted); white-space: nowrap; pointer-events: none; opacity: 0;
    transition: opacity 0.2s;
}
.color-preset:hover::after { opacity: 1; }
.custom-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.color-field { display: flex; flex-direction: column; gap: 0.25rem; }
.color-field label { font-size: 0.7rem; color: var(--muted); }
.color-field input[type="color"] {
    width: 100%; height: 32px; border: 1px solid var(--border); border-radius: 0.375rem;
    cursor: pointer; padding: 2px;
}
.builder-preview-area {
    display: flex; flex-direction: column; align-items: center; gap: 2rem;
}
.preview-box {
    width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center;
    background: repeating-conic-gradient(#f0ece6 0% 25%, #fff 0% 50%) 50% / 20px 20px;
    border: 1px solid var(--border); border-radius: 1rem; padding: 3rem;
}
.preview-box svg { max-width: 100%; height: auto; }
.preview-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.btn-builder {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem;
    border-radius: 9999px; font-family: var(--font-display); font-size: 0.85rem;
    font-weight: 600; border: none; cursor: pointer; transition: filter 0.2s, transform 0.2s;
}
.btn-builder:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-builder-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(212,146,10,0.25); }
.btn-builder-secondary { background: rgba(31,28,24,0.08); color: var(--fg); }
.embed-code-box {
    width: 100%; background: rgba(240,236,230,0.5); border: 1px solid rgba(226,221,213,0.5);
    border-radius: var(--radius); padding: 1.25rem; max-width: 600px;
}
.embed-code-box h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; }
.embed-code-box code {
    display: block; font-size: 0.75rem; font-family: 'SF Mono', 'Fira Code', monospace;
    background: rgba(226,221,213,0.3); border-radius: 0.375rem; padding: 0.75rem;
    color: rgba(31,28,24,0.8); overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}

@media (max-width: 768px) {
    .builder-layout { grid-template-columns: 1fr; }
    .builder-controls { position: static; }
}

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

/* ===== Print ===== */
@media print {
    .navbar, .mobile-menu, .toast, .hero-cta, .badge-actions, .footer { display: none; }
    .hero { min-height: auto; background: white !important; color: black !important; }
}
