/* ==========================================================================
   REALSMEVENTURES.COM — Version 1
   Pure HTML/CSS implementation per Developer-Ready Single-Page Specification
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --realsme-orange: #B7642D;
  --realsme-orange-deep: #9A5325;
  --realsme-charcoal: #2F3133;
  --charcoal-deep: #26282A;
  --surface-warm: #F6F2EB;
  --surface-ivory: #FBF8F2;
  --text-mid: #62676B;
  --line-soft: #D9CDBE;
  --on-dark: #F3EEE5;
  --on-dark-mid: #C9C3B8;

  --font-heading: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", Aptos, Arial, sans-serif;
  --font-script: "Caveat", "Segoe Script", cursive;

  --container: 1220px;
  --radius: 10px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;              /* ~17px desktop */
  line-height: 1.65;
  color: var(--realsme-charcoal);
  background: var(--surface-warm);
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; line-height: 1.15; margin: 0 0 0.6em; }

h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: -0.008em; }
h3 { font-size: 1.25rem; font-family: var(--font-body); font-weight: 700; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--realsme-orange); }
a:hover { color: var(--realsme-orange-deep); }

/* Visible focus for every interactive element */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.nav-toggle:focus-visible + .nav-toggle-label {
  outline: 3px solid var(--realsme-orange);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Anchor offset below sticky header */
section[id] { scroll-margin-top: 96px; }

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 64px);
}

.section { padding-block: clamp(56px, 8vw, 104px); }
.section-ivory { background: var(--surface-ivory); }
.section-band {
  background: var(--surface-ivory);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.section-dark {
  background: var(--charcoal-deep);
  color: var(--on-dark);
}
.section-dark h2, .section-dark h3 { color: #FFFFFF; }
.section-dark p { color: var(--on-dark); }

/* Skip link */
.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  background: var(--realsme-charcoal);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- Eyebrows, notes, annotations ---------- */
.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--realsme-orange);
  margin-bottom: 0.9em;
}

.section-intro { color: var(--text-mid); max-width: 62ch; }

.fine-note {
  color: var(--text-mid);
  font-size: 0.9375rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 18px;
  margin-top: clamp(28px, 4vw, 44px);
  max-width: 70ch;
}
.fine-note-light { color: var(--on-dark-mid); border-top-color: rgba(255,255,255,0.18); }

.annotation, .side-note {
  font-family: var(--font-script);
  font-size: 1.35rem;
  line-height: 1.25;
  color: var(--realsme-charcoal);
}
.annotation-light { color: var(--on-dark); }
.annotation-rule {
  display: block;
  width: 44px; height: 3px;
  background: var(--realsme-orange);
  margin-top: 10px;
  border-radius: 2px;
}

.pull-line {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 1.6em;
  font-size: 1.05rem;
}
.pull-dash {
  flex: none;
  width: 34px; height: 3px;
  background: var(--realsme-orange);
  border-radius: 2px;
  transform: translateY(-4px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 13px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--realsme-orange); color: #fff; }
.btn-primary:hover { background: var(--realsme-orange-deep); color: #fff; }
.btn-ghost {
  color: var(--realsme-charcoal);
  border-color: transparent;
  text-decoration: underline;
  text-decoration-color: var(--realsme-orange);
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
  padding-inline: 10px;
}
.btn-ghost:hover { color: var(--realsme-orange-deep); }
.btn-outline {
  border-color: var(--realsme-orange);
  color: var(--realsme-orange);
  background: transparent;
  padding: 10px 18px;
  font-size: 0.95rem;
}
.btn-outline:hover { background: var(--realsme-orange); color: #fff; }

.text-link {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--realsme-orange);
  padding-bottom: 2px;
}
.text-link:hover { color: var(--realsme-orange-deep); }
.text-link-light { color: var(--on-dark); border-bottom-color: var(--realsme-orange); }
.text-link-light:hover { color: #fff; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 1.8em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 242, 0.96);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: saturate(1.2) blur(6px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  min-height: 86px;
}

.brand { flex: none; display: inline-flex; }
.brand-logo { height: 52px; width: auto; }

.site-nav { margin-left: auto; }
.site-nav ul {
  list-style: none;
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  margin: 0; padding: 0;
}
.site-nav a {
  display: inline-block;
  white-space: nowrap;
  padding: 8px 2px;
  color: var(--realsme-charcoal);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--realsme-orange);
  border-bottom-color: var(--realsme-orange);
}

.header-tagline {
  margin: 0;
  padding-left: clamp(16px, 2vw, 28px);
  border-left: 1px solid var(--line-soft);
  font-style: italic;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-mid);
}

