/* ==========================================================================
   Fundly AI Consulting — design system
   Warm paper + deep ink, amber accent. No purple gradients.
   ========================================================================== */

:root {
  /* Palette */
  --paper:        #FBFAF7;
  --paper-2:      #F3F0E9;
  --paper-3:      #E9E4D9;
  --ink:          #0E1621;
  --ink-2:        #16212E;
  --ink-3:        #223142;
  --text:         #26313D;
  --text-muted:   #5A6773;
  --text-onink:   #E7EAEE;
  --text-onink-muted: #A3AEBB;
  --accent:       #B45309;
  --accent-hover: #92400E;
  --accent-bright:#F0A93B;
  --accent-wash:  #FDF3E3;
  --line:         #DED8CC;
  --line-onink:   #2C3A4B;
  --good:         #15706B;

  /* Type */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Space */
  --wrap: 1120px;
  --wrap-narrow: 760px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(14, 22, 33, .06), 0 8px 24px -12px rgba(14, 22, 33, .18);
  --shadow-lg: 0 2px 4px rgba(14, 22, 33, .06), 0 24px 60px -24px rgba(14, 22, 33, .28);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.012em;
  margin: 0 0 .5em;
  font-weight: 600;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; letter-spacing: 0; }

p { margin: 0 0 1.1em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--wrap-narrow); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .9rem;
}
.on-ink .eyebrow { color: var(--accent-bright); }

.lede { font-size: 1.16rem; color: var(--text-muted); max-width: 62ch; }
.on-ink .lede { color: var(--text-onink-muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 247, .88);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: var(--ink); color: var(--accent-bright);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 17px; font-weight: 700;
}
.brand-name { font-family: var(--font-display); font-size: 1.12rem; letter-spacing: -.01em; }
.brand-name span { color: var(--accent); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text); text-decoration: none; font-size: .94rem; font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
}
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a.is-active { color: var(--ink); background: var(--paper-2); }
.nav .btn { margin-left: 8px; }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 42px; height: 38px; cursor: pointer; color: var(--ink);
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: currentColor; margin: 3px auto; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 12px 20px 20px; display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px; }
  .nav .btn { margin: 8px 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .78em 1.4em; border-radius: 8px;
  font-size: .96rem; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: .15s ease;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-3); color: #fff; transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: var(--paper-2); }
