/* theme.css — single source of truth for design tokens + site chrome
   (status bar, nav, footer, buttons, cards) shared by every page:
   index.html, contact.html, legal_en.html, legal_fr.html.

   Page-specific styles (hero, capabilities, portfolio, legal layout, …)
   stay inline in each page's own <style> block — only what repeats
   identically across pages belongs here. Edit once, applies everywhere. */

:root {
  --bg:        #06080c;
  --bg-2:      #0a0d13;
  --surface:   #0e121a;
  --elev:      #131824;
  --line:      #1d2330;
  --line-2:    #2a3242;
  --line-hot:  rgba(0,122,255,.38);

  --text:      #e9edf3;
  --text-2:    #c4cad6;
  --mute:      #7c8597;
  --mute-2:    #4e5666;

  --accent:    #007AFF;
  --accent-2:  #5aa9ff;
  --accent-glow: rgba(0,122,255,.18);
  --green:     #7fd49a;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-serif: "Instrument Serif", "Times New Roman", serif;

  --maxw: 1320px;
  --pad: 28px;
  --radius: 14px;
}

*,*::before,*::after { box-sizing: border-box; }
html,body { margin:0; padding:0; background:var(--bg); color:var(--text); }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-feature-settings: "ss01","cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-2); }
::selection { background: var(--accent); color: #fff; }

.grid-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
}

main { position: relative; z-index: 2; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* Type atoms */
.h-section {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(38px, 4.4vw, 68px);
  line-height: .98;
  letter-spacing: -0.035em;
  margin: 0;
}
.h-section em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent-2);
  letter-spacing: -0.025em;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
}
.crumb {
  display: inline-flex; align-items:center; gap:8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--mute);
}
.crumb b { color: var(--text-2); font-weight:500; }
.crumb .sep { color: var(--mute-2); }

/* Dot status indicator */
.dot { display:inline-block; width:7px; height:7px; border-radius:999px; background: var(--green); box-shadow: 0 0 0 3px rgba(127,212,154,.18); position: relative; }
.dot::after { content:""; position:absolute; inset:-3px; border-radius:999px; background: var(--green); opacity:.4; animation: ping 1.8s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity:.5 } 100% { transform: scale(2.2); opacity:0 } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 18px; border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 500; font-size: 14px;
  cursor: pointer; border: 0; transition: transform .15s, background .15s, color .15s;
}
.btn-primary {
  background: var(--accent); color: #ffffff;
  box-shadow: 0 0 0 1px rgba(0,122,255,.45), 0 10px 30px -10px rgba(0,122,255,.65);
}
.btn-primary:hover { background: var(--accent-2); color: #fff; }
.btn .arr { transition: transform .2s; }
.btn:hover .arr { transform: translateX(3px); }

/* Cards */
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
}
.card-bracket::before,
.card-bracket::after,
.card-bracket > .br-bl,
.card-bracket > .br-br {
  content:""; position:absolute; width: 8px; height: 8px; border: 1px solid var(--accent);
}
.card-bracket::before { top:-1px; left:-1px; border-right:0; border-bottom:0; }
.card-bracket::after { top:-1px; right:-1px; border-left:0; border-bottom:0; }
.card-bracket .br-bl { bottom:-1px; left:-1px; border-right:0; border-top:0; }
.card-bracket .br-br { bottom:-1px; right:-1px; border-left:0; border-top:0; }

