/* ============================================
   ROTONDA — Website
   V5 Hermès Ledger aesthetic:
   Cream paper, binding edge, Overpass Mono,
   brass accents, green structure
   ============================================ */

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

:root {
  --cream: #F5F2EB;
  --paper-white: #FFFDF8;
  --paper-aged: #EDE8DF;
  --brown: #8B4513;
  --green: #2D5A47;
  --green-faint: #C5D5CD;
  --brass: #B8860B;
  --brass-dark: #8B6914;
  --ink: #1A1A1A;
  --ink-dark: #2C2C2C;
  --ink-medium: #5C5C5C;
  --ink-light: #8C8C8C;
  --ink-faded: #A09A8C;
  --rule: #E8E4DC;
  --burgundy: #722F37;
  --font: 'Overpass Mono', monospace;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 60px;
}

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-dark);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-style: italic; }

/* ---------- BINDING EDGES ---------- */
.binding-edge {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--brown);
  z-index: 200;
}

.binding-edge-top {
  height: 4px;
  background: var(--brown);
}

.binding-edge-bottom {
  height: 4px;
  background: var(--brown);
}

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(8px);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(40px, calc((100vw - 1200px) / 2));
  border-bottom: 1px solid var(--rule);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo span {
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--ink);
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-medium);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}

.nav-cta {
  background: var(--brass);
  color: var(--paper-white) !important;
  padding: 8px 20px;
  font-weight: 700;
  letter-spacing: 0.12em;
  border-radius: 2px;
  transition: background 0.2s;
}

.nav-cta:hover {
  background: var(--brass-dark);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
}

/* ---------- DIVIDERS ---------- */
.divider-green {
  height: 2px;
  background: var(--green);
}

/* ---------- BUTTONS ---------- */
.btn-primary {
  display: inline-block;
  background: var(--brass);
  color: var(--paper-white);
  padding: 14px 36px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--brass-dark);
}

/* ---------- SECTION SHARED ---------- */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px max(40px, calc((100vw - 1200px) / 2));
}

.section-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--brass);
  margin-bottom: 24px;
}

.section-heading {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: var(--ink-dark);
  margin-bottom: 48px;
}

.hero-rule {
  width: 60px;
  height: 3px;
  background: var(--green);
  margin: 0 auto 32px;
}

/* ---------- HERO HOME ---------- */
.hero-home {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 40px 80px;
  min-height: 70vh;
}

.hero-home-inner {
  max-width: 780px;
}

.hero-home h1 {
  font-size: clamp(22px, 3.5vw, 34px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: var(--ink-dark);
  margin-bottom: 28px;
}

.hero-home-sub {
  font-size: 13px;
  color: var(--ink-medium);
  line-height: 1.85;
  max-width: 520px;
  margin: 0 auto 36px;
}

/* ---------- PROBLEM SECTION ---------- */
.section-problem {
  background: var(--paper-white);
}

.problem-list {
  border-top: 1px solid var(--rule);
}

.problem-row {
  display: grid;
  grid-template-columns: 40px 3px 1fr 2fr;
  gap: 24px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}

.problem-num {
  font-size: 12px;
  font-weight: 300;
  color: var(--brass);
  letter-spacing: 0.08em;
}

.problem-accent {
  width: 3px;
  height: 40px;
  background: var(--green);
  margin-top: 2px;
}

.problem-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-dark);
}

.problem-desc {
  font-size: 12px;
  color: var(--ink-medium);
  line-height: 1.8;
}

/* ---------- SCENARIO CAROUSEL ---------- */
.section-scenarios {
  background: var(--cream);
}

.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.carousel-viewport {
  flex: 1;
  overflow: hidden;
  border-radius: 2px;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}

.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
}

.carousel-arrow {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--brass);
  cursor: pointer;
  font-family: var(--font);
  transition: color 0.2s;
}

.carousel-arrow:disabled {
  color: var(--rule);
  cursor: default;
}

.carousel-arrow:not(:disabled):hover {
  color: var(--brass-dark);
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
}

.carousel-dot {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faded);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.carousel-dot .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-faded);
  transition: background 0.2s;
}

.carousel-dot.active {
  color: var(--brass);
  font-weight: 700;
}

.carousel-dot.active .dot {
  background: var(--brass);
}

.carousel-caption {
  text-align: center;
  font-size: 13px;
  color: var(--ink-medium);
  line-height: 1.85;
  margin-top: 28px;
}

/* Terminal bar */
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  background: var(--paper-white);
  border-top: 2px solid var(--green);
  padding: 0 16px;
  margin-bottom: 12px;
}

.terminal-chevron {
  color: var(--brass);
  font-size: 12px;
  flex-shrink: 0;
}

