@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap");

/* ============ TOKENS ============ */
:root {
  --ink: #14181c;
  --ink-soft: #4a5158;
  --ink-faint: #8b929a;
  --paper: #f1f2ed;
  --paper-raised: #ffffff;
  --line: #dadfd5;
  --signal: #f2a93b;      /* amber — automation "trigger" accent */
  --signal-ink: #7a4b0a;
  --sheet: #2e7d5b;       /* spreadsheet green — secondary accent */
  --sheet-soft: #e4f0ea;
  --workspace: #1b2430;   /* deep navy — dark sections */
  --workspace-soft: #2a3441;
  --workspace-line: #384252;
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 28px;
  --display: "Space Grotesk", sans-serif;
  --body: "Inter", sans-serif;
  --mono: "IBM Plex Mono", monospace;
  --max: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 2rem; }

h1, h2, h3 { font-family: var(--display); line-height: 1.15; letter-spacing: -0.01em; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sheet);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--signal);
}

/* ============ BUTTONS ============ */
.btn {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 200ms ease;
}
.btn-primary { background: var(--ink); color: var(--paper-raised); }
.btn-primary:hover { background: var(--signal); color: var(--ink); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-on-dark { background: var(--signal); color: var(--ink); }
.btn-on-dark:hover { background: #ffc266; transform: translateY(-2px); }
.btn-ghost-on-dark { background: transparent; color: var(--paper-raised); border-color: var(--workspace-line); }
.btn-ghost-on-dark:hover { border-color: var(--paper-raised); transform: translateY(-2px); }

/* ============ NAV ============ */
header.site-nav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(241, 242, 237, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 0;
}
.brand { font-family: var(--display); font-weight: 700; font-size: 1.25rem; }
.brand span { color: var(--sheet); }
.nav-links {
  display: flex; align-items: center; gap: 2.2rem;
  list-style: none; font-weight: 500; font-size: 0.95rem;
}
.nav-links a { position: relative; color: var(--ink-soft); }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--signal);
}
.nav-cta { display: flex; align-items: center; gap: 1rem; }
.nav-cta .btn { padding: 0.65rem 1.3rem; font-size: 0.88rem; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; }
.hamburger span { width: 24px; height: 2px; background: var(--ink); transition: all 250ms ease; }
.mobile-menu {
  display: none; flex-direction: column; gap: 0; background: var(--paper-raised);
  border-top: 1px solid var(--line);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 1rem 2rem; border-bottom: 1px solid var(--line); font-weight: 500; }

/* ============ HERO ============ */
.hero { padding: 5rem 0 6rem; }
.hero-inner {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center;
}
.hero h1 {
  font-size: clamp(2.3rem, 4.2vw, 3.4rem);
  margin: 1rem 0 1.2rem;
}
.hero h1 .accent { color: var(--sheet); }
.hero p.lede {
  font-size: 1.1rem; color: var(--ink-soft); max-width: 34rem; margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero-trust { display: flex; gap: 2.2rem; flex-wrap: wrap; }
.hero-trust div { font-family: var(--mono); }
.hero-trust b { display: block; font-size: 1.5rem; font-family: var(--display); color: var(--ink); }
.hero-trust span { font-size: 0.78rem; color: var(--ink-faint); }

/* ---- signature: automation flow diagram ---- */
.flow-card {
  background: var(--workspace); border-radius: var(--radius-lg);
  padding: 2rem; position: relative; overflow: hidden;
}
.flow-card::before {
  content: "AUTOMATION.LOG"; position: absolute; top: 1.2rem; right: 1.6rem;
  font-family: var(--mono); font-size: 0.68rem; color: var(--workspace-line); letter-spacing: 0.08em;
}
.flow-node {
  display: flex; align-items: center; gap: 0.7rem;
  background: var(--workspace-soft); border: 1px solid var(--workspace-line);
  border-radius: var(--radius-sm); padding: 0.75rem 1rem; margin-bottom: 0;
  font-family: var(--mono); font-size: 0.82rem; color: #cfd6de;
}
.flow-node .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); flex-shrink: 0; }
.flow-node.done .dot { background: var(--sheet); }
.flow-node.active .dot { background: var(--signal); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(242,169,59,0.5); } 50% { box-shadow: 0 0 0 6px rgba(242,169,59,0); } }
.flow-connector { width: 1.5px; height: 22px; background: var(--workspace-line); margin-left: 1.55rem; }
.flow-card p.caption {
  font-family: var(--mono); font-size: 0.72rem; color: var(--ink-faint); margin-top: 1.2rem;
}