/* Site chrome: status bar + top nav (rendered by StatusBar/Nav/Logo, see ui.jsx) */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12,9,7,.92);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.nav-status {
  font-family: var(--font-mono); font-size: 11px; color: var(--mute);
  display: flex; align-items:center; gap: 18px; flex-wrap: nowrap;
  padding: 9px 0; border-bottom: 1px solid var(--line);
  white-space: nowrap; overflow: hidden;
}
.nav-status .seg { display:inline-flex; align-items:center; gap:8px; white-space: nowrap; }
.nav-status .seg:first-child { padding-left: 6px; }
.nav-status .seg b { color: var(--text-2); font-weight: 500; }
.nav-status .spacer { flex: 1; }
nav.top { border-bottom: 1px solid var(--line); }
nav.top .row { display: flex; align-items: center; gap: 20px; height: 68px; white-space: nowrap; }
nav.top .grow { flex: 1; }
nav.top .right { display:flex; align-items:center; gap: 10px; flex-shrink: 0; }
nav.top .right .btn { white-space: nowrap; }
.logo { display:flex; align-items:center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; font-size: 16px; flex-shrink: 0; }
.logo .mark { width: 16.4px; height: 25px; display: block; flex-shrink: 0; padding-bottom: 3px; }
.logo small { font-family: var(--font-mono); font-size:10.5px; color: var(--mute); padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,.04); margin-left: 14px; }
.nav-links { display:flex; align-items:center; gap: 22px; margin-left: 16px; flex-shrink: 0; }
.nav-links a { font-size: 14px; color: var(--text-2); display:inline-flex; align-items:center; gap:6px; white-space: nowrap; }
.nav-links a:hover { color: var(--text); }
.nav-links a .ix { font-family: var(--font-mono); font-size:10px; color: var(--mute-2); }

/* Footer (rendered by FooterBig, see sections.jsx) */
footer.bot { padding: 24px 0 40px; position: relative; }
footer.bot .cols { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 80px; margin-top: 64px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
footer.bot .col h5 { margin: 0 0 14px; font-family: var(--font-mono); font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .14em; font-weight: 500; }
footer.bot .col a { display: block; padding: 5px 0; color: var(--text-2); font-size: 14px; }
footer.bot .col a:hover { color: var(--accent); }
footer.bot .legal { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 22px; font-family: var(--font-mono); font-size: 11.5px; color: var(--mute); }
footer.bot .legal .stat { display: inline-flex; align-items: center; gap: 8px; color: var(--green); }

/* Shared contact-form field styling (used by the on-page contact section and the standalone contact page — the focus trigger differs per page, see each page's own <style>) */
.contact-form .field {
  display: flex; align-items: baseline; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 13.5px;
}
.contact-form .field .lbl { color: var(--accent); width: 130px; flex-shrink: 0; }
.contact-form .field .lbl::before { content: "$ "; color: var(--mute-2); }
.contact-form .field input,
.contact-form .field textarea {
  flex: 1; background: transparent; border: 0; outline: 0;
  color: var(--text); font-family: var(--font-mono); font-size: 14px;
  padding: 4px 0; resize: none;
}
.contact-form .field input::placeholder,
.contact-form .field textarea::placeholder { color: var(--mute-2); }
.contact-form .actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.contact-form .hint { font-family: var(--font-mono); font-size: 11.5px; color: var(--mute); margin-left: auto; }

/* Responsive — site chrome only */
@media (max-width: 1180px) {
  .nav-links { gap: 14px; margin-left: 8px; }
  .nav-links a .ix { display: none; }
  nav.top .right .btn-ghost { display: none; }
}
@media (max-width: 980px) {
  .nav-status { font-size: 10px; gap: 12px; }
  .nav-status .seg:nth-child(2),
  .nav-status .seg:nth-child(3) { display: none; }
  .logo small { display: none; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  /* 1 col, not 1fr 1fr: with 3 blocks (Apps/Talk/Fine print), 2 columns
     always leaves the 3rd one orphaned alone on its own row. */
  footer.bot .cols { grid-template-columns: 1fr; gap: 32px; }
  footer.bot .legal { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* iPhone (portrait) — 640px comfortably covers every current iPhone width
   (375–430px) without touching the ≥900px tablet/desktop rules above. */
@media (max-width: 640px) {
  :root { --pad: 20px; }

  nav.top .row { height: 60px; gap: 10px; }
  .logo { font-size: 14px; gap: 8px; }
  .logo .mark { width: 14px; height: 21px; }
  nav.top .right .btn { height: 38px; padding: 0 14px; font-size: 12.5px; }

  footer.bot .cols { margin-top: 40px; }

  /* Fixed 130px label eats too much of a 375px-wide form — stack label
     above field instead so the input/textarea gets full width. */
  .contact-form .field { flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 0; }
  .contact-form .field .lbl { width: auto; font-size: 12px; }
  .contact-form .actions { flex-wrap: wrap; }
  .contact-form .hint { margin-left: 0; flex-basis: 100%; }
}
