/* ============================================================
   ML Software, LLC
   Copyright 2026. All rights reserved.

   File:        /assets/css/site.css
   Project:     The Stoic Man (marketing site, SPA)
   Version:     2.1.0
   Updated:     2026-04-20

   Description:
      Stylesheet for the Stoic Man marketing SPA. Design tokens
      match Wingman app exactly (charcoal #0c0c0c + gold #c0922a,
      Cinzel display + Inter body). Single-page: all 5 sections
      render in the same doc, only the active one is visible.

   Version history:
      2.0.0  2026-04-20  SPA rebuild. Replaces multi-page v1.0.
      2.1.0  2026-04-20  Hero redesigned to match Shopify reference
                         (textured warrior emblem bleeding off left,
                         right-side copy, "DISCIPLINE OVER COMFORT /
                         BUILD A LIFE YOU RESPECT" title). Pillars
                         rebuilt as full labeled icon cards (Stoic
                         Foundation / The Work / Direction). Header
                         brand mark replaced with logo image.
   ============================================================ */


/* ============================================================
   Tokens (mirror Wingman theme.css)
   ============================================================ */

:root {
    --bg:          #0c0c0c;
    --bg2:         #111111;
    --panel:       #171717;
    --panel2:      #1e1e1e;
    --panel3:      #252525;

    --gold:        #8a6d1e;
    --gold2:       #c0922a;
    --gold3:       #e0b84a;
    --gold-dim:    rgba(192, 146, 42, 0.10);
    --gold-glow:   rgba(192, 146, 42, 0.25);

    --text:        #f5f2ed;
    --text2:       #b8b0a0;
    --muted:       #6a6258;

    --border:      #252525;
    --border2:     #333333;

    --radius:      10px;
    --radius-sm:   6px;
    --transition:  0.28s cubic-bezier(0.2, 0.8, 0.2, 1);

    --font-display: 'Cinzel', Georgia, serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --measure:     66ch;
    --gutter:      clamp(1.25rem, 4vw, 2.5rem);
    --section-y:   clamp(4.5rem, 10vw, 8.5rem);
    --nav-h:       64px;
}


/* ============================================================
   Reset / base
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}


body {
    background: var(--bg);
    min-height: 100vh;
    overflow-x: hidden;
}


img {
    max-width: 100%;
    height: auto;
    display: block;
}


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


a:hover {
    color: var(--gold3);
}


button {
    font-family: inherit;
    cursor: pointer;
}


::selection {
    background: var(--gold2);
    color: var(--bg);
}


/* ============================================================
   Layout
   ============================================================ */

.wrap {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}


.wrap-narrow {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}


/* ============================================================
   Top nav
   ============================================================ */

.topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 100;
    background: rgba(12, 12, 12, 0.85);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--border);
}


.topnav__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}


.topnav__brand {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    height: 100%;
}


.topnav__brand img {
    height: 40px;
    width: auto;
    display: block;
    transition: opacity var(--transition);
}


.topnav__brand:hover img {
    opacity: 0.85;
}


.topnav__links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}


.topnav__link {
    position: relative;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text2);
    background: transparent;
    border: none;
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: color var(--transition);
}


.topnav__link:hover {
    color: var(--text);
}


.topnav__link.is-active {
    color: var(--gold3);
}


.topnav__link::after {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.35rem;
    height: 1px;
    background: var(--gold2);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--transition);
}


.topnav__link.is-active::after {
    transform: scaleX(1);
}


.topnav__login {
    color: var(--gold2) !important;
    border: 1px solid var(--gold-dim);
    margin-left: 0.75rem;
    background: transparent;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}


.topnav__login:hover {
    background: var(--gold2);
    border-color: var(--gold2);
    color: var(--bg) !important;
}


.topnav__login::after {
    display: none;
}


.topnav__burger {
    display: none;
    background: transparent;
    border: 1px solid var(--border2);
    color: var(--gold2);
    padding: 0.5rem 0.75rem;
    font-size: 1.1rem;
    line-height: 1;
    border-radius: var(--radius-sm);
}


@media (max-width: 760px) {
    .topnav__links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(12, 12, 12, 0.98);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--border);
        padding: 0.5rem 1rem 1rem;
    }

    .topnav__links.is-open {
        display: flex;
    }

    .topnav__link {
        padding: 0.95rem 0.5rem;
        border-bottom: 1px solid var(--border);
        text-align: left;
    }

    .topnav__link:last-of-type {
        border-bottom: none;
    }

    .topnav__link::after {
        display: none;
    }

    .topnav__login {
        margin: 0.75rem 0 0 0;
        text-align: center;
    }

    .topnav__burger {
        display: inline-flex;
    }
}