/* Hamburger (CSS-only) */
.nav-toggle { position: absolute; opacity: 0; }
.nav-toggle-label {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  margin-left: auto;
  cursor: pointer;
  border-radius: 8px;
}
.nav-toggle-bar {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--realsme-charcoal);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 860px) {
  .header-inner { min-height: 68px; }
  .brand-logo { height: 42px; }
  .header-tagline { display: none; }
  .nav-toggle-label { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--surface-ivory);
    border-bottom: 1px solid var(--line-soft);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 16px;
  }
  .site-nav a {
    display: block;
    padding: 12px 4px;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line-soft);
  }
  .site-nav li:last-child a { border-bottom-color: transparent; }

  .nav-toggle:checked ~ .site-nav { max-height: 420px; }
  .nav-toggle:checked + .nav-toggle-label .nav-toggle-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle:checked + .nav-toggle-label .nav-toggle-bar:nth-child(2) { opacity: 0; }
  .nav-toggle:checked + .nav-toggle-label .nav-toggle-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(180deg, var(--surface-ivory) 0%, var(--surface-warm) 100%);
  padding-block: clamp(48px, 7vw, 96px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-copy .lead {
  font-size: 1.2rem;
  color: var(--realsme-charcoal);
  max-width: 54ch;
}
.hero-copy p { max-width: 58ch; }
.hero-statement { margin-top: 1.2em; }
.hero-statement strong { color: var(--realsme-charcoal); }

.hero-visual { margin: 0; position: relative; }
.hero-visual img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 18px 40px -18px rgba(47, 49, 51, 0.35);
}
.hero-visual .annotation {
  position: absolute;
  right: 18px; bottom: 18px;
  background: rgba(251, 248, 242, 0.9);
  padding: 10px 16px 12px;
  border-radius: 8px;
}

/* ---------- Split sections (Doing Layer / New Ventures) ---------- */
.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.split-grid-reverse { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }

.split-visual { margin: 0; position: relative; }
.split-visual img { width: 100%; border-radius: var(--radius); }
.split-visual .annotation {
  position: absolute;
  left: 18px; bottom: 18px;
  background: rgba(251, 248, 242, 0.9);
  padding: 10px 16px 12px;
  border-radius: 8px;
}
.section-dark .split-visual .annotation {
  background: rgba(38, 40, 42, 0.85);
}

/* ---------- Section heads with side note ---------- */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 3fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  margin-bottom: clamp(32px, 4vw, 52px);
}
.section-head .side-note { justify-self: end; text-align: left; margin-top: 8px; }

/* ---------- Role grid ---------- */
.role-grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.role {
  padding: 8px clamp(18px, 2.4vw, 34px);
  border-left: 1px solid var(--line-soft);
}
.role:first-child { border-left: none; padding-left: 0; }
.role-icon {
  display: inline-flex;
  width: 48px; height: 48px;
  color: var(--realsme-orange);
  margin-bottom: 14px;
}
.role-icon svg { width: 100%; height: 100%; }
.role h3 { margin-bottom: 0.4em; }
.role p { color: var(--text-mid); font-size: 0.975rem; }

/* ---------- Use / Share / Evolve ---------- */
.shared-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.shared-copy p { max-width: 56ch; }

.use-share-evolve {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 28px);
  counter-reset: use;
}
.use-share-evolve li {
  position: relative;
  background: var(--surface-warm);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
}
.use-share-evolve li:not(:last-child)::after {
  content: "\2192";
  position: absolute;
  right: -20px; top: 50%;
  transform: translateY(-50%);
  color: var(--realsme-orange);
  font-size: 1.3rem;
  z-index: 1;
}
.use-num {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--realsme-orange);
}
.use-share-evolve h3 { margin: 6px 0 4px; }
.use-share-evolve p { color: var(--text-mid); font-size: 0.95rem; }

