/* ==========================================================================
   LENR Invest — pure HTML/CSS/JS stylesheet
   Palette derived from the original site (colors_standard.min.css) and the
   brand logo / hero imagery.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Brand */
  --navy:        #112855;   /* cassiopeia-color-primary */
  --link:        #224faa;   /* link color */
  --hover:       #424077;   /* link hover color */
  --soft:        #f0f4fb;   /* template-bg-light */
  --ink:         #495057;   /* template-text-dark */
  --deep:        #001B4C;   /* template-special-color */

  /* Accents sampled from logo + leaf */
  --teal:        #23829a;
  --teal-dark:   #17647a;
  --teal-soft:   #e4f2f6;
  --leaf:        #5f8f4e;
  --leaf-soft:   #eef4ea;

  /* Surfaces & text */
  --bg:          #ffffff;
  --surface:     #ffffff;
  --surface-2:   var(--soft);
  --text:        #1d2433;
  --text-soft:   var(--ink);
  --muted:       #6b7488;
  --border:      #e2e8f4;
  --border-2:    #cdd7ea;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-serif: Georgia, "Times New Roman", Times, serif;

  /* Shape */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Elevation */
  --sh-sm: 0 1px 2px rgba(17, 40, 85, .06), 0 1px 3px rgba(17, 40, 85, .05);
  --sh-md: 0 4px 12px rgba(17, 40, 85, .07), 0 2px 4px rgba(17, 40, 85, .04);
  --sh-lg: 0 18px 40px rgba(17, 40, 85, .10), 0 6px 14px rgba(17, 40, 85, .05);
  --sh-xl: 0 30px 70px rgba(1, 27, 76, .18);

  /* Metrics */
  --container: 1180px;
  --header-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

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

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy); font-weight: 700; letter-spacing: -.015em; }
p { margin: 0 0 1.1em; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--link); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--hover); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 880px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -60px; left: 16px; z-index: 2000;
  background: var(--navy); color: #fff; padding: 12px 20px;
  border-radius: 0 0 var(--r-sm) var(--r-sm); font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- 3. Header & navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.site-header.is-stuck { box-shadow: var(--sh-md); border-bottom-color: var(--border); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand-logo { width: 232px; height: 50px; object-fit: contain; object-position: left center; }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 10px;
  background: transparent; border: 1px solid var(--border-2); border-radius: var(--r-sm);
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle-bar {
  display: block; width: 20px; height: 2px; background: var(--navy); border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--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); }

.primary-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 4px; }
.nav-item { position: relative; }
.nav-link {
  display: block; padding: 10px 15px; border-radius: var(--r-sm);
  color: var(--navy); font-weight: 600; font-size: 15.5px; letter-spacing: -.01em;
}
.nav-link:hover { color: var(--link); background: var(--soft); }
.nav-link.is-active { color: var(--link); }
.nav-link.is-active::after {
  content: ""; display: block; height: 2px; margin-top: 5px; border-radius: 2px;
  background: linear-gradient(90deg, var(--teal), var(--link));
}

.submenu-toggle {
  display: none; position: absolute; right: 4px; top: 8px;
  width: 30px; height: 34px; background: transparent; border: 0;
  color: var(--navy); font-size: 13px; line-height: 1;
}
.submenu-toggle[aria-expanded="true"] span { transform: rotate(180deg); }

.submenu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--sh-lg); padding: 8px; z-index: 40;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
}
.nav-item:hover > .submenu,
.nav-item.is-open > .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a {
  display: block; padding: 9px 12px; border-radius: var(--r-sm);
  font-size: 15px; color: var(--text); font-weight: 500;
}
.submenu a:hover { background: var(--soft); color: var(--link); }