/* ============================================================
   Section shell - SPA visibility
   ============================================================ */

main {
    padding-top: var(--nav-h);
}


.section {
    display: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--transition), transform var(--transition);
    min-height: calc(100vh - var(--nav-h));
}


.section.is-active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}


.section__body {
    padding-top: var(--section-y);
    padding-bottom: var(--section-y);
}


/* ============================================================
   Shared typography
   ============================================================ */

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.08;
    color: var(--text);
    letter-spacing: 0.01em;
}


.eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold2);
    margin-bottom: 1.5rem;
}


.rule {
    display: block;
    width: 2.5rem;
    height: 1px;
    background: var(--gold2);
    border: none;
    margin: 2rem 0;
}


/* ============================================================
   Home / Hero
   ============================================================ */

.hero {
    position: relative;
    min-height: calc(100vh - var(--nav-h));
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
}


.hero__bg {
    position: absolute;
    inset: 0;
    z-index: -3;
    background-color: var(--bg);
}


/*
 * Emblem: textured gold warrior mark. Positioned off-left so the
 * circle bleeds beyond the viewport edge. Large enough to fill the
 * vertical space but dimmed so the title reads cleanly on top.
 */
.hero__emblem {
    position: absolute;
    top: 50%;
    left: -14%;
    transform: translateY(-50%);
    width: clamp(520px, 60vw, 900px);
    height: clamp(520px, 60vw, 900px);
    background-image: url("/assets/img/emblem-texture.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.28;
    z-index: -2;
    pointer-events: none;
    filter: brightness(0.85);
}


.hero__veil {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse at 70% 50%, rgba(12, 12, 12, 0) 0%, rgba(12, 12, 12, 0.6) 55%, rgba(12, 12, 12, 0.95) 100%),
        linear-gradient(180deg, rgba(12, 12, 12, 0.2) 0%, rgba(12, 12, 12, 0.4) 70%, rgba(12, 12, 12, 0.95) 100%);
}


.hero__content {
    position: relative;
    padding: 4rem 0;
    margin-left: auto;
    max-width: 640px;
    text-align: center;
}


.hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 5.5vw, 4.25rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--gold2);
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}


.hero__title__line {
    display: block;
}


.hero__sub {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.4vw, 1.85rem);
    font-weight: 400;
    color: var(--text);
    margin-bottom: 2.5rem;
    letter-spacing: 0.01em;
    line-height: 1.3;
}


@media (max-width: 860px) {
    .hero__emblem {
        left: -30%;
        opacity: 0.2;
    }

    .hero__content {
        margin: 0 auto;
        padding: 3rem 0;
    }

    .hero__veil {
        background:
            radial-gradient(ellipse at 50% 50%, rgba(12, 12, 12, 0.4) 0%, rgba(12, 12, 12, 0.85) 80%, rgba(12, 12, 12, 1) 100%);
    }
}


/* ============================================================
   Buttons
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 1rem 2rem;
    border: 1px solid var(--gold2);
    background: transparent;
    color: var(--gold2);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
    border-radius: var(--radius-sm);
}


.btn:hover {
    background: var(--gold2);
    color: var(--bg);
    transform: translateY(-1px);
}


.btn--solid {
    background: var(--gold2);
    color: var(--bg);
}


.btn--solid:hover {
    background: var(--gold3);
    border-color: var(--gold3);
    color: var(--bg);
}


.btn__arrow {
    display: inline-block;
    transition: transform var(--transition);
}


.btn:hover .btn__arrow {
    transform: translateX(4px);
}


/* ============================================================
   Foundation section (below hero)
   ============================================================ */

.foundation {
    background: var(--bg);
    padding: var(--section-y) 0;
}


.foundation__inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}


.foundation__title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.01em;
    line-height: 1.3;
    margin-bottom: 2rem;
}


.foundation__body p {
    color: var(--text2);
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 1.5rem;
    max-width: 56ch;
    margin-left: auto;
    margin-right: auto;
}


.foundation__body p:last-child {
    margin-bottom: 0;
}


.foundation__body strong {
    color: var(--text);
    font-weight: 600;
}


/* ============================================================
   Pillars
   ============================================================ */

.pillars {
    padding: var(--section-y) 0;
    background: var(--bg);
}


.pillars__header {
    text-align: center;
    margin-bottom: 4rem;
}


.pillars__header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.02em;
}


.pillars__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.25rem, 2.5vw, 1.75rem);
    max-width: 1080px;
    margin: 0 auto;
}


.pillar {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem 2.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: border-color var(--transition), background var(--transition);
}


.pillar:hover {
    border-color: var(--gold-dim);
    background: var(--panel);
}


