/* ============================================================================
   Damasio Academy — PUBLIC marketing site styles
   Layers on top of /css/tokens.css + /css/themes.css (theme-aware via --da-*).
   All classes are namespaced `m-` / `site-` so they never collide with the
   portal shell classes styled in themes.css (.side/.nav/.card/.hero/.rec).
============================================================================ */

/* ---- header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--da-bg) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--da-line);
}
.site-header__row {
  max-width: var(--da-maxw); margin: 0 auto; padding: 12px var(--da-space);
  display: flex; align-items: center; gap: 16px;
}
.site-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.site-brand:hover { text-decoration: none; }
.site-brand .crest {
  width: 42px; height: 42px; flex: none; object-fit: contain;
}
.site-brand .wm { font-family: var(--da-font-display); font-weight: 600; font-size: 20px; line-height: 1.02; color: var(--da-heading); letter-spacing: var(--disp-spacing, 0); }
.site-brand .wm small { display: block; font-family: var(--da-font-body); font-weight: 600; font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--da-muted); margin-top: 3px; }

/* Desktop nav: one robust flex row, brand left, nav centered, actions right.
   nowrap = never spill to a second line; below --nav-collapse the whole inline
   nav is replaced by the hamburger (see media query) so it can never wrap. */
.site-nav { display: flex; align-items: center; justify-content: center; gap: 14px; flex: 1 1 auto; flex-wrap: nowrap; min-width: 0; }
.site-nav a { color: var(--da-text); font-weight: 500; font-size: 13.5px; text-decoration: none; padding: 6px 1px; border-bottom: 2px solid transparent; white-space: nowrap; }
.site-nav a:hover { color: var(--da-accent); text-decoration: none; }
.site-nav a.on { color: var(--da-accent); border-bottom-color: var(--da-accent); font-weight: 600; }
.site-nav .site-actions-inline { display: none; } /* mobile-menu only (see media query) */

.site-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; flex: none; }
.site-actions .da-btn { padding: .6em 1em; font-size: 13.5px; white-space: nowrap; }
.site-lang {
  background: transparent; border: 1.5px solid var(--da-line); color: var(--da-text);
  border-radius: 8px; padding: .34em .8em; cursor: pointer; font-weight: 600; font-size: 13px;
  font-family: var(--da-font-body);
}
.site-lang:hover { border-color: var(--da-accent); color: var(--da-accent); }
.site-burger {
  display: none; background: transparent; border: 1.5px solid var(--da-line); border-radius: 10px;
  width: 42px; height: 40px; cursor: pointer; color: var(--da-text);
}
.site-burger svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }

/* The `hidden` attribute must win over author display rules (e.g. .m-field is
   display:grid, which would otherwise override the UA [hidden]{display:none}). */
[hidden] { display: none !important; }

