/* ============================================================
   Day One AI — site styles
   Palette: deep navy base, sunrise amber/orange accent
   ============================================================ */

:root {
  --navy-900: #0a1626;
  --navy-800: #0e1f33;
  --navy-700: #16304d;
  --navy-100: #dce6f2;
  --ink: #17233a;
  --muted: #5b6b82;
  --line: #e4e9f1;
  --cream: #faf8f4;
  --white: #ffffff;
  --amber: #f5a623;
  --orange: #e8590c;
  --sunrise: linear-gradient(135deg, #f7b733 0%, #e8590c 100%);
  --sunrise-soft: linear-gradient(135deg, rgba(247, 183, 51, 0.14), rgba(232, 89, 12, 0.14));
  --radius: 14px;
  --shadow: 0 8px 30px rgba(10, 22, 38, 0.08);
  --shadow-lg: 0 18px 50px rgba(10, 22, 38, 0.16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 22, 38, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 8px 24px rgba(6, 12, 22, 0.35);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.2px;
}
.brand:hover { text-decoration: none; }
.brand .logo { width: 30px; height: 30px; flex: none; }
.brand em { font-style: normal; background: var(--sunrise); -webkit-background-clip: text; background-clip: text; color: transparent; }

.site-nav { display: flex; align-items: center; gap: 16px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
}
.nav-links a {
  color: var(--navy-100);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 7px 15px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.09);
  text-decoration: none;
}
.nav-links a.active {
  color: var(--white);
  background: rgba(247, 183, 51, 0.16);
}
.nav-links .chip {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 7px 2px;
  border-radius: 999px;
  background: rgba(247, 183, 51, 0.18);
  color: var(--amber);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.btn-nav { padding: 9px 20px; font-size: 0.9rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  border: 0;
  font-family: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--sunrise);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(232, 89, 12, 0.35);
}
.btn-primary:hover { box-shadow: 0 10px 24px rgba(232, 89, 12, 0.45); }

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}
.btn-ghost:hover { border-color: var(--white); }

.btn-dark {
  background: var(--navy-800);
  color: var(--white);
}
.btn-dark:hover { background: var(--navy-700); }

.btn-outline {
  background: transparent;
  color: var(--navy-800);
  border: 1.5px solid var(--navy-800);
}

/* ---------- Hero ---------- */

.hero {
  background:
    radial-gradient(1100px 500px at 70% -10%, rgba(247, 183, 51, 0.18), transparent 60%),
    radial-gradient(900px 480px at 15% 110%, rgba(232, 89, 12, 0.14), transparent 60%),
    var(--navy-900);
  color: var(--white);
  padding: 92px 0 84px;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.hero .kicker {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: normal;
  background: var(--sunrise);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lede {
  font-size: 1.16rem;
  color: var(--navy-100);
  max-width: 34em;
  margin-bottom: 32px;
}

.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-art { text-align: center; }
.hero-art svg { width: 100%; max-width: 380px; height: auto; }

.hero-points {
  display: flex;
  gap: 28px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero-points div { font-size: 0.92rem; color: var(--navy-100); }
.hero-points strong { display: block; color: var(--white); font-size: 1.02rem; }

/* ---------- Sections ---------- */

section { padding: 84px 0; }
section.alt { background: var(--cream); }
section.dark { background: var(--navy-900); color: var(--white); }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head .kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  display: block;
  margin-bottom: 10px;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 14px;
}
.dark .section-head h2 { color: var(--white); }
.section-head p { color: var(--muted); font-size: 1.06rem; }
.dark .section-head p { color: var(--navy-100); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Cards grid ---------- */

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--sunrise-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.3rem;
}
.card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.96rem; }

/* ---------- Steps ---------- */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  position: relative;
}
.step .num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sunrise);
  color: var(--white);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 0.95rem;
}
.step h3 { font-size: 1.04rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.92rem; }

