/* =============================================================
   Keith Galli — personal site
   Hand-built styles (no framework). Dark, modern dev-portfolio.
   ============================================================= */

/* ---------- Design tokens ---------- */
:root {
  --bg:        #000116;
  --bg-2:      #080a22;
  --bg-3:      #0d1030;
  --surface:   #0a0c28;
  --line:      rgba(255, 255, 255, 0.09);
  --line-2:    rgba(255, 255, 255, 0.16);

  --text:      #f4f6fb;
  --muted:     #a3acc2;
  --faint:     #6f7691;

  --salmon:    #ff7967;
  --salmon-2:  #ff5f4a;
  --salmon-soft: rgba(255, 121, 103, 0.12);
  --blue:      #9cb5d1;
  --highlight: #2f86ff;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;
  --r-pill: 999px;

  --shadow:    0 24px 60px -28px rgba(0, 0, 0, 0.85);
  --shadow-sm: 0 10px 30px -16px rgba(0, 0, 0, 0.7);

  --container: 1140px;
  --nav-h: 76px;
}

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

* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; transition: color 0.18s ease; }

ul { list-style: none; padding: 0; }

button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

input, textarea { font-family: inherit; font-size: inherit; }

:focus-visible {
  outline: 2px solid var(--salmon);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--salmon); color: #14060a; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: 10px; left: 50%;
  transform: translateX(-50%) translateY(-150%);
  z-index: 1000;
  background: var(--salmon);
  color: #14060a;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateX(-50%) translateY(0); }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

.section { padding-block: clamp(72px, 11vw, 132px); position: relative; }

.icon { width: 20px; height: 20px; fill: currentColor; flex: none; }

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-mono);
  color: var(--salmon);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.section-sub {
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  max-width: 56ch;
  margin-top: 18px;
}

.hl { color: var(--blue); }

.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .section-sub { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
}
.btn .icon { width: 18px; height: 18px; }

.btn--primary {
  background: var(--salmon);
  color: #190707;
  box-shadow: 0 10px 28px -12px rgba(255, 121, 103, 0.7);
}
.btn--primary:hover {
  background: var(--salmon-2);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -12px rgba(255, 121, 103, 0.8);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--line-2);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--salmon);
  color: var(--salmon);
  transform: translateY(-2px);
}

.btn--block { width: 100%; justify-content: center; }

/* ---------- Background blooms ---------- */
.bloom-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bloom {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
  will-change: transform;
}
.bloom--1 {
  width: 46vw; height: 46vw;
  top: -14vw; left: -8vw;
  background: radial-gradient(circle, rgba(255, 121, 103, 0.55), transparent 68%);
  animation: drift1 22s ease-in-out infinite alternate;
}
.bloom--2 {
  width: 42vw; height: 42vw;
  top: 8vw; right: -12vw;
  background: radial-gradient(circle, rgba(110, 134, 200, 0.5), transparent 68%);
  animation: drift2 26s ease-in-out infinite alternate;
}
.bloom--3 {
  width: 50vw; height: 50vw;
  bottom: -22vw; left: 28vw;
  background: radial-gradient(circle, rgba(47, 70, 130, 0.45), transparent 70%);
  animation: drift1 30s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate3d(6vw, 5vw, 0) scale(1.12); } }
