/* EcoMarket Foundation — Local styles only
   Palette: Living market green #749C57 | Restrained gold #B08B4F | Deep forest #405D3C
   No external fonts or resources.
*/

:root {
  --green: #749C57;
  --gold: #B08B4F;
  --forest: #405D3C;
  --cream: #F7F4EF;
  --paper: #F0EBE3;
  --stone: #E5DFD4;
  --ink: #2A2F28;
  --muted: #5C6558;
  --white: #FFFFFF;
  --focus: #B08B4F;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(64, 93, 60, 0.08);
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--forest);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 10000;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Focus visible */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
button:focus-visible, a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* Container */
.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-primary {
  background: var(--forest);
  color: var(--white);
  border-color: var(--forest);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: #334a30;
  border-color: #334a30;
}
.btn-secondary {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}
.btn-secondary:hover, .btn-secondary:focus-visible {
  background: var(--stone);
}
.btn-disabled {
  background: var(--stone);
  color: var(--muted);
  border-color: var(--stone);
  cursor: not-allowed;
  pointer-events: none;
}
.btn-text {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.5rem;
}
.btn-text:hover { color: var(--forest); }

/* ========== Opening presentation ========== */
.opening {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: linear-gradient(160deg, var(--forest) 0%, #2d4229 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.opening[hidden], .opening.is-hidden {
  display: none;
}
.opening-inner {
  text-align: center;
  max-width: 28rem;
}
.opening-logo {
  display: block;
  width: 160px;
  height: auto;
  margin: 0 auto 1.25rem;
  filter: brightness(1.15);
}
.opening-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}
.opening-desc {
  font-size: 1.15rem;
  opacity: 0.92;
  margin: 0 0 0.5rem;
  line-height: 1.5;
}
.opening-note {
  font-size: 0.9rem;
  opacity: 0.75;
  margin: 0 0 1.75rem;
}
.opening .btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
  margin-bottom: 0.75rem;
}
.opening .btn-primary:hover {
  background: #638a48;
  border-color: #638a48;
}

/* ========== Header ========== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--stone);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1.5rem;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}
.logo-img {
  display: block;
  height: 52px;
  width: auto;
  object-fit: contain;
}
.logo-name {
  display: block;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--forest);
  line-height: 1.2;
}
.logo-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-top: 2px;
}
.main-nav ul {
  display: flex;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.35rem 0;
}
.main-nav a:hover, .main-nav a:focus-visible {
  color: var(--forest);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--forest);
  border-radius: 2px;
}
.mobile-nav {
  background: var(--white);
  border-top: 1px solid var(--stone);
  padding: 1rem 0;
}
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 1rem;
}
.mobile-nav a {
  display: block;
  padding: 0.75rem 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--stone);
}
.mobile-nav a:hover { color: var(--forest); }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
}

/* Status banner */
.status-banner {
  background: var(--forest);
  color: var(--white);
  font-size: 0.9rem;
  padding: 0.75rem 0;
}
.status-banner .container {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
}
.status-banner strong { font-weight: 700; }
.status-banner .separator { opacity: 0.6; }

/* ========== Hero ========== */
.hero {
  padding: 3.5rem 0 4rem;
  background: linear-gradient(180deg, var(--white) 0%, var(--cream) 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
}
.eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 0.75rem;
}
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 750;
  line-height: 1.15;
  color: var(--forest);
  margin: 0 0 1.25rem;
  letter-spacing: -0.025em;
}
.hero-lead {
  font-size: 1.2rem;
  color: var(--ink);
  margin: 0 0 1rem;
  max-width: 36rem;
}
.hero-sub {
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 1.75rem;
  max-width: 36rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.exchange-rings {
  position: relative;
  width: 220px;
  height: 220px;
}
.ring-large, .ring-medium, .ring-core {
  position: absolute;
  border-radius: 50%;
  border-style: solid;
}
.ring-large {
  inset: 0;
  border-width: 4px;
  border-color: var(--green);
  border-top-color: transparent;
  border-right-color: transparent;
}
.ring-medium {
  inset: 28px;
  border-width: 3px;
  border-color: var(--gold);
  border-bottom-color: transparent;
  border-left-color: transparent;
}
.ring-core {
  inset: 70px;
  background: var(--forest);
  border: none;
}
.visual-caption {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  margin: 0;
  max-width: 14rem;
}

/* ========== Sections common ========== */
.section {
  padding: 4rem 0;
}
.section:nth-child(even) {
  background: var(--white);
}
.section-header {
  margin-bottom: 2.25rem;
  max-width: 40rem;
}
.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--forest);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.section-intro {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0;
}

/* Demo warning */
.demo-warning {
  background: #F8F1E3;
  border: 1px solid #E5D5B5;
  border-left: 4px solid var(--gold);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}
.demo-warning strong { color: var(--forest); }

