/* ============================================================
   BEFOX - Base / shared styles
   Dark, technical & warm. Humanist sans + mono.
   Lightweight, no-JS. Shared by all page templates.
   ============================================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---- Design tokens ---- */
:root{
  /* Brand */
  --orange:        #f08018;
  --orange-bright: #ff9b3f;
  --orange-deep:   #c4660e;
  --brown:         #99520f;
  --brown-dark:    #452507;

  /* Warm neutral scale (dark) */
  --ink-900: #120f0c;   /* page background */
  --ink-850: #181410;
  --ink-800: #1d1813;   /* raised surface */
  --ink-750: #241e18;   /* card */
  --ink-700: #2c251d;   /* hover surface */
  --line:    #38302610; /* not used directly */

  /* Text */
  --fg:       #f4efe8;  /* primary */
  --fg-soft:  #cdc4b8;  /* secondary */
  --fg-mute:  #968b7c;  /* tertiary / captions */

  /* Hairlines */
  --hair:        rgba(244,239,232,.10);
  --hair-strong: rgba(244,239,232,.18);

  /* Type */
  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Rhythm */
  --pad: clamp(20px, 5vw, 64px);
  --maxw: 1200px;
  --radius: 14px;
}

/* ---- Reset-ish ---- */
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--sans);
  background:var(--ink-900);
  color:var(--fg);
  line-height:1.6;
  font-size:17px;
  letter-spacing:-.003em;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
h1,h2,h3,h4,p{ margin:0; }
ul{ margin:0; padding:0; list-style:none; }
button{ font:inherit; }
::selection{ background:var(--orange); color:#1a1208; }

/* ---- Layout helpers ---- */
.wrap{ max-width:var(--maxw); margin-inline:auto; padding-inline:var(--pad); }
.eyebrow{
  font-family:var(--mono);
  font-size:12.5px;
  font-weight:500;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--orange);
  display:inline-flex;
  align-items:center;
  gap:.55em;
}
.eyebrow::before{ content:""; width:1.6em; height:1px; background:var(--orange); opacity:.7; }
.muted{ color:var(--fg-soft); }

/* ---- Buttons ---- */
.btn{
  --bg:var(--orange); --c:#1a1107;
  display:inline-flex; align-items:center; gap:.55em;
  background:var(--bg); color:var(--c);
  font-weight:700; font-size:15.5px; letter-spacing:-.01em;
  padding:13px 22px; border-radius:10px; border:0; cursor:pointer; white-space:nowrap;
  transition:transform .15s ease, background .15s ease, box-shadow .15s ease;
  will-change:transform;
}
.btn:hover{ background:var(--orange-bright); transform:translateY(-2px); box-shadow:0 10px 24px -10px rgba(240,128,24,.6); }
.btn .arr{ transition:transform .15s ease; }
.btn:hover .arr{ transform:translateX(3px); }
.btn--ghost{ --bg:transparent; --c:var(--fg); border:1px solid var(--hair-strong); }
.btn--ghost:hover{ --bg:var(--ink-700); box-shadow:none; border-color:var(--fg-mute); }

/* ============================================================
   HEADER  (shared)
   ============================================================ */
.site-header{
  position:sticky; top:0; z-index:50;
  background:color-mix(in srgb, var(--ink-900) 86%, transparent);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--hair);
}
.nav{ display:flex; align-items:center; gap:24px; height:70px; }
.brand{ display:flex; align-items:center; margin-right:auto; }
.brand img{ height:42px; width:auto; }
.nav-links{ display:flex; align-items:center; gap:28px; }
.nav-links a{
  font-size:15px; font-weight:500; color:var(--fg-soft); white-space:nowrap;
  position:relative; padding:4px 0; transition:color .15s ease;
}
.nav-links a:hover{ color:var(--fg); }
.nav-links a.active{ color:var(--fg); }
.nav-links a::after{
  content:""; position:absolute; left:0; right:100%; bottom:-2px; height:2px;
  background:var(--orange); transition:right .2s ease;
}
.nav-links a:hover::after, .nav-links a.active::after{ right:0; }
.nav-cta{ display:flex; align-items:center; gap:14px; }

/* Mobile menu: no-JS disclosure */
.nav-toggle{ display:none; }
.burger{ display:none; }

@media (max-width:860px){
  .nav-cta .btn{ display:none; }
  .burger{
    display:flex; flex-direction:column; gap:5px; justify-content:center;
    width:42px; height:42px; border:1px solid var(--hair-strong);
    border-radius:9px; cursor:pointer; align-items:center;
  }
  .burger span{ width:18px; height:2px; background:var(--fg); border-radius:2px; transition:.2s; }
  .nav-links{
    position:absolute; top:70px; left:0; right:0;
    flex-direction:column; align-items:stretch; gap:0;
    background:var(--ink-850); border-bottom:1px solid var(--hair);
    max-height:0; overflow:hidden; transition:max-height .28s ease;
  }
  .nav-links a{ padding:16px var(--pad); border-top:1px solid var(--hair); font-size:16px; }
  .nav-links a::after{ display:none; }
  .nav-toggle:checked ~ .nav-links{ max-height:320px; }
  .nav-toggle:checked ~ .burger span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .burger span:nth-child(2){ opacity:0; }
  .nav-toggle:checked ~ .burger span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }
}

/* ============================================================
   FOOTER  (shared)
   ============================================================ */
.site-footer{
  border-top:1px solid var(--hair);
  background:var(--ink-850);
  margin-top:0;
}
.footer-top{
  display:grid; grid-template-columns:1.6fr 1fr 1fr 1fr; gap:40px;
  padding-block:64px 48px;
}
.footer-brand .brand{ margin-bottom:16px; }
.footer-brand p{ color:var(--fg-mute); font-size:14.5px; max-width:30ch; }
.footer-col h4{
  font-family:var(--mono); font-size:12px; text-transform:uppercase;
  letter-spacing:.1em; color:var(--fg-mute); margin-bottom:16px; font-weight:600;
}
.footer-col a{ display:block; color:var(--fg-soft); font-size:14.5px; padding:5px 0; transition:color .15s; }
.footer-col a:hover{ color:var(--orange); }
.footer-bottom{
  display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap;
  padding-block:22px; border-top:1px solid var(--hair);
  font-family:var(--mono); font-size:12.5px; color:var(--fg-mute);
}
.footer-bottom .libre{ color:var(--fg-soft); }
.footer-bottom .libre b{ color:var(--orange); font-weight:600; }

@media (max-width:760px){
  .footer-top{ grid-template-columns:1fr 1fr; gap:32px; padding-block:48px 36px; }
  .footer-brand{ grid-column:1 / -1; }
}

/* ---- Reusable section header ---- */
.sec-head{ max-width:62ch; margin-bottom:clamp(32px,5vw,56px); }
.sec-head h2{
  font-size:clamp(28px,4.4vw,46px); font-weight:800; letter-spacing:-.025em;
  line-height:1.05; margin-top:14px; text-wrap:balance;
}
.sec-head p{ color:var(--fg-soft); font-size:clamp(16px,2vw,18.5px); margin-top:16px; }

/* ---- Tech logo wordmarks (shared concept) ---- */
.tech-name{ font-weight:800; letter-spacing:-.02em; }