/* ---- footer ------------------------------------------------------------- */
.site-footer { background: var(--da-primary); color: color-mix(in srgb, var(--btn-ink, #fff) 82%, transparent); margin-top: 72px; }
.site-footer__brand { display: inline-block; margin: 0 0 16px; }
.site-footer__brand img { display: block; width: 200px; max-width: 100%; height: auto; border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.site-footer__brand:hover { text-decoration: none; }
html[data-skin="nocturne"] .site-footer { background: #100f0b; }
.site-footer__row { max-width: var(--da-maxw); margin: 0 auto; padding: 44px var(--da-space); display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: color-mix(in srgb, var(--btn-ink, #fff) 92%, transparent); font-family: var(--da-font-display); font-size: 1.15rem; margin: 0 0 12px; }
.site-footer p { color: color-mix(in srgb, var(--btn-ink, #fff) 74%, transparent); font-size: .92rem; max-width: 40ch; }
.site-footer a { display: block; color: color-mix(in srgb, var(--btn-ink, #fff) 80%, transparent); text-decoration: none; font-size: .92rem; padding: 4px 0; }
.site-footer a:hover { color: var(--da-highlight); text-decoration: none; }
.site-footer__bar { border-top: 1px solid color-mix(in srgb, var(--btn-ink, #fff) 16%, transparent); }
.site-footer__bar div { max-width: var(--da-maxw); margin: 0 auto; padding: 16px var(--da-space); font-size: .82rem; color: color-mix(in srgb, var(--btn-ink, #fff) 62%, transparent); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---- generic sections --------------------------------------------------- */
.m-section { padding: clamp(44px, 8vw, 84px) 0; }
.m-section--tint { background: var(--da-cream-2); }
.m-eyebrow { font-family: var(--da-font-body); font-size: 11px; font-weight: 700; letter-spacing: var(--uppercase-spacing, .14em); text-transform: uppercase; color: var(--da-muted); margin: 0 0 12px; }
.m-lead { font-family: var(--da-font-serif); font-size: clamp(1.05rem, 2.2vw, 1.35rem); color: var(--da-muted); max-width: 60ch; }
.m-head { max-width: 62ch; margin: 0 auto 40px; text-align: center; }
.m-head .m-eyebrow { text-align: center; }

/* ---- hero --------------------------------------------------------------- */
.m-hero { position: relative; overflow: hidden; }
.m-hero__bg { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,26,20,.62), rgba(14,26,20,.82)), center/cover no-repeat var(--m-hero-img); }
.m-hero__inner { position: relative; padding: clamp(64px, 12vw, 132px) 0; }
.m-hero h1 { color: #f7f1e5; max-width: 17ch; }
.m-hero p { font-family: var(--da-font-serif); font-size: clamp(1.1rem, 2.4vw, 1.55rem); max-width: 48ch; color: #ece4d3; }
.m-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.m-hero .da-badge { margin-bottom: 18px; }
.m-hero--sub { background: var(--hero-grad, var(--da-primary)); }
.m-hero--sub .m-hero__inner { padding: clamp(52px, 8vw, 92px) 0; }
.m-hero--sub h1, .m-hero--sub p { color: #f7f1e5; }
/* Center the whole CTA block: the narrow max-width heading/paragraph blocks are
   auto-centered inside the text-align:center container, so heading + text +
   buttons all share one centered axis. */
.m-hero--sub h1 { max-width: 20ch; margin-left: auto; margin-right: auto; }
.m-hero--sub p { max-width: 52ch; margin-left: auto; margin-right: auto; }
.m-hero--sub .m-hero__cta { justify-content: center; }

/* hero brand motto — echoes the logo wordmark "Learn · Grow · Succeed" */
.m-hero__motto {
  font-family: var(--da-font-display); font-weight: 600;
  font-size: clamp(1.05rem, 2.2vw, 1.5rem); color: var(--da-highlight);
  letter-spacing: .04em; margin: 6px 0 2px;
}

/* ---- cards / grids ------------------------------------------------------ */
.m-grid { display: grid; gap: 20px; }
.m-grid--3 { grid-template-columns: repeat(3, 1fr); }
.m-grid--2 { grid-template-columns: repeat(2, 1fr); }
.m-grid--4 { grid-template-columns: repeat(4, 1fr); }

.m-course { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.m-course__cap { height: 116px; background: var(--hero-grad, var(--da-primary)); position: relative; }
.m-course:nth-child(3n+2) .m-course__cap { background: linear-gradient(135deg, var(--da-accent), var(--da-highlight)); }
.m-course:nth-child(3n) .m-course__cap { background: linear-gradient(135deg, var(--da-primary), var(--da-accent)); }
.m-course__cap .da-badge { position: absolute; top: 12px; left: 12px; }
.m-course__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.m-course__body h3 { font-family: var(--da-font-display); font-size: 1.28rem; margin: 0 0 6px; }
.m-course__body p { color: var(--da-muted); font-size: .94rem; margin: 0 0 14px; }
.m-course__meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--da-line); }
.m-course__price { font-family: var(--da-font-serif); font-weight: 600; font-size: 1.3rem; color: var(--da-heading); }
.m-course__lvl { font-size: 12px; color: var(--da-muted); font-weight: 600; }
.m-course.is-soon { opacity: .8; }

.m-feature { display: flex; gap: 14px; align-items: flex-start; }
.m-feature .m-ic { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--nav-active-bg, rgba(0,0,0,.06)); color: var(--nav-active-ink, var(--da-accent)); }
.m-feature .m-ic svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.m-feature h3 { font-family: var(--da-font-display); font-size: 1.22rem; margin: 2px 0 5px; }
.m-feature p { color: var(--da-muted); font-size: .94rem; margin: 0; }

/* split (image + text) */
.m-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: center; }
.m-split img { border-radius: var(--da-radius); box-shadow: var(--da-shadow); width: 100%; object-fit: cover; }
.m-split--rev .m-split__media { order: 2; }

/* pricing */
.m-price { display: flex; flex-direction: column; text-align: center; }
.m-price.is-feat { border-color: var(--da-accent); box-shadow: 0 12px 34px rgba(0,0,0,.12); }
.m-price h3 { font-family: var(--da-font-display); font-size: 1.4rem; margin: 0 0 4px; }
.m-price .m-price__amt { font-family: var(--da-font-serif); font-size: 2.6rem; font-weight: 600; color: var(--da-heading); line-height: 1.1; margin: 10px 0 2px; }
.m-price .m-price__unit { color: var(--da-muted); font-size: .88rem; }
.m-price ul { list-style: none; padding: 0; margin: 18px 0 22px; text-align: left; }
.m-price li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; color: var(--da-text); font-size: .94rem; }
.m-price li svg { width: 18px; height: 18px; flex: none; margin-top: 2px; stroke: var(--da-accent); fill: none; stroke-width: 2; }
.m-price .da-btn { margin-top: auto; }

/* quotes / testimonials */
.m-quote { display: flex; flex-direction: column; }
.m-quote blockquote { margin: 0 0 16px; font-family: var(--da-font-serif); font-size: 1.15rem; line-height: 1.5; color: var(--da-text); font-style: italic; }
.m-quote .m-who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.m-quote .m-who .av { width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; background: linear-gradient(135deg, var(--da-accent), var(--da-highlight)); color: #fff; font-weight: 700; }
.m-quote .m-who b { display: block; font-weight: 600; }
.m-quote .m-who small { color: var(--da-muted); }

/* instructor card */
.m-person { text-align: center; }
.m-person img { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; box-shadow: var(--da-shadow); }
.m-person h3 { font-family: var(--da-font-display); font-size: 1.3rem; margin: 0 0 2px; }
.m-person .m-role { color: var(--da-accent); font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.m-person p { color: var(--da-muted); font-size: .92rem; }

/* stat row */
.m-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.m-stat { text-align: center; }
.m-stat .n { font-family: var(--da-font-display); font-size: clamp(2rem, 4vw, 2.8rem); color: var(--da-heading); line-height: 1; }
.m-stat .k { color: var(--da-muted); font-size: .9rem; margin-top: 6px; }

/* steps */
.m-steps { counter-reset: step; display: grid; gap: 22px; }
.m-step { display: flex; gap: 18px; align-items: flex-start; }
.m-step .num { counter-increment: step; width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--da-primary); color: var(--btn-ink, #fff); font-family: var(--da-font-display); font-weight: 700; }
.m-step .num::before { content: counter(step); }
.m-step h3 { font-family: var(--da-font-display); font-size: 1.24rem; margin: 4px 0 5px; }
.m-step p { color: var(--da-muted); margin: 0; }

/* ---- forms -------------------------------------------------------------- */
.m-form { display: grid; gap: 16px; }
.m-field { display: grid; gap: 6px; }
.m-field label { font-weight: 600; font-size: .9rem; color: var(--da-heading); }
.m-field input, .m-field select, .m-field textarea {
  font-family: var(--da-font-body); font-size: 1rem; color: var(--da-text);
  background: var(--da-surface); border: 1.5px solid var(--da-line); border-radius: var(--da-radius-sm);
  padding: .7em .85em; width: 100%;
}
.m-field textarea { min-height: 120px; resize: vertical; }
.m-field input:focus, .m-field select:focus, .m-field textarea:focus { outline: none; border-color: var(--da-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--da-accent) 22%, transparent); }
.m-note { font-size: .84rem; color: var(--da-muted); }
.m-feedback { font-size: .95rem; padding: 10px 0; min-height: 1.4em; }
.m-feedback.ok { color: var(--da-accent); font-weight: 600; }
.m-feedback.err { color: #b0392c; font-weight: 600; }

/* login card centered */
.m-authwrap { min-height: 62vh; display: grid; place-items: center; padding: 48px 0; }
.m-authcard { width: 100%; max-width: 420px; }
.m-authcard h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
.m-authtabs { display: flex; gap: 6px; background: var(--da-cream-2); border: 1px solid var(--da-line); border-radius: 8px; padding: 4px; margin-bottom: 20px; }
.m-authtabs button { flex: 1; border: none; background: transparent; padding: 8px 12px; border-radius: 8px; font-weight: 600; color: var(--da-muted); cursor: pointer; font-family: var(--da-font-body); }
.m-authtabs button.on { background: var(--da-surface); color: var(--da-heading); box-shadow: var(--da-shadow-sm); }

.m-prose p { color: var(--da-text); max-width: 66ch; }
.m-prose h2 { margin-top: 1.6em; }
.m-center { text-align: center; }
.m-mt { margin-top: 22px; }
.m-mt-lg { margin-top: 40px; }
.m-empty { text-align: center; color: var(--da-muted); padding: 40px 0; font-family: var(--da-font-serif); font-size: 1.15rem; }

/* ---- mobile ------------------------------------------------------------- */
/* Collapse the inline nav into the hamburger at 1000px — well before the 8-link
   row would ever get tight (it still fits one line down to ~960px), so the nav
   never wraps to a second line. */
@media (max-width: 1000px) {
  .site-nav { position: fixed; inset: 62px 0 auto 0; flex: none; flex-direction: column; align-items: stretch;
    background: var(--da-bg); border-bottom: 1px solid var(--da-line); padding: 12px var(--da-space) 20px;
    gap: 2px; box-shadow: var(--da-shadow); display: none; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 4px; border-bottom: 1px solid var(--da-line); }
  .site-nav a.on { border-bottom-color: var(--da-line); }
  .site-burger { display: grid; place-items: center; }
  .site-nav .site-actions-inline { display: block; }
  .site-actions .da-btn { display: none; } /* Apply + Login live in the mobile menu */
  .m-grid--3, .m-grid--4 { grid-template-columns: 1fr 1fr; }
  .m-stats { grid-template-columns: 1fr 1fr; }
  .site-footer__row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .m-grid--2, .m-grid--3, .m-grid--4 { grid-template-columns: 1fr; }
  .m-split { grid-template-columns: 1fr; }
  .m-split--rev .m-split__media { order: 0; }
  .m-stats { grid-template-columns: 1fr 1fr; }
}
