/* ==========================================================================
   PBMX Design System
   ==========================================================================
   Canonical Pantones from client brand sheet (delivered 2026-05-04).
   See projects/pbmx/brand-guidelines.json for the source of truth.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Self-hosted fonts (loaded from assets/fonts/)
   -------------------------------------------------------------------------- */

@font-face {
    font-family: "Cormorant Garamond";
    src: url("../fonts/CormorantGaramond-VariableFont_wght.ttf") format("truetype-variations");
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Montserrat";
    src: url("../fonts/Montserrat-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Montserrat";
    src: url("../fonts/Montserrat-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Montserrat";
    src: url("../fonts/Montserrat-BoldItalic.ttf") format("truetype");
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Roboto";
    src: url("../fonts/Roboto-Light.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}


/* --------------------------------------------------------------------------
   Design Tokens
   -------------------------------------------------------------------------- */

:root {
    /* ── PBMX Canonical Brand Palette (Pantones) ──────────────────────── */
    /* Source: projects/pbmx/client-assets/brand-palette-pantone-reference.jpeg */
    --pbmx-terracota:       #C24514; /* Pantone 7585 C */
    --pbmx-terracota-rgb:   194, 69, 20;
    --pbmx-verde-profundo:  #1E4B33; /* Pantone 5535 C */
    --pbmx-verde-rgb:       30, 75, 51;
    --pbmx-urban-grove:     #4C7A4E; /* Pantone 7736 C */
    --pbmx-urban-rgb:       76, 122, 78;
    --pbmx-cream:           #F9F7F0; /* Pantone 7499 C */
    --pbmx-cream-rgb:       249, 247, 240;
    --pbmx-pale-mint:       #DCEEE7; /* Pantone 621 C */
    --pbmx-mint-rgb:        220, 238, 231;
    --pbmx-black:           #101820; /* Pantone Black 6 C */
    --pbmx-black-rgb:       16, 24, 32;

    /* Tonal variants for hover / disabled / focus states */
    --pbmx-terracota-dark:  #A23A10;
    --pbmx-terracota-light: #DC5E2C;
    --pbmx-verde-dark:      #14352B;
    --pbmx-verde-light:     #2D6446;
    --pbmx-cream-dim:       #EFECDF;
    --pbmx-mint-dim:        #B8D8CC;

    /* ── Aliases for the scaffold's color tokens (so scaffold CSS works) ─ */
    --color-primary:        var(--pbmx-terracota);
    --color-primary-light:  var(--pbmx-terracota-light);
    --color-primary-dark:   var(--pbmx-terracota-dark);
    --color-primary-50:     var(--pbmx-cream);
    --color-primary-100:    var(--pbmx-cream-dim);
    --color-primary-200:    var(--pbmx-pale-mint);
    --color-primary-500:    var(--pbmx-terracota-light);
    --color-primary-600:    var(--pbmx-terracota);
    --color-primary-700:    var(--pbmx-terracota-dark);
    --color-primary-800:    var(--pbmx-terracota-dark);
    --color-primary-900:    var(--pbmx-verde-profundo);

    --color-secondary:      var(--pbmx-verde-profundo);
    --color-secondary-light: var(--pbmx-verde-light);
    --color-secondary-dark:  var(--pbmx-verde-dark);
    --color-secondary-rgb:   var(--pbmx-verde-rgb); /* shadows use this */

    --color-accent:         var(--pbmx-urban-grove);
    --color-accent-light:   #6E9670;
    --color-accent-dark:    var(--pbmx-verde-light);

    /* ── Aliases for the legacy /club-reset/ CSS ──────────────────────── */
    /* These let us port club-reset-v2.css into assets/css/legacy/ without
       editing class names — only the values change. */
    --cr-terracotta:  var(--pbmx-terracota);
    --cr-dark-green:  var(--pbmx-verde-profundo);
    --cr-green:       var(--pbmx-urban-grove);
    --cr-sage:        var(--pbmx-pale-mint);
    --cr-cream:       var(--pbmx-cream);
    --cr-white:       #FFFFFF;        /* used by hero title; legacy file expects pure white */
    --cr-text-dark:   var(--pbmx-black);
    --cr-text-muted:  #5A5854;
    --cr-container:   1440px;          /* legacy fixed container width */

    /* ── Neutral grays (warm, tinted toward verde profundo) ───────────── */
    --gray-50:  #F4F2EB;
    --gray-100: #E9E6DC;
    --gray-200: #D4D0C2;
    --gray-300: #B0AC9F;
    --gray-400: #8B8779;
    --gray-500: #6B6759;
    --gray-600: #4F4B40;
    --gray-700: #383530;
    --gray-800: #25231F;
    --gray-900: var(--pbmx-black);
    --gray-950: #060A10;

    /* ── Semantic ───────────────────────────────────────────────────── */
    --color-success: var(--pbmx-urban-grove);
    --color-warning: #D4A017;
    --color-error:   var(--pbmx-terracota);
    --color-info:    var(--pbmx-verde-profundo);

    /* ── Backgrounds ────────────────────────────────────────────────── */
    --bg-primary:   var(--pbmx-cream);
    --bg-secondary: var(--pbmx-pale-mint);
    --bg-dark:      var(--pbmx-verde-profundo);
    --bg-darker:    var(--pbmx-black);

    /* ── Text ───────────────────────────────────────────────────────── */
    --text-primary:    var(--pbmx-black);
    --text-secondary:  var(--gray-600);
    --text-tertiary:   var(--gray-500);
    --text-inverse:    var(--pbmx-cream);
    --text-link:       var(--pbmx-verde-profundo);
    --text-link-hover: var(--pbmx-terracota);

    /* ── Typography ─────────────────────────────────────────────────── */
    --font-heading:  "Cormorant Garamond", "Times New Roman", Georgia, serif;
    --font-body:     "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-eyebrow:  "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* Font sizes (clamp for responsiveness; meets PILLAR.md minimum-maximums) */
    --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
    --text-sm:   clamp(0.8125rem, 0.775rem + 0.25vw, 0.875rem);
    --text-base: clamp(0.9375rem, 0.9rem + 0.25vw, 1.0625rem); /* PBMX body */
    --text-md:   clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
    --text-lg:   clamp(1.125rem, 1.05rem + 0.4vw, 1.25rem);
    --text-xl:   clamp(1.25rem, 1.1rem + 0.75vw, 1.75rem);   /* h4 max 28px */
    --text-2xl:  clamp(1.5rem, 1.3rem + 1vw, 2.25rem);        /* h3 max 36px */
    --text-3xl:  clamp(1.875rem, 1.5rem + 1.5vw, 2.75rem);
    --text-4xl:  clamp(2rem, 1.75rem + 2vw, 4rem);            /* h2 max 64px */
    --text-5xl:  clamp(2.5rem, 2rem + 3vw, 5rem);             /* h1 max 80px */
    --text-6xl:  clamp(3rem, 2.25rem + 4vw, 7rem);            /* hero max 112px (above PILLAR.md 96px floor) */

    /* Weights */
    --font-light:     300;
    --font-regular:   400;
    --font-medium:    500;
    --font-semibold:  600;
    --font-bold:      700;
    --font-extrabold: 700; /* Cormorant Garamond max weight */

    /* Line heights */
    --leading-none:    1;
    --leading-tight:   1.1;
    --leading-snug:    1.25;
    --leading-normal:  1.65;
    --leading-relaxed: 1.75;

    /* Letter spacing */
    --tracking-tighter: -0.025em;
    --tracking-tight:   -0.015em;
    --tracking-normal:  0;
    --tracking-wide:    0.04em;
    --tracking-wider:   0.08em;
    --tracking-widest:  0.12em;

    /* ── Spacing ────────────────────────────────────────────────────── */
    --space-xs:  0.25rem;
    --space-sm:  0.5rem;
    --space-md:  1rem;
    --space-lg:  1.5rem;
    --space-xl:  2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 5rem;
    --space-cta-above: 4rem; /* 64px PILLAR.md floor before any trailing CTA */

    --section-padding: clamp(4rem, 6vw, 7.5rem); /* 64px - 120px (PBMX brand spec) */
    --container-max:    1320px;
    --container-padding: clamp(1rem, 3vw, 2rem);
    --container-narrow: 800px;

    /* ── Borders & Radius ───────────────────────────────────────────── */
    --border-color:      rgba(var(--pbmx-verde-rgb), 0.15);
    --border-color-dark: rgba(var(--pbmx-verde-rgb), 0.3);
    --border-width:      1px;

    --radius-sm:  0.5rem;   /* 8px — inputs, badges */
    --radius-md:  0.75rem;  /* 12px — buttons, small cards (matches existing club-reset) */
    --radius-lg:  1rem;     /* 16px — cards */
    --radius-xl:  1.25rem;  /* 20px — large feature cards */
    --radius-2xl: 1.5rem;   /* 24px — image masks */
    --radius-full: 9999px;

    /* ── Shadows (Verde Profundo tinted, never pure black) ────────── */
    --shadow-sm: 0 2px 8px rgba(var(--color-secondary-rgb), 0.08);
    --shadow-md: 0 12px 32px rgba(var(--color-secondary-rgb), 0.14);
    --shadow-lg: 0 24px 56px rgba(var(--color-secondary-rgb), 0.18);
    --shadow-xl: 0 40px 80px rgba(var(--color-secondary-rgb), 0.22),
                 0 12px 24px rgba(var(--color-secondary-rgb), 0.10);
    --shadow-2xl: 0 50px 100px rgba(var(--color-secondary-rgb), 0.28),
                  0 16px 32px rgba(var(--color-secondary-rgb), 0.14);

    /* ── Easing (spring) ────────────────────────────────────────────── */
    --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out:    cubic-bezier(0.33, 0, 0.2, 1);
    --ease-smooth: cubic-bezier(0.215, 0.61, 0.355, 1);
    --transition-fast:   150ms;
    --transition-base:   300ms;
    --transition-slow:   500ms;
    --transition-slower: 750ms;

    /* ── Icon Size Tiers (PILLAR.md spec) ───────────────────────────── */
    --icon-sm:  20px;
    --icon-md:  32px;
    --icon-lg:  48px;
    --icon-xl:  64px;
    --icon-2xl: 80px;

    /* ── Z-Index ──────────────────────────────────────────────────── */
    --z-behind:   -1;
    --z-base:     0;
    --z-raised:   10;
    --z-dropdown: 100;
    --z-sticky:   200;
    --z-overlay:  300;
    --z-modal:    400;
    --z-popover:  500;
    --z-toast:    600;
    --z-max:      9999;
}


/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

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

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

body {
    font-family: var(--font-body);
    font-size:   var(--text-base);
    font-weight: var(--font-regular);
    line-height: var(--leading-normal);
    color:       var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

address {
    font-style: normal;
}


/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
    font-family:   var(--font-heading);
    font-weight:   var(--font-semibold);
    line-height:   var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color:         var(--pbmx-verde-profundo);
}

h1, h2 {
    text-wrap: balance;
}

.hero-heading,
.h-hero {
    font-size:     var(--text-6xl);
    font-weight:   var(--font-semibold);
    line-height:   1.05;
    letter-spacing: var(--tracking-tighter);
}

h1 {
    font-size:     var(--text-5xl);
    font-weight:   var(--font-semibold);
    letter-spacing: var(--tracking-tighter);
}

h2 {
    font-size:   var(--text-4xl);
    font-weight: var(--font-medium);
    line-height: 1.15;
}

h3 {
    font-size:   var(--text-2xl);
    font-weight: var(--font-medium);
}

h4 {
    font-size:   var(--text-xl);
    font-weight: var(--font-medium);
}

h5 {
    font-size:   var(--text-lg);
    font-weight: var(--font-medium);
}

h6 {
    font-size:   var(--text-md);
    font-weight: var(--font-semibold);
}

p {
    margin-bottom: var(--space-md);
    line-height:   var(--leading-normal);
    color:         var(--text-primary);
}

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

strong, b {
    font-weight: var(--font-bold);
}

.eyebrow {
    font-family:    var(--font-eyebrow);
    font-size:      var(--text-sm);
    font-weight:    var(--font-light);
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
    color:          var(--pbmx-urban-grove);
}


/* --------------------------------------------------------------------------
   Container + Section
   -------------------------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.container--narrow { max-width: var(--container-narrow); }
.container--wide   { max-width: 1440px; }

.section {
    padding-top:    var(--section-padding);
    padding-bottom: var(--section-padding);
    /* PILLAR.md: every section must have visible bg complexity. Default is
       a subtle radial accent. Sections override per layout. */
    background-image: radial-gradient(
        ellipse 100% 80% at 50% 0%,
        rgba(var(--pbmx-urban-rgb), 0.04) 0%,
        transparent 60%
    );
}

.section--cream     { background-color: var(--pbmx-cream); }
.section--mint      { background-color: var(--pbmx-pale-mint); }
.section--verde     { background-color: var(--pbmx-verde-profundo); color: var(--pbmx-cream); }
.section--terracota { background-color: var(--pbmx-terracota); color: var(--pbmx-cream); }

.section--verde h1, .section--verde h2, .section--verde h3,
.section--verde h4, .section--verde h5, .section--verde h6,
.section--terracota h1, .section--terracota h2, .section--terracota h3,
.section--terracota h4, .section--terracota h5, .section--terracota h6 {
    color: var(--pbmx-cream);
}

.section--verde p, .section--terracota p {
    color: rgba(var(--pbmx-cream-rgb), 0.92);
}

.section__header {
    text-align: center;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-3xl);
}

.section__title {
    margin-bottom: var(--space-md);
}

.section__title--sm {
    font-size: var(--text-2xl);
}

.section__subtitle {
    font-size:    var(--text-lg);
    color:        var(--text-secondary);
    line-height:  var(--leading-relaxed);
}


/* --------------------------------------------------------------------------
   Flex + Grid utilities
   -------------------------------------------------------------------------- */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.grid { display: grid; gap: var(--space-xl); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

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

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


/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size:   0.9375rem;
    font-weight: var(--font-bold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    line-height: 1;
    text-decoration: none;
    border: 1.5px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-base) var(--ease-spring),
                border-color var(--transition-base) var(--ease-spring),
                color var(--transition-base) var(--ease-spring),
                transform var(--transition-fast) var(--ease-spring),
                box-shadow var(--transition-base) var(--ease-spring);
    white-space: nowrap;
}

.btn:focus-visible {
    outline: 2px solid var(--pbmx-verde-profundo);
    outline-offset: 3px;
}

.btn--primary {
    background-color: var(--pbmx-terracota);
    color:            var(--pbmx-cream);
    border-color:     var(--pbmx-terracota);
}

.btn--primary:hover {
    background-color: var(--pbmx-terracota-dark);
    border-color:     var(--pbmx-terracota-dark);
    color:            var(--pbmx-cream);
    transform:        translateY(-2px);
    box-shadow:       0 12px 32px rgba(var(--pbmx-terracota-rgb), 0.28);
}

.btn--secondary {
    background-color: transparent;
    color:            var(--pbmx-verde-profundo);
    border-color:     var(--pbmx-verde-profundo);
}

.btn--secondary:hover {
    background-color: var(--pbmx-verde-profundo);
    color:            var(--pbmx-cream);
    transform:        translateY(-2px);
}

.btn--outline {
    background-color: transparent;
    color:            var(--pbmx-cream);
    border-color:     var(--pbmx-cream);
}

.btn--outline:hover {
    background-color: var(--pbmx-cream);
    color:            var(--pbmx-verde-profundo);
    transform:        translateY(-2px);
}

.btn--sm { padding: 0.625rem 1.25rem; font-size: var(--text-xs); }
.btn--lg { padding: 1.25rem 2.75rem; font-size: var(--text-base); }
.btn--full { width: 100%; }

.btn__icon { display: inline-flex; flex-shrink: 0; }


/* --------------------------------------------------------------------------
   Form Elements
   -------------------------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
input[type="password"],
textarea,
select {
    display: block;
    width: 100%;
    padding: 0.875rem 1.125rem;
    font-family: var(--font-body);
    font-size:   var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: #fff;
    border: var(--border-width) solid var(--border-color-dark);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-fast),
                box-shadow   var(--transition-fast);
    appearance: none;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--pbmx-verde-profundo);
    box-shadow:   0 0 0 3px rgba(var(--pbmx-verde-rgb), 0.15);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-tertiary);
}

textarea {
    min-height: 140px;
    resize: vertical;
}

label {
    display: block;
    margin-bottom: var(--space-xs);
    font-size:    var(--text-sm);
    font-weight:  var(--font-medium);
    color:        var(--text-primary);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%231E4B33' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

a {
    color: var(--text-link);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--text-link-hover);
}


/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    :root {
        --section-padding: clamp(3rem, 5vw, 5rem);
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: clamp(2.5rem, 4vw, 4rem);
    }
    .section__header {
        margin-bottom: var(--space-2xl);
    }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 1rem;
    }
}
