/* ====================================================================
   styles-landing.css
   Landing-page / hero component styles.

   Design tokens (--brand, --font-*, --surface-*, --d-ring) and the
   global :focus-visible ring live in styles.css so they apply site-wide
   in both themes. This file only holds the reusable page components.

   Class names are d- prefixed to avoid collisions with the existing
   build while the site is migrated page-by-page.
   ==================================================================== */

/* ---------------------------------------------------------------------
   ROOT - shared type + smoothing (d-root applies to <body class="d-root">)
   --------------------------------------------------------------------- */
.d-root {
    font-family: var(--font-ui);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ====================================================================
   HERO - single consolidated rule: one scrim, one H1 colour, one accent
   ==================================================================== */
.d-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    isolation: isolate;
    min-height: clamp(440px, 68vh, 660px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(3rem, 8vw, 6rem) 1.5rem;
    background: url('./images/home_circuit.jpg') center center / cover no-repeat;
    color: #fff;
}

/* one scrim does the legibility job in BOTH themes */
.d-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(120% 90% at 50% 0%, transparent 0%, rgba(0, 0, 0, 0.35) 55%, rgba(0, 0, 0, 0.72) 100%);
}

.d-hero-inner { max-width: 760px; }

.d-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 1.1rem;
}
/* Hero eyebrow sits over the bright circuit image -> needs a dark, high-contrast colour */
.d-hero .d-eyebrow { color: #142a4e; }
.d-eyebrow::before,
.d-eyebrow::after {
    content: "";
    width: 26px;
    height: 1px;
    background: currentColor;
    opacity: 0.6;
}

.d-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6.5vw, 4.5rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    font-weight: 800;
    margin: 0 0 1.1rem;
    color: #fff;
}

.d-hero-lead {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.55;
    color: Cornsilk;
    margin: 0 auto 2rem;
    max-width: 600px;
}
.d-hero-lead strong { color: Gold; font-weight: 600; }

.d-hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------------------------------------------------------------------
   BUTTONS
   --------------------------------------------------------------------- */
.d-btn {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.72rem 1.35rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.d-btn:active { transform: translateY(1px); }
.d-btn-primary { background: var(--brand); color: #fff; }
.d-btn-primary:hover { background: var(--brand-strong); box-shadow: 0 6px 18px -6px rgba(79, 143, 255, 0.7); }
.d-btn-ghost { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.35); backdrop-filter: blur(4px); }
.d-btn-ghost:hover { background: rgba(255, 255, 255, 0.16); }

/* ====================================================================
   SECTION SHELL - consistent header + spacing across the whole page
   ==================================================================== */
.d-section { max-width: 1200px; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem; }
.d-section-head { margin-bottom: 1.75rem; max-width: 640px; }
.d-section-head .d-eyebrow { margin-bottom: 0.6rem; }
.d-section-head h2 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.4vw, 2.25rem);
    margin: 0 0 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
.d-section-head p { margin: 0; color: var(--text-secondary); font-size: 1rem; line-height: 1.55; }

/* ====================================================================
   FEATURED GRID - static, responsive, no carousel, no auto-play
   1 col -> 2 -> 3 via auto-fit (no extra breakpoints)
   ==================================================================== */
.d-featured {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.d-feat {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--d-radius);
    overflow: hidden;
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.18s ease;
}
.d-feat:hover { border-color: var(--color-gray-400); }
.d-feat-img { aspect-ratio: 16 / 9; overflow: hidden; }
.d-feat-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-feat-body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: 0.4rem; }
.d-feat-tag {
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
}
.d-feat-title { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; margin: 0; }
.d-feat-title a { color: var(--text-primary); text-decoration: none; }
.d-feat-title a:hover { color: var(--brand); }
.d-feat-desc { margin: 0; font-size: 0.92rem; color: var(--text-secondary); line-height: 1.5; }
.d-feat-more { margin-top: 0.35rem; font-size: 0.88rem; font-weight: 600; color: var(--brand); }

/* ====================================================================
   STANDARDISED "METHOD IN PRACTICE" CARDS
   one base + a single accent left-border per card (replaces badge soup)
   ==================================================================== */
.d-cards {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.d-card {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--brand);
    border-radius: var(--d-radius);
    padding: 1.35rem 1.4rem 1.4rem;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.18s ease;
}
.d-card:hover { border-color: var(--color-gray-400); }
.d-card h3 { font-family: var(--font-display); font-size: 1.2rem; margin: 0 0 0.55rem; }
.d-card h3 a { color: var(--text-primary); text-decoration: none; }
.d-card h3 a:hover { color: var(--brand); }

.d-card p { margin: 0 0 0.9rem; font-size: 0.94rem; line-height: 1.55; color: var(--text-secondary); }
.d-card p a { color: var(--brand); font-weight: 500; text-decoration: none; transition: color 0.2s ease; }
.d-card p a:hover { text-decoration: underline; }

.d-card-link { font-size: 0.88rem; font-weight: 600; color: var(--brand); text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; transition: gap 0.2s ease; }
.d-card-link:hover { gap: 0.7rem; }

/* ====================================================================
   CTA BAND - a clear next step above the footer
   ==================================================================== */
.d-cta {
    margin: 0 1.5rem;
    max-width: 1170px;
    margin-left: auto;
    margin-right: auto;
    border-radius: var(--d-radius);
    border: 1px solid var(--border-color);
    background:grey;
    color: #fff;
    padding: clamp(1.8rem, 4vw, 2.75rem) 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}
.d-cta h2 { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2rem); margin: 0 0 0.4rem; letter-spacing: -0.01em; }
.d-cta p { margin: 0; color: rgba(255, 255, 255, 0.85); max-width: 46ch; }
.d-cta .d-btn-primary { background: #fff; color: var(--brand-strong); white-space: nowrap; }
.d-cta .d-btn-primary:hover { background: #f1f5ff; box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.4); }

/* ====================================================================
   MOTION SAFETY - honour reduced-motion (no auto-play to begin with)
   ==================================================================== */
@media (prefers-reduced-motion: reduce) {
    .d-feat,
    .d-card,
    .d-btn {
        transition: none;
    }
}