.terminal-input {
  flex: 1;
  height: 32px;
  display: flex;
  align-items: center;
  background: var(--cream);
  border: 1px solid var(--rule);
  padding: 0 12px;
  font-family: var(--font);
  font-size: 12px;
  color: var(--ink-dark);
}

.terminal-shortcut {
  font-size: 10px;
  color: var(--ink-medium);
  border: 1px solid var(--green-faint);
  padding: 2px 6px;
  flex-shrink: 0;
}

/* Scenario canvas */
.scenario-canvas {
  position: relative;
  min-height: 400px;
  background: var(--cream);
  border: 1px solid var(--rule);
  overflow-x: auto;
  overflow-y: hidden;
}

.scenario-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.scenario-node {
  position: absolute;
  width: 150px;
  padding: 10px 12px;
  background: var(--paper-white);
  font-family: var(--font);
}

.node-base {
  border: 2px solid var(--green);
  box-shadow: 0 0 0 3px rgba(45, 90, 71, 0.12);
}

.node-sensitivity {
  border: 2px dashed var(--brass);
}

.node-ghost {
  border: 2px dashed var(--brass);
  background: rgba(184, 134, 11, 0.06);
  opacity: 0.6;
}

.node-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.node-base .node-title { color: var(--green); }
.node-sensitivity .node-title { color: var(--brass); }
.node-ghost .node-title { color: var(--brass); }

.node-metric {
  font-size: 9px;
  color: var(--ink-light);
  line-height: 1.6;
}

.node-metric strong {
  color: var(--ink-dark);
  font-weight: 600;
}

.node-metric em {
  color: var(--ink-light);
  font-size: 9px;
}

/* ---------- CSS CONNECTORS ---------- */
.connector-h {
  position: absolute;
  height: 2px;
  background: var(--green-faint);
}
.connector-v {
  position: absolute;
  width: 2px;
  background: var(--green-faint);
}
.connector-dashed {
  background: none;
  border-top: 2px dashed var(--brass);
}
.connector-dashed.connector-v {
  border-top: none;
  border-left: 2px dashed var(--brass);
}

/* ---------- CAPABILITIES ---------- */
.section-capabilities {
  background: var(--paper-white);
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 16px;
}

.cap-card {
  background: var(--cream);
  border-left: 3px solid var(--green);
  padding: 20px;
}

.cap-layer {
  display: block;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brass);
  margin-bottom: 10px;
}

.cap-card strong {
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-dark);
  margin-bottom: 10px;
}

.cap-card p {
  font-size: 11px;
  color: var(--ink-medium);
  line-height: 1.7;
}

/* ---------- CTA SECTION ---------- */
.section-cta {
  background: var(--cream);
  padding: 40px 0;
}

.cta-headline {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: var(--ink-dark);
  margin-bottom: 24px;
}

.cta-sub {
  font-size: 13px;
  color: var(--ink-medium);
  line-height: 1.85;
  margin-bottom: 36px;
}

/* ---------- FOOTER HOME ---------- */
.footer-home {
  background: var(--paper-white);
  border-top: 1px solid var(--rule);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px max(40px, calc((100vw - 1200px) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.2em;
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 10px;
  color: var(--ink-light);
}

.footer-links a {
  letter-spacing: 0.08em;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--ink-dark);
}

/* ---------- LEGACY PAGE SECTIONS (platform, services, contact) ---------- */
.page {
  max-width: 820px;
  margin: 0 auto;
  padding: 80px 48px;
}

.page h2 {
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 0;
  line-height: 1.4;
}

.rule {
  height: 1px;
  background: var(--rule);
  margin: 16px 0 28px;
}

.page p {
  margin-bottom: 16px;
  max-width: 620px;
}

.section-intro {
  margin-bottom: 32px;
}

.callout {
  color: var(--brown);
  font-style: italic;
  margin-top: 24px;
}

.bold-statement {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  margin-top: 32px;
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 48px;
  margin: 36px 0;
}

.stat-value {
  font-size: 22px;
  font-weight: 500;
  color: var(--brown);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  color: var(--ink-light);
  line-height: 1.5;
}

/* Quote */
.quote-block {
  border-left: 3px solid var(--brown);
  padding: 16px 24px;
  margin: 28px 0;
}

.quote-block p {
  font-weight: 500;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 0;
}

.quote-attr {
  font-size: 11px;
  color: var(--ink-light);
  font-style: italic;
  display: block;
  margin-top: 8px;
}

/* Design showcase */
.design-showcase { margin: 48px 0; }
.design-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-light);
  font-weight: 600;
  margin-bottom: 12px;
}

