/* Tespen Robotics - shared styles. A dark studio gradient grounds each page. */

:root {
  color-scheme: dark;
  --bg: #0b0a0d;
  --bg-1: #111015;
  --bg-2: #18161d;
  --line: #25222b;
  --line-2: #3a3542;
  --fg: #f3f1f5;
  --fg-2: #aca6b4;
  --fg-3: #847d8d;
  --brand: #741f6a;
  --brand-hi: #9b3a8f;
  --accent: #d9a6d0;
  --accent-2: #ecd4e7;
  --signal: #ffb547;

  /* aliases used by the engineering drawings and the simulation */
  --ink-0: var(--bg); --ink-1: var(--bg-1); --ink-2: var(--bg-2);
  --brand-d: #4f1548; --brand-dd: #2a0b26;

  --font-sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1360px;
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 65% at 72% 72%, rgba(52, 26, 61, .13), transparent 82%),
    linear-gradient(180deg, var(--bg) 0%, #100c15 35%, #150d1b 75%, #180f1f 100%);
  min-height: 100vh;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--brand); color: var(--fg); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--font-mono); font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; font-size: 11.5px; }
.label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--fg); color: var(--bg); padding: 10px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* type scale */
.t-display { font-size: clamp(2.5rem, 5.6vw, 5.4rem); line-height: 0.98; letter-spacing: -0.038em; font-weight: 600; }
.t-h1 { font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: 1; letter-spacing: -0.035em; }
.t-h2 { font-size: clamp(1.9rem, 3.4vw, 3.2rem); line-height: 1.04; letter-spacing: -0.03em; }
.t-h3 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.015em; }
.t-lead { font-size: clamp(1.1rem, 1.5vw, 1.32rem); line-height: 1.45; color: var(--fg-2); max-width: 44ch; }
.t-body { color: var(--fg-2); max-width: 62ch; }
.t-small { font-size: 14px; color: var(--fg-2); }

/* buttons and links */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 20px;
  border-radius: 2px; border: 1px solid transparent;
  font-size: 15px; font-weight: 560; letter-spacing: -0.005em;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  cursor: pointer; white-space: nowrap;
}
.btn--solid { background: var(--fg); color: var(--bg); }
.btn--solid:hover { background: var(--accent-2); }
.btn--line { border-color: var(--line-2); color: var(--fg); background: transparent; }
.btn--line:hover { border-color: var(--fg-2); }
.btn .arr { transition: transform 0.25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 560; color: var(--fg);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px; background-position: 0 100%; background-repeat: no-repeat;
  padding-bottom: 3px; transition: background-size 0.35s var(--ease);
}
.link:hover { background-size: 100% 1px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-solid, body:not(.has-hero) .site-header {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}
.site-header .wrap { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand img { width: 26px; height: 26px; }
.brand__word { font-weight: 640; font-size: 15px; letter-spacing: 0.2em; }
.nav { display: none; align-items: center; gap: 30px; }
.nav a { font-size: 14.5px; color: var(--fg-2); transition: color 0.2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.nav a[aria-current="page"] { box-shadow: 0 1px 0 var(--accent); }
.header-cta { display: none; height: 38px; padding: 0 16px; font-size: 14px; }
.menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 1px solid var(--line-2); border-radius: 2px; background: transparent; cursor: pointer;
}
.menu-btn span { display: block; width: 16px; height: 1.5px; background: var(--fg); position: relative; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; width: 16px; height: 1.5px; background: var(--fg); transition: transform 0.25s var(--ease); }
.menu-btn span::before { top: -5px; } .menu-btn span::after { top: 5px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { transform: translateY(5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { transform: translateY(-5px) rotate(-45deg); }
@media (min-width: 960px) {
  .nav, .header-cta { display: inline-flex; }
  .menu-btn { display: none; }
}
.mobile-menu {
  position: fixed; inset: 0; z-index: 49; background: var(--bg);
  padding: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 24px) var(--gutter) 32px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a { font-size: clamp(2rem, 9vw, 2.8rem); font-weight: 600; letter-spacing: -0.03em; padding-block: 8px; border-bottom: 1px solid var(--line); }
.mobile-menu .label { margin-top: 24px; }

/* ---------- page scaffolding (inner pages) ---------- */
main { display: block; }
.page-head { padding-top: calc(var(--header-h) + clamp(56px, 9vw, 120px)); padding-bottom: clamp(40px, 6vw, 72px); }
.page-head .label { display: block; margin-bottom: 22px; }
.page-head h1 { max-width: 14ch; }
.page-head .t-lead { margin-top: 24px; }
.band { padding-block: clamp(64px, 9vw, 128px); border-top: 1px solid var(--line); }
.band--flush { padding-top: 0; border-top: 0; }
.split { display: grid; gap: 28px; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; } }
.split > h2 { max-width: 16ch; }
.rows { border-top: 1px solid var(--line); }
.rows > li { display: grid; gap: 6px 32px; padding-block: 22px; border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .rows > li { grid-template-columns: 14rem 1fr; } }
.rows .label { color: var(--fg-2); padding-top: 4px; }
.rows p { color: var(--fg-2); max-width: 60ch; }
.two { display: grid; gap: 40px; }
@media (min-width: 820px) { .two { grid-template-columns: 1fr 1fr; gap: 64px; } }
.two h3 { margin-bottom: 12px; }
.seq { display: grid; gap: 36px; counter-reset: seq; }
@media (min-width: 900px) { .seq { grid-template-columns: repeat(3, 1fr); gap: 40px; } .seq--4 { grid-template-columns: repeat(4, 1fr); } }
.seq > li { border-top: 1px solid var(--line-2); padding-top: 20px; }
.seq h3 { margin-bottom: 10px; }
.seq p { color: var(--fg-2); font-size: 15.5px; }
.concept-note { margin-top: 14px; }
.cta-band { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 28px; }
.cta-band h2 { max-width: 18ch; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 56px 36px; color: var(--fg-2); }
.footer-grid { display: grid; gap: 40px; }
@media (min-width: 600px) and (max-width: 899px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.3fr .8fr .8fr 1.2fr; } }
.footer-grid .brand { margin-bottom: 16px; }
.footer-grid h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); font-weight: 400; margin-bottom: 14px; }
.footer-grid li + li { margin-top: 8px; }
.footer-grid a { color: var(--fg-2); transition: color 0.2s; }
.footer-grid a:hover { color: var(--fg); }
.footer-mission { max-width: 30ch; font-size: 15px; }
.footer-socials { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 17px; }
.footer-socials a { color: var(--fg-3); font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; }
.footer-email { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; }
.footer-email svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.footer-location { display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 8px; margin-top: 13px; font-size: 12.5px; line-height: 1.4; }
.footer-location__tag { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 18px; border: 1px solid var(--line-2); border-radius: 2px; color: var(--fg-3); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0; text-decoration: none; }
.footer-base { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 12px; font-size: 12.5px; color: var(--fg-3); }
@media (min-width: 900px) { .footer-base { grid-template-columns: auto 1fr; gap: 40px; } .footer-base p:last-child { text-align: right; } }
.email-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.copy-btn { height: 30px; padding: 0 10px; font-size: 11px; font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--line-2); border-radius: 2px; background: transparent; color: var(--fg-2); cursor: pointer; }
.copy-btn:hover { color: var(--fg); border-color: var(--fg-3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
