/* Tayhami Labs — editorial dark system (design language inspired by the AI Common layout:
   near-black ground, ivory type, bronze glow, hairline rules, light oversized display type). */

:root {
  --bg: #0a0a09;
  --bg-deep: #050504;
  --ink: #e9e5da;
  --muted: #9c978b;
  --soft: #cfc9bb;
  --note: #7a766c;
  --line: #2a2825;
  --card: #121210;
  --copper: #8e5a36;
  --gold: #e2c58e;
  --brown: #3b2416;
  --font: "Inter", "Helvetica Neue", Arial, sans-serif;
  --gut: clamp(16px, 3.125vw, 40px);
  --sec: clamp(96px, 13vw, 170px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, blockquote { margin: 0; padding: 0; }
ol, ul { list-style: none; }
::selection { background: var(--gold); color: var(--bg); }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 8px 14px; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--gut); }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { background: rgba(10, 10, 9, .86); backdrop-filter: blur(10px); border-color: var(--line); }
.site-header__inner {
  max-width: 1280px; margin: 0 auto; padding: 18px var(--gut);
  display: flex; align-items: center; gap: 28px;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 46px; width: auto; }
.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a { text-decoration: none; font-size: 14px; color: var(--soft); transition: color .2s; }
.site-nav a:hover { color: var(--ink); }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; border: 1px solid var(--line);
  font: 500 15px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn--solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--solid:hover { background: var(--gold); border-color: var(--gold); }
