/* ============================================================
   base.css - shared across every page
   Design tokens live at the top. Change colours/spacing here
   and every page updates.
   ============================================================ */

:root {
  --bg: #161616;
  --surface: #1E1E1D;
  --surface-hover: #262625;
  --border: #302F2D;
  --text-primary: #ECEBE8;
  --text-secondary: #9C9A96;
  --text-muted: #706E6A;
  --accent: #6B9878;
  --accent-deep: #33503E;
  --accent-text-on-light: #2E3D1F;
  --hero-image: url('../images/hero-splash.jpg');
  --accent-soft: #182018;
  --negative: #C1591F;
  --negative-soft: #2E2116;
  --icon-inline: 20px;
  --icon-feature: 36px;
}

[data-theme="light"] {
  --bg: #F7F6F3;
  --surface: #FFFFFF;
  --surface-hover: #F0EFEB;
  --border: #E2E0DA;
  --text-primary: #1E1E1D;
  --text-secondary: #5C5A55;
  --text-muted: #8A8880;
  --accent: #3F6249;
  --accent-deep: #294736;
  --accent-soft: #E7EFE8;
  --negative: #A6491A;
  --negative-soft: #FBEBE1;
}

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

body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 48px;
}

nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.25s ease;
}

nav a:hover::after {
    width: 100%;
}

.section-label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

/* ---------- Footer ---------- */

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

footer .wrap {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
}

/* ---------- Focus states ---------- */

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

/* ---------- Motion: page fade ---------- */

body {
    opacity: 0;
    transition: opacity 0.55s ease;
}

body.is-loaded {
    opacity: 1;
}

/* ---------- Motion: scroll reveal ---------- */

.reveal {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1), transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Role & impact: bolded key phrases ---------- */

.impact-card p strong {
    color: var(--text-primary);
    font-weight: 600;
}

.theme-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover { border-color: var(--accent-deep);
}

.theme-toggle svg {
    position: absolute;
    width: 20px;
    height: 20px;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-toggle .icon-sun { opacity: 1; transform: rotate(0deg) scale(1);
}

.theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.5);
}

[data-theme="light"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(90deg) scale(0.5);
}

[data-theme="light"] .theme-toggle .icon-moon { opacity: 1; transform: rotate(0deg) scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .theme-toggle svg { transition: none; }
}

.hamburger-btn svg { width: 26px; height: 26px; display: block;
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 40;
}

.mobile-nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 78%;
    max-width: 320px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    z-index: 50;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding: 32px 28px;
}

.mobile-nav-panel.is-open {
    transform: translateX(0);
}

.mobile-nav-panel .close-btn {
    align-self: flex-end;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    margin-bottom: 32px;
}

.mobile-nav-panel .close-btn svg { width: 22px; height: 22px; display: block;
}

.mobile-nav-panel a {
    font-family: 'Newsreader', serif;
    font-size: 22px;
    color: var(--text-primary);
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s ease;
}

.mobile-nav-panel a:hover { color: var(--accent);
}

.page-shell {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
    .mobile-nav-panel, .mobile-nav-overlay, .page-shell { transition: none; }
}
