/*
 * Design pass based on the landing-page-design / redesign-existing-projects skills.
 * Loaded last so it can be reviewed (or removed) as one layer.
 */

/* Arial tuned to Geist's metrics (width +1.3%, ascent 101 / descent 29 per 100px),
   so the swap to Geist does not re-wrap or shift the hero (CLS). */
@font-face {
    font-family: 'Geist Fallback';
    src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('Helvetica');
    size-adjust: 101.3%;
    ascent-override: 99.7%;
    descent-override: 28.6%;
    line-gap-override: 0%;
}

:root {
    /* B1: one typeface, Geist */
    --font-heading: 'Geist', 'Geist Fallback', system-ui, sans-serif;
    --font-body: 'Geist', 'Geist Fallback', system-ui, sans-serif;

    /* One accent: indigo. Blue variants snap to the same family */
    --secondary-color: #4f46e5;
    --accent-color: #6366f1;

    /* B7: weighted, decelerating base curve */
    --ease-base: cubic-bezier(0.22, 1, 0.36, 1);
    --transition-fast: 200ms var(--ease-base);
    --transition-base: 300ms var(--ease-base);
    --transition-bounce: 500ms var(--ease-base);
}

body {
    font-family: var(--font-body);
}

/* B1: no italics, no ultra bold */
em,
i:not([class*="fa"]),
blockquote,
cite {
    font-style: normal;
}

h1, h2, h3, h4, h5, h6,
.hero-title,
.section-title,
strong,
b {
    font-weight: 700;
}

/* B1: no orphaned words */
h1, h2, h3, .hero-title, .section-title {
    text-wrap: balance;
}

p, li {
    text-wrap: pretty;
    hyphens: manual;         /* B1: no hyphens, including automatic ones */
}

/* B5: hero heading, light theme gradient, capped at 680px */
.hero-title {
    font-size: 3.75rem;      /* text-6xl */
    line-height: 1;
    letter-spacing: -0.03em;
    max-width: 680px;
    background-image: linear-gradient(90deg, #000000 0%, #666666 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    padding-bottom: 0.08em; /* keeps descenders inside the clip box */
}

.hero-title span {
    -webkit-text-fill-color: transparent;
}

.hero-description,
.hero-subnote {
    max-width: 680px;
}

.hero-description {
    font-size: 1.125rem;     /* text-lg */
    line-height: 1.75rem;
}

.section-title {
    font-size: 2.25rem;      /* text-4xl */
    line-height: 2.5rem;
    letter-spacing: -0.025em;
}

@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;     /* text-5xl */
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.25rem;  /* text-4xl */
        line-height: 2.5rem;
    }

    .section-title {
        font-size: 1.875rem; /* text-3xl */
        line-height: 2.25rem;
    }
}

/* B1 + B9: button type and full state set */
.btn {
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 600;
    transition:
        transform var(--transition-bounce),
        background-color var(--transition-base),
        border-color var(--transition-base),
        color var(--transition-base),
        box-shadow var(--transition-base);
}

.btn-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.btn:active {
    transform: scale(0.98);
}

.btn:focus-visible,
.nav-link:focus-visible,
.lang-current:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* B4: flat backgrounds, drop decorative orbs and rings */
.decorative-shapes {
    display: none;
}

/* B7: scroll reveals rise 32px over 700ms on the base curve */
[data-aos] {
    transition: opacity 700ms var(--ease-base), transform 700ms var(--ease-base);
}

[data-aos="fade-up"] {
    transform: translateY(32px);
}

[data-aos="fade-left"] {
    transform: translateX(32px);
}

[data-aos="fade-right"] {
    transform: translateX(-32px);
}

[data-aos].aos-animate {
    transform: none;
}

.nav-island {
    transition: background-color 300ms var(--ease-base), box-shadow 300ms var(--ease-base);
}

/* B11: tagline reveal */
.tagline-reveal {
    padding: 96px 0;
}

.tagline-reveal-text {
    max-width: 680px;
    margin: 0;
    font-family: var(--font-heading);
    font-size: 3rem;         /* text-5xl */
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--neutral-900);
    text-wrap: balance;
}

.tagline-reveal-text .tw {
    opacity: 0.3;
    transition: opacity 500ms var(--ease-base);
}

.tagline-reveal-text .tw.is-on {
    opacity: 1;
}

@media (max-width: 640px) {
    .tagline-reveal {
        padding: 64px 0;
    }

    .tagline-reveal-text {
        font-size: 2.25rem;  /* text-4xl */
        line-height: 2.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-aos],
    [data-aos].aos-animate {
        transform: none !important;
        transition: opacity 300ms linear;
    }

    .btn:active {
        transform: none;
    }

    .tagline-reveal-text .tw {
        opacity: 1;
        transition: none;
    }
}

/* ========================================
   Second pass
   ======================================== */

