/* ============================================
   CyberLeda.ca Homepage Styles
   Matches cyberleda.com design system exactly
   ============================================ */

:root {
    /* Colors - Primary (Trust & Authority) */
    --navy-900: #0a1628;
    --navy-800: #111d32;
    --navy-700: #1a2942;

    /* Colors - Neutral */
    --slate-500: #334155;
    --slate-400: #b0bfcf;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --white: #ffffff;

    /* Colors - Accent (Action & Energy) */
    --teal-500: #065f56;
    --teal-400: #2dd4bf;
    --teal-600: #054d47;
    --teal-glow: rgba(20, 184, 166, 0.15);
    --teal-btn: #065f56;
    --teal-btn-hover: #054d47;

    /* Colors - Status */
    --green-500: #16a34a;
    --amber-500: #f59e0b;

    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(10, 22, 40, 0.05);
    --shadow-md: 0 4px 12px rgba(10, 22, 40, 0.08);
    --shadow-lg: 0 12px 32px rgba(10, 22, 40, 0.12);
    --shadow-xl: 0 24px 48px rgba(10, 22, 40, 0.16);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--navy-800); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; color: var(--navy-900); }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
p { color: var(--slate-500); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-lg); }
.section { padding: var(--space-4xl) 0; }
.section--dark { background: var(--navy-900); color: rgba(255,255,255,0.88); }
.section--light { background: var(--slate-100); }
.section__header { text-align: center; margin-bottom: var(--space-3xl); max-width: 700px; margin-left: auto; margin-right: auto; }
.section__header h2 { margin-bottom: var(--space-md); }
.section--dark .section__header h2 { color: var(--white); }
.section__subtitle { font-size: 1.1rem; line-height: 1.7; color: var(--slate-500); }
.section--dark .section__subtitle { color: var(--slate-300); }

.link--teal { color: var(--teal-500); font-weight: 600; transition: color var(--transition-fast); }
.link--teal:hover { color: var(--teal-600); }

/* ============================================
   Buttons (identical to cyberleda.com)
   ============================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
    font-family: var(--font-display); font-weight: 600; font-size: 1rem;
    padding: var(--space-md) var(--space-xl); border-radius: var(--radius-md);
    border: none; cursor: pointer; transition: all var(--transition-base); text-decoration: none;
}
.btn--primary { background: var(--teal-btn); color: var(--white); box-shadow: 0 4px 14px rgba(20, 184, 166, 0.35); }
.btn--primary:hover { background: var(--teal-btn-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(20, 184, 166, 0.45); }
.btn--secondary { background: transparent; color: var(--navy-800); border: 2px solid var(--slate-300); }
.btn--secondary:hover { border-color: var(--navy-800); background: var(--slate-100); }
.btn--large { padding: var(--space-lg) var(--space-2xl); font-size: 1.1rem; }

/* ============================================
   Navigation (matches cyberleda.com)
   ============================================ */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--slate-200);
}
.nav__inner {
    display: flex; align-items: center; justify-content: space-between; height: 72px;
}
.nav__logo-image { height: 50px; width: auto; }
.nav__right { display: flex; align-items: center; gap: var(--space-xl); }
.nav__link {
    font-family: var(--font-display); font-weight: 500; font-size: 0.95rem;
    color: var(--slate-500); transition: color var(--transition-fast);
}
.nav__link:hover { color: var(--navy-900); }
.nav__link--desktop { display: none; }
@media (min-width: 768px) { .nav__link--desktop { display: inline; } }
.nav__phone {
    display: flex; align-items: center; gap: var(--space-xs);
    font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
    color: var(--teal-600); transition: color var(--transition-fast);
}
.nav__phone:hover { color: var(--navy-900); }
.nav__phone svg { flex-shrink: 0; }
.nav__phone span { display: none; }
@media (min-width: 480px) { .nav__phone span { display: inline; } }

/* ============================================
   Hero (matches cyberleda.com hero structure)
   ============================================ */
