/* =============================================================
   ARCLINE — Core stylesheet  (v2)
   Direction: Swiss Modernism / engineering-precise, dark.
   Monochrome zinc base + ONE flat accent (brand blue). No
   gradients, no glow, no decorative shadows. Mathematical
   spacing, hairline rules, sharp geometry. Type is the signature.
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800;900&family=IBM+Plex+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root{
  /* base — neutral zinc, dark */
  --bg:        #0a0a0b;
  --bg-2:      #0d0d0f;
  --surface:   #141417;
  --surface-2: #1b1b1f;

  /* hairlines — neutral, never blue */
  --line:   rgba(255,255,255,0.09);
  --line-2: rgba(255,255,255,0.16);

  /* text — zinc scale */
  --text:  #f4f4f5;
  --text-2:#a1a1aa;
  --muted: #8a8a93;

  /* single flat accent = brand blue */
  --accent:       #3fa9f5;
  --accent-press: #2e97e6;
  --accent-soft:  rgba(63,169,245,0.10);
  --on-accent:    #051320;

  /* status (used sparingly, low-chroma) */
  --ok: #5fcf8e;

  /* scale */
  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 48px);

  /* type */
  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --radius: 3px;
}

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

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

body{
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-2);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Layout ---- */
.wrap{ width:100%; max-width:var(--maxw); margin-inline:auto; padding-inline:var(--pad); }
.section{ padding-block: clamp(72px, 10vw, 130px); position: relative; }
.section--tight{ padding-block: clamp(52px, 7vw, 88px); }
/* hairline divider between stacked sections */
.section + .section, .section--tight + .section, .section + .section--tight, .section--tight + .section--tight{ border-top: 1px solid var(--line); }

