/* ===========================================================
   synthetic-intelligence.ai — site styles
   =========================================================== */

:root {
  --bg:          #060608;
  --bg-elev:     #0A0A0E;
  --line:        #15151C;
  --line-strong: #25252E;

  --text:        #E8E9EC;
  --text-dim:    #82828C;
  --text-faint:  #52526A;

  --accent:      #5BC2D7;
  --accent-dim:  #2E5F7F;
  --accent-glow: rgba(91, 194, 215, 0.14);

  --maxw: 1080px;
  --gut: clamp(24px, 5vw, 80px);

  --font-display: "Space Grotesque", "Inter", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", "JetBrains Mono", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }

/* ---------- background canvas + grain ---------- */

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* subtle vignette to focus the eye */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 35%,
      transparent 0%,
      transparent 55%,
      rgba(6, 6, 8, 0.55) 100%);
}

/* ---------- nav ---------- */

.nav {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--gut);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0;
  color: var(--text);
}
.brand .mark {
  width: 22px;
  height: 22px;
  color: var(--accent);
  opacity: 0.95;
  flex: 0 0 auto;
}
.brand .name { white-space: nowrap; }

.nav .meta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  color: var(--text-dim);
  font: inherit;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.pill:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}
.pill .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow), 0 0 8px 1px var(--accent);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow), 0 0 4px 0 var(--accent); opacity: 0.7; }
  50%   { box-shadow: 0 0 0 4px var(--accent-glow), 0 0 14px 2px var(--accent); opacity: 1; }
  100%  { box-shadow: 0 0 0 0 var(--accent-glow), 0 0 4px 0 var(--accent); opacity: 0.7; }
}

.clock { font-variant-numeric: tabular-nums; }

/* ---------- layout primitives ---------- */

main {
  position: relative;
  z-index: 4;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(32px, 5vh, 56px);
}

section { padding: 0; }

/* ---------- hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.hero .title {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(48px, 6vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 28px;
}
.hero .title em {
  font-style: normal;
  color: var(--accent);
  font-weight: 600;
}
.hero .lede {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 40em;
  margin: 0 auto;
}
.hero .lede em {
  font-style: normal;
  color: var(--accent);
}

.actions { display: inline-flex; gap: 12px; flex-wrap: wrap; }

.btn {
  --pad-y: 13px;
  --pad-x: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 0.4s var(--ease),
    background 0.3s var(--ease),
    color 0.3s var(--ease),
    border-color 0.3s var(--ease),
    box-shadow 0.4s var(--ease);
}
.btn.primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn.primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 24px 0 var(--accent-glow), inset 0 0 0 1px var(--accent-dim);
}
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn.ghost:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}
.btn:active { transform: translateY(1px); }

/* ---------- contact / form ---------- */

.contact {
  display: flex;
  justify-content: center;
}

#request-form {
  max-width: 560px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#request-form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
#request-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#request-form label > span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
#request-form input,
#request-form textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 10px 14px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--text);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
#request-form input::placeholder,
#request-form textarea::placeholder {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}
#request-form input:focus,
#request-form textarea:focus {
  outline: none;
  border-color: var(--accent-dim);
  background: var(--bg-elev);
  box-shadow: 0 0 0 1px var(--accent-dim);
}
#request-form textarea { resize: none; min-height: 64px; }

.submit-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.submit-row .success {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.submit-row .success.shown {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- footer ---------- */

.foot {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px var(--gut);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  text-transform: uppercase;
}

/* ---------- cooking veil ---------- */

.veil {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 22vh;
  padding-inline: var(--gut);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s var(--ease);
}
.veil.on {
  opacity: 1;
  visibility: visible;
}
.veil-text {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 520px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(18px, 2.4vw, 26px);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text-dim);
  transform: translateY(12px);
  transition: transform 0.7s var(--ease) 0.15s, opacity 0.7s var(--ease) 0.15s;
}
.veil.on .veil-text {
  transform: translateY(0);
}
.veil-text li {
  display: flex;
  align-items: center;
  gap: 14px;
}
.veil-text .vmark {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--accent);
  opacity: 0.85;
}
.veil-text::selection { background: transparent; }

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.9s var(--ease) both,
    transform 0.9s var(--ease) both;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* stagger hero reveals */
.hero .reveal:nth-child(1) { transition-delay: 0.05s; }
.hero .reveal:nth-child(2) { transition-delay: 0.18s; }
.hero .reveal:nth-child(3) { transition-delay: 0.32s; }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  :root { --gut: 22px; }
  .nav { padding-block: 18px; }
  .nav .meta .clock { display: none; }
  .hero .title { font-size: clamp(34px, 9vw, 52px); }
  #request-form .row { grid-template-columns: 1fr; }
}

@media (max-height: 640px) {
  .hero .eyebrow { margin-bottom: 12px; }
  .hero .title { margin-bottom: 16px; }
  .hero .actions { display: none; }
  .grain { opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .pill .dot { animation: none; }
}

@media (hover: none) {
  .btn.primary:hover { background: var(--accent); color: var(--bg); }
}
