@charset "UTF-8";

/* Typography */
:root {
  --font-sans: "Manrope", sans-serif;
  --font-serif: "Newsreader", serif;
  --font-mono: "DM Mono", monospace;
  
  /* Color Palette - Sophisticated Warm Dark / Amber */
  --bg-base: #090908;
  --bg-elevated: #11110f;
  --bg-overlay: #181714;
  
  --text-primary: #f4eee5;
  --text-secondary: #b8afa3;
  --text-tertiary: #8e867b;
  
  --accent-amber: #f3a54a;
  --accent-amber-light: #ffd18e;
  --accent-amber-dim: rgba(243, 165, 74, 0.1);
  --accent-amber-glow: rgba(243, 165, 74, 0.05);
  
  --border-subtle: rgba(255, 209, 142, 0.12);
  --border-focus: var(--accent-amber-light);

  --state-success: #8bc8a0;
  --state-error: #df8172;
  
  /* Layout & Animation */
  --ease-smooth: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-snappy: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 150ms var(--ease-snappy);
  --transition-med: 300ms var(--ease-smooth);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font: 15px/1.65 var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Base interactive elements */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
}

button {
  cursor: pointer;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 4px;
}

/* Typography utilities */
.text-serif {
  font-family: var(--font-serif);
}

.text-mono {
  font-family: var(--font-mono);
}

.mono-eyebrow {
  font: 500 11px/1.4 var(--font-mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-amber);
  display: flex;
  align-items: center;
  gap: 12px;
}

.mono-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}

/* Layout utilities */
.container, .wrap {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.section {
  padding: 120px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  max-width: 780px;
  margin-bottom: 64px;
}

.section-title {
  font: 400 clamp(42px, 6vw, 68px)/1.05 var(--font-serif);
  letter-spacing: -0.04em;
  margin: 16px 0 24px;
}

.section-title em {
  color: var(--accent-amber);
  font-style: italic;
  font-weight: 500;
}

.section-desc {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  max-width: 640px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition-fast);
  background: rgba(255, 255, 255, 0.02);
}

.btn:hover {
  border-color: var(--accent-amber);
  background: rgba(255, 255, 255, 0.05);
}

.btn-primary, .btn.primary {
  background: var(--accent-amber-light);
  color: var(--bg-base);
  border-color: var(--accent-amber-light);
}

.btn-primary:hover {
  background: #fff0d4;
  border-color: #fff0d4;
}

.btn-text {
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
}

.btn-text:hover {
  color: var(--text-primary);
  background: transparent;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(9, 9, 8, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--text-primary);
}

.brand b {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-amber-light);
  display: block;
}

.nav-links {
  display: flex;
  gap: 24px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text-primary);
}

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

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 48px 0;
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* Modal / Auth logic preserving existing setup */
.modal-bg {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  place-items: center;
  padding: 24px;
  background: rgba(9, 9, 8, 0.85);
  backdrop-filter: blur(8px);
  overscroll-behavior: contain;
}

.modal-bg.open {
  display: grid;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 40px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-elevated);
  max-height: calc(var(--login-viewport-height, 100dvh) - 48px);
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.modal-x {
  position: absolute;
  right: 20px;
  top: 20px;
  color: var(--text-secondary);
  font-size: 24px;
  padding: 4px;
  line-height: 1;
}

.modal-x:hover {
  color: var(--text-primary);
}

.modal h3 {
  margin: 0 0 8px;
  font: 400 28px/1.2 var(--font-serif);
  letter-spacing: -0.02em;
}

.modal-sub {
  margin: 0 0 28px;
  color: var(--text-secondary);
  font-size: 14px;
}

.form-row {
  margin-bottom: 20px;
}

.form-row label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-row input, .form-row select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
}

.form-row input:focus, .form-row select:focus {
  border-color: var(--accent-amber);
  outline: none;
  box-shadow: 0 0 0 1px var(--accent-amber-dim) inset;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 32px;
}

.err {
  min-height: 20px;
  color: var(--state-error);
  font-size: 13px;
  margin-top: 8px;
}