/* Phosphor icons in place of Font Awesome */
.lang-current i.ph-caret-down {
    font-size: 0.75rem;
    opacity: 0.7;
    transition: transform 300ms var(--ease-base);
}

.language-dropdown.open .lang-current i.ph-caret-down {
    transform: rotate(180deg);
}

/* Risk reversal sits directly under the primary CTA */
.hero-risk {
    width: 100%;             /* same box as the centered .hero-cta row above */
    margin: -8px 0 24px;
    font-size: 0.875rem;     /* text-sm */
    line-height: 1.25rem;
    color: var(--neutral-600);
    text-align: center;
    text-wrap: balance;
}

.hero-risk::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 9999px;
    background: var(--success-color);
    vertical-align: 1px;
}

/* style.css forces white bordered cards on services and FAQ with !important
   (around line 5390), so the overrides below need it too. */

/* Services: asymmetric zig zag instead of four equal towers.
   Row 1: discovery (narrow) + compliance (wide); row 2: audit (wide) + pilot (narrow). */
.services-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
    padding-top: 24px;
}

.services .service-card {
    grid-column: span 6;
    text-align: left;
    box-shadow: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #ffffff !important;
    border: 1px solid var(--neutral-200) !important;
    border-radius: 24px;
    transition:
        transform 500ms var(--ease-base),
        border-color 300ms var(--ease-base),
        background-color 300ms var(--ease-base);
}

.services .service-card:nth-child(1),
.services .service-card:nth-child(4) {
    grid-column: span 5;
}

.services .service-card:nth-child(2),
.services .service-card:nth-child(3) {
    grid-column: span 7;
}

/* Wide cards put the feature list in two columns */
.services .service-card:nth-child(2) .service-features,
.services .service-card:nth-child(3) .service-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 24px;
}

.services .service-card::before {
    display: none;
}

.services .service-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light) !important;
    box-shadow: none !important;
    background: #ffffff !important;
}

.services .service-icon {
    margin: 0 0 16px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 1.5rem;
}

.services .service-card > .btn {
    align-self: flex-start;
}

/* Recommended tier: emphasised by color and weight, not height */
.services .service-card.popular {
    background: var(--neutral-900) !important;
    border-color: var(--neutral-900) !important;
}

.services .service-card.popular:hover {
    background: var(--neutral-900) !important;
    border-color: var(--primary-light) !important;
}

.services .service-card.popular .service-title {
    color: #ffffff !important;
}

.services .service-card.popular .service-description,
.services .service-card.popular .service-features li,
.services .service-card.popular .service-features span {
    color: var(--neutral-300) !important;
}

.services .service-card.popular .service-features i {
    color: var(--primary-light) !important;
}

.services .service-card.popular .btn-primary {
    background: #ffffff;
    color: var(--neutral-900);
    box-shadow: none;
}

/* Square label instead of a floating pill */
.services .service-badge.popular-badge {
    position: static;
    transform: none;
    align-self: flex-start;
    margin-bottom: 16px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: var(--primary-color);
}

@media (max-width: 900px) {
    .services .service-card:nth-child(n) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .services .service-card:nth-child(2) .service-features,
    .services .service-card:nth-child(3) .service-features {
        grid-template-columns: 1fr;
    }
}

/* FAQ: open side by side list. Question left, answer right, nothing to click */
.faq .faq-grid {
    gap: 0 !important;
    margin-top: 32px !important;
    border-top: 1px solid var(--neutral-200);
}

.faq .faq-item {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 32px;
    padding: 24px 0;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--neutral-200) !important;
    border-radius: 0;
    box-shadow: none !important;
    overflow: visible;
}

.faq .faq-item:hover {
    border-color: var(--neutral-200) !important;
    box-shadow: none !important;
    transform: none;
}

.faq .faq-question {
    margin: 0;
    padding: 0 !important;
    display: block;
    cursor: auto;
    font-family: var(--font-heading);
    font-size: 1.125rem;     /* text-lg */
    line-height: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--neutral-900);
    border: 0;
}

.faq .faq-question:hover {
    color: var(--neutral-900);
}

.faq .faq-answer {
    max-height: none;
    overflow: visible;
}

.faq .faq-answer p {
    margin: 0;
    padding: 0 !important;
    font-size: 1rem;
    line-height: 1.5rem;
    color: var(--neutral-600);
    max-width: 65ch;
}

@media (max-width: 768px) {
    .faq .faq-item {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 16px 0;
    }
}

/* Phosphor glyphs are 1em squares. Fix the box before the icon font loads,
   so wrapping rows (hero badges, CTAs) do not shift when it swaps in (CLS). */
i.ph,
i.ph-fill {
    display: inline-block;
    width: 1em;
    height: 1em;
    line-height: 1;
    flex-shrink: 0;
}
