/*
Theme Name: 2-Sigma
Theme URI: https://2-sigma.com
Author: 2-Sigma
Description: Marketing theme for 2-Sigma — AI-assisted software for medical education. Includes a reusable header/footer and a component-based stylesheet built to extend across future pages.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: 2sigma
*/

/* =========================================================================
   1. DESIGN TOKENS
   Change these values to re-skin the whole theme. Every component below
   references these variables instead of hard-coded values.
   ========================================================================= */
:root {
    /* Brand / accent — cyberpunk variant (pink → purple, replaces blue) */
    --color-primary:        #C2278E;   /* magenta accent: links, tags, icons */
    --color-primary-hover:  #5A1F73;   /* deep purple, for hovers */
    --color-primary-soft:   #fbeaf5;   /* soft pink, icon badges / fills */
    --color-accent-purple:  #5A1F73;

    /* Cyberpunk neon gradient (from Figma) — display headlines + buttons */
    --Cyberpunk-Neon-Gradient: linear-gradient(246deg, #F2529D 9.7%, #5A1F73 92.27%);
    --gradient-cta: linear-gradient(90deg, #F2529D 0%, #5A1F73 100%); /* horizontal, for wide pills */

    /* Ink / text */
    --color-ink:            #0f172a;   /* headings */
    --color-ink-2:          #1e293b;
    --color-body:           #475569;   /* paragraph text */
    --color-muted:          #64748b;   /* secondary / meta */
    --color-faint:          #94a3b8;   /* eyebrows on dark, captions */

    /* Surfaces */
    --color-bg:             #ffffff;
    --color-surface:        #f8fafc;   /* alternating section background */
    --color-surface-2:      #f1f5f9;
    --color-card:           #ffffff;
    --color-border:         #e2e8f0;
    --color-border-soft:    #eef2f6;

    /* Footer (dark) */
    --color-footer-bg:      #0f172a;
    --color-footer-text:    #cbd5e1;
    --color-footer-muted:   #94a3b8;
    --color-footer-heading: #ffffff;
    --color-footer-border:  rgba(255, 255, 255, .08);

    /* Typography */
    --font-heading: "Poppins", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --text-eyebrow: .8125rem;   /* 13px */
    --text-sm:      .875rem;    /* 14px */
    --text-base:    1rem;       /* 16px */
    --text-lg:      1.125rem;   /* 18px */
    --text-xl:      1.375rem;   /* 22px */
    --text-2xl:     1.75rem;    /* 28px */
    --text-3xl:     2.5rem;     /* 40px */
    --text-hero:    3.5rem;     /* 56px */

    /* Spacing / layout */
    --container:        1200px;
    --container-narrow: 820px;
    --gutter:           24px;
    --section-y:        96px;
    --radius-sm:        8px;
    --radius:           12px;
    --radius-lg:        16px;
    --radius-pill:      999px;

    /* Effects */
    --shadow-sm:  0 1px 2px rgba(15, 23, 42, .04);
    --shadow:     0 4px 16px rgba(15, 23, 42, .06);
    --shadow-lg:  0 18px 40px rgba(15, 23, 42, .10);
    --transition: 160ms ease;
}

/* =========================================================================
   2. RESET / BASE
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.65;
    color: var(--color-body);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-ink);
    line-height: 1.15;
    margin: 0 0 .5em;
    font-weight: 700;
    letter-spacing: -0.01em;
}

p { margin: 0 0 1rem; }

a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-hover); }

img, svg { max-width: 100%; display: block; }

ul { margin: 0; padding: 0; list-style: none; }

/* Accessibility helpers */
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--color-primary); color: #fff;
    padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0;
    z-index: 1000;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* =========================================================================
   3. LAYOUT PRIMITIVES (reusable across all pages)
   ========================================================================= */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); }
.section--surface { background: var(--color-surface); }
.section--center { text-align: center; }