.hero {
    position: relative; min-height: 70vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 50%, var(--navy-700) 100%);
    overflow: hidden; padding: calc(72px + var(--space-4xl)) 0 var(--space-4xl);
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(circle at 20% 80%, var(--teal-glow) 0%, transparent 50%),
                       radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.08) 0%, transparent 40%);
    pointer-events: none;
}
.hero::after {
    content: ''; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
                       linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px; pointer-events: none;
}
.hero__content {
    position: relative; z-index: 1; max-width: 750px; text-align: center; margin: 0 auto;
}
.hero__eyebrow {
    display: inline-flex; align-items: center; gap: var(--space-xs);
    font-family: var(--font-display); font-weight: 600; font-size: 0.875rem;
    letter-spacing: 0.05em; text-transform: uppercase; color: var(--teal-600);
    margin-bottom: var(--space-lg); padding: var(--space-xs) var(--space-md);
    background: rgba(20, 184, 166, 0.1); border-radius: var(--radius-xl);
    border: 1px solid rgba(20, 184, 166, 0.2);
}
.hero__title { color: var(--white); margin-bottom: var(--space-lg); font-weight: 800; }
.hero__title span { color: #5eead4; }
.hero__subtitle {
    font-size: 1.15rem; line-height: 1.7; color: #e2e8f0;
    margin-bottom: var(--space-2xl); max-width: 650px; margin-left: auto; margin-right: auto;
}

/* ============================================
   Features Grid
   ============================================ */
.features__grid {
    display: grid; grid-template-columns: 1fr; gap: var(--space-lg);
}
@media (min-width: 600px) { .features__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .features__grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
    padding: var(--space-xl); background: var(--white);
    border-radius: var(--radius-lg); border: 1px solid var(--slate-200);
    transition: all var(--transition-base);
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-card__icon {
    width: 56px; height: 56px; background: var(--teal-glow);
    border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center;
    margin-bottom: var(--space-lg);
}
.feature-card__icon svg { color: var(--teal-500); }
.feature-card h3 { margin-bottom: var(--space-sm); }
.feature-card p { font-size: 0.95rem; line-height: 1.6; }

/* ============================================
   Steps (How It Works)
   ============================================ */
.steps {
    display: flex; flex-direction: column; align-items: center; gap: 0;
    max-width: 700px; margin: 0 auto;
}
@media (min-width: 768px) {
    .steps { flex-direction: row; align-items: flex-start; gap: 0; }
}
.step {
    text-align: center; flex: 1; padding: 0 var(--space-lg);
}
.step__number {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--teal-btn); color: var(--white);
    font-family: var(--font-display); font-weight: 800; font-size: 1.5rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto var(--space-lg); box-shadow: 0 4px 14px rgba(20, 184, 166, 0.35);
}
.step h3 { margin-bottom: var(--space-sm); }
.step p { font-size: 0.95rem; line-height: 1.6; }
.step__connector {
    width: 2px; height: 32px; background: var(--slate-300); flex-shrink: 0;
}
@media (min-width: 768px) {
    .step__connector { width: 48px; height: 2px; margin-top: 28px; }
}

/* ============================================
   Form Section (Dark CTA)
   ============================================ */
.form-section {
    display: grid; grid-template-columns: 1fr; gap: var(--space-2xl);
    align-items: start;
}
@media (min-width: 768px) {
    .form-section { grid-template-columns: 1fr 1fr; }
}
.form-section__text h2 { color: var(--white); margin-bottom: var(--space-lg); }
.form-section__text > p { color: var(--slate-300); line-height: 1.7; margin-bottom: var(--space-xl); }
.form-section__promises { display: flex; flex-direction: column; gap: var(--space-sm); }
.promise {
    display: flex; align-items: center; gap: var(--space-sm);
    font-family: var(--font-display); font-weight: 500; font-size: 0.95rem;
    color: var(--slate-300);
}
.promise svg { color: var(--green-500); flex-shrink: 0; }

/* HubSpot form container */
.form-section__form {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg); padding: var(--space-xl);
}

