/* YAH Technologies — editorial identity
   Palette: white paper, near-black ink, one royal-blue accent. No gradients. */

:root {
  --paper: #ffffff;
  --paper-2: #f5f5f2;
  --ink: #0a0a0b;
  --ink-soft: #1a1a1d;
  --muted: #6a6f77;
  --line: #e5e5e0;
  --blue: #0066ff;      /* brand accent, large surfaces only */
  --blue-deep: #0341c4; /* small text / links (AA on white) */

  --hero-scrim:
    linear-gradient(to top, rgba(255,255,255,0.97), rgba(255,255,255,0.6) 32%, rgba(255,255,255,0.12) 62%, rgba(255,255,255,0) 100%),
    linear-gradient(to right, rgba(255,255,255,0.72), rgba(255,255,255,0) 58%);
  --hero-scrim-m:
    linear-gradient(to top, rgba(255,255,255,0.98), rgba(255,255,255,0.78) 42%, rgba(255,255,255,0.32) 74%, rgba(255,255,255,0.05) 100%);

  --display: "Bricolage Grotesque", "Archivo", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --edge: clamp(1.25rem, 5vw, 6rem);
  --maxw: 1360px;
  color-scheme: light;
}

/* dark theme — follows the OS by default, overridable by the nav toggle */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b0c0e; --paper-2: #14161a;
    --ink: #f4f5f3; --ink-soft: #cfd2d7; --muted: #8b9099; --line: #262a31;
    --blue: #4d8bff; --blue-deep: #8fb4ff;
    --hero-scrim:
      linear-gradient(to top, rgba(11,12,14,0.95), rgba(11,12,14,0.6) 34%, rgba(11,12,14,0.12) 66%, rgba(11,12,14,0) 100%),
      linear-gradient(to right, rgba(11,12,14,0.78), rgba(11,12,14,0) 60%);
    --hero-scrim-m:
      linear-gradient(to top, rgba(11,12,14,0.97), rgba(11,12,14,0.8) 42%, rgba(11,12,14,0.34) 74%, rgba(11,12,14,0.06) 100%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0b0c0e; --paper-2: #14161a;
  --ink: #f4f5f3; --ink-soft: #cfd2d7; --muted: #8b9099; --line: #262a31;
  --blue: #4d8bff; --blue-deep: #8fb4ff;
  --hero-scrim:
    linear-gradient(to top, rgba(11,12,14,0.95), rgba(11,12,14,0.6) 34%, rgba(11,12,14,0.12) 66%, rgba(11,12,14,0) 100%),
    linear-gradient(to right, rgba(11,12,14,0.78), rgba(11,12,14,0) 60%);
  --hero-scrim-m:
    linear-gradient(to top, rgba(11,12,14,0.97), rgba(11,12,14,0.8) 42%, rgba(11,12,14,0.34) 74%, rgba(11,12,14,0.06) 100%);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

::selection { background: var(--blue); color: #fff; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--edge);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--blue);
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.scrolled { border-color: var(--line); }
.nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}
.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}
.wordmark b { color: var(--blue); }
.nav__links {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: center;
}
.nav__links a {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  opacity: 0.75;
  transition: opacity 0.2s ease;
}
.nav__links a:hover { opacity: 1; }
.nav__cta {
  border: 1px solid var(--ink);
  padding: 0.5rem 0.9rem !important;
  opacity: 1 !important;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav__cta:hover { background: var(--ink); color: var(--paper); }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: none;
  border: 1px solid var(--line);
  padding: 0.45rem 0.55rem;
  line-height: 0;
  cursor: pointer;
  opacity: 0.78;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.theme-toggle:hover { opacity: 1; border-color: var(--ink); }
.theme-toggle iconify-icon { font-size: 1.15rem; }
/* show the icon for the theme you'd switch TO */
.theme-toggle .i-sun { display: none; }
.theme-toggle .i-moon { display: inline-flex; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: inline-flex; }
}
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: inline-flex; }
:root[data-theme="light"] .theme-toggle .i-moon { display: inline-flex; }
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }
@media (max-width: 640px) {
  .nav__links a:not(.nav__cta) { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: clamp(600px, 94vh, 940px);
  margin-top: -4.5rem;              /* pull the image up behind the sticky nav */
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--paper-2);
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08);
  transition: transform 1.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.is-ready .hero__bg img { transform: scale(1); }