/* ---------- 4. Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--r-pill); border: 1.5px solid transparent;
  font-weight: 650; font-size: 15.5px; line-height: 1.2; text-align: center;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3d7d 55%, var(--teal-dark) 130%);
  color: #fff; box-shadow: var(--sh-md);
}
.btn-primary:hover { color: #fff; box-shadow: var(--sh-lg); }
.btn-ghost { border-color: var(--border-2); color: var(--navy); background: transparent; }
.btn-ghost:hover { border-color: var(--navy); background: var(--soft); color: var(--navy); }
.btn-outline { border-color: var(--border-2); color: var(--navy); background: var(--surface); }
.btn-outline:hover { border-color: var(--link); color: var(--link); background: var(--soft); }
.btn-sm { padding: 9px 18px; font-size: 14.5px; }
.btn-block { width: 100%; }

.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 650; font-size: 15px; color: var(--link);
  border-bottom: 1.5px solid transparent;
}
.text-link:hover { border-bottom-color: currentColor; }
.ext { font-size: 13px; line-height: 1; }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 88% -10%, rgba(35, 130, 154, .16), transparent 60%),
    radial-gradient(900px 480px at 5% 105%, rgba(95, 143, 78, .13), transparent 62%),
    linear-gradient(168deg, #f7faff 0%, #eef4fb 48%, #ffffff 100%);
  padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 9vw, 118px);
  border-bottom: 1px solid var(--border);
}

.hero-glow {
  position: absolute; top: -180px; right: -140px; width: 620px; height: 620px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(35, 130, 154, .16), transparent 65%);
  filter: blur(12px);
}

/* Radiating sunburst that echoes the LENR Invest logo mark */
.hero-rays {
  position: absolute; top: -180px; right: -220px; width: 760px; height: 760px;
  pointer-events: none; opacity: .38;
  -webkit-mask-image: radial-gradient(closest-side circle at 50% 0%, #000 25%, transparent 78%);
  mask-image: radial-gradient(closest-side circle at 50% 0%, #000 25%, transparent 78%);
}
.hero-rays span {
  position: absolute; top: 0; left: 50%; width: 30%; height: 100%;
  transform-origin: 50% 0;
  background: linear-gradient(180deg, rgba(35, 130, 154, .3), rgba(35, 130, 154, 0) 72%);
  filter: blur(1.5px);
}
.hero-rays span:nth-child(1) { transform: rotate(0deg); }
.hero-rays span:nth-child(2) { transform: rotate(45deg); }
.hero-rays span:nth-child(3) { transform: rotate(90deg); }
.hero-rays span:nth-child(4) { transform: rotate(135deg); }
.hero-rays span:nth-child(5) { transform: rotate(180deg); }
.hero-rays span:nth-child(6) { transform: rotate(225deg); }
.hero-rays span:nth-child(7) { transform: rotate(270deg); }
.hero-rays span:nth-child(8) { transform: rotate(315deg); }

.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}

.eyebrow {
  display: inline-block; margin: 0 0 18px; padding: 7px 15px;
  border-radius: var(--r-pill); background: rgba(255, 255, 255, .8);
  border: 1px solid var(--border-2);
  color: var(--teal-dark); font-size: 13px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.4rem, 5.4vw, 4.1rem);
  letter-spacing: -.03em; line-height: 1.04; margin: 0 0 20px;
  color: var(--deep);
}
.hero-lead {
  font-size: clamp(1.06rem, 1.6vw, 1.25rem);
  color: var(--text-soft); max-width: 34ch; margin: 0 0 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }

.hero-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px; padding-top: 30px; border-top: 1px solid var(--border-2);
}
.hero-facts li { display: flex; flex-direction: column; gap: 4px; }
.hero-facts strong {
  font-size: clamp(1.35rem, 2.3vw, 1.75rem); color: var(--navy);
  letter-spacing: -.02em; line-height: 1.1;
}
.hero-facts span { font-size: 13.5px; color: var(--muted); line-height: 1.4; }

.hero-media { position: relative; }
.leaf-frame {
  position: relative; z-index: 2; border-radius: var(--r-xl); overflow: hidden;
  box-shadow: var(--sh-xl); border: 1px solid rgba(255, 255, 255, .7);
  transform: rotate(-1.4deg);
}
.leaf-frame img { width: 100%; height: auto; display: block; }

