/* Fratic SRL — light/dark studio theme, vanilla CSS, no build step. Mobile-first.
   Light is the default; [data-theme="dark"] on <html> switches every token. */

:root {
  --color-bg: #fafafa;
  --color-bg-elevated: #ffffff;
  --color-border: #e8e8ed;
  --color-text: #1d1d1f;
  --color-text-secondary: #6e6e73;
  --color-accent: #3b5bdb;
  --color-accent-hover: #4c6ef5;
  --color-accent-glow: rgba(59, 91, 219, 0.06);
  --color-on-accent: #ffffff;
  --color-aurora-1: rgba(59, 91, 219, 0.2);
  --color-aurora-2: rgba(124, 58, 237, 0.14);
  --color-aurora-3: rgba(14, 165, 233, 0.13);
  --color-selection: rgba(59, 91, 219, 0.25);
  --color-card-hover: rgba(59, 91, 219, 0.32);
  --shadow-card: 0 1px 2px rgba(29, 29, 31, 0.04), 0 12px 32px rgba(29, 29, 31, 0.05);
  --shadow-card-hover: 0 2px 4px rgba(29, 29, 31, 0.05), 0 18px 44px rgba(29, 29, 31, 0.08);
  --card-highlight: rgba(255, 255, 255, 0.85);
  --grain-opacity: 0.03;
  --nav-bg: rgba(250, 250, 250, 0.8);
  --nav-bg-scrolled: rgba(250, 250, 250, 0.92);
  --nav-menu-bg: rgba(250, 250, 250, 0.97);
  --nav-height: 48px;
  --content-width: 980px;
  --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: "New York", ui-serif, Georgia, "Times New Roman", serif;
}

:root[data-theme="dark"] {
  --color-bg: #0a0a10;
  --color-bg-elevated: #0f0f17;
  --color-border: #2a2a36;
  --color-text: #f5f5f7;
  --color-text-secondary: #9b9ba3;
  --color-accent: #748ffc;
  --color-accent-hover: #91a7ff;
  --color-accent-glow: rgba(116, 143, 252, 0.09);
  --color-on-accent: #0b102e;
  --color-aurora-1: rgba(116, 143, 252, 0.18);
  --color-aurora-2: rgba(167, 139, 250, 0.13);
  --color-aurora-3: rgba(56, 189, 248, 0.12);
  --color-selection: rgba(116, 143, 252, 0.35);
  --color-card-hover: rgba(116, 143, 252, 0.35);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-card-hover: 0 2px 4px rgba(0, 0, 0, 0.5), 0 18px 44px rgba(0, 0, 0, 0.45);
  --card-highlight: rgba(255, 255, 255, 0.06);
  --grain-opacity: 0.05;
  --nav-bg: rgba(10, 10, 16, 0.75);
  --nav-bg-scrolled: rgba(10, 10, 16, 0.92);
  --nav-menu-bg: rgba(10, 10, 16, 0.97);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-stack);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p { margin: 0; }

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

body {
  transition: background 0.3s ease, color 0.3s ease;
}

/* Set while re-syncing the theme on bfcache restores: the swap must snap,
   not fade, because it can land after first paint. */
.theme-instant *,
.theme-instant *::before,
.theme-instant *::after { transition: none !important; }

.dot { color: var(--color-accent); }

