/* =========================================================
   diventare.ai · cool/tech design system
   Per Charter v2.0 §5 — brand canon
   Tokens lift directly from §5.1; type per §5.2; motifs per §5.4
   ========================================================= */

:root {
  /* Grounds (Lightened for contrast) */
  --void:        #0B1218;
  --abyss:       #0E171E;
  --depth:       #14202A;
  --shell:       #1A2A36;
  --shell-edge:  #223746;
  --rule:        #2C475A;

  /* Accents (unchanged) */
  --term-green:  #7FE3B0;
  --term-glow:   rgba(127, 227, 176, 0.6);
  --term-dim:    rgba(127, 227, 176, 0.13);
  --term-faint:  rgba(127, 227, 176, 0.05);
  --teal:        #3FA590;
  --teal-bright: #5FCCB0;
  --cyan-soft:   #8FE5E0;
  --clay-trace:  rgba(201, 168, 130, 0.35);

  /* Text (Brightened for high contrast) */
  --text-bright: #FFFFFF;
  --text:        #E8F4EE;

  /* Type stacks */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui:      'Jost', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Motifs */
.code-bg {
  position: fixed; inset: 0; z-index: 0;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--term-green); opacity: 0.04;
  white-space: pre; padding: 80px 24px;
  pointer-events: none; overflow: hidden; line-height: 1.7;
  animation: drift 60s linear infinite;
}
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-40%); } }
.grid-bg {
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(127,227,176,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127,227,176,0.025) 1px, transparent 1px);
  background-size: 64px 64px; pointer-events: none;
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 40px;
  background: rgba(4, 7, 10, 0.78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--shell-edge);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.medallion { width: 32px; height: 32px; border-radius: 50%; display: block; }
.wm { font-family: var(--font-ui); font-weight: 400; font-size: 15px; letter-spacing: 0.06em; color: var(--text-bright); }
.wm .ai { color: var(--term-green); font-weight: 500; }
.nav-r { display: flex; align-items: center; gap: 28px; }
.nav-r a {
  color: var(--text-dim); text-decoration: none;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 300; transition: color 0.18s;
}
.nav-r a:hover { color: var(--term-green); }

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--term-green); border-radius: 100px;
  color: var(--term-green); font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
}
.pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--term-green); box-shadow: 0 0 6px var(--term-green);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Sections */
.section { position: relative; z-index: 2; padding: 96px 64px; max-width: 1100px; margin: 0 auto; }
.section-alt {
  background: var(--abyss);
  border-top: 1px solid var(--shell-edge); border-bottom: 1px solid var(--shell-edge);
  max-width: none;
  padding-left: max(64px, calc((100vw - 1100px) / 2 + 64px));
  padding-right: max(64px, calc((100vw - 1100px) / 2 + 64px));
}

/* Hero */
.hero { display: grid; grid-template-columns: 420px 1fr; gap: 56px; align-items: center; padding-top: 80px; padding-bottom: 80px; }
.hero-img img { width: 100%; height: auto; max-width: 480px; display: block; filter: drop-shadow(0 0 30px rgba(127, 227, 176, 0.18)); }

/* Terminal cards */
.section-term { padding-top: 0; }
.term { background: var(--abyss); border: 1px solid var(--shell-edge); border-radius: 8px; overflow: hidden; font-family: var(--font-mono); max-width: 720px; margin: 0 auto; }
.term-wide { max-width: none; margin-top: 24px; }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 11px 16px; background: var(--shell); border-bottom: 1px solid var(--shell-edge); font-size: 11px; color: var(--text-dim); letter-spacing: 0.06em; }
.term-title { margin-left: 10px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rule); }
.dot.green { background: var(--term-green); box-shadow: 0 0 7px var(--term-green); }
.term-body { padding: 24px 26px; font-size: 13px; line-height: 1.8; color: var(--text); }
.prompt, .key { color: var(--term-green); }
.bright { color: var(--text-bright); }
.comment { color: var(--text-dim); font-style: italic; }
.cursor { display: inline-block; width: 8px; height: 14px; background: var(--term-green); vertical-align: -2px; animation: blink 1s infinite; margin-left: 2px; }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* Typography */
h1, h2 { font-family: var(--font-display); font-weight: 300; color: var(--text-bright); margin: 0 0 18px; letter-spacing: -0.01em; }
h1 { font-size: 48px; line-height: 1.06; }
h2 { font-size: 32px; line-height: 1.18; }
h1 em, h2 em { color: var(--term-green); font-style: italic; font-weight: 300; }
p { font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: 16px; line-height: 1.7; color: var(--text); max-width: 580px; margin: 0 0 16px; }
p em { color: var(--term-green); font-style: italic; }
.lead { font-size: 18px; line-height: 1.55; color: var(--text); max-width: 460px; margin: 0 0 28px; }

