/* TecTuff — modernized vanilla scaffold */

:root {
  --ink: #1c1814;
  --ink-soft: #5a5248;
  --paper: #f3eee6;
  --paper-deep: #e6ddd0;
  --surface: #faf6ef;
  --line: rgba(28, 24, 20, 0.12);
  --brand: #c4122f;
  --brand-deep: #9a0e24;
  --signal: #e6b000;
  --header-bg: rgba(250, 246, 239, 0.94);
  --nav-bg: rgba(250, 246, 239, 0.97);
  --form-bg: rgba(255, 251, 244, 0.7);
  --field-bg: #fffdf8;
  --about-wash: rgba(255, 248, 238, 0.65);
  --glow-brand: rgba(196, 18, 47, 0.07);
  --glow-signal: rgba(230, 176, 0, 0.12);
  --footer-bg: #1c1814;
  --footer-ink: rgba(255, 255, 255, 0.8);
  --btn-primary-ink: #1c1814;
  --hero-fog: linear-gradient(
    to left,
    rgba(18, 14, 10, 0.84) 0%,
    rgba(18, 14, 10, 0.52) 42%,
    rgba(18, 14, 10, 0.16) 100%
  );
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Manrope", "Helvetica Neue", sans-serif;
  --wrap: min(1120px, calc(100% - 2.5rem));
  --wrap-narrow: min(720px, calc(100% - 2.5rem));
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --app-media-h: min(34rem, 62vh);
  color-scheme: light;
}

html[lang^="zh"] {
  --font-body: "Manrope", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Barlow Condensed", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html[lang^="zh"] h1,
html[lang^="zh"] h2,
html[lang^="zh"] h3,
html[lang^="zh"] .eyebrow,
html[lang^="zh"] .btn,
html[lang^="zh"] .theme-toggle,
html[lang^="zh"] .app-switch__tabs button {
  letter-spacing: 0.04em;
  text-transform: none;
}

html[lang^="zh"] .section__title,
html[lang^="zh"] .hero__lede,
html[lang^="zh"] .section__lede {
  line-height: 1.45;
}

html[data-theme="dark"] {
  --ink: #f2ebe2;
  --ink-soft: #b8aea1;
  --paper: #14110f;
  --paper-deep: #0e0c0a;
  --surface: #1c1814;
  --line: rgba(242, 235, 226, 0.14);
  --brand: #ef3b52;
  --brand-deep: #c4122f;
  --signal: #f0c42a;
  --header-bg: rgba(20, 17, 15, 0.92);
  --nav-bg: rgba(20, 17, 15, 0.97);
  --form-bg: rgba(28, 24, 20, 0.85);
  --field-bg: #221e19;
  --about-wash: rgba(28, 24, 20, 0.55);
  --glow-brand: rgba(239, 59, 82, 0.12);
  --glow-signal: rgba(240, 196, 42, 0.1);
  --footer-bg: #0a0908;
  --footer-ink: rgba(242, 235, 226, 0.78);
  --btn-primary-ink: #1c1814;
  --hero-fog: linear-gradient(
    to left,
    rgba(8, 6, 5, 0.9) 0%,
    rgba(8, 6, 5, 0.58) 42%,
    rgba(8, 6, 5, 0.2) 100%
  );
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--glow-brand), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, var(--glow-signal), transparent 50%),
    linear-gradient(180deg, var(--paper) 0%, var(--surface) 42%, var(--paper-deep) 100%);
  background-attachment: fixed;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand);
}

h1,
h2,
h3,
.hero__brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin: 0 0 0.6em;
  text-transform: uppercase;
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0;
  padding: 0;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

.wrap--narrow {
  width: var(--wrap-narrow);
}

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  color: #fff;
  transition:
    background 0.35s var(--ease),
    color 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    transform 0.35s var(--ease);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-header.is-solid,
.site-header.is-scrolled {
  background: var(--header-bg);
  color: var(--ink);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}