/* ---- Eyebrow / labels ---- */
.eyebrow{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before{ content:""; width: 14px; height: 2px; background: var(--accent); }

.section-head{ max-width: 680px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head .eyebrow{ margin-bottom: 20px; }

/* ---- Typography ---- */
h1,h2,h3,h4{ font-family: var(--font-display); color: var(--text); font-weight: 700; line-height: 1.04; letter-spacing: -0.03em; }
h2{ font-size: clamp(2rem, 4.2vw, 3.3rem); font-weight: 700; }
h3{ font-size: 1.22rem; font-weight: 600; letter-spacing: -0.01em; }
p{ color: var(--text-2); }
.lead{ font-size: clamp(1.05rem, 1.55vw, 1.28rem); color: var(--text-2); line-height: 1.6; }
strong{ color: var(--text); font-weight: 600; }

/* ---- Buttons ---- */
.btn{
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500; letter-spacing: 0.01em;
  padding: 0.85em 1.4em; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: transform .16s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.btn svg{ width: 15px; height: 15px; }
.btn-primary{ background: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn-primary:hover{ background: var(--accent-press); transform: translateY(-1px); }
.btn-ghost{ background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover{ border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* ---- Header / nav ---- */
.site-header{
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav{ display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 24px; }
.brand{ display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--text); letter-spacing: -0.02em; }
.brand .mark{ width: 28px; height: 28px; flex: none; border-radius: 50%; object-fit: cover; display: block; }

.nav-links{ display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a{ font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); position: relative; padding-block: 4px; transition: color .18s ease; }
.nav-links a:hover, .nav-links a[aria-current="page"]{ color: var(--text); }
.nav-links a[aria-current="page"]::after{ content:""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent); }
.nav-right{ display: flex; align-items: center; gap: 16px; }
.nav-toggle{ display: none; background: none; border: 1px solid var(--line-2); border-radius: var(--radius); width: 40px; height: 40px; color: var(--text); cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg{ width: 20px; height: 20px; }

/* ---- Hero ---- */
.hero{ position: relative; padding-block: clamp(80px, 13vw, 160px) clamp(60px, 9vw, 120px); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero .wrap{ position: relative; z-index: 2; }
.hero-inner{ max-width: 920px; }
.hero h1{ font-size: clamp(2.9rem, 8vw, 6.2rem); font-weight: 800; line-height: 0.98; letter-spacing: -0.045em; margin: 26px 0 30px; max-width: 16ch; }
.hero h1 .accent{ color: var(--accent); }
.hero .lead{ max-width: 60ch; margin-bottom: 38px; }
.hero-cta{ display: flex; flex-wrap: wrap; gap: 14px; }

/* quiet flat 'arcline' signature: a single thin rule, no glow */
.hero::after{
  content:""; position: absolute; right: calc(-1 * var(--pad)); bottom: 0; width: min(46vw, 560px); height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2)); z-index: 1; pointer-events: none;
}

.reveal{ opacity: 0; transform: translateY(12px); }
.reveal.in{ opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }

/* ---- Stack strip ---- */
.cap-strip{ border-bottom: 1px solid var(--line); background: var(--bg); padding-block: 20px; }
.cap-row{ display: flex; flex-wrap: wrap; gap: 8px 0; align-items: center; }
.cap-label{ font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-right: 20px; }
.chip{ font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-2); padding: 0 16px 0 0; position: relative; }
.chip::after{ content:"/"; position: absolute; right: 5px; color: var(--line-2); }
.chip:last-child::after{ content:""; }

/* ---- Card grid ---- */
.grid{ display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.card{
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; transition: border-color .2s ease, transform .2s ease;
}
.card:hover{ border-color: var(--line-2); transform: translateY(-3px); }
.card .ico{ display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; color: var(--accent); margin-bottom: 22px; }
.card .ico svg{ width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; }
.card h3{ margin-bottom: 10px; }
.card p{ font-size: 0.94rem; line-height: 1.6; }
.card .tag{ font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 16px; }

/* ---- Work / project cards ---- */
.work-grid{ display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.work-card{ display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .2s ease, transform .2s ease; }
.work-card:hover{ border-color: var(--line-2); transform: translateY(-3px); }
.work-thumb{ aspect-ratio: 16 / 9; position: relative; background: var(--surface-2); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.work-thumb::before{ content:""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 28px 28px; opacity: 0.6; }
.work-thumb .glyph{ font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4.5vw, 3rem); color: rgba(244,244,245,0.13); letter-spacing: -0.04em; position: relative; }
.work-thumb img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.work-body{ padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.work-body h3{ font-size: 1.18rem; }
.work-body p{ font-size: 0.92rem; flex: 1; line-height: 1.55; }
.work-tags{ display: flex; flex-wrap: wrap; gap: 6px; }
.work-tags span{ font-family: var(--font-mono); font-size: 0.66rem; color: var(--muted); border: 1px solid var(--line); border-radius: 2px; padding: 3px 8px; }
.work-link{ font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
.work-link svg{ width: 14px; height: 14px; transition: transform .2s ease; }
.work-card:hover .work-link svg{ transform: translateX(3px); }

/* ---- Process (real sequence -> numbered) ---- */
.steps{ display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.step{ padding: 32px 28px 36px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.step .num{ font-family: var(--font-mono); font-size: 0.74rem; color: var(--accent); letter-spacing: 0.08em; margin-bottom: 18px; display: block; }
.step h3{ font-size: 1.08rem; margin-bottom: 8px; }
.step p{ font-size: 0.9rem; line-height: 1.55; }

/* ---- Split / about ---- */
.split{ display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.stat-row{ display: flex; flex-wrap: wrap; gap: 28px 44px; margin-top: 32px; }
.stat .n{ font-family: var(--font-display); font-weight: 700; font-size: clamp(1.7rem, 3.2vw, 2.3rem); color: var(--text); line-height: 1; letter-spacing: -0.02em; }
.stat .l{ font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-top: 8px; display: block; }
.panel{ border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 32px; min-height: 280px; }
.panel ul{ list-style: none; display: flex; flex-direction: column; gap: 0; }
.panel li{ font-family: var(--font-mono); font-size: 0.84rem; color: var(--text-2); display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.panel li:first-child{ padding-top: 0; }
.panel li:last-child{ border-bottom: none; padding-bottom: 0; }
.panel li .dot{ width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; }
.panel li .pill{ margin-left: auto; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); border-radius: 2px; padding: 2px 7px; }

/* ---- CTA band ---- */
.cta-band{ border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); padding: clamp(44px, 6vw, 80px); text-align: center; }
.cta-band h2{ margin-bottom: 16px; }
.cta-band p{ max-width: 540px; margin: 0 auto 32px; }
.cta-band .hero-cta{ justify-content: center; }

/* ---- Footer ---- */
.site-footer{ border-top: 1px solid var(--line); background: var(--bg); padding-block: 64px 30px; }
.footer-grid{ display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid var(--line); }
.footer-brand p{ font-size: 0.9rem; margin-top: 16px; max-width: 280px; }
.footer-col h4{ font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 18px; }
.footer-col ul{ list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a, .footer-col span{ font-size: 0.9rem; color: var(--text-2); transition: color .18s ease; font-family: var(--font-mono); }
.footer-col a:hover{ color: var(--accent); }
.footer-bottom{ display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding-top: 26px; }
.footer-bottom small, .footer-meta{ font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.footer-meta{ display: flex; gap: 18px; flex-wrap: wrap; }

/* ---- Interior page header ---- */
.page-head{ padding-block: clamp(70px, 10vw, 130px) clamp(36px, 5vw, 60px); border-bottom: 1px solid var(--line); }
.page-head h1{ font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1; margin: 20px 0 20px; max-width: 16ch; }
.page-head .lead{ max-width: 620px; }

/* ---- Contact ---- */
.contact-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.field{ margin-bottom: 18px; }
.field label{ font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 8px; }
.field input, .field textarea, .field select{ width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--text); font-family: var(--font-body); font-size: 0.95rem; padding: 12px 14px; transition: border-color .18s ease; }
.field input:focus, .field textarea:focus, .field select:focus{ outline: none; border-color: var(--accent); }
.field textarea{ resize: vertical; min-height: 130px; }
.contact-detail{ border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 26px; margin-bottom: 16px; }
.contact-detail .label{ font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 10px; }
.contact-detail a, .contact-detail p{ color: var(--text); font-size: 1.02rem; }
.contact-detail a:hover{ color: var(--accent); }

/* ---- Project detail ---- */
.project-hero{ padding-block: clamp(70px, 10vw, 120px) clamp(30px, 4vw, 48px); }
.project-meta{ display: flex; flex-wrap: wrap; gap: 28px 48px; padding-block: 28px; border-block: 1px solid var(--line); margin-block: 40px; }
.project-meta .item .k{ font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 7px; }
.project-meta .item .v{ color: var(--text); font-size: 0.96rem; }
.prose{ max-width: 680px; }
.prose h2{ font-size: 1.5rem; margin: 40px 0 14px; }
.prose p{ margin-bottom: 16px; }
.prose ul{ margin: 0 0 18px 18px; color: var(--text-2); }
.prose li{ margin-bottom: 8px; }
.shot{ aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); display: flex; align-items: center; justify-content: center; margin-block: 30px; overflow: hidden; position: relative; }
.shot::before{ content:""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 32px 32px; opacity: 0.6; }
.shot .glyph{ font-family: var(--font-display); font-weight: 800; color: rgba(244,244,245,0.12); font-size: 3rem; position: relative; }
.shot img{ width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.back-link{ font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); display: inline-flex; align-items: center; gap: 7px; }
.back-link svg{ width: 14px; height: 14px; }

/* ---- Status pills (projects + products) ---- */
.proj-status{ position: absolute; top: 12px; left: 12px; z-index: 2; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 9px; border-radius: 2px; color: var(--text-2); border: 1px solid var(--line-2); background: color-mix(in srgb, var(--bg) 65%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.proj-status.current, .proj-status.live{ color: var(--ok); border-color: color-mix(in srgb, var(--ok) 42%, transparent); }
.proj-status.past{ color: var(--muted); }
.proj-status.beta, .proj-status.dev{ color: var(--accent); border-color: color-mix(in srgb, var(--accent) 42%, transparent); }

/* ---- Section head row with 'view all' ---- */
.head-row{ display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(30px, 4vw, 48px); }
.head-row .section-head{ margin-bottom: 0; }
.head-row .section-head .eyebrow{ margin-bottom: 16px; }
.view-all{ font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding-bottom: 6px; }
.view-all svg{ width: 14px; height: 14px; transition: transform .2s ease; }
.view-all:hover svg{ transform: translateX(3px); }

/* ---- Article cards ---- */
.article-card{ display: flex; flex-direction: column; gap: 13px; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px 24px; transition: border-color .2s ease, transform .2s ease; }
.article-card:hover{ border-color: var(--line-2); transform: translateY(-3px); }
.article-cat{ font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 4px 9px; border-radius: 2px; align-self: flex-start; border: 1px solid var(--line-2); color: var(--muted); }
.article-cat.dev{ color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.article-cat.ai{ color: var(--text); border-color: var(--line-2); }
.article-card h3{ font-size: 1.12rem; line-height: 1.28; }
.article-card p{ font-size: 0.92rem; flex: 1; line-height: 1.55; }
.article-meta{ font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); display: flex; gap: 14px; padding-top: 13px; border-top: 1px solid var(--line); margin-top: 2px; }

/* ---- Responsive ---- */
@media (max-width: 860px){
  .nav-links{ display: none; }
  .nav-right .btn-cta-desktop{ display: none; }
  .nav-toggle{ display: inline-flex; }
  .nav-links.open{ display: flex; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 8px var(--pad) 18px; }
  .nav-links.open li{ border-bottom: 1px solid var(--line); }
  .nav-links.open a{ display: block; padding: 15px 0; font-size: 0.9rem; }
  .nav-links.open a[aria-current="page"]::after{ display: none; }
  .split, .contact-grid{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr 1fr; gap: 32px; }
  .steps{ grid-template-columns: 1fr; }
}
@media (max-width: 520px){
  .footer-grid{ grid-template-columns: 1fr; }
  .hero-cta .btn{ flex: 1; justify-content: center; }
  .card{ padding: 28px 24px; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal{ opacity: 1; transform: none; }
}

/* inline code (article prose) */
.prose code, code{ font-family: var(--font-mono); font-size: 0.86em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; color: var(--text); }

/* ---- Integrations / logo wall ---- */
.logos{ display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: clamp(36px, 5vw, 54px); }
.logo-cell{ display: flex; align-items: center; justify-content: center; gap: 10px; padding: 34px 20px; min-height: 104px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); transition: color .2s ease, background .2s ease; }
.logo-cell:hover{ color: var(--text); background: var(--surface); }
.logo-cell .brand-logo{ height: 24px; width: auto; max-width: 130px; fill: currentColor; display: block; }
.logo-cell .wordmark{ font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; color: inherit; white-space: nowrap; }
@media (max-width: 860px){ .logos{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px){ .logos{ grid-template-columns: repeat(2, 1fr); } }
