/* ============================================================
   AICommish · Premium modern design system
   Sans-led product chrome. Serif reserved for the column itself.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;0,8..60,600;1,8..60,400;1,8..60,500&family=Geist:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ----- INK ----- */
  --ink-900: #16110D;
  --ink-800: #211B14;
  --ink-700: #2E281F;
  --ink-500: #6B6357;
  --ink-400: #8C8473;
  --ink-300: #B5AC97;
  --ink-200: #D5CCB6;
  --ink-100: #E4DCC7;        /* hairline rules */

  /* ----- PAPER ----- */
  --paper:     #F3EDE0;
  --paper-2:   #E9E1CE;
  --paper-up:  #F8F3E7;
  --paper-deep:#1B1610;

  /* ----- ACCENT (Palette A: warm parchment + signal red) ----- */
  --accent:    #D6402B;
  --accent-d:  #A82E1B;
  --accent-soft: #F2BFB5;
  --accent-tint: rgba(214,64,43,0.10);

  /* ----- TYPE ----- */
  --serif:    "Source Serif 4", "Source Serif Pro", "Georgia", serif;
  --sans:     "Geist", "Helvetica Neue", "Helvetica", sans-serif;
  --mono:     "JetBrains Mono", "SFMono-Regular", ui-monospace, monospace;

  /* ----- LAYOUT ----- */
  --max:      1240px;
  --gutter:   32px;
  --r-sm: 2px;
  --r-md: 6px;
  --r-lg: 10px;
}

/* ----------- RESET ----------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink-900);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink-900); color: var(--paper); }

main, header, footer, section { position: relative; z-index: 1; }

/* ----------- CONTAINER ----------- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
@media (max-width: 640px){
  :root { --gutter: 20px; }
}

/* ============================================================
   TYPE
   Sans-led. Serif used only for column output + select moments.
   ============================================================ */

.eyebrow {
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-700);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
}
.eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: -2px;
}

.dek {
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.45;
  color: var(--ink-500);
  font-weight: 400;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}

/* hero-grade display (sans-led, modern) */
h1.display, .display {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(40px, 5.2vw, 72px);
  line-height: 1;
  letter-spacing: -0.032em;
  margin: 0;
  color: var(--ink-900);
  text-wrap: balance;
}
/* italic-serif accent inside a sans display word — disabled.
   Serif lives only inside the column output (excerpt + claims + pull quote). */
h1.display em,
.display em {
  font-weight: 500;
  font-style: normal;
}
h1.display .accent,
.display .accent {
  color: var(--accent);
}

h2.section {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.024em;
  margin: 0;
  text-wrap: balance;
}
h2.section em {
  font-weight: 500;
  font-style: normal;
}
h2.section .accent { color: var(--accent); }

/* labels */
.label {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-900);
}
.label-uc {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-700);
}
.muted {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-500);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-700);
  padding: 5px 10px;
  border: 1px solid var(--ink-200);
  border-radius: 100px;
  background: transparent;
}
.tag .pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-tint);
}

/* ============================================================
   MASTHEAD — minimal
   ============================================================ */
.masthead {
  padding: 18px 0;
  background: var(--paper);
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ink-100);
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink-900);
  line-height: 1;
  transition: opacity .15s ease;
}
.wordmark:hover { opacity: .8; }
.wordmark .prompt {
  color: var(--accent);
  font-weight: 700;
  transform: translateY(-0.5px);
}
.wordmark .name { color: var(--ink-900); }
.wordmark .cursor {
  display: inline-block;
  width: 9px;
  height: 18px;
  background: var(--accent);
  margin-left: 2px;
  border-radius: 1.5px;
  animation: aic-blink 1.05s steps(1) infinite;
}
@keyframes aic-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
.masthead-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-500);
}
.masthead-nav a { transition: color .15s ease; }
.masthead-nav a:hover { color: var(--ink-900); }
.masthead-nav .pill {
  font-size: 12.5px;
  padding: 6px 11px;
  border: 1px solid var(--ink-200);
  border-radius: 100px;
  color: var(--ink-700);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.masthead-nav .pill .pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
@media (max-width: 640px){
  .masthead-nav a:not(.pill) { display: none; }
}

/* ============================================================
   RULES
   ============================================================ */
.rule        { border: 0; height: 1px; background: var(--ink-100); margin: 0; }
.rule-strong { border: 0; height: 1px; background: var(--ink-200); margin: 0; }

/* ============================================================
   SECTION CAP — numbered header used at top of major sections
   ============================================================ */
.sec-cap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink-100);
  margin-bottom: 40px;
  gap: 24px;
}
.sec-cap .left {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-shrink: 0;
}
.sec-cap .num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}
.sec-cap .name {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-900);
  white-space: nowrap;
}
.sec-cap .right {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-500);
  text-align: right;
}
@media (max-width: 640px){
  .sec-cap .right { display: none; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px;
  background: var(--ink-900);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: #000; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--ink-900);
  border: 1px solid var(--ink-200);
}
.btn-ghost:hover { background: var(--ink-900); color: var(--paper); border-color: var(--ink-900); }

/* ============================================================
   FORM — modern, composed
   ============================================================ */
.field { display: grid; gap: 8px; }
.field-label {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--ink-700);
  font-weight: 500;
}
.field-label .opt {
  color: var(--ink-400);
  font-weight: 400;
  margin-left: 6px;
}
.field-input {
  display: flex;
  align-items: center;
  background: var(--paper-up);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  padding: 14px 16px;
  transition: border-color .15s ease, background .15s ease;
}
.field-input:focus-within {
  border-color: var(--ink-900);
  background: var(--paper-up);
}
.field-input .prefix {
  font-family: var(--mono);
  color: var(--ink-400);
  margin-right: 8px;
  font-size: 14px;
}
.field-input input,
.field-input textarea {
  flex: 1;
  width: 100%;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  color: var(--ink-900);
  outline: none;
  padding: 0;
}
.field-input input::placeholder,
.field-input textarea::placeholder {
  color: var(--ink-400);
  font-weight: 400;
}
.field-input textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.field-hint {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-500);
}