/* Film grain over the whole page: barely-there SVG noise that gives surfaces
   tooth and stops the aurora gradients from banding. Non-interactive. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav--scrolled {
  background: var(--nav-bg-scrolled);
  border-bottom-color: var(--color-border);
}

.nav__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  height: var(--nav-height);
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
.nav__brand:hover { text-decoration: none; }

.nav__right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__links a {
  font-size: 12px;
  color: var(--color-text);
  opacity: 0.85;
}
.nav__links a:hover { opacity: 1; text-decoration: none; }

.nav__cta {
  padding: 4px 12px;
  border-radius: 10px;
  background: var(--color-accent);
  color: var(--color-on-accent) !important;
  font-weight: 600;
  opacity: 1 !important;
}
.nav__cta:hover { background: var(--color-accent-hover); }

.lang-toggle {
  padding: 3px 10px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.lang-toggle:hover { border-color: var(--color-text-secondary); color: var(--color-text); }

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: none;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--color-text-secondary); color: var(--color-text); }
.theme-toggle svg { width: 13px; height: 13px; display: none; }
:root:not([data-theme="dark"]) .icon-moon { display: block; }
:root[data-theme="dark"] .icon-sun { display: block; }

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 8px;
  border: 0;
  background: none;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  height: 1.5px;
  background: var(--color-text);
  transition: transform 0.3s ease;
}

.nav--open .nav__toggle span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav--open .nav__toggle span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

@media (max-width: 734px) {
  .nav__toggle { display: flex; }

  .nav__links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 40px 24px;
    background: var(--nav-menu-bg);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--color-border);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }

  .nav--open .nav__links {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .nav__links a {
    font-size: 17px;
    padding: 12px 0;
    width: 100%;
  }

  .nav__cta {
    margin-top: 8px;
    text-align: center;
    padding: 10px 12px;
  }
}

/* ---------- Buttons & links ---------- */

.button {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 12px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-size: 17px;
  font-weight: 600;
}
.button:hover { background: var(--color-accent-hover); text-decoration: none; }

.button--large { padding: 14px 30px; font-size: 19px; }

.link-arrow { font-size: 17px; white-space: nowrap; }
.link-arrow::after { content: " \203A"; }
.link-arrow--light { color: var(--color-accent); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: calc(var(--nav-height) + 96px) 22px 110px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, var(--color-accent-glow), transparent 60%),
    var(--color-bg);
  text-align: center;
  overflow: hidden;
}

/* Aurora backdrop: large soft emerald-tinted gradients drifting very slowly
   behind the headline. Oversized (inset -25%) so its edges never show while
   it moves; the section's overflow:hidden clips it. */
.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(ellipse 38% 30% at 30% 32%, var(--color-aurora-1), transparent 70%),
    radial-gradient(ellipse 32% 26% at 70% 24%, var(--color-aurora-2), transparent 70%),
    radial-gradient(ellipse 44% 32% at 52% 48%, var(--color-aurora-3), transparent 72%);
  animation: aurora-drift 22s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes aurora-drift {
  from { transform: translate3d(-2.5%, -1.5%, 0) scale(1); }
  to { transform: translate3d(2.5%, 2.5%, 0) scale(1.08); }
}

.hero__inner { position: relative; }

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
  margin-bottom: 14px;
}

.hero__title {
  font-size: clamp(48px, 9vw, 88px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.hero__lede {
  max-width: 600px;
  margin: 18px auto 0;
  font-size: clamp(19px, 2.5vw, 26px);
  line-height: 1.3;
  color: var(--color-text-secondary);
}

.hero__actions {
  margin-top: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

/* ---------- Sections ---------- */

.section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 124px 22px;
}

.section__head { text-align: center; margin-bottom: 64px; }

.section__num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}

.section__head h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.section__head p {
  margin-top: 8px;
  font-size: clamp(19px, 2.5vw, 24px);
  color: var(--color-text-secondary);
}

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

/* Four services read best as a 2×2 grid. */
.cards--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 734px) {
  .cards--four { grid-template-columns: 1fr; }
}

.card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: var(--shadow-card), inset 0 1px 0 var(--card-highlight);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-4px);
    border-color: var(--color-card-hover);
    box-shadow: var(--shadow-card-hover), inset 0 1px 0 var(--card-highlight);
  }
}

.card__icon {
  width: 44px;
  height: 44px;
  color: var(--color-text);
  margin-bottom: 20px;
}
.card__icon svg { width: 100%; height: 100%; }

.card h3 { font-size: 24px; font-weight: 600; }
.card p { margin-top: 10px; color: var(--color-text-secondary); }

/* ---------- Feature (the emerald moment) ---------- */

/* The feature section is the page's emerald moment — a stronger tinted wash
   than the hero. It follows the active theme: light emerald on light, deep
   glow on dark. */
.feature {
  background:
    radial-gradient(ellipse 70% 85% at 50% 100%, var(--color-aurora-1), transparent 65%),
    var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  text-align: center;
  padding: 130px 22px;
}

