/* ===========================================================
   ALINE — Editorial Confidence
   Shared design system for the redesigned site.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;1,9..144,300;1,9..144,400&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --paper:        #f5f1ea;
  --paper-2:      #ede7dc;
  --ink:          #15140f;
  --ink-soft:     #3a3630;
  --ink-muted:    #5b5750;
  --ink-faint:    #8a857c;
  --rule:         rgba(21, 20, 15, 0.12);
  --rule-strong:  rgba(21, 20, 15, 0.6);
  --accent:       #2d4a2a;     /* deep sage */
  --accent-soft:  #9bbf95;
  --accent-bg:    rgba(45, 74, 42, 0.06);
  --highlight:    rgba(45, 74, 42, 0.18);

  --serif:  'Fraunces', 'Times New Roman', Georgia, serif;
  --sans:   'Inter', system-ui, -apple-system, sans-serif;
  --mono:   'JetBrains Mono', ui-monospace, monospace;

  --max:    1280px;
  --gutter: 56px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* ===== UTILITIES ===== */
.serif { font-family: var(--serif); font-variation-settings: 'opsz' 144; }
.mono { font-family: var(--mono); }
.italic { font-style: italic; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
}
.marker {
  background: linear-gradient(transparent 60%, var(--highlight) 60%);
  padding: 0 2px;
}
.rule { border-top: 1px solid var(--rule); }
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); display: inline-block;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* link underline animation */
.link { position: relative; transition: color .2s; }
.link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s cubic-bezier(.22,1,.36,1);
}
.link:hover::after { transform: scaleX(1); }

/* fade-in */
.fade { animation: fadeUp .8s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ===== NAV ===== */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 56px;
  background: rgba(245, 241, 234, 0.85);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.nav.scrolled { border-bottom-color: var(--rule); }
.nav-logo { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 500; letter-spacing: 0.22em; color: var(--ink); }
.nav-logo-mark {
  width: 28px; height: 28px;
  display: block;
  object-fit: contain;
}
.nav-links { display: flex; gap: 32px; font-size: 13px; color: var(--ink-muted); }
.nav-cta {
  background: var(--ink); color: var(--paper);
  padding: 10px 22px; border: none; border-radius: 100px;
  font-size: 13px; font-weight: 500;
  transition: all .2s;
}
.nav-cta:hover { background: var(--accent); transform: translateY(-1px); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px;
  font-size: 13px; font-weight: 500;
  border-radius: 4px; border: none;
  transition: all .2s;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); }
.btn-light { background: var(--accent-soft); color: var(--ink); }
.btn-light:hover { background: #b3d4ad; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.btn-ghost:hover { border-color: var(--ink); }

/* ===== INPUTS ===== */
.input {
  padding: 14px 18px;
  background: transparent;
  border: 1px solid rgba(21, 20, 15, 0.2);
  border-radius: 4px;
  font-size: 14px; font-family: var(--sans);
  color: var(--ink);
  outline: none;
  transition: border-color .2s, background .2s;
}
.input:focus { border-color: var(--ink); background: rgba(255,255,255,0.4); }
.input::placeholder { color: var(--ink-faint); }

select.input { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%2315140f' fill='none' stroke-width='1.5'/></svg>"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }

/* ===== CHIPS ===== */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-block;
  padding: 8px 16px;
  font-size: 13px;
  border: 1px solid rgba(21,20,15,0.2);
  border-radius: 100px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
  transition: all .15s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.selected {
  background: var(--ink); color: var(--paper);
  border-color: var(--ink);
}

/* Suggestion chips: live below an input as quick-fill helpers */
.chip-suggest {
  display: flex; flex-wrap: wrap; gap: 6px;
  align-items: center;
  margin-top: 10px;
}
.chip-suggest .chip {
  padding: 5px 11px; font-size: 11px; letter-spacing: 0.04em;
  border-radius: 999px; border-color: var(--rule);
  color: var(--ink-muted); background: transparent;
}
.chip-suggest .chip:hover { color: var(--ink); border-color: var(--ink-soft); }
.suggest-eye {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em;
  color: var(--ink-muted); text-transform: uppercase;
  margin-right: 6px;
}

/* Intent textarea + meta row */
.intent-area { resize: vertical; min-height: 64px; line-height: 1.5; padding: 14px 16px; font-family: var(--sans); }
.intent-meta {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-top: 10px;
}
.intent-meta .chip-suggest { margin-top: 0; flex: 1; }
.char-count {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  color: var(--ink-muted); white-space: nowrap; padding-top: 4px;
}

/* ===== FOOTER ===== */
footer.site-foot {
  padding: 56px;
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end;
  border-top: 1px solid var(--rule);
}
.foot-brand { display: flex; flex-direction: column; gap: 6px; }
.foot-brand-row { display: flex; align-items: center; gap: 12px; }
.foot-mark { width: 24px; height: 24px; display: block; object-fit: contain; }
.foot-name { font-size: 12px; font-weight: 500; letter-spacing: 0.22em; }
.foot-copy { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-faint); }
.foot-links { font-family: var(--mono); display: flex; gap: 24px; font-size: 11px; letter-spacing: 0.12em; color: var(--ink-muted); text-transform: uppercase; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 28px; border-radius: 100px;
  font-size: 13px; font-weight: 500;
  background: var(--ink); color: var(--paper);
  z-index: 200; opacity: 0;
  transition: all .35s ease;
  pointer-events: none;
  box-shadow: 0 12px 40px rgba(21, 20, 15, 0.15);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.error { background: #842821; }
.toast.success { background: var(--accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .nav { padding: 16px 24px; }
  .nav-links { display: none; }
  footer.site-foot { padding: 32px 24px; grid-template-columns: 1fr; }
  .foot-links { flex-wrap: wrap; }
}