/* Shared Background Effects */
.bg-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 50% 0%, var(--accent-amber-dim) 0%, transparent 60%);
  pointer-events: none;
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: fade-in 0.6s var(--ease-smooth) forwards;
}

@keyframes fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .nav-links { display: none; }
}

@media (max-width: 600px) {
  .container, .wrap { width: calc(100% - 32px); }
  .section { padding: 80px 0; }
  .section-title { font-size: clamp(36px, 10vw, 42px); }
  .nav { padding: 0 16px; height: 64px; }
  .nav-actions .btn-text { display: none; }
  .modal-bg { padding: 16px; }
  .modal { padding: 32px 24px; max-height: calc(var(--login-viewport-height, 100dvh) - 32px); }
}

/* Result-first public Sage composition. Samples are documents, not live tools. */
.sage-launch.hero { min-height: 0; padding: 145px 0 88px; }
.launch-grid { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,1fr); gap: clamp(32px,6vw,90px); align-items: center; }
.sage-launch .hero-copy { width: 100%; text-align: left; }
.sage-launch .hero-audience { letter-spacing: .15em; font-size: 10px; }
.sage-launch.hero h1 { font-size: clamp(46px,5.7vw,82px); line-height: 1; letter-spacing: -.055em; margin-bottom: 30px; }
.sage-launch.hero h1 span { white-space: normal; }
.sage-launch .hero-lede { font-size: 17px; line-height: 1.7; margin: 0 0 24px; max-width: 47ch; }
.sage-launch .hero-actions { justify-content: flex-start; margin: 28px 0 20px; }
.launch-disclosure { color: var(--text-tertiary); max-width: 50ch; font-size: 12px; line-height: 1.7; margin: 0; }
.work-caption { color: var(--accent-amber); font: 400 30px/1.15 var(--font-serif); margin: 0 0 24px; }
.work-caption span { display: block; font: 400 11px/1.5 var(--font-sans); color: var(--text-tertiary); margin-top: 8px; }
.work-sheet { padding: clamp(22px,3vw,36px); background: #efe6d8; color: #29271f; border: 1px solid #dbccb6; border-radius: 2px; box-shadow: 0 14px 36px #0003; }
.work-sheet-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-bottom: 1px solid #b7ab97; padding-bottom: 17px; font: 500 9px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: #635641; }
.work-sheet h2 { font: 500 clamp(28px,3vw,39px)/1.1 var(--font-serif); letter-spacing: -.035em; margin: 26px 0 10px; color: #29271f; }
.work-sheet-meta { color: #665c4e; font-size: 11px; margin: 0 0 25px; }
.work-sheet-row { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 14px; padding: 16px 0; border-top: 1px solid #cfc3b2; }
.work-sheet-row > span { font: 500 10px/1.7 var(--font-mono); color: #786347; }
.work-sheet-row strong { font-size: 13px; font-weight: 700; }
.work-sheet-row p { font-size: 12px; line-height: 1.6; color: #5e574b; margin: 7px 0 0; }
.work-sheet .work-note { color: #655c4f; font-size: 10px; line-height: 1.65; border-top: 1px solid #b7ab97; margin: 15px 0 0; padding-top: 16px; }
.example-link { display: inline-block; color: var(--accent-amber); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; margin-top: 22px; }
.public-bridge { padding: 28px 0; border-bottom: 1px solid var(--border-subtle); }
.public-bridge .container { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.public-bridge p { color: var(--text-secondary); margin: 0; font-size: 13px; max-width: 62ch; }
.public-bridge .btn { flex-shrink: 0; }
.reveal.visible { opacity: 1; transform: none; }
@media (max-width: 900px) {
  .launch-grid { grid-template-columns: 1fr; max-width: 680px; }
  .sage-launch.hero { padding: 125px 0 64px; }
  .sage-launch.hero h1 { font-size: clamp(48px,9vw,74px); }
  .launch-example { margin-top: 18px; }
  .public-bridge .container { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 600px) {
  .sage-launch .hero-copy { margin: 0; }
  .sage-launch .hero-actions .btn { padding: 0 18px; }
  .sage-launch.hero h1 { font-size: clamp(43px,11vw,64px); }
  .work-sheet { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; opacity: 1; transform: none; }
}