@keyframes drift2 { to { transform: translate3d(-7vw, 4vw, 0) scale(1.08); } }

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(3, 4, 26, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand-mark { flex: none; display: block; border-radius: 10px; }

.nav__menu { display: flex; align-items: center; gap: 30px; }
.nav__link {
  position: relative;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.97rem;
  padding-block: 6px;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--salmon);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after,
.nav__link.active::after { transform: scaleX(1); }
.nav__link.active { color: var(--text); }
.nav__cta { padding: 10px 18px; font-size: 0.9rem; }
.nav__cta .icon { width: 17px; height: 17px; }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav__toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h) + 24px);
  padding-bottom: 64px;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
}
.hero__title {
  font-size: clamp(3.6rem, 12vw, 8.4rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin-block: 6px 22px;
}
.hero__line { display: block; }
.hero__line--accent { position: relative; width: max-content; }
.hero__line--accent::after {
  content: "";
  position: absolute;
  left: 2px; right: 6px; bottom: 0.12em;
  height: 0.14em;
  background: var(--salmon);
  border-radius: 4px;
  transform: scaleX(0);
  transform-origin: left;
  animation: underline 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}
@keyframes underline { to { transform: scaleX(1); } }

.hero__tagline {
  font-size: clamp(1.15rem, 2.3vw, 1.55rem);
  font-weight: 500;
  color: var(--text);
  max-width: 30ch;
}
.hero__roles {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 46ch;
}
.hero__roles a { color: var(--salmon); font-weight: 600; }
.hero__roles a:hover { color: var(--salmon-2); text-decoration: underline; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.hero__socials { display: flex; gap: 12px; margin-top: 34px; }
.hero__socials a,
.contact__socials a,
.footer__socials a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  color: var(--muted);
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}
.hero__socials a:hover,
.contact__socials a:hover,
.footer__socials a:hover {
  color: var(--salmon);
  border-color: var(--salmon);
  transform: translateY(-3px);
}

.hero__art { justify-self: center; }
.hero__art-img {
  width: min(100%, 460px);
  filter: drop-shadow(0 40px 70px rgba(0, 0, 0, 0.55));
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  animation: bob 1.8s ease-in-out infinite;
}
.hero__scroll:hover { color: var(--salmon); border-color: var(--salmon); }
.hero__scroll .icon { width: 22px; height: 22px; }
@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ---------- About ---------- */
.about__intro { max-width: 860px; }
.about__lead {
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  line-height: 1.75;
  max-width: 68ch;
}
.about__lead a { color: var(--salmon); font-weight: 600; }
.about__lead a:hover { text-decoration: underline; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: clamp(40px, 6vw, 60px);
}
.stat {
  background: linear-gradient(180deg, var(--bg-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 30px 26px;
  text-align: center;
}
.stat__num {
  display: block;
  color: var(--salmon);
  font-size: clamp(2.6rem, 6vw, 3.7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Services ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 24px;
  align-items: stretch;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 34px 30px;
  position: relative;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}
.card--featured {
  border-color: rgba(255, 121, 103, 0.4);
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 121, 103, 0.08), transparent 60%),
    var(--surface);
}
.card--featured::before {
  content: "Most popular";
  position: absolute;
  top: -11px; left: 30px;
  background: var(--salmon);
  color: #190707;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: var(--r-pill);
}

.card__icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--salmon-soft);
  color: var(--salmon);
  margin-bottom: 20px;
}
.card__icon .icon { width: 26px; height: 26px; }

.card__title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; }
/* Reserve ~2 lines so the section labels below line up across all cards */
.card__desc { color: var(--muted); margin-top: 8px; line-height: 1.6; min-height: 3.2em; }

.card__label {
  font-family: var(--font-mono);
  color: var(--salmon);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 24px;
  margin-bottom: 12px;
}

.checks { display: grid; gap: 10px; }
.checks li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
  line-height: 1.5;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0; top: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--salmon-soft);
  /* check mark */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ff7967' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.price-list { display: grid; margin-top: 2px; }