.design-frame {
  border: 1px solid var(--rule);
  background: rgba(255, 253, 248, 0.5);
  padding: 4px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.design-frame::after {
  content: 'Click to expand';
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-light);
  background: rgba(245, 242, 235, 0.85);
  padding: 3px 8px;
  opacity: 0;
  transition: opacity 0.2s;
}

.design-frame:hover::after { opacity: 1; }
.design-frame.expanded::after { content: 'Click to collapse'; opacity: 1; }
.design-frame img { width: 100%; display: block; }

.design-frame.expanded {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  margin: 0;
  padding: 24px;
  background: rgba(245, 242, 235, 0.97);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.design-frame.expanded img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

.design-caption {
  font-size: 11px;
  color: var(--ink-light);
  max-width: 560px;
}

.subsection-heading {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 64px;
  margin-bottom: 0;
}

/* Layers list */
.layers-list { margin: 32px 0; }

.layer {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  align-items: flex-start;
}

.layer:first-child { border-top: 1px solid var(--rule); }

.layer-num {
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
  min-width: 24px;
  padding-top: 1px;
}

.layer strong {
  font-size: 13px;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.layer p {
  font-size: 11px;
  color: var(--ink-light);
  margin-bottom: 0;
}

/* Enables grid */
.enables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin: 32px 0;
  border: 1px solid var(--rule);
}

.enables-card {
  padding: 24px 20px;
  border: 1px solid var(--rule);
  background: rgba(255, 253, 248, 0.5);
}

.enables-card strong {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 8px;
}

.enables-card p {
  font-size: 11px;
  color: var(--ink-light);
  margin-bottom: 0;
  max-width: none;
}

/* Services grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0;
}

.service-card {
  border: 1px solid var(--rule);
  padding: 28px 24px;
  background: rgba(255, 253, 248, 0.5);
}

.service-header {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 16px;
}

.service-num { font-size: 20px; font-weight: 300; color: var(--rule); }
.service-header strong { font-size: 13px; }

.service-card > p {
  font-size: 11px;
  color: var(--ink-light);
  margin-bottom: 16px;
  max-width: none;
}

.service-card li {
  font-size: 11px;
  color: var(--ink-light);
  padding: 5px 0 5px 14px;
  position: relative;
  border-bottom: 1px solid rgba(232, 228, 220, 0.4);
}

.service-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 1px;
  background: var(--green);
}

.service-tag {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-light);
  border-top: 1px solid var(--rule);
  padding-top: 10px;
}

/* Closing page */
.page-closing {
  text-align: center;
  padding: 120px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.closing-headline {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: var(--brown);
  margin-bottom: 28px;
  max-width: 500px;
}

.closing-body {
  font-size: 12px;
  color: var(--ink-light);
  text-align: center;
  max-width: 480px;
  margin-bottom: 28px;
}

.closing-statement {
  margin-top: 8px;
  margin-bottom: 40px;
}

.closing-email {
  font-size: 12px;
  color: var(--ink-light);
  letter-spacing: 0.08em;
}

/* Legacy footer */
.footer {
  padding: 20px 48px;
  font-size: 10px;
  color: var(--ink-light);
  letter-spacing: 0.1em;
  display: flex;
  gap: 8px;
}

/* ---------- CONTACT FORM ---------- */
.contact-form {
  max-width: 520px;
  margin: 0 auto;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  font-family: var(--font);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-light);
  margin-bottom: 6px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 12px;
  color: var(--ink-dark);
  background: var(--cream);
  border: 1px solid var(--rule);
  padding: 10px 12px;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--brass);
}

.contact-form textarea {
  min-height: 100px;
  resize: vertical;
}

.contact-form select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238C8C8C'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.contact-form .btn-primary {
  width: 100%;
  margin-top: 8px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1000px) {
  .cap-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .problem-row {
    grid-template-columns: 32px 3px 1fr;
    gap: 16px;
  }

  .problem-desc {
    grid-column: 3;
  }
}

@media (max-width: 800px) {
  .services-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; }
  .enables-grid { grid-template-columns: 1fr; }
  .page { padding: 60px 32px; }

  .hero-home {
    padding: 80px 24px 60px;
    min-height: auto;
  }

  .section-inner {
    padding: 60px 24px;
  }

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

  .scenario-canvas {
    min-height: 300px;
  }

  .scenario-node {
    width: 120px;
    font-size: 9px;
  }
}

@media (max-width: 540px) {
  .nav {
    padding: 0 20px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(255, 253, 248, 0.97);
    flex-direction: column;
    padding: 16px 24px;
    gap: 14px;
    border-bottom: 1px solid var(--rule);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-cta {
    text-align: center;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-home h1 {
    font-size: 20px;
  }

  .problem-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .problem-num { display: none; }
  .problem-accent { display: none; }

  .carousel-indicators {
    gap: 16px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