/* ---------- Initiatives ---------- */
.initiative-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 36px);
}
.initiative-card {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  background: var(--surface-ivory);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.initiative-media img { width: 100%; height: 100%; object-fit: cover; }
.initiative-body { padding: clamp(20px, 2.6vw, 30px); }
.initiative-body h3 {
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.initiative-body p { font-size: 0.975rem; }
.initiative-note { color: var(--text-mid); font-size: 0.9rem; }
.initiative-body .btn { margin-top: 10px; }

/* ---------- New ventures flow ---------- */
.emerge-flow {
  list-style: none;
  margin: 1.6em 0 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 8px;
  counter-reset: step;
}
.emerge-flow li {
  counter-increment: step;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  padding: 9px 18px 9px 14px;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.emerge-flow li::before {
  content: counter(step, decimal-leading-zero);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #E1A26B;
}
.emerge-flow li:not(:last-child)::after {
  content: "\2192";
  margin-left: 2px;
  color: #E1A26B;
}

/* ---------- Thinking vs Doing ---------- */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 36px);
  margin-top: clamp(24px, 3vw, 40px);
}
.compare-col {
  background: var(--surface-warm);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 36px);
}
.compare-col-accent {
  background: var(--realsme-charcoal);
  border-color: var(--realsme-charcoal);
  color: var(--on-dark);
}
.compare-col-accent h3 { color: #fff; }
.compare-col-accent p { color: var(--on-dark); }
.compare-tag {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--realsme-orange);
  margin-bottom: 0.8em;
}
.compare-col-accent .compare-tag { color: #E1A26B; }
.compare-col h3 { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 600; }
.compare-here {
  font-family: var(--font-script);
  font-size: 1.3rem;
  color: #E1A26B;
  margin-top: 0.6em;
}
.compare-footnote {
  color: var(--text-mid);
  max-width: 74ch;
  margin-top: clamp(20px, 3vw, 32px);
}

/* ---------- Ecosystem strip ---------- */
.ecosystem-brand { justify-self: end; text-align: right; }
.ecosystem-mark { height: 40px; width: auto; margin-left: auto; margin-bottom: 14px; }
.ecosystem-brand .side-note { text-align: left; display: inline-block; }

.layer-strip {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-ivory);
}
.layer { border-left: 1px solid var(--line-soft); }
.layer:first-child { border-left: none; }
.layer a, .layer-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 20px 18px;
  text-decoration: none;
  color: var(--realsme-charcoal);
}
.layer a:hover { background: var(--surface-warm); }
.layer a:hover .layer-name { color: var(--realsme-orange-deep); }
.layer-name { font-weight: 700; font-size: 0.98rem; }
.layer-role { color: var(--text-mid); font-size: 0.88rem; }
.layer .arrow { color: var(--realsme-orange); margin-top: auto; padding-top: 8px; }
.layer-current {
  background: var(--realsme-charcoal);
}
.layer-current .layer-name { color: #fff; }
.layer-current .layer-role { color: #E1A26B; }
.layer-you {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--font-script);
  font-size: 1.15rem;
  color: var(--on-dark-mid);
}

#ecosystem .pull-line { margin-top: clamp(28px, 4vw, 44px); }

/* ---------- Contact ---------- */
.section-contact { background: var(--charcoal-deep); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.contact-grid p { max-width: 58ch; }
.contact-mail {
  margin-top: 1.4em;
  gap: 12px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.mail-icon { width: 22px; height: 22px; }

.contact-details {
  font-style: normal;
  border-left: 3px solid var(--realsme-orange);
  padding-left: clamp(18px, 2vw, 28px);
  margin-top: 12px;
}
.contact-label { font-weight: 700; color: #fff; }
.contact-details p { color: var(--on-dark-mid); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--realsme-charcoal);
  color: var(--on-dark-mid);
  padding-top: clamp(44px, 6vw, 72px);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 2.5fr) minmax(0, 3fr) minmax(0, 2.5fr);
  gap: clamp(28px, 4vw, 56px);
  padding-bottom: clamp(36px, 5vw, 56px);
}

.footer-logo {
  height: 64px; width: auto;
  /* the charcoal letters need a light plate on dark footer */
  background: var(--surface-ivory);
  padding: 10px 14px;
  border-radius: 8px;
  box-sizing: content-box;
}
.footer-tag {
  margin-top: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
}
.footer-motto { font-family: var(--font-script); font-size: 1.3rem; color: var(--on-dark-mid); }

.footer-heading {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #E1A26B;
  margin-bottom: 1em;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a {
  color: var(--on-dark-mid);
  text-decoration: none;
}
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--realsme-orange); }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-block: 22px;
  font-size: 0.9rem;
}
.footer-legal p { margin: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1023px) {
  .hero-grid, .split-grid, .split-grid-reverse { grid-template-columns: 1fr; }
  .split-grid-reverse .split-visual { order: 2; }
  .split-grid-reverse .split-copy { order: 1; }

  .section-head { grid-template-columns: 1fr; }
  .section-head .side-note { justify-self: start; }
  .ecosystem-brand { justify-self: start; text-align: left; }
  .ecosystem-mark { margin-left: 0; }

  .role-grid { grid-template-columns: 1fr 1fr; gap: 28px 0; }
  .role:nth-child(odd) { border-left: none; padding-left: 0; }
  .role:nth-child(even) { padding-right: 0; }

  .shared-grid { grid-template-columns: 1fr; }
  .initiative-grid { grid-template-columns: 1fr; }
  .layer-strip { grid-template-columns: 1fr; }
  .layer { border-left: none; border-top: 1px solid var(--line-soft); }
  .layer:first-child { border-top: none; }
  .layer .arrow { padding-top: 4px; }

  .compare-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-details { border-left-width: 3px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }               /* 16px minimum on mobile */

  section[id] { scroll-margin-top: 78px; }

  .role-grid { grid-template-columns: 1fr; gap: 24px; }
  .role { border-left: none; padding-inline: 0; border-top: 1px solid var(--line-soft); padding-top: 22px; }
  .role:first-child { border-top: none; padding-top: 0; }

  .use-share-evolve { grid-template-columns: 1fr; }
  .use-share-evolve li:not(:last-child)::after {
    content: "\2193";
    right: auto; left: 24px;
    top: auto; bottom: -22px;
    transform: none;
  }
  .use-share-evolve { row-gap: 26px; }

  .initiative-card { grid-template-columns: 1fr; }
  .initiative-media img { max-height: 190px; }

  .cta-row { align-items: flex-start; flex-direction: column; gap: 14px; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-logo { height: 52px; }
  .footer-legal { flex-direction: column; }

  .contact-mail { font-size: 0.92rem; padding: 12px 16px; }
}

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