.feature__inner { max-width: 880px; margin: 0 auto; }

.feature h2 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* Manifesto lines: short declaratives, set larger than body and in full ink —
   the section reads as a statement, not an explanation. */
/* Each manifesto line is one idea and reads as one row on desktop; the
   container above is widened so the longest line fits without wrapping. */
.feature__manifesto {
  margin: 24px 0 0;
  font-size: clamp(19px, 2.4vw, 25px);
  line-height: 1.35;
  color: var(--color-text);
  text-wrap: balance;
}

.feature__manifesto + .feature__manifesto { margin-top: 10px; }

.feature .link-arrow { display: inline-block; margin-top: 32px; }

/* ---------- About / founders ---------- */

.about__blurb {
  max-width: 640px;
  margin: -16px auto 56px;
  text-align: center;
  font-size: clamp(19px, 2.5vw, 24px);
  line-height: 1.4;
  color: var(--color-text-secondary);
}

.founders {
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.founder {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 36px 24px;
  text-align: center;
  box-shadow: var(--shadow-card), inset 0 1px 0 var(--card-highlight);
}

.founder__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.founder h3 { font-size: 21px; font-weight: 600; }
.founder p { margin-top: 4px; font-size: 15px; color: var(--color-text-secondary); }

a.founder {
  display: block;
  color: inherit;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
a.founder:hover { text-decoration: none; }

@media (hover: hover) {
  a.founder:hover {
    transform: translateY(-4px);
    border-color: var(--color-card-hover);
    box-shadow: var(--shadow-card-hover), inset 0 1px 0 var(--card-highlight);
  }
}

.founder .card__more { margin-top: 14px; font-size: 14px; }

.founder__bio {
  max-width: 260px;
  margin: 12px auto 0;
  line-height: 1.45;
}

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

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 48px 40px;
}

.step__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
  margin-bottom: 10px;
}

.step h3 { font-size: 21px; font-weight: 600; }
.step p { margin-top: 8px; color: var(--color-text-secondary); }

/* ---------- Contact ---------- */

.contact {
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  text-align: center;
  padding: 120px 22px;
}

.contact h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.contact p {
  margin: 12px 0 30px;
  font-size: clamp(19px, 2.5vw, 24px);
  color: var(--color-text-secondary);
}

.contact__alt {
  margin-top: 24px;
  font-size: 17px;
  color: var(--color-text-secondary);
}

.contact__phone {
  margin-top: 6px;
  font-size: 17px;
  color: var(--color-text-secondary);
}

/* ---------- Footer ---------- */

.footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  font-size: 12px;
  color: var(--color-text-secondary);
}

.footer__brand {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 44px 22px 10px;
}

.footer__wordmark {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.footer__tagline {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--color-text-secondary);
}

.footer__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer__legal p { margin: 2px 0; }

.footer nav { display: flex; gap: 24px; }
.footer nav a { color: var(--color-text-secondary); }
.footer nav a:hover { color: var(--color-text); text-decoration: none; }

/* ---------- Scroll reveals ---------- */
/* Content is visible by default; the .js class opts in to the animation so
   nothing is hidden when JavaScript is unavailable. */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Applied during pagereveal: content already in the viewport must be visible
   the instant the view-transition snapshot is taken, with no fade of its own. */
.js .reveal--instant { transition: none; }

/* ---------- Card links ---------- */

a.card { display: block; color: inherit; }
a.card:hover { text-decoration: none; }

.card__more {
  display: inline-block;
  margin-top: 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-accent);
}
.card__more::after { content: " \203A"; }

/* ---------- Service pages ---------- */

.page-hero {
  position: relative;
  padding: calc(var(--nav-height) + 72px) 22px 72px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, var(--color-accent-glow), transparent 60%),
    var(--color-bg);
  text-align: center;
  overflow: hidden;
}

.page-hero__inner { position: relative; }

.page-hero__back { margin-bottom: 28px; }

.back-link {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
}
.back-link::before { content: "\2039 "; }
.back-link:hover { color: var(--color-text); text-decoration: none; }

.page-hero__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  padding: 16px;
  color: var(--color-text);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 20px;
}
.page-hero__icon svg { width: 100%; height: 100%; }

