/* ==========================================================================
   Strata Applied AI — site stylesheet
   Static site; no build step. Organized as:
     1. Fonts (self-hosted)
     2. Design tokens
     3. Base
     4. Navigation
     5. Hero
     6. Buttons
     7. Section scaffolding
     8. Learning pathway cards
     9. Organizational training / About
    10. Contact and footer
    11. Skip link
    12. Responsive
    13. Reduced motion
   ========================================================================== */


/* ==========================================================================
   1. Fonts — self-hosted, SIL Open Font License 1.1 (see fonts/OFL-*.txt)
   Latin subset only; other characters use the fallback stack.
   ========================================================================== */

/* DM Sans — variable font, weights 400–700 (primary typeface) */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/DMSans-latin-variable.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* DM Serif Display Italic — editorial emphasis */
@font-face {
  font-family: 'DM Serif Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/DMSerifDisplay-Italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter ExtraBold (800) — primary hero headline only */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/Inter-ExtraBold-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ==========================================================================
   2. Design tokens
   ========================================================================== */

:root {
  /* Brand palette */
  --white: #FFFFFF;
  --stone: #FBFBF9;
  --graphite: #28282C;
  --mid: #6F6E69;
  --hairline: #E5E2DA;
  --gold: #B8912F;        /* signature decorative gold: rules, accents. Not for small text (2.95:1 on white) */
  --gold-large: #B58C2E;  /* large gold text only, ≥24px or ≥18.66px bold (3.11:1 on white, 3.00:1 on stone) */
  --gold-text: #85631B;   /* accessible gold for small text (5.53:1 on white, 5.34:1 on stone) */
  --hairline-hover: #D8D4C9;

  /* Typography */
  --font-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-hero: 'Inter', var(--font-sans);
  --font-serif-italic: 'DM Serif Display', Georgia, 'Times New Roman', serif;

  /* Type scale */
  --hero-size: clamp(2rem, 5.2vw, 3.8rem);      /* h1: 60.8px at desktop */
  --hero-size-mobile: clamp(1.9rem, 8vw, 2.6rem);
  --hero-weight: 800;
  --heading-size: 1.6rem;                       /* section headings: 25.6px */
  --heading-weight: 600;
  --heading-tracking: -0.01em;
  --card-title-size: 1.35rem;                   /* card h3: 21.6px */
  --card-title-weight: 600;
  --card-title-tracking: -0.01em;

  /* Layout */
  --wrap-max: 1080px;
  --gutter: 24px;
  --band-h: 104px;                              /* regular stone band: base measurement */
  --hero-large: calc(var(--band-h) * 2);
  --stone-thin: calc(var(--band-h) * 0.3);
  --hero-content-h: calc(var(--hero-large) * 0.75);
  --projects-header-h: calc(var(--hero-large) * 0.4);
  --band-cta-h: 85px;
  --band-cta-gap: 24px;                         /* white space between CTA band and the band below */
  --band-extra-h: 24px;
  --stone-medium-h: 40px;
  --hero-spacer: 24px;
}


/* ==========================================================================
   3. Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--white);
  color: var(--graphite);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;   /* a long word wraps instead of overflowing the page at large text sizes */
  -webkit-font-smoothing: antialiased;
}

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

/* Anchored sections and keyboard focus clear the sticky navigation (rem: grows with the text-size setting; 110px at the default) */
html {
  scroll-padding-top: 6.875rem;
}

a:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--gold-text);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip-link target: main is focusable only programmatically (tabindex="-1"). It is not interactive,
   so the browser's default ring around the whole page body is suppressed. Links keep their ring. */
main:focus {
  outline: none;
}

h2 {
  font-size: var(--heading-size);
  font-weight: var(--heading-weight);
  letter-spacing: var(--heading-tracking);
}


/* ==========================================================================
   4. Navigation
   ========================================================================== */

nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--stone);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 80px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.wordmark-logo {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}

.nav-links a {
  color: var(--gold-text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--graphite);
}

/* Desktop uses the always-visible link row. The disclosure is mobile-only. */
.nav-menu {
  display: none;
}


/* ==========================================================================
   5. Hero — editorial strata rhythm (horizontal bands)
   ========================================================================== */

header {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
}

.hero-area {
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--white);
}

.hero-area .wrap {
  width: 100%;
}

.hero-area--large {
  min-height: var(--hero-large);
  padding: 32px 0;
}

.hero-area--content {
  min-height: var(--hero-content-h);
  padding: 24px 0;
}

.hero-area--projects {
  min-height: var(--projects-header-h);
}

.hero-intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-spacer {
  width: 100%;
  flex-shrink: 0;
  background: var(--white);
}

.hero-spacer--thin {
  min-height: var(--hero-spacer);
}

.stone-stripe {
  width: 100%;
  flex-shrink: 0;
  background: var(--stone);
}

