/* ==========================================================================
   MentorLab: main.css
   Premium redesign with MentorLab green and orange brand colors.
   Dark-hero aesthetic, polished spacing and typography.
   ========================================================================== */

/* ---------------------------------------------------------- tokens */
:root {
  /* Brand colors sampled from the MentorLab logo */
  --color-primary: #43624D;
  --color-primary-dark: #304736;
  --color-primary-light: #58765F;
  --color-primary-soft: #E7EFE8;

  --color-accent: #F26A40;
  --color-accent-dark: #B84728;
  --color-accent-soft: #FFF0EA;
  --color-accent-glow: rgba(242, 106, 64, 0.18);

  /* Dark surface palette */
  --color-dark: #132018;
  --color-dark-surface: #1B2B20;
  --color-dark-border: rgba(255, 255, 255, 0.10);
  --color-dark-text: rgba(255, 255, 255, 0.88);
  --color-dark-muted: rgba(255, 255, 255, 0.60);

  /* Neutrals */
  --color-white: #FFFFFF;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F4F7F4;
  --color-bg-warm: #FAFAF8;
  --color-border: #DDE6DE;
  --color-border-strong: #C4D2C6;
  --color-text: #17251B;
  --color-text-muted: #58675B;

  /* Feedback */
  --color-error: #B03A2E;
  --color-error-soft: #FDECEA;
  --color-error-border: #F3C4BF;

  /* Type */
  --font-display: 'Outfit', 'Inter', system-ui, sans-serif;
  --font-editorial: 'Fraunces', Georgia, serif;
  --font-base: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.0625rem;
  --fs-lg: clamp(1.125rem, 1.6vw, 1.25rem);
  --fs-h3: clamp(1.15rem, 1.8vw, 1.4rem);
  --fs-h2: clamp(1.65rem, 3.2vw, 2.4rem);
  --fs-h1: clamp(2.1rem, 4.6vw, 3.5rem);

  --lh-tight: 1.15;
  --lh-snug: 1.38;
  --lh-base: 1.65;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --space-8: 3rem;
  --space-9: 4rem;
  --space-10: 5.5rem;

  --section-y: clamp(3.5rem, 7vw, 6rem);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 999px;

  /* Brand-tinted shadows */
  --shadow-sm: 0 1px 3px rgba(67, 98, 77, 0.08);
  --shadow-md: 0 8px 28px rgba(67, 98, 77, 0.12);
  --shadow-lg: 0 20px 50px rgba(67, 98, 77, 0.16);
  --shadow-glow: 0 0 60px rgba(242, 106, 64, 0.10);

  --header-height: 72px;
  --container-max: 1200px;
}

/* ----------------------------------------------------------- reset */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg { max-width: 100%; display: block; }

img { height: auto; }

h1, h2, h3, h4 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--color-text);
}

h1 { font-size: var(--fs-h1); letter-spacing: -0.03em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-base); }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-light); }

ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25rem; }

fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  padding: 0.05em 0.35em;
}

[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* --------------------------------------------------------- helpers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.text-accent { color: var(--color-accent); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: var(--space-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-accent);
}

.section { padding-block: var(--section-y); }
.section--alt { background: var(--color-bg-alt); }
.section[id] { scroll-margin-top: calc(var(--header-height) + 20px); }

.section__head {
  max-width: 60ch;
  margin-bottom: var(--space-8);
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__head--center .eyebrow { justify-content: center; }

.section__note {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 200;
  padding: 0.65rem 1rem;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: var(--space-4);
  color: var(--color-white);
}

/* ---------------------------------------------------------- views */
.view { position: relative; }

.view.is-active {
  animation: viewIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.view:focus { outline: none; }

/* --------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #FBF9F4;
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid rgba(28, 25, 23, 0.12);
}

.header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: var(--header-height);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #1C1917;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo:hover { color: var(--color-primary); }

.site-header .logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.logo__image {
  display: block;
  width: clamp(170px, 18vw, 220px);
  height: auto;
}

/* ------------------------------------------------------ nav (desktop) */
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-left: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: #57534E;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.site-nav__link:hover {
  color: var(--color-primary);
  background: rgba(67, 98, 77, 0.07);
}

.site-nav__link[aria-current="page"] {
  color: var(--color-primary);
  font-weight: 600;
}

.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--color-accent);
}

.header__back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid rgba(28, 25, 23, 0.16);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(67, 98, 77, 0.04);
  transition: background-color 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.header__back:hover {
  background: rgba(67, 98, 77, 0.08);
  border-color: rgba(67, 98, 77, 0.28);
  color: var(--color-primary);
}