/* Eyebrow */
.eyebrow { font-family: var(--font-ui); font-weight: 300; font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--term-green); margin-bottom: 22px; }
.eyebrow.dim { color: var(--text-dim); font-family: var(--font-mono); text-transform: none; letter-spacing: 0.04em; font-size: 11px; }

/* BE spine */
.be { font-family: var(--font-ui); font-weight: 700; color: var(--term-green); font-style: normal; }
.suffix { font-family: var(--font-display); font-style: italic; font-weight: 300; color: var(--text-bright); }

/* CTA */
.cta { display: inline-flex; align-items: center; gap: 12px; padding: 14px 26px; font-family: var(--font-ui); font-weight: 300; font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--term-green); background: transparent; border: 1px solid var(--term-green); border-radius: 4px; text-decoration: none; transition: background 0.18s, box-shadow 0.18s; }
.cta:hover { background: rgba(127, 227, 176, 0.08); box-shadow: 0 0 18px rgba(127, 227, 176, 0.18); }
.cta .arr { font-family: var(--font-mono); }

/* Principle grid */
.principle-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--shell-edge); margin-top: 36px; }
.principle { padding: 30px 32px 30px 0; border-bottom: 1px solid var(--shell-edge); border-right: 1px solid var(--shell-edge); }
.principle:nth-child(even) { border-right: none; padding: 30px 0 30px 32px; }
.principle:nth-child(3), .principle:nth-child(4) { border-bottom: none; }
.principle-label { font-family: var(--font-ui); font-weight: 400; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--term-green); margin-bottom: 12px; }
.principle-label .num { font-family: var(--font-mono); color: var(--text-dim); margin-right: 12px; font-weight: 300; }
.principle-text { font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: 16px; line-height: 1.6; color: var(--text); margin: 0; }

/* Status row */
.status-row { display: flex; align-items: center; gap: 16px; margin: 0 0 24px; }
.status-note { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); letter-spacing: 0.06em; }

/* CTA section */
.cta-line { max-width: 540px; }
.cta-email { margin-top: 20px; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); letter-spacing: 0.06em; }

/* Footer */
.foot { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding: 32px 64px; border-top: 1px solid var(--shell-edge); font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); letter-spacing: 0.06em; background: var(--void); }
.foot a { color: var(--term-green); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot-l .be, .foot-l .suffix { font-size: 11px; }

/* Responsive */
@media (max-width: 1100px) {
  h1 { font-size: 42px; } h2 { font-size: 28px; }
  .hero { grid-template-columns: 320px 1fr; gap: 40px; }
  .section { padding: 72px 40px; }
  .section-alt { padding-left: 40px; padding-right: 40px; }
  .nav { padding: 14px 32px; }
  .foot { padding: 28px 40px; }
}
@media (max-width: 720px) {
  h1 { font-size: 34px; } h2 { font-size: 24px; }
  .lead { font-size: 17px; } p { font-size: 16px; }
  .nav { padding: 12px 20px; }
  .nav-r { gap: 16px; }
  .nav-r a { font-size: 10px; letter-spacing: 0.18em; }
  .nav-r a:nth-child(1), .nav-r a:nth-child(2), .nav-r a:nth-child(3) { display: none; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 56px; padding-bottom: 56px; }
  .hero-img { max-width: 280px; margin: 0 auto; }
  .section { padding: 56px 20px; }
  .section-alt { padding-left: 20px; padding-right: 20px; }
  .principle-grid { grid-template-columns: 1fr; }
  .principle, .principle:nth-child(even) { padding: 24px 0; border-right: none; }
  .principle:nth-child(3) { border-bottom: 1px solid var(--shell-edge); }
  .foot { padding: 24px 20px; flex-direction: column; align-items: flex-start; }
  .term-body { padding: 18px 18px; font-size: 12px; }
}
