:root {
  --ink: #173b34;
  --ink-deep: #102f29;
  --sage: #758c7f;
  --sage-light: #dbe3dc;
  --mist: #dfe7e7;
  --paper: #f7f3ea;
  --paper-2: #fbf8f1;
  --rust: #b56545;
  --charcoal: #24302d;
  --muted: #68736f;
  --line: rgba(23, 59, 52, .13);
  --shadow: 0 22px 55px rgba(29, 46, 40, .11);
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--charcoal);
  background: var(--paper-2);
  overflow-x: hidden;
}

::selection { background: rgba(181, 101, 69, .22); color: var(--ink-deep); }

.skip-link { position: fixed; z-index: 5000; top: 1rem; left: 1rem; background: #fff; padding: .75rem 1rem; border-radius: .5rem; }

.navbar-merriveo {
  background: rgba(247, 243, 234, .88);
  backdrop-filter: blur(13px);
  border-bottom: 1px solid transparent;
  transition: all .25s ease;
  padding-block: .78rem;
}
.navbar-merriveo.scrolled { border-color: var(--line); box-shadow: 0 8px 30px rgba(30, 50, 44, .06); }
.brand-mark-wrap { width: 54px; height: 38px; overflow: hidden; display: inline-flex; align-items: center; }
.brand-mark { width: 60px; opacity: .82; filter: sepia(.15) saturate(.75) hue-rotate(100deg); }
.brand-word { font-family: var(--serif); color: var(--ink); font-size: 1.75rem; letter-spacing: -.02em; }
.navbar .nav-link { color: var(--charcoal); font-weight: 600; font-size: .95rem; padding: .7rem .85rem !important; position: relative; }
.navbar .nav-link:hover, .navbar .nav-link:focus { color: var(--ink); }
.active-link::after { content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .35rem; height: 2px; background: var(--rust); }

.product-menu { width: min(720px, 92vw); border: 1px solid var(--line); border-radius: 1rem; background: rgba(251, 248, 241, .98); box-shadow: var(--shadow); }
.product-menu-item { display: flex; align-items: flex-start; gap: .85rem; padding: .78rem; border-radius: .75rem; color: var(--charcoal); text-decoration: none; transition: all .18s ease; }
.product-menu-item:hover { background: rgba(117, 140, 127, .09); transform: translateY(-1px); }
.product-menu-item strong { display: block; color: var(--ink); margin-bottom: .15rem; }
.product-menu-item small { color: var(--muted); display: block; line-height: 1.35; }
.menu-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-light); color: var(--ink); flex: 0 0 38px; }
.product-menu-lab .menu-icon { background: #f1dfd6; color: #8d4c34; }

.btn-merriveo { background: var(--ink); color: #fff; border-color: var(--ink); border-radius: .55rem; font-weight: 600; }
.btn-merriveo:hover, .btn-merriveo:focus { background: var(--ink-deep); border-color: var(--ink-deep); color: #fff; transform: translateY(-1px); }
.btn-outline-merriveo { border: 1px solid var(--ink); color: var(--ink); background: transparent; border-radius: .55rem; font-weight: 600; }
.btn-outline-merriveo:hover, .btn-outline-merriveo:focus { background: var(--ink); border-color: var(--ink); color: #fff; }

.hero {
  position: relative;
  min-height: 760px;
  padding-top: 150px;
  background:
    radial-gradient(circle at 15% 22%, rgba(255,255,255,.95), transparent 33%),
    linear-gradient(180deg, #faf7ef 0%, #f7f3ea 74%, #edf0eb 100%);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  opacity: .23;
  pointer-events: none;
  background-image: repeating-linear-gradient(15deg, rgba(23,59,52,.025) 0, rgba(23,59,52,.025) 1px, transparent 1px, transparent 8px);
}
.hero-inner { z-index: 3; padding-bottom: 150px; }
.hero-copy { position: relative; z-index: 4; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .13em; font-weight: 700; font-size: .76rem; color: var(--sage); margin-bottom: 1rem; }
.text-rust { color: var(--rust) !important; }
.hero h1 { font-family: var(--serif); font-size: clamp(3.35rem, 6.2vw, 6.3rem); line-height: .94; letter-spacing: -.035em; color: var(--ink); margin-bottom: 1.65rem; }
.hero h1 span::after { content: "."; color: var(--rust); }
.hero-lede { max-width: 650px; color: #3f4a47; font-size: clamp(1.08rem, 1.65vw, 1.33rem); line-height: 1.7; }
.hero-note { color: var(--muted); font-size: .93rem; }

.hero-art { position: relative; min-height: 470px; display: grid; place-items: center; }
.hero-m { position: absolute; width: min(75%, 520px); opacity: .28; filter: sepia(.12) saturate(.55) hue-rotate(95deg); transform: translateY(5px); }
.hero-mountain { position: relative; z-index: 2; width: min(100%, 660px); opacity: .54; filter: sepia(.12) saturate(.62) hue-rotate(100deg) contrast(.82); mix-blend-mode: multiply; transform: translateY(28px); animation: drift 8s ease-in-out infinite; }
.drawing-credit { position: absolute; right: 4%; bottom: 8%; color: rgba(23,59,52,.62); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; z-index: 3; }
@keyframes drift { 0%,100% { transform: translateY(28px); } 50% { transform: translateY(19px); } }

.mountain-haze { position: absolute; left: 0; right: 0; bottom: 0; height: 220px; z-index: 1; overflow: hidden; }
.ridge { position: absolute; left: -8%; width: 116%; height: 180px; bottom: -70px; border-radius: 48% 52% 0 0 / 60% 55% 0 0; transform-origin: center; }
.ridge-one { background: rgba(162, 180, 174, .33); transform: rotate(-2deg) scaleY(.72); }
.ridge-two { background: rgba(125, 151, 145, .25); transform: translateY(38px) rotate(2deg) scaleY(.78); }
.ridge-three { background: rgba(68, 103, 94, .17); transform: translateY(82px) rotate(-1deg) scaleY(.92); }

.section-space { padding: 105px 0; }
.bg-paper { background: var(--paper-2); }
.display-heading { font-family: var(--serif); color: var(--ink); font-size: clamp(2.3rem, 4.5vw, 4.35rem); letter-spacing: -.025em; }
.section-lede { font-size: 1.15rem; line-height: 1.75; color: var(--muted); max-width: 790px; }
.text-link { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(181,101,69,.55); text-underline-offset: .35rem; }
.text-link:hover { color: var(--rust); }
.shadow-soft { box-shadow: var(--shadow); }

.app-window { background: #f8f7f2; border: 1px solid rgba(23,59,52,.12); border-radius: 1rem; overflow: hidden; }
.window-bar { height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 16px; border-bottom: 1px solid rgba(23,59,52,.08); }
.window-bar span { width: 9px; height: 9px; border-radius: 50%; background: #c6c7c3; }
.window-bar span:nth-child(1) { background: #c97c5d; }
.window-bar span:nth-child(2) { background: #d8b463; }
.window-bar span:nth-child(3) { background: #799a7d; }
.app-grid { display: grid; grid-template-columns: 190px 1fr; min-height: 480px; }
.app-sidebar { background: var(--ink-deep); color: #fff; padding: 25px 18px; }
.app-logo { font-family: var(--serif); font-size: 1.45rem; margin-bottom: 28px; }
.app-sidebar nav { display: grid; gap: .35rem; }
.app-sidebar nav a { color: rgba(255,255,255,.74); text-decoration: none; display: flex; align-items: center; gap: .65rem; padding: .65rem .75rem; border-radius: .55rem; font-size: .9rem; }
.app-sidebar nav a.active { color: #fff; background: rgba(255,255,255,.10); }
.app-main { padding: 28px; background: #fbfaf6; }
.stat-card { border: 1px solid rgba(23,59,52,.10); border-radius: .7rem; padding: .9rem 1rem; background: #fff; }
.stat-card strong { font-size: 1.6rem; display: block; color: var(--ink); line-height: 1; }
.stat-card span { display: block; margin-top: .35rem; font-size: .75rem; color: var(--muted); }
.recent-panel { border: 1px solid rgba(23,59,52,.1); background: #fff; border-radius: .75rem; padding: 1rem; }
.pass-row { display: grid; grid-template-columns: 34px 1fr 1fr auto; align-items: center; gap: .65rem; padding: .68rem .2rem; border-top: 1px solid rgba(23,59,52,.07); font-size: .88rem; }
.pass-row:first-of-type { border-top: 0; }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--sage-light); color: var(--ink); font-size: .72rem; font-weight: 700; }
.status { font-size: .78rem; color: var(--muted); }
.status i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: .35rem; }
.status.active i { background: #5f8c6a; }
.status.returned i { background: #9aa29e; }

.principles { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f8f5ee; padding: 75px 0; }
.principle-card { padding: 1rem 1.2rem; }
.sketch-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; margin-bottom: 1.2rem; font-size: 1.55rem; color: var(--ink); border: 1px dashed rgba(23,59,52,.25); }
.bg-sage { background: #dfe7dc; }
.bg-blue { background: #dfe7e8; }
.bg-rust { background: #f2d9cf; }
.principle-card h3, .product-card h3 { font-family: var(--serif); color: var(--ink); }
.principle-card p { margin: 0; color: var(--muted); line-height: 1.65; }

.products-section { background: linear-gradient(180deg, #eef2f0 0%, #e8efee 100%); }
.product-status { background: rgba(23,59,52,.08); color: var(--ink); padding: .7rem 1rem; font-weight: 600; }
.product-card { background: rgba(251,248,241,.86); border: 1px solid rgba(23,59,52,.11); border-radius: 1rem; padding: 1.55rem; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 18px 45px rgba(37,61,54,.10); border-color: rgba(23,59,52,.21); }
.product-card-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.product-icon { width: 48px; height: 48px; border-radius: .8rem; display: grid; place-items: center; background: var(--sage-light); color: var(--ink); font-size: 1.25rem; }
.badge-soft { font-size: .72rem; color: var(--rust); background: rgba(181,101,69,.09); border: 1px solid rgba(181,101,69,.16); padding: .38rem .55rem; border-radius: 999px; white-space: nowrap; }
.product-card p { color: var(--muted); line-height: 1.7; }
.product-detail { display: block; color: var(--ink); font-size: .88rem; font-weight: 600; padding-top: .8rem; border-top: 1px solid var(--line); }
.lab-card { background: rgba(244, 230, 220, .54); }

.about-section { background: var(--paper-2); }
.about-art { min-height: 420px; display: grid; place-items: center; position: relative; }
.about-art::before { content: ""; width: 340px; height: 340px; border-radius: 50%; background: rgba(117,140,127,.08); position: absolute; }
.about-art img { position: relative; z-index: 1; width: min(100%, 520px); opacity: .72; filter: sepia(.1) saturate(.72) hue-rotate(100deg) contrast(.88); }
.mini-point { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 0; }
.mini-point > i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: .65rem; background: var(--sage-light); color: var(--ink); flex: 0 0 38px; }
.mini-point strong, .mini-point small { display: block; }
.mini-point strong { color: var(--ink); }
.mini-point small { color: var(--muted); margin-top: .18rem; line-height: 1.45; }

.cta-section { background: #dfe9e7; padding: 90px 0; position: relative; overflow: hidden; }
.cta-section::after { content: "M"; position: absolute; right: -4vw; bottom: -17vw; font-family: var(--serif); font-size: 35vw; color: rgba(23,59,52,.045); line-height: 1; pointer-events: none; }
.cta-card { position: relative; z-index: 1; background: rgba(251,248,241,.88); border: 1px solid rgba(23,59,52,.12); border-radius: 1.1rem; padding: clamp(1.5rem, 4vw, 3.3rem); box-shadow: 0 26px 58px rgba(47,72,65,.10); }
.cta-card h2 { font-family: var(--serif); color: var(--ink); font-size: clamp(2rem, 4vw, 3.4rem); }
.cta-card p { color: var(--muted); font-size: 1.05rem; line-height: 1.7; }

.site-footer { padding: 38px 0; background: #f8f5ed; border-top: 1px solid var(--line); }
.footer-mark { width: 52px; opacity: .74; filter: sepia(.15) saturate(.65) hue-rotate(100deg); }
.site-footer .brand-word { font-size: 1.35rem; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s ease, transform .65s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }

@media (max-width: 991.98px) {
  .navbar-merriveo { background: rgba(247,243,234,.97); }
  .navbar-collapse { padding: 1rem 0; }
  .active-link::after { display: none; }
  .product-menu { width: 100%; box-shadow: none; border-radius: .75rem; }
  .hero { min-height: auto; padding-top: 125px; }
  .hero-inner { padding-bottom: 120px; }
  .hero-art { min-height: 370px; }
  .hero-mountain { width: min(88%, 610px); }
  .drawing-credit { right: 9%; bottom: 4%; }
}

@media (max-width: 767.98px) {
  .section-space { padding: 78px 0; }
  .hero h1 { font-size: clamp(3.1rem, 15vw, 5rem); }
  .hero-art { min-height: 310px; }
  .hero-m { width: 70%; }
  .app-grid { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
  .app-main { padding: 18px; }
  .pass-row { grid-template-columns: 34px 1fr auto; }
  .pass-dest { display: none; }
  .drawing-credit { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}


/* Story Forge */
.product-menu-featured { background: rgba(181,101,69,.055); border: 1px solid rgba(181,101,69,.10); }
.product-menu-featured .menu-icon { background: #f1dfd6; color: #8d4c34; }
.story-forge-feature { background: linear-gradient(180deg, #f3eee5 0%, #f8f5ee 100%); border-bottom: 1px solid var(--line); }
.story-window { overflow: hidden; border-radius: 1rem; border: 1px solid rgba(23,59,52,.12); background: #fbfaf6; }
.window-title { margin-left: auto; color: var(--muted); font-size: .75rem; }
.story-stage { padding: clamp(1.25rem, 3vw, 2.4rem); background: radial-gradient(circle at 88% 12%, rgba(181,101,69,.09), transparent 28%), #fbfaf6; }
.story-stage-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.35rem; }
.story-stage h4 { font-family: var(--serif); color: var(--ink); font-size: clamp(1.7rem, 3vw, 2.5rem); margin: .15rem 0 0; }
.story-kicker { text-transform: uppercase; letter-spacing: .12em; color: var(--rust); font-weight: 700; font-size: .72rem; }
.vote-pill { background: rgba(95,140,106,.12); color: #416a4a; border: 1px solid rgba(95,140,106,.2); border-radius: 999px; padding: .45rem .7rem; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.story-copy { font-size: 1.04rem; line-height: 1.72; color: #48534f; max-width: 760px; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin: 1.5rem 0; }
.story-choice { text-align: left; border: 1px solid rgba(23,59,52,.12); border-radius: .8rem; background: #fff; padding: 1rem; color: var(--charcoal); min-height: 126px; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.story-choice:hover { transform: translateY(-2px); border-color: rgba(181,101,69,.36); background: #fffdf9; }
.story-choice > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sage-light); color: var(--ink); font-weight: 800; margin-bottom: .65rem; }
.story-choice strong, .story-choice small { display: block; }
.story-choice strong { color: var(--ink); margin-bottom: .25rem; }
.story-choice small { color: var(--muted); line-height: 1.35; }
.story-meter { height: 8px; border-radius: 999px; overflow: hidden; background: rgba(23,59,52,.08); margin: .8rem 0 .45rem; }
.story-meter span { display: block; height: 100%; background: var(--rust); border-radius: inherit; }
.product-card-live { border-color: rgba(181,101,69,.24); background: linear-gradient(180deg, rgba(251,248,241,.94), rgba(247,239,231,.92)); }
.badge-live { color: #416a4a; background: rgba(95,140,106,.10); border-color: rgba(95,140,106,.18); }
@media (max-width: 767.98px) {
  .choice-grid { grid-template-columns: 1fr; }
  .story-stage-head { flex-direction: column; }
}

.story-choice[aria-pressed="true"]{border-color:var(--rust);background:var(--sage-light)}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.reveal{opacity:1!important;transform:none!important;transition:none!important}}