.stone-stripe--thin {
  min-height: var(--stone-thin);
}

.stone-stripe--cta {
  display: flex;
  align-items: center;
  min-height: var(--band-cta-h);
  margin-bottom: var(--band-cta-gap);
}

.stone-stripe--cta .wrap {
  width: 100%;
}

.stone-stripe--medium {
  min-height: var(--stone-medium-h);
}

.hero-band--extra {
  width: 100%;
  flex-shrink: 0;
  min-height: var(--band-extra-h);
  background: var(--stone);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-text);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  display: block;
  width: 26px;
  height: 1px;
  background: var(--gold);
}

h1 {
  color: var(--graphite);
  font-family: var(--font-hero);
  font-size: var(--hero-size);
  font-weight: var(--hero-weight);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h1 em {
  color: var(--gold-large);
  font-family: var(--font-serif-italic);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.hero-sub {
  max-width: 65ch;
  color: var(--mid);
  font-size: 1.125rem;
}

.hero-sub + .hero-sub {
  margin-top: 16px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}


/* ==========================================================================
   6. Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary {
  background: var(--graphite);
  color: var(--white);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(40, 40, 44, 0.18);
}

.btn-ghost {
  border: 1px solid var(--mid);   /* 4.93:1 on stone; WCAG 1.4.11 needs 3:1 */
  background: transparent;
  color: var(--graphite);
}

.btn-ghost:hover {
  border-color: var(--graphite);
}


/* ==========================================================================
   7. Section scaffolding (solid stone from "Learning pathways" down)
   ========================================================================== */

section {
  padding: 88px 0;
  border-top: 1px solid var(--hairline);
}

.stone {
  background: var(--stone);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.hero-area--projects h2 {
  color: var(--gold-large);   /* 25.6px: qualifies as large text */
}

.hero-area--projects .section-label {
  color: var(--gold-text);
}

.section-label {
  color: var(--mid);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.grid-section {
  padding-top: 36px;
  border-top: none;
}


/* ==========================================================================
   8. Learning pathway cards
   ========================================================================== */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 28px 28px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--white);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.card:not(.card--info):hover {   /* informational cards (about.html) have no hover effect */
  border-color: var(--hairline-hover);
  box-shadow: 0 12px 32px rgba(40, 40, 44, 0.07);
}

.card.featured {
  grid-column: 1 / -1;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.layer-id {
  color: var(--mid);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.card-top .layer-id:first-child {
  flex-shrink: 0;
  white-space: nowrap;   /* keep "L-05" on one line when the tag wraps */
}

.card-top .layer-id:last-child {
  min-width: 0;
  overflow-wrap: anywhere;   /* lets the tag shrink and wrap at large text sizes */
  text-align: right;
}

.card h3 {
  font-size: var(--card-title-size);
  font-weight: var(--card-title-weight);
  letter-spacing: var(--card-title-tracking);
}

.card .pitch {
  max-width: 52ch;
  color: var(--mid);
  font-size: 0.95rem;
}

.card .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  color: var(--mid);
  font-size: 0.8rem;
}

.card .meta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--graphite);
  font-weight: 600;
  text-decoration: none;
}

.card .meta a::after {
  content: "→";
  content: "→" / "";   /* decorative arrow: no alt text where supported */
  transition: transform 0.15s;
}

.card .meta a:hover::after {
  transform: translateX(3px);
}


/* ==========================================================================
   9. Organizational training / About (shared by index.html and training.html)
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

/* Teaching-philosophy statement: uses the standard section-heading size and weight.
   Line 1 DM Sans; line 2 DM Serif Display Italic in large-text gold (≥24px) at the same size. */
.about-serif {
  color: var(--graphite);
  font-family: var(--font-sans);
  font-size: var(--heading-size);
  font-weight: var(--heading-weight);
  letter-spacing: var(--heading-tracking);
}

.about-serif em {
  display: block;                            /* second sentence on its own line; wraps safely on narrow screens */
  color: var(--gold-large);
  font-family: var(--font-serif-italic);
  font-size: 1em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.about-body p {
  margin-bottom: 16px;
  color: var(--mid);
}

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

/* Interior-page text components (training.html): restrained, inherit existing tokens */
h2 + .about-serif,
h2 + .section-intro {
  margin-top: 16px;
}

.section-intro {
  color: var(--mid);
}

.about-body ul {
  margin: 0 0 16px 1.25em;
  color: var(--mid);
}

.about-body li + li {
  margin-top: 4px;
}

/* Secondary text link under a call to action (courses.html) */
.about-body .btn + .text-link-row {
  margin-top: 16px;
}

.text-link {
  color: var(--graphite);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

/* Sub-headings inside detail columns reuse the approved card-title tokens (courses.html) */
.about-body h3 {
  margin: 32px 0 12px;
  font-size: var(--card-title-size);
  font-weight: var(--card-title-weight);
  letter-spacing: var(--card-title-tracking);
}

/* Founder profile (about.html): rectangular photograph beside the biography; photo first on mobile */
.founder-photo {
  display: block;
  align-self: end;   /* bottom-aligns the portrait with the biography when side by side; no effect when stacked */
}

.founder-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.founder-bio h3 {
  margin: 24px 0 4px;
}

.about-body .founder-title {
  margin-bottom: 24px;
  color: var(--gold-text);
  font-weight: 600;
}

/* Education section (about.html): detail columns that open with a sub-heading, and credential lists inside them */
.about-body > h3:first-child {
  margin-top: 0;
}

.about-body .format-list {
  margin-bottom: 16px;
}

.format-list > div + div {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
}

.format-list dt {
  font-weight: 600;
}

.format-list dd {
  color: var(--mid);
}


/* ==========================================================================
   10. Contact and footer
   ========================================================================== */

.contact {
  padding: 100px 0;
  text-align: center;
}

.contact h2 {
  margin-bottom: 12px;
}

.contact p {
  max-width: 65ch;
  margin: 0 auto 24px;
  color: var(--mid);
}

footer {
  padding: 32px 0;
  border-top: 1px solid var(--hairline);
  background: var(--stone);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--mid);
  font-size: 0.8rem;
}

.foot-inner a {
  white-space: nowrap;   /* keep "Privacy Policy" on one line when the footer text wraps */
  color: var(--graphite);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot-inner a:hover {
  color: var(--gold-text);
}

.foot-strata {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 64px;
}

.foot-strata i {
  display: block;
  height: 1px;
  background: var(--hairline);
}

.foot-strata i:nth-child(2) {
  width: 80%;
}

.foot-strata i:nth-child(3) {
  width: 60%;
  background: var(--gold);
}


/* ==========================================================================
   11. Skip link
   ========================================================================== */

.skip {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 100;
  padding: 12px;
  background: var(--white);
  color: var(--graphite);
}

.skip:focus {
  top: 8px;
}


/* ==========================================================================
   12. Responsive
   ========================================================================== */

/* Tablet: five navigation links fit on one row beside the wordmark (no orphaned link) */
@media (max-width: 900px) {
  .nav-links {
    gap: 12px 24px;
  }
}

@media (max-width: 760px) {
  :root {
    --band-h: 88px;
  }

  h1 {
    font-size: var(--hero-size-mobile);
  }

  section {
    padding: 64px 0;
  }

  .nav-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 16px;
    row-gap: 8px;
  }

  .nav-links--bar {
    display: none;
  }

  .wordmark {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .wordmark-logo {
    width: 210px;
  }

  /* Promote summary and panel into the header grid. Closed panels are hidden
     explicitly because display:contents skips the user-agent closed-details rule. */
  .nav-menu {
    display: contents;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    box-sizing: border-box;
    min-height: 44px;
    min-width: 44px;
    padding: 10px 14px;
    border: 1px solid var(--mid);
    border-radius: 6px;
    background: var(--white);
    color: var(--gold-text);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    list-style: none;
  }

  .nav-toggle::-webkit-details-marker,
  .nav-toggle::marker {
    display: none;
    content: none;
  }

  .nav-menu:not([open]) > .nav-links--panel {
    display: none;
  }

  .nav-menu[open] .nav-toggle {
    color: var(--graphite);
  }

  .nav-menu[open] > .nav-links--panel {
    display: flex;
    flex-direction: column;
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 0;
    min-width: 0;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 4px;
  }

  .nav-links a[aria-current="page"] {
    color: var(--graphite);
    font-weight: 600;
  }

  /* Compact closed bar is 110px at the default text size; extra padding when open */
  html {
    scroll-padding-top: 6.875rem;
  }

  html:has(.nav-menu[open]) {
    scroll-padding-top: 21.5rem;
  }

  .hero-area--large {
    min-height: 150px;
  }

  .hero-area--projects {
    min-height: 0;
    padding: 24px 0;
  }

  .stone-stripe--cta {
    min-height: 0;
    padding: 18px 0;
  }

  .grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .founder-photo {
    max-width: 420px;
  }

  .contact {
    padding: 64px 0;
  }
}


/* Enlarged text or a short viewport (large text size, high zoom, landscape phone): a tall navigation
   would cover too much of the screen, so it scrolls with the page. The em units follow the browser's
   text-size setting (500px and 576px at the default size, so normal phones keep the sticky navigation). */
@media (max-height: 31.25em), (max-width: 760px) and (max-height: 36em) {
  nav {
    position: static;
  }

  html {
    scroll-padding-top: 0;
  }
}


/* ==========================================================================
   13. Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  /* !important is deliberate: guarantees no component transition survives */
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