.sunburst {
  position: absolute; z-index: 1; left: -60px; bottom: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, var(--teal) 0deg 7deg, transparent 7deg 22deg);
  opacity: .16;
  -webkit-mask-image: radial-gradient(closest-side circle, #000 50%, transparent 92%);
  mask-image: radial-gradient(closest-side circle, #000 50%, transparent 92%);
  animation: spin 70s linear infinite;
}
.sunburst-core {
  position: absolute; inset: 34%; border-radius: 50%; background: var(--bg);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 6. Sections ---------- */
.section { padding: clamp(64px, 8vw, 104px) 0; }
.section-alt {
  background: linear-gradient(180deg, var(--soft) 0%, #e9f0fa 100%);
  border-block: 1px solid var(--border);
}

.section-head { max-width: 720px; margin: 0 0 clamp(36px, 5vw, 56px); }
.section-kicker {
  margin: 0 0 12px; color: var(--teal-dark); font-size: 13px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
}
.section-title { font-size: clamp(1.9rem, 3.6vw, 2.7rem); letter-spacing: -.025em; margin: 0 0 16px; }
.section-intro { font-size: clamp(1.03rem, 1.5vw, 1.16rem); color: var(--text-soft); margin: 0; }

/* ---------- 7. Feature grid (LENR) ---------- */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 22px; margin-bottom: 30px;
}
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 28px 26px; box-shadow: var(--sh-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: var(--border-2); }
.feature-icon {
  width: 50px; height: 50px; border-radius: var(--r-md); display: grid; place-items: center;
  background: linear-gradient(140deg, var(--teal-soft), #d3e9ef);
  color: var(--teal-dark); margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.16rem; margin-bottom: 10px; }
.feature-card p { margin: 0; font-size: 15.5px; color: var(--text-soft); }

/* ---------- 8. Callouts & chips ---------- */
.callout {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--teal);
  border-radius: var(--r-md); padding: 26px 28px; box-shadow: var(--sh-sm); margin-bottom: 22px;
}
.callout-accent { background: linear-gradient(120deg, var(--leaf-soft), var(--teal-soft)); border-left-color: var(--leaf); }
.callout-title { font-size: 1.12rem; margin: 0 0 12px; }
.callout-text { margin: 0; font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--navy); font-weight: 500; }
.callout p { margin-bottom: .8em; }
.callout p:last-child { margin-bottom: 0; }

.chip-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.chip {
  display: inline-block; padding: 7px 15px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .82); border: 1px solid var(--border-2);
  font-size: 14px; font-weight: 600; color: var(--teal-dark);
}

/* ---------- 9. Portfolio ---------- */
.portfolio-lead {
  margin: 0 0 26px; color: var(--navy); font-weight: 600; font-size: 1.05rem;
}