/* form composed as horizontal CTA block: input on left, button on right */
.cta-bar {
  display: flex;
  gap: 10px;
  align-items: stretch;
  background: var(--paper-up);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  padding: 6px;
  transition: border-color .15s ease;
}
.cta-bar:focus-within { border-color: var(--ink-900); }
.cta-bar .prefix {
  font-family: var(--mono);
  color: var(--ink-400);
  font-size: 14px;
  display: flex;
  align-items: center;
  padding-left: 14px;
}
.cta-bar input {
  flex: 1;
  border: 1px solid var(--ink-200);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  color: var(--ink-900);
  outline: none;
  padding: 13px 14px;
  min-width: 0;
  border-radius: 4px;
  transition: border-color .15s ease, background .15s ease;
}
.cta-bar input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.cta-bar input::placeholder { color: var(--ink-400); }
.cta-bar .btn {
  height: auto;
  padding: 0 18px;
  border-radius: calc(var(--r-md) - 2px);
}
@media (max-width: 520px){
  .cta-bar { flex-direction: column; padding: 0; background: transparent; border: 0; gap: 10px; }
  .cta-bar .prefix { display: none; }
  .cta-bar input {
    width: 100%;
    font-size: 16px;
    padding: 14px 14px;
  }
  .cta-bar .btn {
    width: 100%;
    height: 50px;
    padding: 0 22px;
    border-radius: var(--r-md);
  }
}

/* ============================================================
   LINKS
   ============================================================ */
.link {
  position: relative;
  transition: color .15s ease;
}
.link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--ink-300);
  transition: background .15s ease;
}
.link:hover { color: var(--accent); }
.link:hover::after { background: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
footer.foot {
  margin-top: 96px;
  padding: 48px 0 56px;
  border-top: 1px solid var(--ink-100);
  background: var(--paper);
}
footer.foot .foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.7fr;
  gap: 48px;
  align-items: start;
}
footer.foot h4 {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin: 0 0 14px;
  font-weight: 600;
}
footer.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
footer.foot a {
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--ink-800);
  transition: color .15s ease;
}
footer.foot a:hover { color: var(--accent); }
footer.foot .colophon {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-500);
  margin-top: 18px;
  max-width: 30ch;
  line-height: 1.5;
}
@media (max-width: 860px) {
  footer.foot .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 540px) {
  footer.foot .foot-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.tnum { font-variant-numeric: tabular-nums; }
.italic { font-style: italic; }
.serif    { font-family: var(--serif); }
.serif-it { font-family: var(--serif); font-style: italic; }
.sans     { font-family: var(--sans); }
.mono     { font-family: var(--mono); font-feature-settings:"tnum","zero"; }

.ink-500 { color: var(--ink-500); }
.ink-700 { color: var(--ink-700); }
.accent  { color: var(--accent); }

.fcol { display: flex; flex-direction: column; }
.mt-xs { margin-top: 8px; } .mt-sm { margin-top: 16px; } .mt-md { margin-top: 28px; }
.mt-lg { margin-top: 56px; } .mt-xl { margin-top: 88px; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes rise { from { opacity:0; transform: translateY(10px);} to{opacity:1;transform:none;} }
.rise { animation: rise .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes fade-in { from { opacity:0; } to { opacity:1; } }
.fade-in { animation: fade-in .35s ease both; }