.price-list li + li { border-top: 1px solid var(--line); }
.price-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  margin-inline: -12px;
  border-radius: var(--r-sm);
  color: var(--muted);
  transition: background-color 0.16s ease, color 0.16s ease;
}
.price-list a:hover { background: var(--salmon-soft); color: var(--text); }
.price-list em {
  font-style: normal;
  color: var(--salmon);
  font-size: 0.78rem;
  font-weight: 600;
}
.price-list .price {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* CTA pinned to the very bottom so it lines up across all cards; note sits just above it */
.card__foot {
  margin-top: auto;
  padding-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.card__cta { align-self: flex-start; order: 2; }
.card__note {
  order: 1;
  font-size: 0.84rem;
  color: var(--faint);
  line-height: 1.55;
}
.card__note a { color: var(--salmon); text-decoration: underline; text-underline-offset: 2px; }
.card__note a:hover { color: var(--salmon-2); }

/* ---------- Videos ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.video-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.video-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}
.video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-3);
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.video-card:hover .video-thumb img { transform: scale(1.05); }
.video-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  background: rgba(255, 121, 103, 0.93);
  color: #190707;
  border-radius: 50%;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.6);
  transition: transform 0.22s ease, background-color 0.22s ease;
}
.video-play .icon { width: 26px; height: 26px; margin-left: 3px; }
.video-card:hover .video-play { transform: scale(1.12); background: var(--salmon); }
.video-body { padding: 18px 20px 22px; }
.video-cat {
  font-family: var(--font-mono);
  color: var(--salmon);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.video-title {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}
.videos__cta { text-align: center; margin-top: clamp(36px, 5vw, 52px); }

@media (max-width: 820px) {
  .video-grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
}

/* ---------- Work / partners ---------- */
.logos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  justify-items: center;
  gap: clamp(30px, 4vw, 52px) clamp(30px, 6vw, 64px);
  max-width: 860px;
  margin-inline: auto;
  padding: 14px 0;
}
.logo img {
  height: clamp(30px, 4vw, 42px);
  width: auto;
  opacity: 0.62;
  filter: saturate(0.85);
  transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}
.logo img:hover { opacity: 1; filter: none; transform: scale(1.05); }

.work__cta { text-align: center; margin-top: clamp(44px, 6vw, 64px); }
.work__cta p { color: var(--muted); margin-bottom: 18px; }

/* ---------- Contact ---------- */
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 72px);
  align-items: start;
}
.contact__title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-top: 6px;
}
.contact__lead { color: var(--muted); font-size: 1.1rem; margin-top: 16px; max-width: 40ch; }
.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--text);
}
.contact__email .icon { color: var(--salmon); }
.contact__email:hover { color: var(--salmon); }
.contact__socials { display: flex; gap: 12px; margin-top: 28px; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(22px, 3vw, 32px);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 7px;
}
.field input,
.field textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 13px 15px;
  color: var(--text);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--faint); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--salmon);
  box-shadow: 0 0 0 3px var(--salmon-soft);
}
.field input:user-invalid,
.field textarea:user-invalid { border-color: #ff6382; }

.form-status { margin-top: 14px; font-size: 0.9rem; min-height: 1.2em; }
.form-status.ok { color: #66d39a; }
.form-status.err { color: #ff6382; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(0, 1, 14, 0.5);
  padding-top: clamp(48px, 7vw, 72px);
  padding-bottom: 30px;
  margin-top: 40px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: 40px;
}
.footer__brand p { color: var(--muted); margin-top: 16px; max-width: 34ch; }
.footer__heading {
  display: block;
  font-family: var(--font-mono);
  color: var(--salmon);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer__nav { display: flex; flex-direction: column; gap: 11px; }
.footer__nav a { color: var(--muted); width: max-content; }
.footer__nav a:hover { color: var(--text); }
.footer__socials { display: flex; gap: 11px; margin-bottom: 18px; }
.footer__email { color: var(--muted); }
.footer__email:hover { color: var(--salmon); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(40px, 6vw, 60px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.85rem;
}

/* ---------- Error page ---------- */
.error {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--nav-h) 0 60px;
}
.error__inner { max-width: 600px; }
.error__title {
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
  margin-top: 8px;
}
.error__lead {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 18px auto 34px;
  max-width: 46ch;
}
.error__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.error__brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 30px;
}
.error__brand .brand-mark { width: 32px; height: 32px; }

/* ---------- Reveal-on-scroll (only hides when JS is present to bring it back) ---------- */
.reveal { opacity: 1; }
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Opening animation overlay ---------- */
.intro { display: none; }
html.intro-lock { overflow: hidden; }
.js .intro {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  will-change: transform;
}
.intro--done {
  transform: translateY(-100%);
  transition: transform 0.72s cubic-bezier(0.76, 0, 0.24, 1);
}
.intro__inner { text-align: center; padding: 24px; }
.intro__word {
  font-size: clamp(2.8rem, 9vw, 5.4rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.96;
  color: var(--text);
}
.intro__line { display: block; }
.intro__line--accent { position: relative; width: max-content; margin-inline: auto; }
.intro__line--accent::after {
  content: "";
  position: absolute;
  left: 2px; right: 4px; bottom: 0.08em;
  height: 0.12em;
  background: var(--salmon);
  border-radius: 4px;
  transform: scaleX(0);
  transform-origin: left;
  animation: introUnderline 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.46s forwards;
}
.intro__text {
  display: block;
  opacity: 0;
  transform: translateY(42%);
  animation: introUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.intro__line:first-child .intro__text { animation-delay: 0.1s; }
.intro__line--accent .intro__text { animation-delay: 0.22s; }
.intro__bar {
  width: 190px;
  height: 3px;
  margin: 32px auto 0;
  border-radius: 999px;
  background: var(--bg-3);
  overflow: hidden;
}
.intro__bar-fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: var(--salmon);
  transform: scaleX(0);
  transform-origin: left;
  animation: introBar 0.82s cubic-bezier(0.4, 0, 0.2, 1) 0.16s forwards;
}
@keyframes introUp { to { opacity: 1; transform: translateY(0); } }
@keyframes introUnderline { to { transform: scaleX(1); } }
@keyframes introBar { to { transform: scaleX(1); } }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { display: none; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :root { --nav-h: 66px; }

  .nav__toggle { display: flex; }
  .nav__menu {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 18px clamp(20px, 5vw, 40px) 26px;
    background: rgba(3, 4, 26, 0.96);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  }
  .nav__menu.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav__link { font-size: 1.05rem; padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav__link::after { display: none; }
  .nav__cta { justify-content: center; margin-top: 12px; }

  .contact__inner { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 30px; }
  .footer__bottom { justify-content: flex-start; }
  .logos { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .stats { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .hero__actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal,
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .hero__line--accent::after { transform: scaleX(1); }
  .intro { display: none !important; }
}