/* Style HubSpot embedded form */
.form-section__form .hs-form-field { margin-bottom: var(--space-lg); }
.form-section__form .hs-form-field label {
    display: block; font-family: var(--font-display); font-weight: 600; font-size: 0.9rem;
    color: var(--slate-300); margin-bottom: var(--space-xs);
}
.form-section__form .hs-form-field input[type="text"],
.form-section__form .hs-form-field input[type="email"] {
    width: 100%; padding: 0.75rem 1rem;
    border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius-md);
    background: rgba(255,255,255,0.05); color: var(--white);
    font-family: var(--font-body); font-size: 1rem; transition: border-color var(--transition-fast);
}
.form-section__form .hs-form-field input:focus {
    outline: 3px solid #5eead4; outline-offset: 2px; border-color: #5eead4; background: rgba(255,255,255,0.08);
}
.form-section__form .hs-form-field input::placeholder { color: var(--slate-400); }
.form-section__form .hs-submit { margin-top: var(--space-md); }
.form-section__form .hs-button {
    width: 100%; padding: var(--space-lg) var(--space-2xl);
    background: var(--teal-btn); color: var(--white); border: none; border-radius: var(--radius-md);
    font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
    cursor: pointer; transition: all var(--transition-base);
    box-shadow: 0 4px 14px rgba(20, 184, 166, 0.35);
}
.form-section__form .hs-button:hover {
    background: var(--teal-btn-hover); transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.45);
}
.form-section__form .hs-error-msgs { list-style: none; padding: 0; margin: var(--space-xs) 0 0; }
.form-section__form .hs-error-msgs li label { color: #f87171 !important; font-size: 0.85rem !important; font-weight: 400 !important; }
.form-section__form .submitted-message {
    color: #5eead4; font-family: var(--font-display); text-align: center; padding: var(--space-xl);
}

/* Thank you state (after form submit) */
.form-thankyou { text-align: center; padding: var(--space-lg) 0; }
.form-thankyou__icon { margin-bottom: var(--space-lg); }
.form-thankyou__icon svg { color: #5eead4; margin: 0 auto; }
.form-thankyou h3 { color: var(--white); font-size: 1.5rem; margin-bottom: var(--space-md); }
.form-thankyou p { color: var(--slate-300); line-height: 1.7; margin-bottom: var(--space-sm); }
.form-thankyou__note { font-size: 0.875rem; color: var(--slate-400); }
.form-thankyou__note a { color: #5eead4; }

/* Fallback (no HubSpot configured) */
.form-placeholder { text-align: center; padding: var(--space-xl); }
.form-placeholder p { color: var(--slate-300); margin-bottom: var(--space-lg); }

/* ============================================
   Report Preview
   ============================================ */
.preview__highlights {
    display: grid; grid-template-columns: 1fr; gap: var(--space-lg);
    max-width: 800px; margin: 0 auto;
}
@media (min-width: 600px) {
    .preview__highlights { grid-template-columns: repeat(2, 1fr); }
}
.preview__item {
    padding: var(--space-xl); background: var(--white);
    border-radius: var(--radius-lg); border: 1px solid var(--slate-200);
}
.preview__item h3 { margin-bottom: var(--space-xs); }
.preview__item p { font-size: 0.95rem; line-height: 1.6; }

.preview__score {
    display: flex; align-items: baseline; gap: var(--space-sm); margin-bottom: var(--space-md);
}
.preview__score-value {
    font-family: var(--font-display); font-weight: 800; font-size: 3rem;
    color: var(--teal-500); line-height: 1;
}
.preview__score-label {
    font-family: var(--font-display); font-weight: 500; font-size: 1rem; color: var(--slate-500);
}

.preview__badge {
    width: 48px; height: 48px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-md);
}
.preview__badge--green { background: rgba(22, 163, 74, 0.12); }
.preview__badge--green svg { color: var(--green-500); }
.preview__badge--teal { background: var(--teal-glow); }
.preview__badge--teal svg { color: var(--teal-500); }
.preview__badge--amber { background: rgba(245, 158, 11, 0.12); }
.preview__badge--amber svg { color: var(--amber-500); }

/* ============================================
   About Section
   ============================================ */
.about-section {
    display: grid; grid-template-columns: 1fr; gap: var(--space-2xl);
}
@media (min-width: 768px) {
    .about-section { grid-template-columns: 1.3fr 1fr; align-items: start; }
}
.about-section__text h2 { margin-bottom: var(--space-lg); }
.about-section__text p { line-height: 1.7; margin-bottom: var(--space-md); }
.about-section__founders {
    display: flex; flex-direction: column; gap: var(--space-md); margin-top: var(--space-xl);
    padding-top: var(--space-xl); border-top: 1px solid var(--slate-200);
}
.founder { display: flex; flex-direction: column; gap: 2px; }
.founder strong { font-family: var(--font-display); font-weight: 700; color: var(--navy-900); }
.founder span { font-size: 0.9rem; color: var(--slate-500); }
.founder__detail { font-size: 0.85rem; color: var(--slate-400); font-style: italic; }

.trust-card {
    display: flex; flex-direction: column; gap: var(--space-sm);
    padding: var(--space-xl); background: var(--white);
    border-radius: var(--radius-lg); border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-sm);
}
.trust-card__item {
    display: flex; align-items: center; gap: var(--space-sm);
    padding: var(--space-sm) 0;
    font-family: var(--font-display); font-weight: 500; font-size: 0.95rem;
    color: var(--slate-500);
}
.trust-card__item svg { color: var(--teal-500); flex-shrink: 0; }

/* ============================================
   Bottom CTA
   ============================================ */
.section--cta {
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
    padding: var(--space-3xl) 0;
}
.section--cta h2 { color: var(--white); margin-bottom: var(--space-sm); }
.section--cta .section__subtitle { color: var(--slate-300); margin-bottom: var(--space-xl); }

/* ============================================
   Footer (matches cyberleda.com footer)
   ============================================ */
.footer { background: var(--navy-900); padding: var(--space-3xl) 0 var(--space-lg); }
.footer__grid {
    display: grid; grid-template-columns: 1fr; gap: var(--space-2xl); margin-bottom: var(--space-2xl);
}
@media (min-width: 768px) { .footer__grid { grid-template-columns: 1.5fr 1fr; } }
.footer__logo { display: block; margin-bottom: var(--space-md); }
.footer__logo-image { height: 50px; width: auto; }
.footer__tagline { color: var(--slate-300); font-size: 0.95rem; line-height: 1.6; margin-bottom: var(--space-sm); }
.footer__domain-note { color: var(--slate-400); font-size: 0.85rem; line-height: 1.5; }
.footer__domain-note a { color: #5eead4; transition: color var(--transition-fast); }
.footer__domain-note a:hover { color: var(--white); }
.footer__contact h4 {
    font-family: var(--font-display); font-weight: 600; font-size: 0.9rem;
    color: var(--slate-400); text-transform: uppercase; letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
}
.footer__contact-item {
    display: flex; align-items: center; gap: var(--space-sm);
    padding: 0.35rem 0; color: var(--slate-200); font-size: 0.95rem;
}
.footer__contact-item svg { color: #5eead4; flex-shrink: 0; width: 18px; height: 18px; }
.footer__contact-item a { color: var(--slate-200); transition: color var(--transition-fast); }
.footer__contact-item a:hover { color: #5eead4; }
.footer__social { display: flex; gap: var(--space-sm); margin-top: var(--space-lg); }
.footer__social-link {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    color: var(--slate-300); background: rgba(255,255,255,0.05); border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}
.footer__social-link:hover { color: #0ff4c6; background: rgba(20, 184, 166, 0.15); }
.footer__bottom {
    padding-top: var(--space-lg); border-top: 1px solid rgba(255,255,255,0.1); text-align: center;
}
.footer__copyright { color: var(--slate-300); font-size: 0.85rem; }
.footer__copyright a { color: #5eead4; transition: color var(--transition-fast); }
.footer__copyright a:hover { text-decoration: underline; }

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero__content { animation: fadeInUp 0.6s ease forwards; }
.feature-card { opacity: 0; animation: fadeInUp 0.5s ease forwards; }
.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.15s; }
.feature-card:nth-child(3) { animation-delay: 0.2s; }
.feature-card:nth-child(4) { animation-delay: 0.25s; }
.feature-card:nth-child(5) { animation-delay: 0.3s; }
.feature-card:nth-child(6) { animation-delay: 0.35s; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
    .nav__logo-image { height: 36px; }
    .hero { min-height: auto; padding: calc(72px + var(--space-2xl)) 0 var(--space-2xl); }
    .hero__subtitle { font-size: 1rem; }
    .btn--large { padding: var(--space-md) var(--space-lg); font-size: 0.95rem; }
    .section { padding: var(--space-3xl) 0; }
}

/* ============================================
   WCAG 2.2 AAA — Accessibility Fixes
   ============================================ */

/* Dark-bg color overrides (hero eyebrow needs bright teal, not dark) */
.hero__eyebrow { color: #5eead4; }

/* Light-bg overrides for vars that changed for dark-bg usage */
.founder__detail { color: var(--slate-500); }

/* Focus indicators — visible on all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #0a1628;
    outline-offset: 2px;
}

/* Focus on dark backgrounds — use bright teal outline */
.hero a:focus-visible,
.section--dark a:focus-visible,
.section--dark button:focus-visible,
.section--dark input:focus-visible,
.section--cta a:focus-visible,
.footer a:focus-visible,
.footer button:focus-visible,
#cookie-banner button:focus-visible {
    outline-color: #5eead4;
}

/* Link underlines for body text (non-nav, non-button links) */
.section p a,
.about-section__text a,
.footer__domain-note a,
.footer__copyright a,
.footer__contact-item a,
.form-thankyou__note a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer__contact-item a:hover,
.footer__domain-note a:hover,
.footer__copyright a:hover {
    text-decoration-thickness: 2px;
}

/* Visited link colors — maintain contrast */
a:visited { color: inherit; }
.link--teal:visited { color: var(--teal-500); }
.footer__domain-note a:visited,
.footer__copyright a:visited { color: #5eead4; }

/* Touch targets — minimum 44x44px */
.footer__social-link {
    width: 44px;
    height: 44px;
}
.footer__contact-item {
    min-height: 44px;
    display: flex;
    align-items: center;
}
.nav__phone {
    min-height: 44px;
    display: flex;
    align-items: center;
}
.nav__link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* Skip link (visually hidden until focused) */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: #0a1628;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 8px 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 10000;
    text-decoration: none;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid #5eead4;
    outline-offset: 2px;
}

/* Footer contact heading (was h4, changed to p for correct hierarchy) */
.footer__contact-heading {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
}

/* Text spacing — AAA 1.4.12 */
p + p { margin-top: 1.5em; }

/* Reduced motion — WCAG 2.3.3 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    html {
        scroll-behavior: auto;
    }
}