.on-ink .btn-ghost { border-color: var(--line-onink); color: var(--text-onink); }
.on-ink .btn-ghost:hover { border-color: var(--accent-bright); color: #fff; background: rgba(255,255,255,.05); }
.btn-lg { padding: .95em 1.7em; font-size: 1.02rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8rem; }

/* ---------- Sections ---------- */
section { padding: 84px 0; }
section.tight { padding: 56px 0; }
.on-ink { background: var(--ink); color: var(--text-onink); }
.on-ink h1, .on-ink h2, .on-ink h3 { color: #fff; }
.on-ink p { color: var(--text-onink-muted); }
.on-paper-2 { background: var(--paper-2); }
.section-head { max-width: 68ch; margin-bottom: 2.6rem; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 520px at 82% -8%, rgba(240,169,59,.16), transparent 62%),
    radial-gradient(760px 420px at 6% 8%, rgba(21,112,107,.12), transparent 60%),
    var(--ink);
  color: var(--text-onink);
  padding: 96px 0 92px;
  border-bottom: 1px solid var(--line-onink);
}
.hero h1 { color: #fff; max-width: 17ch; }
.hero .lede { color: var(--text-onink-muted); font-size: 1.22rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

.page-hero {
  background: var(--ink);
  color: var(--text-onink);
  padding: 72px 0 64px;
}
.page-hero h1 { color: #fff; }
.page-hero .lede { color: var(--text-onink-muted); }

/* Terminal-ish visual */
.window {
  background: var(--ink-2);
  border: 1px solid var(--line-onink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.window-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; border-bottom: 1px solid var(--line-onink);
  background: rgba(255,255,255,.02);
}
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3B4A5C; display: block; }
.window-bar .fname {
  margin-left: 8px; font-family: var(--font-mono); font-size: .76rem; color: var(--text-onink-muted);
}
.window pre {
  margin: 0; padding: 18px 20px; overflow-x: auto;
  font-family: var(--font-mono); font-size: .8rem; line-height: 1.7; color: #C9D3DF;
}
.window pre .k { color: var(--accent-bright); }
.window pre .s { color: #7FD1C4; }
.window pre .c { color: #6B7C8E; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 950px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card-link { display: block; text-decoration: none; color: inherit; transition: .18s ease; }
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent); color: inherit; }
.card .more { color: var(--accent); font-weight: 600; font-size: .92rem; margin-top: 1rem; display: inline-block; }

.on-ink .card { background: var(--ink-2); border-color: var(--line-onink); box-shadow: none; }

.icon {
  width: 42px; height: 42px; border-radius: 10px; margin-bottom: 16px;
  background: var(--accent-wash); color: var(--accent);
  display: grid; place-items: center; font-size: 20px;
}
.on-ink .icon { background: rgba(240,169,59,.14); color: var(--accent-bright); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat .n { font-family: var(--font-display); font-size: 2.1rem; color: var(--ink); line-height: 1; }
.on-ink .stat .n { color: var(--accent-bright); }
.stat .l { font-size: .9rem; color: var(--text-muted); margin-top: .45rem; }
.on-ink .stat .l { color: var(--text-onink-muted); }

/* ---------- Lists ---------- */
.check { list-style: none; padding: 0; margin: 0; }
.check li { position: relative; padding-left: 30px; margin-bottom: .7em; }
.check li::before {
  content: ""; position: absolute; left: 4px; top: .58em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
}
.on-ink .check li::before { background: var(--accent-bright); }

ul.plain { padding-left: 1.15em; }
ul.plain li { margin-bottom: .55em; }

.deliverables {
  background: var(--accent-wash);
  border: 1px solid #F0DCBE;
  border-radius: var(--radius-lg);
  padding: 26px 30px;
}
.deliverables h4 { margin-top: 0; color: var(--accent-hover); }

.callout {
  border-left: 3px solid var(--accent);
  background: var(--paper-2);
  padding: 18px 22px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.8rem 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%; border-collapse: collapse; font-size: .94rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden;
}
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--paper-2); font-weight: 700; color: var(--ink); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
tbody tr:last-child td { border-bottom: 0; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 20px; }
.step { position: relative; padding-left: 62px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--ink); color: var(--accent-bright);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
}
.step h4 { margin: .35em 0 .35em; }
.step p { margin-bottom: 0; }

/* ---------- FAQ ---------- */
details {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; padding: 4px 20px; margin-bottom: 12px;
}
details summary {
  cursor: pointer; padding: 16px 0; font-weight: 600; color: var(--ink);
  list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; flex: none; }
details[open] summary::after { content: "\2013"; }
details > *:not(summary) { padding-bottom: 6px; }

/* ---------- Pricing ---------- */
.price-card { display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--accent); border-width: 2px; box-shadow: var(--shadow-lg); }
.price-card .tag {
  display: inline-block; background: var(--accent); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 99px; margin-bottom: 14px;
}
.price { font-family: var(--font-display); font-size: 2rem; color: var(--ink); margin: .2em 0 .1em; }
.price small { font-size: .85rem; font-family: var(--font-body); color: var(--text-muted); font-weight: 500; }
.price-card .btn { margin-top: auto; }
.price-card ul { margin: 1.2rem 0 1.6rem; }

/* ---------- Forms ---------- */
.form-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow);
}
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; font-size: .92rem; color: var(--ink); margin-bottom: 7px; }
.field .hint { font-weight: 400; color: var(--text-muted); font-size: .85rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: .96rem; color: var(--text); background: var(--paper);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(180,83,9,.14); background: #fff;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin-top: 18px; padding: 14px 16px; border-radius: 8px; font-size: .94rem; display: none; }
.form-status.show { display: block; }
.form-status.ok { background: #E7F4F1; color: #0E5B57; border: 1px solid #B7DED8; }
.form-status.err { background: #FCEDEA; color: #8A2C1A; border: 1px solid #F0C7BE; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--text-onink-muted); padding: 60px 0 32px; font-size: .93rem; }
.site-footer h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; }
.site-footer a { color: var(--text-onink-muted); text-decoration: none; display: block; padding: 4px 0; }
.site-footer a:hover { color: var(--accent-bright); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; } }
.footer-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-onink);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .86rem;
}
.site-footer .brand { color: #fff; }
.site-footer .brand:hover { color: #fff; }
.site-footer .brand-mark { background: var(--accent); color: #fff; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.center .lede, .center .section-head { margin-left: auto; margin-right: auto; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.small { font-size: .88rem; color: var(--text-muted); }
.on-ink .small { color: var(--text-onink-muted); }
code {
  font-family: var(--font-mono); font-size: .88em;
  background: var(--paper-3); padding: .12em .38em; border-radius: 4px; color: var(--ink);
}
.on-ink code { background: rgba(255,255,255,.08); color: var(--accent-bright); }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

.skip {
  position: absolute; left: -9999px; background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip:focus { left: 0; top: 0; color: #fff; }

@media print { .site-header, .site-footer, .btn-row { display: none; } }