/* Section header: eyebrow + title + optional lead */
.section__head { margin-bottom: 56px; text-align: center; }
.eyebrow {
    display: inline-block;
    font-size: var(--text-eyebrow);
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 14px;
}
.section__title {
    font-size: var(--text-3xl);
    color: var(--color-ink);
    margin: 0 auto;
}
.section__lead {
    max-width: 620px;
    margin: 16px auto 0;
    color: var(--color-muted);
    font-size: var(--text-lg);
}

/* Gradient text utility — apply to any heading for the Figma neon gradient */
.text-gradient {
    background: var(--Cyberpunk-Neon-Gradient, linear-gradient(246deg, #F2529D 9.7%, #5A1F73 92.27%));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--color-ink); /* fallback */
}

/* Responsive grid helper */
.grid { display: grid; gap: 28px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* =========================================================================
   4. BUTTONS (reusable)
   ========================================================================= */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1;
    padding: 15px 30px;
    border-radius: var(--radius-pill);
    border: 0;
    cursor: pointer;
    transition: color var(--transition), transform var(--transition),
                box-shadow var(--transition), filter var(--transition);
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

/* Primary — solid neon-gradient fill, white text */
.btn--primary {
    background: var(--gradient-cta);
    color: #fff;
}
.btn--primary:hover { color: #fff; filter: brightness(1.06); }

/* Outline — gradient border + dark text on a light fill (matches reference) */
.btn--outline {
    background: var(--color-bg);
    color: var(--color-ink-2);
}
.btn--outline::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;                 /* border thickness */
    background: var(--gradient-cta);
    /* Mask out the centre so only the padded ring (the border) shows */
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}
.btn--outline:hover { color: var(--color-primary-hover); }

.btn--sm { padding: 11px 22px; }

/* Text link with arrow */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--color-primary);
}
.link-arrow svg { transition: transform var(--transition); }
.link-arrow:hover svg { transform: translateX(3px); }

/* =========================================================================
   5. CARDS (reusable surface component)
   ========================================================================= */
.card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--color-border-soft); }

.card__icon {
    width: 48px; height: 48px;
    display: grid; place-items: center;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.card__tag {
    display: inline-block;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 12px;
}
.card__title { font-size: var(--text-xl); margin-bottom: 12px; }
.card__text { color: var(--color-body); margin-bottom: 20px; }

/* =========================================================================
   6. SITE HEADER
   ========================================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--color-border-soft);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    height: 72px;
}
.site-brand {
    display: inline-flex;
    align-items: center;
    color: var(--color-ink);   /* drives the "Sigma" wordmark via currentColor */
}
.site-brand .brand-logo { display: block; height: 32px; width: auto; }
/* Text fallback if a child theme outputs a plain wordmark instead of the SVG */
.site-brand:not(:has(.brand-logo)) {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: .02em;
    color: var(--color-primary);
}

.primary-nav ul { display: flex; gap: 32px; align-items: center; }
.primary-nav a {
    color: var(--color-ink-2);
    font-weight: 500;
    font-size: var(--text-sm);
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a { color: var(--color-primary); }

.site-header__actions { display: flex; align-items: center; gap: 12px; }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none; border: 0; cursor: pointer;
    width: 40px; height: 40px;
    color: var(--color-ink);
}
.nav-toggle svg { margin-inline: auto; }

/* =========================================================================
   7. HERO
   ========================================================================= */
.hero {
    text-align: center;
    padding-top: 88px;
    padding-bottom: 64px;
    background:
        radial-gradient(60% 60% at 50% 0%, rgba(242, 82, 157, .08), transparent 70%);
}
.hero__title {
    font-size: var(--text-hero);
    margin: 12px auto 20px;
    /* Cyberpunk neon gradient text (from Figma) */
    background: var(--Cyberpunk-Neon-Gradient, linear-gradient(246deg, #F2529D 9.7%, #5A1F73 92.27%));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--color-ink); /* fallback for browsers without background-clip:text */
}
.hero__lead {
    max-width: 600px;
    margin: 0 auto 32px;
    font-size: var(--text-lg);
    color: var(--color-muted);
}
.hero__actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}
.hero__media {
    max-width: 1000px;
    margin-inline: auto;
    aspect-ratio: 16 / 10;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: grid;
    place-items: center;
    color: var(--color-faint);
    font-size: var(--text-sm);
    overflow: hidden;
}
.hero__media::before {
    content: "";
    position: absolute;
}

/* =========================================================================
   8. TESTIMONIALS
   ========================================================================= */
.testimonial {
    background: var(--color-surface);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 0px;
}
.testimonial__quote {
    font-style: italic;
    color: var(--color-ink-2);
    margin-bottom: 22px;
}
.testimonial__person { display: flex; align-items: center; gap: 12px; }
.testimonial__avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    display: grid; place-items: center;
    flex: none;
}
.testimonial__name { font-weight: 700; color: var(--color-ink); font-size: var(--text-sm); }
.testimonial__role { color: var(--color-muted); font-size: var(--text-sm); line-height: 1.4; }
.testimonial__org  { color: var(--color-faint); font-size: var(--text-sm); }

