/* ============================================================
   Berwolf Group — Site Stylesheet
   ============================================================ */

/* ---------- Type-family tokens (referenced by page styles below) ---------- */
    
:root {
  --font-brand:   "avenir-next-world", "Avenir Next", "Avenir", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: "avenir-next-world", "Avenir Next", "Avenir", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

/* ============================================================
   Page styles
   ============================================================ */

:root {
    /* Berwolf brand palette */
    --sumi:   #0A1C36;
    --ink:    #0E2647;
    --paper:  #F7F4EE;
    --linen:  #DDD3BC;
    --terra:  #C8755A;
    --stone:  #6B7280;
    --pebble: #A0A7B2;
    --white:  #ffffff;
    --paper-tint: #F1ECE3;

    --maxw: 1120px;
    
    --menu-bar-height: 110px;
    
    /* ---------- Fluid type scale  (anchors: 375px → 1200px) ----------
       Formula: clamp(min-rem, intercept-rem + slope-vw, max-rem)
       Derived from explicit min/max pairs so the slope is geometrically
       coherent AND scales with user font-size preference (rem-based). */

	--fs-xs:   clamp(0.6875rem, 0.659rem + 0.121vw, 0.75rem);    /* 11 → 12 */
	--fs-sm:   clamp(0.8125rem, 0.784rem + 0.121vw, 0.875rem);   /* 13 → 14 */
	--fs-base: clamp(0.9375rem, 0.909rem + 0.121vw, 1rem);       /* 15 → 16 */
	--fs-md:   clamp(1.0625rem, 1.006rem + 0.242vw, 1.1875rem);  /* 17 → 19 */
	--fs-lg:   clamp(1.125rem,  1.011rem + 0.485vw, 1.375rem);   /* 18 → 22 */
	--fs-xl:   clamp(1.25rem,   1.136rem + 0.485vw, 1.5rem);     /* 20 → 24 */
	/*--fs-2xl:  clamp(1.6875rem, 1.318rem + 1.576vw, 2.5rem);     /* 27 → 40  Claude */
    --fs-2xl:  clamp(1.875rem, 1.4489rem + 1.8182vw, 2.8125rem); /* 30 → 45 */
	/*--fs-3xl:  clamp(2.0625rem, 1.466rem + 2.545vw, 3.375rem);   /* 33 → 54 Claude */
    --fs-3xl:  clamp(2.625rem, 1.7727rem + 3.6364vw, 4.5rem);	 /* 42 → 72 */

	/* ---------- Spacing scale  (anchors: 375px → 1200px) ---------- */
	--space-xs:  clamp(16px, 12.36px + 0.970vw, 24px);   /* 16 → 24 */
	--space-sm:  clamp(24px, 18.55px + 1.455vw, 36px);   /* 24 → 36 */
	--space-md:  clamp(32px, 24.73px + 1.939vw, 48px);   /* 32 → 48 */
	--space-lg:  clamp(40px, 29.09px + 2.909vw, 64px);   /* 40 → 64 */
	--space-xl:  clamp(48px, 37.09px + 2.909vw, 72px);   /* 48 → 72 */
	--space-2xl: clamp(56px, 37.82px + 4.848vw, 96px);   /* 56 → 96 */
	--space-3xl: clamp(76px, 50.55px + 6.788vw, 132px);  /* 76 → 132 */
	
	--gutter:    clamp(24px, -5.09px + 7.758vw, 88px);   /* 24 → 88 */
	
  }

  * { box-sizing: border-box; }

  html, body { background: var(--white); color: var(--ink); }
  body {
    font-family: var(--font-brand);
    font-weight: 400;
    letter-spacing: -0.025em;            /* brand −25 tracking on regular text */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  /* Bold and heavier weights keep normal tracking (brand rule) */
  h1, h2, h3, h4, strong, b, .eyebrow, .runner, .btn, .nav a, .wm-text {
    letter-spacing: normal;
    font-weight: 700;
  }

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

  .wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

  /* ---------- Shared type ---------- */
  .eyebrow {
    font-weight: 500;
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin: 0;
  }
  .runner {
    font-weight: 600;
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--terra);
    margin: 0 0 22px;
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .runner::before {
    content: "";
    width: 26px;
    height: 2px;
    background: var(--terra);
    display: inline-block;
  }
  .lead {
    font-size: var(--fs-lg);
    line-height: 1.55;
    font-weight: 400;
    color: var(--ink);
    max-width: 36ch;
  }

  /* ---------- Logos ---------- */
  .logo { display: block; fill: currentColor; }
  .hero-logo path { fill: var(--paper); }
  .hero-logo .wolf-o { fill: var(--terra); }

  /* ---------- Header ---------- */
  header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,0);
    transition: background .35s ease, box-shadow .35s ease, border-color .35s ease;
    border-bottom: 1px solid transparent;
  }
  header.stuck {
    background: rgba(255,255,255,0.92);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom-color: var(--ink-100, #e7e9ee);
  }
  /* hero is dark, so header starts with light marks; once stuck (over white) switch to ink */
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--menu-bar-height);
  }
  .header-mark { color: var(--paper); width: 220px; transition: color .35s ease; }
  header.stuck .header-mark { color: var(--ink); }
  .header-mark path.wolf-o { fill: var(--terra); }
  header.stuck .header-mark path.wolf-o { fill: var(--terra); }
  .nav {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
  }
  .nav a.link {
    font-weight: 600;
    font-size: var(--fs-sm);
    letter-spacing: 0.01em;
    color: var(--paper);
    opacity: .85;
    transition: color .35s ease, opacity .2s ease;
    text-transform: uppercase;
  }
  header.stuck .nav a.link { color: var(--ink); opacity: .7; }
  .nav a.link:hover { opacity: 1; }
  .nav a.link::after {
    content: "";
    display: block;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
    margin-top: 3px;
  }
  .nav a.link:hover::after { transform: scaleX(1); }
  @media (max-width: 720px) { .nav .link, .nav .header-cta { display: none; } }

  /* ---------- Hamburger ---------- */
  .hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: 4px;
    flex-shrink: 0;
  }
  .hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--paper);
    border-radius: 1px;
    transition: transform .25s ease, opacity .2s ease, background .35s ease;
  }
  header.stuck .hamburger span { background: var(--ink); }
  .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  @media (max-width: 720px) { .hamburger { display: flex; } }

  /* ---------- Mobile nav panel ---------- */
  .mobile-nav {
    display: none;
    position: fixed;
    top: var(--menu-bar-height);
    left: 0; right: 0;
    background: var(--sumi);
    z-index: 48;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, padding .3s ease;
    /*border-bottom: 1px solid rgba(247,244,238,.1);*/
  }
  .mobile-nav.open { max-height: 320px; padding-bottom: 20px; }
  .mobile-nav a {
    display: block;
    padding: 15px var(--gutter);
    font-family: var(--font-brand);
    font-weight: 600;
    font-size: var(--fs-md);
    color: var(--paper);
    opacity: .85;
    letter-spacing: 0.01em;
    border-bottom: 1px solid rgba(247,244,238,.07);
    transition: opacity .15s ease;
    text-transform: uppercase;
  }
  .mobile-nav a:last-child { border-bottom: none; }
  .mobile-nav a:hover { opacity: 1; }
  @media (max-width: 720px) { .mobile-nav { display: block; } }

  .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: var(--fs-base);
    padding: 11px 20px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
    white-space: nowrap;
  }
  .btn .arrow { transition: transform .2s ease; }
  .btn:hover .arrow { transform: translateX(3px); }

  .btn-ink   { background: var(--ink); color: var(--paper); }
  .btn-ink:hover { background: #163359; }
  .btn-terra  { background: var(--terra); color: var(--paper); }
  .btn-terra:hover { background: #b9694f; }
  .btn-ghost-light { background: transparent; color: var(--paper); border-color: rgba(247,244,238,.35); }
  .btn-ghost-light:hover { border-color: var(--paper); }
  .header-cta { padding: 9px 16px; font-size: var(--fs-sm); text-transform: uppercase;}
  header.stuck .btn-ghost-light { color: var(--ink); border-color: rgba(14,38,71,.3); }
  header.stuck .btn-ghost-light:hover { border-color: var(--ink); }

  /* ---------- Hero ---------- */
  .hero {
    background: var(--sumi);
    color: var(--paper);
    position: relative;
    margin-top: calc(-1 * var(--menu-bar-height));          /* slide under the transparent sticky header */
    padding-top: var(--menu-bar-height);
    overflow: hidden;
  }
  .hero-inner {
    padding-top: clamp(72px, 12vh, 150px);
    padding-bottom: clamp(80px, 13vh, 168px);
  }
  .hero-logo { width: min(560px, 82vw); height: auto; margin-bottom: var(--space-lg); }
  .hero-eyebrow { color: var(--pebble); margin-bottom: 30px; }
  .hero h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: var(--fs-3xl);
    line-height: 1.07;
    margin: 0 0 28px;
    max-width: 17ch;
    text-wrap: balance;
  }
  .hero p.sub {
    font-weight: 400;
    font-size: var(--fs-lg);
    line-height: 1.6;
    color: var(--pebble);
    max-width: 56ch;
    margin: 0 0 42px;
  }
  .hero .actions { display: flex; flex-wrap: wrap; gap: 14px; }

  /* faint hairline at hero base */
  .hero::after {
    content: "";
    position: absolute;
    left: var(--gutter); right: var(--gutter);
    bottom: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(247,244,238,.16) 18%, rgba(247,244,238,.16) 82%, transparent);
  }

  /* ---------- Section scaffolding ---------- */
  section { position: relative; }
  .band { padding-block: var(--space-3xl); }
  .band-white { background: var(--white); }
  .band-paper { background: var(--paper); }

  .section-head { max-width: 56ch; margin-bottom: var(--space-xl); }
  .section-head h2 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: var(--fs-2xl);
    line-height: 1.12;
    margin: 0;
    text-wrap: balance;
  }

  /* wolf-o divider */
  .divider { display: flex; justify-content: center; padding-block: var(--space-lg); background: var(--white); }
  .divider svg { width: 30px; height: auto; fill: var(--linen); }

  /* ---------- Approach ---------- */
  #approach .lead {
  	max-width:48ch;
  	margin-bottom:clamp(48px,6vw,72px);
  }
  .principles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }
  .principle .pnum {
    font-weight: 600;
    font-size: var(--fs-xs);
    letter-spacing: 0.18em;
    color: var(--stone);
    text-transform: uppercase;
    display: block;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-top: 2px solid var(--ink);
    padding-top: 14px;
  }
  .principle .pnum-num {
    color: var(--terra);
    font-size: var(--fs-xl);
    font-weight: 700;
    margin-right: 6px;
  }
  .principle h3 {
    font-weight: 700;
    font-size: var(--fs-xl);
    margin: 0 0 12px;
  }
  .principle p {
    margin: 0;
    font-size: var(--fs-base);
    color: var(--ink);
    opacity: .82;
  }
  @media (max-width: 820px) { .principles { grid-template-columns: 1fr; gap: 36px; } }

  /* ---------- Team ---------- */
  .team {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg) var(--space-2xl);
  }
  .member { border-top: 1px solid rgba(14,38,71,.18); padding-top: 26px; }
  .member .m-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-xl);
    margin: 0 0 4px;
  }
  .member .m-role {
    font-weight: 600;
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--terra);
    margin: 0 0 18px;
  }
  .member .m-bio { margin: 0 0 16px; font-size: var(--fs-base); color: var(--ink); opacity: .85; }
  .member .m-cred {
    margin: 0;
    font-size: var(--fs-sm);
    color: var(--stone);
    line-height: 1.5;
  }
  @media (max-width: 720px) { .team { grid-template-columns: 1fr; gap: 40px; } }

  /* ---------- Contact / investor pack ---------- */
  .contact-grid {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    gap: var(--space-2xl);
    align-items: start;
  }
  /* Let grid cells shrink below their content's intrinsic size */
  .contact-grid > * { min-width: 0; }
  
  /* Make form controls shrinkable and fill their container */
  .field input,
  .field textarea {
  	width: 100%;
  	min-width: 0;
  }
  
  .contact-copy .lead { margin-bottom: 28px; }
  .contact-copy h2 {
  	font-family:var(--font-display);
  	font-weight: 800;
  	font-size:var(--fs-2xl);
  	line-height: 1.12;
  	margin: 0 0 22px;
  }
  .contact-meta { margin-top: 36px; display: grid; gap: 18px; }
  .contact-meta .item .k {
    font-weight: 500; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.16em;
    color: var(--stone); margin: 0 0 4px;
  }
  .contact-meta .item .v { margin: 0; font-size: var(--fs-base); color: var(--ink); }
  .contact-meta .item .v a { border-bottom: 1px solid var(--linen); transition: border-color .2s; }
  .contact-meta .item .v a:hover { border-color: var(--terra); }

  form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  @media (max-width: 820px) { form .row { grid-template-columns: 1fr; } }
  .field { display: flex; flex-direction: column; margin-bottom: 18px; }
  .field label {
    font-weight: 500; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.14em;
    color: var(--stone); margin-bottom: 8px;
  }
  .field input, .field textarea {
    font-family: var(--font-brand);
    font-size: var(--fs-base);
    letter-spacing: -0.025em;
    color: var(--ink);
    background: var(--white);
    border: 1px solid rgba(14,38,71,.22);
    border-radius: 2px;
    padding: 13px 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
  }
  .field textarea { resize: vertical; min-height: 96px; }
  .field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--terra);
    box-shadow: 0 0 0 3px rgba(200,117,90,.15);
  }
  .field.invalid input, .field.invalid textarea { border-color: #b4452f; }
  .field .err { color: #b4452f; font-size: var(--fs-sm); margin-top: 6px; display: none; }
  .field.invalid .err { display: block; }
  .form-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
  .form-note { font-size: var(--fs-sm); color: var(--stone); margin: 0; max-width: 34ch; }

  .form-success {
    display: none;
    border: 1px solid rgba(14,38,71,.18);
    background: var(--white);
    padding: 40px 36px;
    border-radius: 2px;
  }
  .form-success.show { display: block; }
  .form-success .ok-mark { width: 34px; height: 34px; fill: var(--terra); margin-bottom: 16px; }
  .form-success h3 { font-weight: 700; font-size: var(--fs-lg); margin: 0 0 10px; }
  .form-success p { margin: 0; color: var(--ink); opacity: .8; }
  form.hidden { display: none; }

  @media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

  /* ---------- Footer ---------- */
  footer {
    background: var(--sumi);
    color: var(--pebble);
    padding-block: var(--space-lg);
  }
  .footer-mark { display: block; color: var(--paper); width: 220px; max-width: 60vw; fill: var(--paper); }
  .footer-mark path.wolf-o { fill: var(--terra); }
  .footer-copy { margin: 100px 0 0; font-size: var(--fs-sm); color: var(--pebble); text-align: right; }
  @media (max-width: 820px) { .footer-mark { margin: auto; } .footer-copy { text-align: center; } }

  /* ---------- Reveal (JS only; no-JS shows everything) ---------- */
  .js [data-reveal] { opacity: 0; transform: translateY(18px); }
  .js [data-reveal].in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s ease; }
  @media (prefers-reduced-motion: reduce) {
    .js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  }