.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background: var(--hero-scrim);
}
.hero__inner {
  position: relative; z-index: 2; width: 100%;
  padding-top: clamp(6rem, 13vh, 8.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.hero__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 7.6vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
  margin-top: 1.25rem;
  max-width: 16ch;
}
/* keep the nowrap accent from clipping under hero overflow:hidden on tiny screens */
@media (max-width: 390px) {
  .hero__title { font-size: 1.7rem; }
}
.hero__title .accent {
  position: relative;
  white-space: nowrap;
}
.hero__title .accent::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.06em;
  height: 0.11em;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}
.is-ready .hero__title .accent::after { transform: scaleX(1); }

.hero__lede {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 42ch;
  margin-top: clamp(1.25rem, 3vw, 2rem);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  margin-top: clamp(1.5rem, 3.5vw, 2.25rem);
}
.btn {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  cursor: pointer;
}
.btn--solid {
  background: var(--blue);
  color: #fff;
  padding: 0.95rem 1.5rem;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn--solid:hover { background: var(--blue-deep); transform: translateY(-2px); }
.btn--link { color: var(--ink); padding: 0.95rem 0; }
.btn--link .arrow { transition: transform 0.25s ease; color: var(--blue); }
.btn--link:hover .arrow { transform: translateX(6px); }

.hero__tag {
  position: absolute; right: 0; bottom: 0; z-index: 2;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--blue);
  padding: 0.5rem 0.9rem;
}
@media (max-width: 640px) {
  .hero { min-height: 88vh; }
  .hero__scrim { background: var(--hero-scrim-m); }
}

/* ---------- section frame ---------- */
.section { padding-block: clamp(3rem, 7vw, 6.25rem); }
.section__head {
  display: grid;
  gap: 0.9rem;
  margin-bottom: clamp(2rem, 4.5vw, 3.4rem);
}
.section__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.7rem, 4.4vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin-top: 0.5rem;
  max-width: 20ch;
}
.section__sub {
  color: var(--muted);
  max-width: 44ch;
  font-size: 1.05rem;
}

/* ---------- capabilities index ---------- */
.capabilities { border-top: 1px solid var(--line); }
.capability {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.5rem 3rem;
  padding: clamp(1.4rem, 3.2vw, 2.2rem) 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
/* Animate transform (GPU-composited) instead of padding, so the hover
   glides instead of thrashing layout each frame. */
.capability__title,
.capability__body {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.capability:hover .capability__title,
.capability:hover .capability__body {
  transform: translateX(clamp(0.4rem, 1.6vw, 1.25rem));
}
.capability__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.9vw, 2.05rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.7em;
}
.capability__icon {
  color: var(--blue);
  font-size: 1.5rem;
  flex: none;
}
.capability__body { color: var(--muted); font-size: 1.05rem; }
@media (max-width: 720px) {
  .capability { grid-template-columns: 1fr; gap: 0.75rem; }
}

/* ---------- launches ---------- */
.launches { display: flex; flex-direction: column; gap: clamp(2.5rem, 6vw, 4.5rem); }
.launch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: clamp(1.5rem, 3.5vw, 2.75rem);
}
.launch--noimg { grid-template-columns: 1fr; }
.launch:nth-child(even) .launch__media { order: 2; }
.launch__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 5 / 4;
  background: var(--paper-2);
}
.launch__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.launch:hover .launch__media img { transform: scale(1.05); }
.launch__text { padding-top: 0.25rem; }
.launch__index {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.launch__index b { color: var(--blue-deep); font-weight: 600; }
.launch__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.55rem, 3.6vw, 2.5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}
.launch__title a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
.launch__title a:hover { color: var(--blue-deep); }
.launch__desc { color: var(--ink-soft); margin-bottom: 1.75rem; max-width: 42ch; }
.launch__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.25rem; }
.launch__visit {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none; color: var(--blue-deep);
  display: inline-flex; align-items: center; gap: 0.4em;
}
.launch__visit:hover { text-decoration: underline; text-underline-offset: 3px; }
.launch__visit .arrow { transition: transform 0.2s ease; }
.launch__visit:hover .arrow { transform: translate(2px, -2px); }
.tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
}
.tag::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }
.tag--launching { color: var(--blue-deep); border-color: color-mix(in srgb, var(--blue) 35%, var(--line)); }
.tag--soon { color: var(--muted); }
.tag--live { color: var(--ink); }
@media (max-width: 760px) {
  .launch { grid-template-columns: 1fr; }
  .launch:nth-child(even) .launch__media { order: 0; }
}