/* ============ SECTION SCAFFOLDING ============ */
section { padding: 5rem 0; }
.section-head { max-width: 38rem; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-top: 0.7rem; }
.section-head p { color: var(--ink-soft); margin-top: 0.9rem; }
section.on-dark { background: var(--workspace); color: var(--paper-raised); }
section.on-dark .section-head p, section.on-dark p { color: #b7bfc9; }
section.raised { background: var(--paper-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ============ CARD GRIDS ============ */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

.card {
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.8rem;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px -20px rgba(20,24,28,0.25); }
.card .tag {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em;
  color: var(--sheet); background: var(--sheet-soft);
  padding: 0.25rem 0.6rem; border-radius: 999px; display: inline-block; margin-bottom: 1rem;
}
.card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.card p { color: var(--ink-soft); font-size: 0.95rem; }
.card ul { margin-top: 1rem; padding-left: 1.1rem; color: var(--ink-soft); font-size: 0.92rem; }
.card ul li { margin-bottom: 0.35rem; }

/* ============ PROCESS ============ */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: step; }
.process-step { position: relative; padding-top: 2.5rem; }
.process-step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--mono); font-size: 0.85rem; color: var(--ink-faint);
  position: absolute; top: 0; left: 0;
}
.process-step h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.process-step p { color: var(--ink-soft); font-size: 0.9rem; }

/* ============ PORTFOLIO ============ */
.proj-card { display: flex; flex-direction: column; }
.proj-card .stack { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0 1.2rem; }
.proj-card .stack span {
  font-family: var(--mono); font-size: 0.7rem; color: var(--ink-soft);
  background: var(--paper); border: 1px solid var(--line);
  padding: 0.2rem 0.55rem; border-radius: 999px;
}
.proj-card .proj-link { margin-top: auto; font-weight: 600; font-size: 0.9rem; color: var(--sheet); }
.proj-card .proj-link:hover { text-decoration: underline; }

/* ============ TIMELINE (about) ============ */
.timeline { border-left: 2px solid var(--line); padding-left: 2rem; display: flex; flex-direction: column; gap: 2.2rem; }
.timeline-item { position: relative; }
.timeline-item::before {
  content: ""; position: absolute; left: -2.42rem; top: 0.3rem;
  width: 12px; height: 12px; border-radius: 50%; background: var(--signal); border: 3px solid var(--paper);
}
.timeline-item .date { font-family: var(--mono); font-size: 0.78rem; color: var(--sheet); }
.timeline-item h3 { margin: 0.3rem 0 0.4rem; font-size: 1.1rem; }
.timeline-item p { color: var(--ink-soft); font-size: 0.95rem; }

/* ============ CTA BANNER ============ */
.cta-banner {
  background: var(--workspace); border-radius: var(--radius-lg);
  padding: 3.5rem 3rem; text-align: center; color: var(--paper-raised);
}
.cta-banner h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.8rem; }
.cta-banner p { color: #b7bfc9; max-width: 32rem; margin: 0 auto 2rem; }
.cta-banner .btn-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ============ CONTACT ============ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.contact-form label { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 0.35rem; display: block; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; font-family: var(--body); font-size: 0.95rem;
  padding: 0.8rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper-raised); color: var(--ink);
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--sheet);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-channels { display: flex; flex-direction: column; gap: 1rem; }
.channel-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
}
.channel-card .ic {
  width: 42px; height: 42px; border-radius: 50%; background: var(--sheet-soft);
  display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 600; color: var(--sheet); flex-shrink: 0;
}
.channel-card h3 { font-size: 1rem; margin-bottom: 0.15rem; }
.channel-card p { font-size: 0.88rem; color: var(--ink-soft); }
.channel-card a.channel-link { font-size: 0.88rem; font-weight: 600; color: var(--sheet); }

/* ============ FOOTER ============ */
footer.site-footer { background: var(--workspace); color: #b7bfc9; padding: 3.5rem 0 2rem; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem; margin-bottom: 2.5rem; }
.footer-brand .brand { color: var(--paper-raised); }
.footer-brand p { font-size: 0.9rem; margin-top: 0.6rem; max-width: 22rem; }
.footer-links { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; color: var(--ink-faint); margin-bottom: 0.9rem; text-transform: uppercase; }
.footer-col a { display: block; font-size: 0.9rem; margin-bottom: 0.6rem; color: #b7bfc9; }
.footer-col a:hover { color: var(--paper-raised); }
.footer-bottom { border-top: 1px solid var(--workspace-line); padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem; font-size: 0.82rem; }

/* ============ PAGE HEADER (inner pages) ============ */
.page-header { padding: 3.5rem 0 1rem; }
.page-header h1 { font-size: clamp(2rem, 3.6vw, 2.8rem); margin-top: 0.8rem; }
.page-header p { color: var(--ink-soft); margin-top: 1rem; max-width: 36rem; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 1.3rem; }
  .grid-4, .grid-3, .grid-2, .process { grid-template-columns: 1fr; }
  .hero-trust { gap: 1.5rem; }
  .footer-grid { flex-direction: column; }
  .cta-banner { padding: 2.5rem 1.5rem; }
}