.pillar__icon {
    width: 100%;
    max-width: 260px;
    height: auto;
    margin-bottom: 2rem;
    display: block;
}


.pillar__lines {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    color: var(--text2);
    font-size: 0.98rem;
    line-height: 1.5;
}


.pillar__lines span {
    display: block;
}


@media (max-width: 800px) {
    .pillars__grid {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .pillar {
        padding: 2.5rem 1.75rem;
    }
}


/* ============================================================
   Essentials (product cards, visual-only)
   ============================================================ */

.essentials {
    padding: var(--section-y) 0;
    border-top: 1px solid var(--border);
}


.essentials__header {
    text-align: center;
    margin-bottom: 4rem;
}


.essentials__header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0.5rem;
}


.essentials__header p {
    color: var(--text2);
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.15rem;
    max-width: 40ch;
    margin: 0 auto;
}


.essentials__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}


.product-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition), transform var(--transition);
}


.product-card:hover {
    border-color: var(--gold-dim);
    transform: translateY(-2px);
}


.product-card__imgwrap {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--panel2);
    overflow: hidden;
}


.product-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 350ms ease;
}


.product-card__img--back {
    opacity: 0;
}


.product-card:hover .product-card__img--front {
    opacity: 0;
}


.product-card:hover .product-card__img--back {
    opacity: 1;
}


.product-card__body {
    padding: 1.5rem 1.35rem 1.75rem;
}


.product-card__title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.02em;
    margin-bottom: 0.65rem;
}


.product-card__note {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}


@media (max-width: 800px) {
    .essentials__grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
}


/* ============================================================
   Article sections (Philosophy, The Work, About, Contact)
   ============================================================ */

.article h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 1.25rem;
    color: var(--text);
}


.article__subtitle {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.2vw, 1.7rem);
    font-style: italic;
    font-weight: 400;
    color: var(--gold2);
    margin-bottom: 3rem;
    line-height: 1.35;
}


.article__body {
    font-size: 1.08rem;
    line-height: 1.75;
    color: var(--text2);
    max-width: var(--measure);
}


.article__body p {
    margin-bottom: 1.5em;
}


.article__body strong {
    color: var(--text);
    font-weight: 500;
}


.article__body em {
    color: var(--gold3);
    font-style: italic;
}


.article__body ul {
    list-style: none;
    margin: 2rem 0;
}


.article__body ul li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--text2);
}


.article__body ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.75em;
    width: 0.9rem;
    height: 1px;
    background: var(--gold2);
}


.article__callout {
    position: relative;
    padding: 0.75rem 0 0.75rem 1.75rem;
    margin: 2.5rem 0;
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.4vw, 1.55rem);
    font-style: italic;
    color: var(--text);
    line-height: 1.4;
    border-left: 2px solid var(--gold2);
}


.article__cta {
    margin-top: 3rem;
}


/* ============================================================
   Contact form
   ============================================================ */

.contact-form {
    display: grid;
    gap: 1.5rem;
    margin-top: 2.5rem;
    max-width: 560px;
}


.field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}


.field label {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text2);
}


.field label .req {
    color: var(--gold2);
    margin-left: 0.15rem;
}


.field input,
.field textarea {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 0.9rem 1rem;
    width: 100%;
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}


.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--gold2);
    background: var(--panel2);
    box-shadow: 0 0 0 3px var(--gold-dim);
}


.contact-form .field textarea {
    min-height: 170px;
    resize: vertical;
    line-height: 1.55;
}


.form-actions {
    margin-top: 0.75rem;
}


.form-error {
    background: rgba(192, 57, 43, 0.08);
    border: 1px solid rgba(192, 57, 43, 0.35);
    color: #e8a7a0;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
}


/* ============================================================
   Footer (minimal)
   ============================================================ */

.sitefoot {
    border-top: 1px solid var(--border);
    background: var(--bg);
    padding: 2.5rem 0 2rem;
    margin-top: 2rem;
}


.sitefoot__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}


.sitefoot__brand {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--gold2);
}


.sitefoot__tag {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1rem;
    color: var(--text2);
}


.sitefoot__legal {
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
    font-size: 0.78rem;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-align: center;
}


@media (max-width: 600px) {
    .sitefoot__grid {
        justify-content: flex-start;
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ============================================================
   Thanks panel
   ============================================================ */

.thanks {
    min-height: calc(100vh - var(--nav-h));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 0;
}


.thanks__inner {
    max-width: 520px;
}


.thanks h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1.25rem;
    color: var(--text);
}


.thanks p {
    color: var(--text2);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}


/* ============================================================
   Scroll reveal (optional enhancement)
   ============================================================ */

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}


.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