.btn--ghost { background: transparent; color: var(--ink); border-color: rgba(233, 229, 218, .35); }
.btn--ghost:hover { border-color: var(--ink); background: rgba(233, 229, 218, .06); }
.btn--small { padding: 10px 18px; font-size: 14px; }
.btn--block { width: 100%; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden; isolation: isolate; background: var(--bg-deep); text-align: center;
  padding: 120px var(--gut) 150px;
}
.hero__orb {
  position: absolute; left: 50%; top: 46%;
  width: min(74vmin, 820px); aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%) translate(var(--mx, 0px), var(--my, 0px));
  background:
    radial-gradient(circle at 42% 38%, rgba(226, 197, 142, .55) 0%, rgba(142, 90, 54, .42) 22%, rgba(59, 36, 22, .34) 48%, rgba(10, 10, 9, 0) 70%);
  filter: blur(4px);
  animation: breathe 9s ease-in-out infinite;
  z-index: -1;
  will-change: transform;
  transition: transform .9s var(--ease);
}
@keyframes breathe {
  0%, 100% { scale: 1; }
  50% { scale: 1.035; }
}
.hero__inner { position: relative; top: 4vh; }
.hero__mark { position: absolute; left: 50%; bottom: 100%; margin-bottom: 12px; transform: translateX(-50%); width: 76px; height: auto; z-index: 1; }
/* WebGL orb: hidden until its first frame draws; the CSS orb remains the fallback. */
.hero__canvas { display: none; position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; will-change: transform; }
.hero.is-webgl .hero__canvas { display: block; }
.hero.is-webgl .hero__orb { display: none; }
.hero__kicker {
  font-size: clamp(11px, 1.05vw, 13px); letter-spacing: .14em; text-transform: uppercase; color: rgba(233, 229, 218, .72);
}
.hero__title {
  margin-top: clamp(12px, 1.6vw, 20px);
  font-weight: 300; font-size: clamp(48px, 8.2vw, 116px);
  line-height: .96; letter-spacing: -.02em; text-transform: uppercase; color: var(--ink);
}
.hero__sub {
  max-width: 640px; margin: clamp(18px, 2vw, 26px) auto 0;
  font-weight: 300; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.65; letter-spacing: .01em; color: rgba(233, 229, 218, .88);
}
.hero__actions { margin-top: clamp(28px, 3vw, 40px); display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero__foot {
  position: absolute; left: 0; right: 0; bottom: 40px;
  max-width: 1280px; margin: 0 auto; padding: 0 var(--gut);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
}
.hero__place { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(233, 229, 218, .6); }
.hero__cta { font-size: 15px; text-decoration: none; color: var(--ink); }
.hero__cta span { display: inline-block; transition: transform .3s var(--ease); }
.hero__cta:hover span { transform: translateX(4px); }

/* ---------- sections ---------- */
.section { padding: var(--sec) 0; border-top: 1px solid var(--line); }
.section--alt { background: linear-gradient(180deg, var(--bg) 0%, #0d0d0b 100%); }

.label { display: flex; align-items: center; gap: 14px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.label__rule { width: 36px; height: 1px; background: var(--line); flex: 0 0 auto; }

.grid-label { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.grid-label .label { padding-top: 14px; }

.statement {
  font-weight: 300; font-size: clamp(30px, 4.2vw, 58px); line-height: 1.12; letter-spacing: -.015em; color: var(--ink);
}
.prose { margin-top: clamp(28px, 3vw, 40px); display: grid; gap: 18px; color: var(--soft); max-width: 680px; }
.prose p { font-size: clamp(15px, 1.2vw, 17px); }

.values { margin-top: clamp(56px, 6vw, 84px); border-top: 1px solid var(--line); }
.value { display: grid; grid-template-columns: 72px 1fr; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.value h3 { font-size: clamp(18px, 1.6vw, 22px); font-weight: 500; letter-spacing: -.005em; }
.value p { margin-top: 8px; color: var(--muted); max-width: 620px; }
.num { font-size: 13px; letter-spacing: .08em; color: var(--note); padding-top: 4px; font-variant-numeric: tabular-nums; }

.section-head { max-width: 920px; margin-bottom: clamp(56px, 6vw, 88px); }
.section-head .label { margin-bottom: 26px; }
.display {
  font-weight: 300; font-size: clamp(34px, 5vw, 68px); line-height: 1.05; letter-spacing: -.02em;
}
.lead { margin-top: 24px; max-width: 640px; font-size: clamp(15px, 1.25vw, 18px); color: var(--muted); }

/* services: a pinned rail on desktop (JS slides the cards sideways as the page scrolls),
   a native swipeable row on phones and for reduced motion */
.rail-trigger { position: relative; }
.rail-stage { position: relative; padding-bottom: clamp(24px, 3vw, 40px); }
.rail-stage .section-head { margin-bottom: clamp(40px, 4.4vw, 64px); }
.rail-viewport { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; scroll-padding-inline: var(--gut); }
.service-rail {
  list-style: none; margin: 0; display: flex; gap: 18px;
  padding: 0 max(var(--gut), calc((100vw - 1280px) / 2 + var(--gut))) 0 max(var(--gut), calc((100vw - 1280px) / 2 + var(--gut)));
  will-change: transform;
}
.service {
  flex: 0 0 clamp(290px, 34vw, 470px);
  display: flex; flex-direction: column; gap: 22px;
  min-height: clamp(300px, 46vh, 440px);
  padding: clamp(26px, 2.6vw, 36px);
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  scroll-snap-align: start;
}
.service .num { padding-top: 0; }
.service__body { margin-top: auto; }
.service h3 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 400; letter-spacing: -.01em; line-height: 1.2; }
.service__body p:not(.tags) { margin-top: 14px; max-width: 42ch; color: var(--muted); font-size: 15px; }
.tags { margin-top: 18px !important; font-size: 13px; letter-spacing: .04em; color: var(--note) !important; }
.rail-hint { margin: 28px 0 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--note); }

/* pinned mode, set by main.js only on wide screens without reduced motion */
.rail-trigger.is-pinned .rail-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: center; overflow: hidden;
  padding-bottom: 0;
}
.rail-trigger.is-pinned .rail-viewport { overflow: hidden; scroll-snap-type: none; }
.rail-trigger.is-pinned .rail-hint { margin-top: 22px; }

/* products */
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.product {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: clamp(26px, 2.6vw, 36px);
  transition: border-color .3s var(--ease), transform .4s var(--ease);
}
.product:hover { border-color: rgba(226, 197, 142, .35); transform: translateY(-3px); }
.product h3 { margin-top: 18px; font-size: clamp(22px, 2vw, 26px); font-weight: 400; letter-spacing: -.01em; line-height: 1.2; }
.product p:not(.product__kicker):not(.tags) { margin-top: 14px; color: var(--muted); font-size: 15px; }
.product__kicker { margin-top: 22px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.product .tags { margin-top: auto; padding-top: 20px; }
.product__link {
  margin-top: 26px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font-size: 15px; color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: 4px; align-self: flex-start;
}
.product__link:hover { border-color: var(--gold); }
.product__link--muted { color: var(--note); border-color: transparent; }
.status {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--live { color: #9be8dd; border-color: rgba(155, 232, 221, .3); }
.status--dev { color: var(--gold); border-color: rgba(226, 197, 142, .3); }

/* stories & quote */
.story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.story { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: clamp(28px, 3vw, 40px); }
.story__meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--note); }
.story h3 { margin-top: 22px; font-size: clamp(22px, 2.2vw, 28px); font-weight: 400; line-height: 1.2; }
.story__kicker { margin-top: 10px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.story p:last-child { margin-top: 16px; color: var(--muted); }

.story--video .story__frame { position: relative; max-width: 270px; aspect-ratio: 9 / 16; margin-bottom: 26px; background: #060913; border-radius: 6px; overflow: hidden; }
.story-video { display: block; width: 100%; height: 100%; object-fit: cover; }
.story__duration { position: absolute; right: 12px; bottom: 12px; padding: 4px 9px; border-radius: 4px; background: rgba(10, 10, 9, .72); color: var(--ink); font-size: 12px; letter-spacing: .06em; pointer-events: none; }
.quote {
  margin-top: clamp(64px, 7vw, 100px); padding-top: clamp(40px, 4vw, 56px); border-top: 1px solid var(--line);
  max-width: 920px;
}
.quote p { font-weight: 300; font-size: clamp(22px, 2.5vw, 34px); line-height: 1.35; letter-spacing: -.01em; color: var(--ink); }
.quote__more { margin-top: 28px; font-size: 16px !important; color: var(--muted) !important; line-height: 1.75 !important; font-weight: 400 !important; letter-spacing: 0 !important; }
.quote footer { margin-top: 26px; font-size: 14px; color: var(--note); font-style: normal; }
.quote cite { font-style: normal; color: var(--ink); }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-lines { margin-top: 40px; border-top: 1px solid var(--line); }
.contact-lines li { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.contact-lines__k { font-size: 13px; letter-spacing: .06em; color: var(--note); }
.contact-lines a, .contact-lines span:not(.contact-lines__k) { text-decoration: none; font-size: 17px; color: var(--ink); }
.contact-lines a:hover { color: var(--gold); }

.form { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: clamp(26px, 3vw, 40px); display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field > span { font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 4px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font: 400 16px/1.4 var(--font);
  transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 110px; }
.form__note { font-size: 14px; color: var(--gold); min-height: 1.4em; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding-top: clamp(64px, 7vw, 96px); background: var(--bg-deep); }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 40px; padding-bottom: 56px; }
.site-footer__brand { font-size: 22px; font-weight: 400; letter-spacing: -.01em; }
.site-footer__text { margin-top: 14px; color: var(--muted); max-width: 360px; font-size: 15px; }
.site-footer__h { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--note); margin-bottom: 14px; }
.site-footer a, .site-footer__grid > div > span { display: block; text-decoration: none; color: var(--soft); font-size: 15px; padding: 4px 0; }
.site-footer a:hover { color: var(--gold); }
.site-footer__base {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 24px; padding-bottom: 32px; border-top: 1px solid var(--line); font-size: 13px; color: var(--note);
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .site-nav { display: none; }
  .grid-label, .contact-grid { grid-template-columns: 1fr; }
  .grid-label .label { padding-top: 0; }
  .product-grid, .story-grid { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  .site-header__inner { gap: 12px; }
  .hero { padding: 108px var(--gut) 150px; }
  .hero__foot { bottom: 28px; }
  .hero__place { display: none; }
  .hero__orb { width: 110vmin; top: 42%; }
  .hero__mark { width: 60px; margin-bottom: 10px; }
  .service { flex-basis: 84vw; min-height: 0; }
  .rail-viewport { scroll-snap-type: x mandatory; }
  .value { grid-template-columns: 1fr; gap: 8px; }
  .contact-lines li { grid-template-columns: 1fr; gap: 4px; }
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__orb { animation: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* services links */
.service__link { display: inline-block; margin-top: 18px; align-self: flex-start; font-size: 14px; color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: 4px; text-decoration: none; }
.service__link:hover { border-color: var(--gold); }
.service__cta { margin-top: 28px; }

/* hero line under the buttons */
.hero__line { margin: 22px 0 0; font-size: 15px; letter-spacing: .02em; color: var(--soft); }

/* hero: a full sentence, not a slogan, so it is set smaller and in sentence case */
.hero__title { max-width: 1040px; margin-left: auto; margin-right: auto; font-size: clamp(27px, 3.5vw, 52px); line-height: 1.12; letter-spacing: -.015em; text-transform: none; text-wrap: balance; }

/* services: the one-line promise under each service name */
.service__body p.service__line { margin-top: 10px; color: var(--soft); font-size: 16px; }

/* problem: four plain cards */
.pain-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.pain { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: clamp(24px, 2.4vw, 32px); }
.pain h3 { font-size: clamp(19px, 1.7vw, 23px); font-weight: 400; letter-spacing: -.01em; line-height: 1.25; }
.pain p { margin-top: 12px; color: var(--muted); font-size: 15px; }

/* agent at work: five steps across */
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.flow__step { padding: 26px 22px 0 0; }
.flow__step h3 { margin-top: 14px; font-size: clamp(18px, 1.5vw, 21px); font-weight: 500; line-height: 1.3; }
.flow__step p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.flow__close { margin-top: clamp(40px, 5vw, 64px); font-weight: 300; font-size: clamp(22px, 2.5vw, 34px); line-height: 1.3; letter-spacing: -.01em; }

@media (max-width: 980px) {
  .pain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: 1fr; border-top: 0; }
  .flow__step { display: grid; grid-template-columns: 48px 1fr; column-gap: 12px; padding: 20px 0; border-top: 1px solid var(--line); }
  .flow__step .num { grid-row: span 2; }
  .flow__step h3 { margin-top: 0; }
}
@media (max-width: 600px) {
  .pain-grid { grid-template-columns: 1fr; }
}

/* pinned services rail: heading and intro sit side by side so the stage fits a laptop screen */
.rail-trigger.is-pinned .rail-stage { padding-top: 84px; }
.rail-trigger.is-pinned .section-head {
  max-width: none; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  column-gap: clamp(32px, 5vw, 80px); align-items: end; margin-bottom: clamp(18px, 3.2vh, 48px);
}
.rail-trigger.is-pinned .section-head .label { grid-column: 1 / -1; margin-bottom: 14px; }
.rail-trigger.is-pinned .display { grid-column: 1; grid-row: 2 / span 2; font-size: clamp(30px, min(3.6vw, 6vh), 54px); }
.rail-trigger.is-pinned .lead { grid-column: 2; grid-row: 2; margin-top: 0; }
.rail-trigger.is-pinned .service__cta { grid-column: 2; grid-row: 3; justify-self: start; margin-top: 14px; padding: 11px 20px; }
.rail-trigger.is-pinned .service { min-height: 0; gap: 14px; padding: clamp(18px, 3vh, 34px) clamp(24px, 2.4vw, 34px); }
.rail-trigger.is-pinned .rail-hint { margin-top: 14px; }

/* phones: the longer hero pushes the logo mark up, so keep it clear of the header */
@media (max-width: 600px) {
  .hero { padding-top: 128px; }
}