/* ---------- Phase ladder ---------- */

.phases { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.phase {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  align-items: start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 18px 22px;
}
.phase .tag {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 2px;
}
.phase h3 { font-size: 1.02rem; margin-bottom: 4px; color: var(--white); }
.phase p { font-size: 0.93rem; color: var(--navy-100); }

/* ---------- Pricing ---------- */

.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.price-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  position: relative;
}
.price-card.featured {
  border: 2px solid var(--orange);
  box-shadow: var(--shadow-lg);
}
.price-card .flag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sunrise);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.price-card .tier { font-weight: 700; font-size: 1.05rem; color: var(--orange); margin-bottom: 6px; }
.price-card .amount { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.02em; }
.price-card .amount span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price-card .blurb { color: var(--muted); font-size: 0.94rem; margin: 10px 0 22px; }
.price-card ul { list-style: none; margin-bottom: 28px; flex: 1; }
.price-card li {
  padding: 8px 0 8px 30px;
  position: relative;
  font-size: 0.95rem;
  border-bottom: 1px dashed var(--line);
}
.price-card li:last-child { border-bottom: 0; }
.price-card li::before {
  content: "✓";
  position: absolute;
  left: 4px;
  color: var(--orange);
  font-weight: 700;
}
.price-card .btn { text-align: center; }
.pricing-note { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 26px; }

/* ---------- Trust / security list ---------- */

.trust-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 32px; }
.trust-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
}
.trust-item .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--sunrise-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}
.trust-item h3 { font-size: 1.02rem; margin-bottom: 3px; }
.trust-item p { color: var(--muted); font-size: 0.93rem; }

/* ---------- Constitution banner ---------- */

.const-banner {
  background: var(--sunrise-soft);
  border: 1px solid rgba(232, 89, 12, 0.25);
  border-radius: 18px;
  padding: 44px;
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 32px;
  align-items: center;
}
.const-banner h2 { font-size: 1.7rem; letter-spacing: -0.015em; margin-bottom: 10px; }
.const-banner p { color: var(--muted); margin-bottom: 0; }
.const-banner .cta { text-align: right; }

/* ---------- FAQ ---------- */

.faq { max-width: 780px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 1.02rem;
  list-style: none;
  position: relative;
  padding-right: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--orange);
  font-weight: 400;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 22px 18px; color: var(--muted); font-size: 0.97rem; }

/* ---------- Contact / inquiry ---------- */

.contact-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: start; }
.contact-info h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 14px; color: var(--white); }
.contact-info p { color: var(--navy-100); margin-bottom: 22px; }
.contact-info .direct { font-size: 0.95rem; color: var(--navy-100); }
.contact-info .direct a { color: var(--amber); font-weight: 600; }

.inquiry-form {
  background: var(--white);
  border-radius: 18px;
  padding: 34px;
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.97rem;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.12s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(247, 183, 51, 0.2);
}
.field textarea { resize: vertical; min-height: 110px; }

.form-status { margin-top: 14px; font-size: 0.92rem; color: var(--muted); }
.form-status.ok { color: #1a7f37; font-weight: 600; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-900);
  color: var(--navy-100);
  padding: 44px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer .brand { font-size: 1rem; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer nav a { color: var(--navy-100); font-size: 0.9rem; }
.site-footer .fine { width: 100%; font-size: 0.82rem; color: #7e93ad; margin-top: 10px; }

/* ============================================================
   Constitution generator page
   ============================================================ */

.gen-hero {
  background:
    radial-gradient(900px 400px at 80% -20%, rgba(247, 183, 51, 0.16), transparent 60%),
    var(--navy-900);
  color: var(--white);
  padding: 64px 0 56px;
}
.gen-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); letter-spacing: -0.02em; margin-bottom: 12px; }
.gen-hero h1 em { font-style: normal; background: var(--sunrise); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gen-hero p { color: var(--navy-100); max-width: 46em; font-size: 1.05rem; }

.gen-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: start;
  padding: 48px 0 84px;
}

.gen-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px;
  box-shadow: var(--shadow);
}
.gen-form fieldset {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 22px 0 8px;
  margin-top: 18px;
}
.gen-form fieldset:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.gen-form legend {
  font-weight: 700;
  font-size: 0.98rem;
  padding-right: 12px;
  color: var(--navy-800);
}
.gen-form legend .step-tag {
  display: inline-block;
  background: var(--sunrise-soft);
  color: var(--orange);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  margin-right: 8px;
  vertical-align: 1px;
  letter-spacing: 0.04em;
}
.hint { font-size: 0.82rem; color: var(--muted); margin-top: -2px; margin-bottom: 10px; }