.site-header__inner {
  width: var(--wrap);
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand img {
  height: 2.85em;
  width: auto;
  transition: filter 0.3s var(--ease);
}

.site-header:not(.is-solid):not(.is-scrolled) .brand img {
  filter: brightness(0) invert(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.lang-switch a {
  text-decoration: none;
  opacity: 0.65;
  padding: 0.2rem 0.15rem;
}

.lang-switch a:hover,
.lang-switch a[aria-current="page"] {
  opacity: 1;
  color: inherit;
}

.lang-switch a[aria-current="page"] {
  color: var(--signal);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid color-mix(in srgb, currentColor 45%, transparent);
  background: transparent;
  color: inherit;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: currentColor;
}

.site-header.is-solid .theme-toggle:hover,
.site-header.is-scrolled .theme-toggle:hover {
  background: rgba(28, 24, 20, 0.06);
}

html[data-theme="dark"] .site-header.is-solid .theme-toggle:hover,
html[data-theme="dark"] .site-header.is-scrolled .theme-toggle:hover {
  background: rgba(242, 235, 226, 0.08);
}

.theme-toggle__icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  display: none;
  overflow: visible;
}

html[data-theme="light"] .theme-toggle__icon--moon,
html[data-theme="dark"] .theme-toggle__icon--sun {
  display: block;
}

.site-nav {
  flex: 1;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.site-nav > a {
  text-decoration: none;
  opacity: 0.9;
}

.site-nav > a:hover,
.site-nav > a[aria-current="page"] {
  opacity: 1;
  color: var(--brand);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
}

.site-nav__cta {
  border: 1.5px solid currentColor;
  padding: 0.45rem 0.9rem;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  display: block;
  width: 1.4rem;
  height: 2px;
  margin-inline: auto;
  background: currentColor;
  content: "";
  position: relative;
  transition: transform 0.25s var(--ease);
}

.nav-toggle__bar::before {
  top: -6px;
}

.nav-toggle__bar::after {
  top: 4px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.7rem 1.35rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--signal);
  color: var(--btn-primary-ink);
  border-color: var(--signal);
}

.btn--primary:hover {
  background: #f0c42a;
  color: var(--btn-primary-ink);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Hero — one composition, brand-first, full-bleed */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: end;
  color: #fff;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: hero-drift 18s var(--ease) infinite alternate;
}

.hero__photo--light {
  object-position: center center;
  display: block;
}

.hero__photo--dark {
  object-position: center 65%;
  display: none;
}

html[data-theme="dark"] .hero__photo--light {
  display: none;
}

html[data-theme="dark"] .hero__photo--dark {
  display: block;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-fog);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: var(--wrap);
  margin: 0 auto;
  padding: calc(var(--header-h) + 2rem) 0 4.5rem;
  max-width: 38rem;
  justify-self: end;
  margin-right: max(1.25rem, calc((100% - var(--wrap)) / 2));
  margin-left: auto;
  text-align: right;
  animation: rise-in 1s var(--ease) both;
}

.hero__title {
  margin: 0 0 1.25rem;
}

.hero__mark {
  width: min(22rem, 72vw);
  height: auto;
  margin-left: auto;
  mix-blend-mode: screen;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.hero__lede {
  font-size: 1.1rem;
  max-width: 28rem;
  margin-left: auto;
  margin-bottom: 1.75rem;
  opacity: 0.92;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Sections */

.section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.section__intro {
  margin-bottom: 2.5rem;
  max-width: 36rem;
}

.section__title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}

.section__lede {
  font-size: 1.12rem;
  color: var(--ink-soft);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.75rem;
}

.subhead {
  font-size: 1.35rem;
  margin-top: 2rem;
}

/* About */

.about {
  background:
    linear-gradient(180deg, transparent, var(--about-wash)),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 11px,
      rgba(28, 24, 20, 0.035) 11px,
      rgba(28, 24, 20, 0.035) 12px
    );
}

html[data-theme="dark"] .about {
  background:
    linear-gradient(180deg, transparent, var(--about-wash)),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 11px,
      rgba(242, 235, 226, 0.04) 11px,
      rgba(242, 235, 226, 0.04) 12px
    );
}

.core-list {
  list-style: none;
  margin-top: 2rem;
  display: grid;
  gap: 0.85rem;
}

.core-list li {
  position: relative;
  padding-left: 1.4rem;
  font-weight: 600;
}

.core-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--brand);
}

/* Science */

.science__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.prop-list {
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.prop-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.science__aside {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.key-list {
  list-style: none;
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.key-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0.85rem;
  align-items: center;
  font-weight: 600;
  font-size: 0.98rem;
}

.key-list img {
  width: 40px;
  height: auto;
}

html[data-theme="dark"] .key-list img {
  filter: invert(1) brightness(1.05);
}

.science__figure {
  margin: 0;
}

.science__figure img {
  width: 100%;
  mix-blend-mode: multiply;
}

html[data-theme="dark"] .science__figure {
  background: #d8d4ce;
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
}

html[data-theme="dark"] .science__figure img {
  mix-blend-mode: normal;
  opacity: 1;
  border-radius: 0.4rem;
}

/* Textures rail */

.textures {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.textures::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("../assets/bg-textures/black-orchid.jpg");
  background-repeat: repeat;
  background-size: 360px auto;
  opacity: 0.45;
  pointer-events: none;
}

.textures::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--paper) 78%, transparent),
    color-mix(in srgb, var(--surface) 62%, transparent) 50%,
    color-mix(in srgb, var(--paper-deep) 74%, transparent)
  );
  pointer-events: none;
}