.page-hero h1 {
  font-size: clamp(40px, 7vw, 68px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.page-hero__lede {
  max-width: 600px;
  margin: 16px auto 0;
  font-size: clamp(19px, 2.5vw, 24px);
  line-height: 1.3;
  color: var(--color-text-secondary);
}

.section__note {
  max-width: 640px;
  margin: 56px auto 0;
  text-align: center;
  font-size: 17px;
  color: var(--color-text-secondary);
}

/* ---------- App showcase (Accents) ---------- */

.app-card {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  max-width: 760px;
  margin: 0 auto;
  padding: 44px 40px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  box-shadow: var(--shadow-card), inset 0 1px 0 var(--card-highlight);
}

.app-card__icon {
  flex: 0 0 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 22px;
  color: var(--color-text);
  background:
    radial-gradient(ellipse at 30% 20%, var(--color-accent-glow), transparent 70%),
    var(--color-bg);
  border: 1px solid var(--color-border);
}
.app-card__icon svg { width: 48px; height: 48px; }

.app-card h3 { font-size: 28px; font-weight: 700; letter-spacing: -0.015em; }

.app-card__tag {
  margin-top: 2px;
  font-size: 19px;
  color: var(--color-text-secondary);
}

.app-card__body { margin-top: 14px; color: var(--color-text-secondary); }

.app-card__platforms {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--color-text-secondary);
}

.app-card .link-arrow { display: inline-block; margin-top: 18px; }

@media (max-width: 600px) {
  .app-card { flex-direction: column; align-items: center; text-align: center; }
}

/* ---------- Display typography ---------- */
/* Headlines set in New York (ui-serif on Apple devices) — editorial contrast
   against the SF body. Serifs carry their own presence: lighter weight and
   near-neutral tracking, unlike the tight bold sans they replace. */

.hero__title,
.section__head h2,
.feature h2,
.contact h2,
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.008em;
}

/* ---------- Page transitions ---------- */
/* Cross-document view transitions: the clicked service card morphs into the
   page hero (they share a view-transition-name). Browsers without support use
   the .no-vt fade fallback set inline in <head> and driven by main.js. */

@view-transition { navigation: auto; }

.nav { view-transition-name: site-nav; }
.vt-apple { view-transition-name: svc-apple; }
.vt-web { view-transition-name: svc-web; }
.vt-custom { view-transition-name: svc-custom; }
.vt-care { view-transition-name: svc-care; }
.vt-cristi { view-transition-name: founder-cristi; }
.vt-george { view-transition-name: founder-george; }

::view-transition-group(svc-apple),
::view-transition-group(svc-web),
::view-transition-group(svc-custom),
::view-transition-group(svc-care),
::view-transition-group(founder-cristi),
::view-transition-group(founder-george) {
  animation-duration: 0.7s;
  animation-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
}

/* The old page slips away quickly; the new one rises in gently after it —
   staggering the two reads much cleaner than the default blended cross-fade. */
::view-transition-old(root) {
  animation: vt-page-out 0.35s cubic-bezier(0.4, 0, 1, 1) both;
}

::view-transition-new(root) {
  animation: vt-page-in 0.7s cubic-bezier(0.32, 0.72, 0, 1) both;
}

@keyframes vt-page-out {
  to { opacity: 0; transform: translateY(-12px) scale(0.995); }
}

@keyframes vt-page-in {
  from { opacity: 0; transform: translateY(20px) scale(0.995); }
  40% { opacity: 1; }
}

.no-vt body { animation: page-enter 0.85s cubic-bezier(0.32, 0.72, 0, 1); }

.page-leaving body {
  opacity: 0;
  transform: translateY(-10px) scale(0.995);
  transition: opacity 0.38s cubic-bezier(0.4, 0, 1, 1),
    transform 0.38s cubic-bezier(0.4, 0, 1, 1);
}

@keyframes page-enter {
  from { opacity: 0; transform: translateY(18px); }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
  .hero::before,
  .page-hero::before { animation: none; }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
  .no-vt body { animation: none; }
  .page-leaving body { opacity: 1; transform: none; transition: none; }
}