.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-bottom: 10px; }
.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.92rem;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.check:hover { background: var(--cream); }
.check input { margin-top: 3px; accent-color: var(--orange); flex: none; }

.radio-stack { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.radio-stack .check { align-items: flex-start; }
.radio-stack .check strong { display: block; font-size: 0.93rem; }
.radio-stack .check span.sub { display: block; font-size: 0.82rem; color: var(--muted); }

.gen-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* Preview pane */

.gen-preview {
  position: sticky;
  top: 84px;
}
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.preview-toolbar .title { font-weight: 700; font-size: 0.95rem; color: var(--navy-800); }
.preview-toolbar .tools { display: flex; gap: 8px; flex-wrap: wrap; }
.tool-btn {
  background: var(--white);
  border: 1.5px solid var(--line);
  color: var(--navy-800);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.tool-btn:hover { border-color: var(--amber); background: var(--cream); }
.tool-btn.primary { background: var(--sunrise); border-color: transparent; color: var(--white); }

.const-doc {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 40px 44px;
  max-height: 72vh;
  overflow-y: auto;
  font-size: 0.94rem;
}
.const-doc h1 { font-size: 1.5rem; margin-bottom: 4px; letter-spacing: -0.01em; }
.const-doc .doc-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 18px; }
.const-doc blockquote {
  border-left: 3px solid var(--amber);
  background: var(--sunrise-soft);
  padding: 10px 16px;
  border-radius: 0 8px 8px 0;
  margin: 14px 0;
  font-size: 0.92rem;
}
.const-doc h2 {
  font-size: 1.08rem;
  margin: 26px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.const-doc p { margin-bottom: 10px; color: #2a3850; }
.const-doc ul, .const-doc ol { margin: 0 0 10px 22px; color: #2a3850; }
.const-doc li { margin-bottom: 4px; }

/* ---------- Print: constitution only ---------- */

@media print {
  body.gen-page .site-header,
  body.gen-page .gen-hero,
  body.gen-page .gen-form-col,
  body.gen-page .preview-toolbar,
  body.gen-page .site-footer { display: none !important; }
  body.gen-page .gen-layout { display: block; padding: 0; }
  body.gen-page .const-doc {
    max-height: none;
    overflow: visible;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--navy-900);
    flex-direction: column;
    align-items: stretch;
    padding: 14px 24px 22px;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 30px rgba(6, 12, 22, 0.4);
  }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
  }
  .nav-links a { padding: 11px 12px; font-size: 1rem; border-radius: 10px; }
  .site-nav .btn-nav { text-align: center; margin-top: 4px; }
}

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .pricing { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .gen-layout { grid-template-columns: 1fr; }
  .gen-preview { position: static; }
  .const-banner { grid-template-columns: 1fr; }
  .const-banner .cta { text-align: left; }
}

@media (max-width: 680px) {
  section { padding: 60px 0; }
  .hero { padding: 64px 0 56px; }
  .steps { grid-template-columns: 1fr; }
  .grid-3, .grid-2, .trust-list, .check-grid, .form-row { grid-template-columns: 1fr; }
  .const-doc { padding: 26px 22px; }
}