/* ---------------------------------------------------- mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0 10px;
  background: transparent;
  border: 1px solid rgba(28, 25, 23, 0.18);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--color-primary);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ------------------------------------------------------ home hero */
#view-home { background: #F7F4EF; }

.home-hero {
  padding-block: clamp(3.5rem, 7vw, 6.5rem) clamp(2.5rem, 5vw, 4rem);
  background:
    radial-gradient(ellipse 640px 420px at 90% 15%, rgba(234, 88, 12, 0.07), transparent 70%),
    #F7F4EF;
  color: #1C1917;
}

.home-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.home-hero__content {
  max-width: 42rem;
}

.home-hero .eyebrow {
  color: var(--color-primary);
}

.home-hero .eyebrow::before {
  background: var(--color-accent);
}

.home-hero__title {
  font-family: var(--font-editorial);
  font-size: clamp(2.8rem, 5.4vw, 5rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin-bottom: var(--space-5);
  color: #1C1917;
}

.home-hero__title .text-accent {
  color: var(--color-primary);
  font-weight: 500;
  font-style: italic;
}

.home-hero__lede {
  max-width: 42rem;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: #57534E;
  line-height: 1.7;
}

.home-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.35rem;
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(28, 25, 23, 0.13);
  color: #57534E;
  font-size: var(--fs-xs);
  font-weight: 600;
}

.home-hero__meta span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 0.5rem 1px 0;
  border-radius: 50%;
  background: var(--color-accent);
}

.home-hero__visual {
  position: relative;
  padding: 0 0 1.5rem 1rem;
}

.home-hero__visual > img {
  width: 100%;
  aspect-ratio: 1.08;
  object-fit: cover;
  border: 1px solid rgba(28, 25, 23, 0.12);
  border-radius: 1.25rem 1.25rem 1.25rem 0.35rem;
  box-shadow: 0 24px 60px rgba(28, 25, 23, 0.13);
}

.home-hero__note {
  position: absolute;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 0.3rem;
  max-width: 270px;
  padding: 1rem 1.2rem;
  border-radius: 0.75rem;
  background: var(--color-primary-dark);
  color: #F7F4EF;
  box-shadow: 0 12px 30px rgba(28, 25, 23, 0.2);
}

.home-hero__note span {
  color: #F6A17E;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.home-hero__note strong {
  font-family: var(--font-editorial);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.25;
}

/* --------------------------------------------------------- footer */
.site-footer {
  margin-top: 0;
  padding-block: var(--space-9) var(--space-6);
  background: #FBF9F4;
  color: #1C1917;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.7fr repeat(4, 1fr);
  gap: var(--space-7);
  padding-bottom: var(--space-7);
  border-bottom: 1px solid rgba(28, 25, 23, 0.12);
}

.logo--footer {
  color: #1C1917;
}

.logo--footer .logo__image { width: 210px; }

.footer__desc {
  margin-top: var(--space-4);
  font-size: var(--fs-sm);
  line-height: 1.75;
  color: #57534E;
  max-width: 36ch;
}

.footer__col h4 {
  margin-bottom: var(--space-4);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 600;
}

.footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  font-size: var(--fs-sm);
}

.footer__list a,
.footer__list li {
  color: #57534E;
  transition: color 0.25s ease;
}

.footer__list a:hover { color: var(--color-accent-dark); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-5);
  font-size: var(--fs-xs);
  color: #6F6C62;
}

.footer__bottom p { margin: 0; }

/* ------------------------------------------------- dark CTA banner */
.cta-banner {
  padding-block: clamp(4rem, 8vw, 7rem);
  background:
    radial-gradient(ellipse 700px 400px at 50% 40%, rgba(242, 106, 64, 0.10) 0%, transparent 70%),
    radial-gradient(ellipse 900px 500px at 20% 80%, rgba(67, 98, 77, 0.18) 0%, transparent 70%),
    var(--color-dark);
  color: var(--color-dark-text);
  text-align: center;
}

.cta-banner__inner {
  max-width: 640px;
}

.cta-banner__eyebrow {
  color: var(--color-accent);
  justify-content: center;
}

.cta-banner__eyebrow::before {
  background: var(--color-accent);
}

.cta-banner__title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: var(--color-white);
  margin-bottom: var(--space-4);
}

.cta-banner__text {
  font-size: var(--fs-lg);
  color: var(--color-dark-muted);
  line-height: 1.65;
  margin-bottom: var(--space-6);
}

.cta-banner__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

/* -------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