/* ========== Exchange flow ========== */
.exchange-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.25rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  counter-reset: step;
}
.flow-step {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.flow-step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.flow-step h3 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
  color: var(--forest);
}
.flow-step p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}
.flow-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* ========== Transparency / Passports ========== */
.passport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}
.passport-card {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  position: relative;
}
.demo-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.passport-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.passport-icon {
  color: var(--green);
  flex-shrink: 0;
}
.passport-header h3 {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
  color: var(--forest);
}
.passport-type {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.passport-fields {
  margin: 0;
  display: grid;
  gap: 0.85rem;
}
.passport-fields > div {
  display: grid;
  gap: 0.15rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--stone);
}
.passport-fields > div:last-child { border-bottom: none; padding-bottom: 0; }
.passport-fields dt {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.passport-fields dd {
  margin: 0;
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.passport-footer {
  margin: 1.25rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Claim states */
.claim-state {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  white-space: nowrap;
}
.claim-state.verified { background: #D4E8C8; color: #2F5A1F; }
.claim-state.source-supported { background: #D8E8F0; color: #1E4A5C; }
.claim-state.seller-reported { background: #F0E6D0; color: #6B4E1A; }
.claim-state.contested { background: #F5D6D6; color: #7A2A2A; }
.claim-state.unknown { background: #E8E4DC; color: #5A554C; }
.claim-state.not-supplied { background: #EDEAE4; color: #6B6760; }

.claim-legend {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.claim-legend h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: var(--forest);
}
.claim-legend ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
.claim-legend li {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.claim-legend p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ========== Services ========== */
.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.service-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  color: var(--forest);
}
.service-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1rem;
}
.service-points {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  font-size: 0.95rem;
}
.service-points li { margin-bottom: 0.35rem; }
.service-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

/* ========== Pathways ========== */
.pathways-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}
.pathways-list li {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.pathways-list h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: var(--green);
}
.pathways-list p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.pathways-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* ========== Seller standard ========== */
.seller-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-bottom: 1.25rem;
}
.seller-grid h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  color: var(--forest);
}
.seller-grid ul {
  margin: 0;
  padding-left: 1.2rem;
}
.seller-grid li { margin-bottom: 0.4rem; }
.seller-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* ========== Trust ========== */
.trust-list {
  columns: 2;
  column-gap: 2.5rem;
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
}
@media (max-width: 600px) {
  .trust-list { columns: 1; }
}
.trust-list li {
  margin-bottom: 0.5rem;
  break-inside: avoid;
}
.trust-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  max-width: 48rem;
}

/* ========== EcoSage ========== */
.ecosage-panel {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  max-width: 720px;
}
.ecosage-top {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
@media (max-width: 560px) {
  .ecosage-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
.ecosage-portrait-wrap {
  flex-shrink: 0;
}
.ecosage-portrait {
  display: block;
  width: 160px;
  height: 160px;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  border: 3px solid var(--green);
  box-shadow: 0 4px 16px rgba(64, 93, 60, 0.18);
}
.ecosage-intro h3 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  color: var(--forest);
}
.ecosage-role {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
}
.ecosage-desc {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.55;
}
.ecosage-boundaries {
  background: #F8F1E3;
  border: 1px solid #E5D5B5;
  border-radius: 8px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}
.ecosage-boundaries ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}
.ecosage-boundaries li { margin-bottom: 0.25rem; }
.ecosage-chat {
  background: var(--paper);
  border-radius: 8px;
  padding: 1rem;
  min-height: 80px;
  margin-bottom: 1rem;
}
.chat-message {
  font-size: 0.95rem;
  line-height: 1.55;
}
.chat-message p { margin: 0; }
.chat-message.user {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--stone);
  color: var(--muted);
  font-style: italic;
}
.ecosage-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.prompt-btn {
  background: var(--cream);
  border: 1px solid var(--stone);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--forest);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.prompt-btn:hover, .prompt-btn:focus-visible {
  background: var(--stone);
  border-color: var(--green);
}
.ecosage-footer {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

/* ========== Entry ========== */
.entry-section {
  background: var(--forest);
  color: var(--white);
  text-align: center;
}
.entry-section .section-header h2,
.entry-section .section-intro {
  color: var(--white);
}
.entry-section .section-intro { opacity: 0.9; }
.entry-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.entry-section .btn-primary {
  background: var(--green);
  border-color: var(--green);
}
.entry-section .btn-primary:hover {
  background: #638a48;
  border-color: #638a48;
}
.entry-section .btn-secondary {
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.entry-section .btn-secondary:hover {
  background: rgba(255,255,255,0.1);
}
.entry-section .btn-disabled {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.55);
  border-color: transparent;
}
.entry-note {
  font-size: 0.9rem;
  opacity: 0.85;
  max-width: 36rem;
  margin: 0 auto;
  line-height: 1.55;
}

/* ========== Footer ========== */
.site-footer {
  background: #2A3528;
  color: rgba(255,255,255,0.85);
  padding: 2.5rem 0 2rem;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 0.25rem;
}
.footer-tag { margin: 0 0 0.35rem; }
.footer-world { margin: 0; opacity: 0.7; font-size: 0.85rem; }
.footer-status { margin: 0 0 0.35rem; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.25rem;
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.75;
  line-height: 1.5;
}

/* Print */
@media print {
  .opening, .nav-toggle, .mobile-nav, .status-banner { display: none !important; }
  .site-header { position: static; }
  body { background: white; color: black; }
}