/* ---------- manifesto / CTA ---------- */
.manifesto { background: var(--paper-2); color: var(--ink); border-top: 1px solid var(--line); }
.manifesto .wrap { padding-block: clamp(4rem, 9vw, 7rem); }
.manifesto .eyebrow { color: var(--muted); }
.manifesto__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.85rem, 4.8vw, 3.7rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-top: 1.25rem;
  max-width: 18ch;
}
.manifesto__title em { font-style: normal; color: var(--blue); }
.manifesto__body { color: var(--muted); max-width: 42ch; margin: 1.5rem 0 0; font-size: 1.05rem; }
.manifesto__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (max-width: 820px) { .manifesto__grid { grid-template-columns: 1fr; } }

/* contact form */
.contact { display: flex; flex-direction: column; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field span {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.field input, .field textarea {
  font-family: var(--body); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line);
  padding: 0.75rem 0.85rem; width: 100%;
  transition: border-color 0.2s ease;
}
.field input:focus, .field textarea:focus { border-color: var(--blue); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.field textarea { resize: vertical; min-height: 6rem; }
.contact .btn--solid { align-self: flex-start; border: none; margin-top: 0.25rem; }
.contact__notice { font-size: 0.95rem; padding: 0.75rem 0.9rem; border: 1px solid var(--line); }
.contact__notice--ok { color: var(--blue-deep); border-color: color-mix(in srgb, var(--blue) 35%, var(--line)); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--paper); }
.footer__top {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.footer__brand .wordmark { font-size: 1.05rem; }
.footer__tag { color: var(--muted); font-size: 0.95rem; max-width: 34ch; margin: 1rem 0 0; }
.footer__col h4 {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 1.1rem;
}
.footer__col ul { display: flex; flex-direction: column; gap: 0.15rem; }
.footer__col a {
  display: inline-block; padding: 0.3rem 0;
  text-decoration: none; color: var(--ink-soft);
  transition: color 0.2s ease;
}
.footer__col a:hover { color: var(--blue-deep); }
.footer__col a .status {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-left: 0.5em;
}
.footer__bottom {
  border-top: 1px solid var(--line);
  padding-block: 1.5rem;
  display: flex; flex-wrap: wrap; gap: 1rem 2rem;
  align-items: center; justify-content: space-between;
}
.footer__note { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; }
@media (max-width: 820px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer__top { grid-template-columns: 1fr; }
}

/* ---------- legal ---------- */
.legal { padding-block: clamp(4rem, 9vw, 7rem); }
.legal__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: -0.03em;
  margin: 1.25rem 0 0.75rem;
}
.legal__updated { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.08em; margin-bottom: 3rem; }
.legal__body { max-width: 68ch; }
.legal__body h2 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem); letter-spacing: -0.01em;
  margin: 2.75rem 0 0.75rem;
}
.legal__body h3 { font-weight: 600; font-size: 1.05rem; margin: 1.75rem 0 0.5rem; }
.legal__body p, .legal__body li { color: var(--ink-soft); line-height: 1.75; margin-bottom: 1rem; }
.legal__body ul { padding-left: 1.25rem; list-style: disc; }
.legal__body li { margin-bottom: 0.5rem; }
.legal__body a { color: var(--blue-deep); text-underline-offset: 3px; }
.legal__back {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.06em;
  text-transform: uppercase; text-decoration: none; color: var(--ink);
  margin-top: 3rem;
}
.legal__back .arrow { color: var(--blue); transition: transform 0.25s ease; }
.legal__back:hover .arrow { transform: translateX(-5px); }

/* ---------- scroll reveal (only hides when JS is present) ---------- */
.reveal { transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal, .reveal { opacity: 1; transform: none; }
  .hero__title .accent::after { transform: scaleX(1); }
  .hero__bg img { transform: none; }
}