.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.portfolio-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--sh-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.portfolio-card:hover { transform: translateY(-5px); box-shadow: var(--sh-lg); }
.portfolio-logo {
  display: grid; place-items: center; min-height: 150px; padding: 26px 22px;
  background: linear-gradient(160deg, #f7fafe, #eef3fa);
  border-bottom: 1px solid var(--border);
}
.portfolio-logo img { max-height: 88px; width: auto; object-fit: contain; }
.portfolio-body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.portfolio-name { font-size: 1.2rem; margin-bottom: 12px; }
.portfolio-text { font-size: 15.5px; color: var(--text-soft); margin-bottom: 18px; flex: 1; }
.portfolio-text em { color: var(--text); }

/* ---------- 10. Downloads ---------- */
.download-list { display: grid; gap: 16px; }
.download-item {
  display: flex; align-items: center; gap: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 22px 26px; box-shadow: var(--sh-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.download-item:hover { transform: translateX(4px); box-shadow: var(--sh-md); border-color: var(--border-2); }
.download-icon {
  flex: 0 0 auto; width: 50px; height: 50px; border-radius: var(--r-md);
  display: grid; place-items: center; color: #fff;
}
.download-icon-video { background: linear-gradient(140deg, #e2503c, #a72a19); }
.download-icon-pdf   { background: linear-gradient(140deg, #3c6fb5, #1d3f7a); }
.download-body { flex: 1; min-width: 0; }
.download-title { font-size: 1.06rem; margin: 0 0 4px; }
.download-meta { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- 11. Contact ---------- */
.contact-card {
  display: grid; justify-items: center; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: clamp(32px, 5vw, 54px); box-shadow: var(--sh-lg);
}
.contact-heading { font-size: 1.3rem; margin-bottom: 8px; }
.contact-text { color: var(--text-soft); font-size: 15.5px; margin-bottom: 0; }

.email-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  margin-top: 26px; padding: 14px 18px;
  background: var(--soft); border: 1px solid var(--border); border-radius: var(--r-md);
}
.email-link { font-weight: 700; font-size: clamp(1.05rem, 2.2vw, 1.3rem); word-break: break-all; }
.copy-btn {
  padding: 8px 16px; border-radius: var(--r-pill); border: 1px solid var(--border-2);
  background: var(--surface); color: var(--navy); font-size: 13.5px; font-weight: 650;
  transition: background-color .18s var(--ease), border-color .18s var(--ease);
}
.copy-btn:hover { background: var(--teal-soft); border-color: var(--teal); color: var(--teal-dark); }
.copy-status { margin: 12px 0 0; font-size: 14px; color: var(--leaf); min-height: 1.2em; }

/* ---------- 12. Terms ---------- */
/* Page hero used by standalone pages (e.g. terms.html) */
.page-hero {
  background:
    radial-gradient(700px 340px at 85% -20%, rgba(35, 130, 154, .14), transparent 62%),
    linear-gradient(168deg, #f7faff 0%, #eef4fb 60%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
  padding: clamp(48px, 7vw, 88px) 0;
}
.page-hero .section-title { margin-bottom: 12px; }
.back-link-wrap { margin: 32px 0 0; text-align: center; }

.terms-list { display: grid; gap: 12px; }
.terms-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  overflow: hidden; box-shadow: var(--sh-sm);
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.terms-item[open] { box-shadow: var(--sh-md); border-color: var(--border-2); }
.terms-item summary {
  display: flex; align-items: center; gap: 14px; cursor: pointer; list-style: none;
  padding: 18px 22px; font-weight: 650; font-size: 1.02rem; color: var(--navy);
}
.terms-item summary::-webkit-details-marker { display: none; }
.terms-item summary::after {
  content: ""; margin-left: auto; flex: 0 0 auto;
  width: 10px; height: 10px; border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal);
  transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease);
}
.terms-item[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.terms-index {
  font-size: 12.5px; font-weight: 700; color: var(--teal-dark);
  background: var(--teal-soft); padding: 4px 9px; border-radius: var(--r-sm); letter-spacing: .05em;
}
.terms-body { padding: 0 22px 20px 22px; }
.terms-body p { margin: 0; color: var(--text-soft); font-size: 15.5px; }

/* ---------- 13. Quote band ---------- */
.quote-band {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--deep) 0%, var(--navy) 48%, var(--teal-dark) 120%);
  color: #fff; padding: clamp(48px, 6vw, 72px) 0;
}
.quote-band::after {
  content: ""; position: absolute; right: -140px; top: -140px; width: 420px; height: 420px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .1), transparent 68%);
}
.quote-inner { position: relative; z-index: 2; text-align: center; }
.quote-tagline {
  margin: 0 0 22px; font-size: 13px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255, 255, 255, .68);
}
.quote-body { max-width: 780px; margin: 0 auto; }
.quote-text {
  margin: 0 0 14px; font-family: var(--font-serif); font-style: italic;
  font-size: clamp(1.2rem, 2.4vw, 1.75rem); line-height: 1.45; color: #fff;
  transition: opacity .35s var(--ease);
}
.quote-author {
  display: block; font-style: normal; font-size: 14.5px; font-weight: 600;
  letter-spacing: .05em; color: rgba(255, 255, 255, .75);
  transition: opacity .35s var(--ease);
}
.quote-body.is-fading .quote-text, .quote-body.is-fading .quote-author { opacity: 0; }

.quote-dots { display: flex; justify-content: center; gap: 9px; margin-top: 28px; }
.quote-dot {
  width: 9px; height: 9px; border-radius: 50%; padding: 0;
  background: rgba(255, 255, 255, .34); border: 0; transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.quote-dot:hover { background: rgba(255, 255, 255, .6); }
.quote-dot.is-active { background: #fff; transform: scale(1.25); }

/* ---------- 14. Footer ---------- */
.site-footer { background: var(--deep); color: rgba(255, 255, 255, .72); }
.footer-inner {
  display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: clamp(28px, 5vw, 64px);
  padding: clamp(48px, 6vw, 72px) 24px 36px;
}
/* The logo PNG has transparent corners and a white band, so it is placed on a
   white chip rather than colour-inverted (which would flatten the sunburst). */
.footer-logo {
  width: 218px; height: 58px; object-fit: contain; object-position: center;
  background: #fff; border-radius: 10px; padding: 6px 12px; margin-bottom: 18px;
}
.footer-tagline { font-size: 14.5px; max-width: 40ch; margin: 0; color: rgba(255, 255, 255, .6); }
.footer-heading {
  color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: 16px;
}
.footer-nav li { margin-bottom: 9px; }
.footer-nav a { color: rgba(255, 255, 255, .72); font-size: 15px; }
.footer-nav a:hover { color: #fff; }

.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px;
  padding: 22px 24px; border-top: 1px solid rgba(255, 255, 255, .12);
}
.footer-bottom p { margin: 0; font-size: 14px; }
.footer-note { color: rgba(255, 255, 255, .5); }
.footer-note a { color: rgba(255, 255, 255, .8); border-bottom: 1px solid rgba(255, 255, 255, .3); }
.footer-note a:hover { color: #fff; }

/* ---------- 15. Back to top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 800;
  width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: var(--navy); color: #fff; display: grid; place-items: center;
  box-shadow: var(--sh-lg);
  opacity: 0; transform: translateY(10px) scale(.9);
  transition: opacity .25s var(--ease), transform .25s var(--ease), background-color .2s var(--ease);
}
.to-top.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.to-top:hover { background: var(--teal-dark); }

/* ---------- 16. Reveal on scroll ---------- */
/* Only hidden when JS is present to bring them back; without JS everything stays visible. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 17. Responsive ---------- */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { max-width: 620px; order: -1; }
  .sunburst { left: auto; right: -50px; bottom: -50px; width: 170px; height: 170px; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  :root { --header-h: 68px; }
  .nav-toggle { display: flex; }
  .brand-logo { width: 178px; height: 40px; }

  .primary-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--sh-lg);
    padding: 12px 20px 22px;
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
  }
  .primary-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-item { border-bottom: 1px solid var(--border); }
  .nav-item:last-child { border-bottom: 0; }
  .nav-link { padding: 14px 4px; font-size: 16.5px; }
  .nav-link.is-active::after { display: none; }
  .nav-link.is-active { color: var(--link); }

  .submenu-toggle { display: block; }
  .nav-item { position: relative; padding-right: 42px; }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-left: 2px solid var(--border-2);
    border-radius: 0; padding: 2px 0 8px 14px; margin: 0 0 8px;
    display: none;
  }
  .nav-item.is-open > .submenu { display: block; }
  .submenu a { padding: 8px 10px; font-size: 15px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .sunburst { display: none; }
  .hero-facts { grid-template-columns: 1fr; gap: 16px; }
  .hero-facts li { flex-direction: row; align-items: baseline; gap: 12px; }
  .hero-facts strong { min-width: 108px; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .download-item { flex-wrap: wrap; }
  .download-item .btn { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .email-row { flex-direction: column; align-items: flex-start; }
  .terms-item summary { font-size: .98rem; padding: 16px 18px; }
  .terms-body { padding: 0 18px 18px; }
}

/* ---------- 18. Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .to-top, .quote-band, .nav-toggle, .primary-nav, .hero-rays, .sunburst { display: none !important; }
  body { font-size: 12pt; color: #000; background: #fff; }
  .section { padding: 1.2em 0; }
  .terms-item { break-inside: avoid; border: 1px solid #999; box-shadow: none; }
  .terms-item[open] .terms-body, .terms-body { display: block !important; }
  a { color: #000; text-decoration: underline; }
}