/* =========================================================================
   9. PUBLICATIONS
   ========================================================================= */
.pub-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.pub-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pub-card__thumb {
    aspect-ratio: 16 / 9;
    background: var(--color-surface-2);
    display: grid; place-items: center;
    color: var(--color-faint);
}
.pub-card__body { padding: 24px; }
.pub-card__journal {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 10px;
    display: block;
}
.pub-card__title { font-size: var(--text-base); font-weight: 600; color: var(--color-ink); margin-bottom: 12px; line-height: 1.4; }
.pub-card__date { font-size: var(--text-sm); color: var(--color-faint); }

/* =========================================================================
   10. SITE FOOTER
   ========================================================================= */
.site-footer {
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding-top: 72px;
}
.site-footer a { color: var(--color-footer-text); }
.site-footer a:hover { color: #fff; }

.site-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 48px;
}
.site-footer__brand .site-brand { color: #fff; display: inline-block; margin-bottom: 12px; }
.site-footer__tagline { color: var(--color-footer-muted); max-width: 26ch; font-size: var(--text-sm); }

.footer-col__title {
    color: var(--color-footer-heading);
    font-size: var(--text-sm);
    font-weight: 700;
    margin-bottom: 16px;
    font-family: var(--font-body);
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: var(--text-sm); }

.site-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-block: 24px;
    border-top: 1px solid var(--color-footer-border);
    font-size: var(--text-sm);
    color: var(--color-footer-muted);
}
.site-footer__social { display: flex; gap: 20px; }
.site-footer__social a { font-size: var(--text-sm); }

/* =========================================================================
   11. GENERIC PAGE / POST CONTENT (page.php, single.php)
   ========================================================================= */
.page-hero { padding-block: 72px 24px; text-align: center; }
.page-hero__title { font-size: var(--text-3xl); }
.entry-content { padding-bottom: var(--section-y); }
.entry-content :is(h2, h3) { margin-top: 1.6em; }
.entry-content img { border-radius: var(--radius); margin-block: 1.5rem; }

/* =========================================================================
   12. RESPONSIVE
   ========================================================================= */
@media (max-width: 980px) {
    :root { --section-y: 72px; --text-hero: 2.75rem; --text-3xl: 2rem; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .grid--2, .grid--3 { grid-template-columns: 1fr; }

    .primary-nav,
    .site-header__actions { display: none; }
    .nav-toggle { display: block; }

    /* Mobile menu (toggled via .is-open on <body>) */
    .site-header.is-open .primary-nav {
        display: block;
        position: absolute;
        top: 72px; left: 0; right: 0;
        background: #fff;
        border-bottom: 1px solid var(--color-border);
        padding: 16px var(--gutter);
        box-shadow: var(--shadow);
    }
    .site-header.is-open .primary-nav ul { flex-direction: column; gap: 4px; align-items: stretch; }
    .site-header.is-open .primary-nav a { display: block; padding: 12px 4px; }
    .site-header.is-open .site-header__actions {
        display: flex; flex-direction: column; align-items: stretch;
        position: absolute; top: 72px; left: 0; right: 0;
        transform: translateY(100%);
    }

    .hero__actions .btn,
    .hero__actions { width: 100%; }
    .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}