html[data-theme="dark"] .textures::before {
  opacity: 0.4;
  filter: none;
  background-size: 360px auto;
}

.textures > .wrap {
  position: relative;
  z-index: 1;
}

.texture-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 320px);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.material-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.material-gallery__item {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: var(--paper-deep);
}

.material-gallery__item img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.95);
  transition: transform 0.5s var(--ease);
}

.material-gallery__item:hover img {
  transform: scale(1.03);
}

.material-gallery__item figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 2.2rem 0.85rem 0.7rem;
  background: linear-gradient(transparent, rgba(20, 17, 15, 0.82) 58%);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.texture-rail:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}

.texture-item {
  scroll-snap-align: start;
}

.texture-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.95);
  transition: transform 0.5s var(--ease);
}

.texture-item:hover img {
  transform: scale(1.03);
}

.texture-item h3 {
  margin-top: 0.85rem;
  font-size: 1.35rem;
}

/* Features — no cards: hairline separators only */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.feature {
  padding: 1.6rem 1.4rem 1.6rem 0;
  border-bottom: 1px solid var(--line);
}

.feature:nth-child(odd) {
  padding-right: 1.75rem;
  border-right: 1px solid var(--line);
}

.feature:nth-child(even) {
  padding-left: 1.75rem;
}

.feature h3 {
  font-size: 1.45rem;
  color: var(--brand);
}

.feature p {
  margin: 0;
  color: var(--ink-soft);
}

/* Applications */

.applications {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.applications::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("../assets/bg-textures/cartographer.png");
  background-repeat: repeat;
  background-size: 360px auto;
  opacity: 0.45;
  pointer-events: none;
}

.applications::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--paper) 78%, transparent),
    color-mix(in srgb, var(--surface) 62%, transparent) 50%,
    color-mix(in srgb, var(--paper-deep) 74%, transparent)
  );
  pointer-events: none;
}

html[data-theme="dark"] .applications::before {
  opacity: 0.4;
  filter: invert(1) brightness(1.2);
}

.applications > .wrap {
  position: relative;
  z-index: 1;
}

.app-switch__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.app-switch__tabs button {
  appearance: none;
  border: 0;
  background: transparent;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.85rem 1rem;
  cursor: pointer;
  color: var(--ink-soft);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.app-switch__tabs button[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--brand);
}

.app-panels {
  min-height: var(--app-media-h);
}

.app-panel {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: stretch;
  min-height: var(--app-media-h);
}

.app-panel.is-active {
  display: grid;
  animation: panel-in 0.45s var(--ease) both;
}

.app-panel__media {
  overflow: hidden;
  height: var(--app-media-h);
  background: var(--paper-deep);
}

.app-panel__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.app-panel__kicker {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.4rem;
}

.app-panel__copy h3 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.app-panel__copy ul {
  list-style: none;
  margin-top: 1.25rem;
  display: grid;
  gap: 0.45rem;
}

.app-panel__copy li {
  padding-left: 1rem;
  position: relative;
  font-weight: 600;
}

.app-panel__copy li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.4rem;
  height: 0.4rem;
  background: var(--signal);
}

/* Comparison */

.compare-list {
  display: grid;
  gap: 0;
}

.compare-row {
  display: grid;
  grid-template-columns: minmax(0, 30%) 1fr minmax(0, 30%);
  gap: 0;
  align-items: start;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.compare-row:last-child {
  border-bottom: 1px solid var(--line);
}

.compare-row h3 {
  font-size: 1.25rem;
  margin-bottom: 0.35em;
}

.compare-row > div:first-child h3 {
  color: var(--brand);
}

.compare-row p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.compare-row > div:last-child {
  justify-self: end;
  text-align: right;
  width: 100%;
}

.compare-vs {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal);
  justify-self: center;
  align-self: center;
  text-align: center;
}

/* CTA */

.cta {
  background:
    linear-gradient(120deg, rgba(20, 20, 20, 0.88), rgba(20, 20, 20, 0.72)),
    url("../assets/images/CamoBG.jpg") center / cover;
  color: #fff;
}

.cta .section__lede {
  color: rgba(255, 255, 255, 0.85);
}

.cta__inner {
  max-width: 40rem;
}

/* Contact */

.contact-hero {
  padding-top: calc(var(--header-h) + 3rem);
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-thanks {
  font-weight: 700;
}

.contact-form {
  display: grid;
  gap: 1rem;
  background: var(--form-bg);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--field-bg);
  color: var(--ink);
  font: inherit;
  padding: 0.75rem 0.85rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.form-note {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.form-note[data-state="success"] {
  color: #2f6b3a;
}

.form-note[data-state="error"] {
  color: var(--brand);
}

html[data-theme="dark"] .form-note[data-state="success"] {
  color: #7dca8c;
}

.contact-form .btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

/* Footer */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: 2.5rem 0;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer img {
  height: 1.6rem;
  width: auto;
  opacity: 0.9;
}

.site-footer nav {
  display: flex;
  gap: 1.25rem;
}

.site-footer a {
  text-decoration: none;
  color: #fff;
}

html[data-theme="dark"] .site-footer a {
  color: var(--ink);
}

.site-footer a:hover {
  color: var(--signal);
}

/* Motion */

.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

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

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-header {
    transition: background 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.35s var(--ease);
  }

  .hero__photo,
  .reveal,
  .app-panel.is-active,
  .hero__content,
  .material-gallery__item img {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Responsive */

@media (max-width: 900px) {
  .science__grid,
  .app-panel.is-active,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .material-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .science__aside {
    position: static;
  }

  .app-panels,
  .app-panel,
  .app-panel__media {
    min-height: 18rem;
    height: auto;
  }

  .app-panel.is-active {
    min-height: 0;
  }

  .app-panel__media {
    height: 18rem;
  }

  .app-panel__media img {
    height: 100%;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature,
  .feature:nth-child(odd),
  .feature:nth-child(even) {
    padding: 1.4rem 0;
    border-right: 0;
  }

  .compare-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .compare-row > div:last-child {
    justify-self: stretch;
    text-align: left;
  }

  .compare-vs {
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 760px) {
  .site-header,
  .site-header.is-solid,
  .site-header.is-scrolled {
    background: rgba(20, 17, 15, 0.92);
    color: #fff;
    backdrop-filter: blur(10px);
    box-shadow: none;
  }

  .site-header:not(.is-solid):not(.is-scrolled) {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent);
  }

  .site-header__inner {
    justify-content: space-between;
  }

  .header-actions {
    margin-left: auto;
    gap: 0.65rem;
  }

  .brand {
    flex-shrink: 0;
    margin-right: 1rem;
  }

  .brand img,
  .site-header:not(.is-solid):not(.is-scrolled) .brand img,
  .site-header.is-solid .brand img,
  .site-header.is-scrolled .brand img {
    height: 2em;
    filter: brightness(0) invert(1);
  }

  .hero__photo--light,
  .hero__photo--dark {
    object-position: -300px center;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    flex: none;
    margin-left: 0;
    padding: 0.85rem 1.25rem 1.75rem;
    background: var(--nav-bg);
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    max-height: calc(100svh - var(--header-h));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav > a {
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--line);
  }

  .site-nav > a:last-of-type {
    border-bottom: 0;
  }

  .site-nav__cta {
    margin-top: 1rem;
    margin-bottom: 0.35rem;
    padding: 0.85rem 1rem;
    text-align: center;
    border-bottom: 0;
  }

  .nav-tools {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    margin: 1.1rem 0 0;
    padding-top: 1.1rem;
    border-top: 1px solid var(--line);
  }

  .nav-tools .lang-switch {
    gap: 1.25rem;
    font-size: 0.92rem;
  }

  .nav-tools .lang-switch a {
    padding: 0.35rem 0;
    text-decoration: none;
  }

  .nav-tools .theme-toggle {
    align-self: flex-start;
    color: var(--ink);
  }

  .nav-tools .theme-toggle:hover,
  .site-header.is-solid .nav-tools .theme-toggle:hover,
  .site-header.is-scrolled .nav-tools .theme-toggle:hover {
    background: rgba(28, 24, 20, 0.06);
  }

  html[data-theme="dark"] .nav-tools .theme-toggle:hover,
  html[data-theme="dark"] .site-header.is-solid .nav-tools .theme-toggle:hover,
  html[data-theme="dark"] .site-header.is-scrolled .nav-tools .theme-toggle:hover {
    background: rgba(242, 235, 226, 0.08);
  }

  body.nav-open {
    overflow: hidden;
  }
}
