:root {
  --bg: #f6efe4;
  --surface: #fffaf1;
  --ink: #2a1d12;
  --muted: #6e5b49;
  --line: #e2d3bf;
  --accent: #b5652b;
  --accent-2: #7a3f16;
  --on-accent: #fff8ee;
  --hero-a: #3b2412;
  --hero-b: #6b3d1c;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 18px;
  --shadow: 0 18px 40px -18px rgba(60, 30, 8, 0.35);
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17100a;
    --surface: #221810;
    --ink: #f3e8d8;
    --muted: #b9a58f;
    --line: #3a2b1d;
    --accent: #e08b4a;
    --accent-2: #f0b27c;
    --on-accent: #1b0f06;
    --hero-a: #0f0a06;
    --hero-b: #3a2210;
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
  }
}
:root[data-theme="dark"] {
  --bg: #17100a;
  --surface: #221810;
  --ink: #f3e8d8;
  --muted: #b9a58f;
  --line: #3a2b1d;
  --accent: #e08b4a;
  --accent-2: #f0b27c;
  --on-accent: #1b0f06;
  --hero-a: #0f0a06;
  --hero-b: #3a2210;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
}
*,
*::before,
*::after {
  box-sizing: inherit;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 76px);
}
body {
  margin: 0;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.65 var(--sans);
  overflow-x: hidden;
  transition:
    background 0.4s,
    color 0.4s;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--bg);
  z-index: 60;
}
img,
svg {
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
}
.wrap {
  width: min(1160px, 90%);
  margin-inline: auto;
}
section {
  padding: clamp(64px, 10vw, 130px) 0;
}
.eyebrow {
  font: 600 0.85rem var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: currentColor;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  border-radius: 99px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  font: 600 1rem var(--sans);
  transition:
    transform 0.3s,
    box-shadow 0.3s,
    background 0.3s,
    translate 0.25s ease-out;
  min-height: 48px;
}
.btn-main {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.btn-main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  animation: shine 4.5s 2s infinite;
}
@keyframes shine {
  40%,
  100% {
    transform: translateX(120%);
  }
}
.btn-main:hover {
  background: var(--accent-2);
  color: var(--on-accent);
}
.btn-ghost {
  border: 1.5px solid currentColor;
  background: transparent;
  color: inherit;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}
.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  filter: blur(6px);
  transition:
    opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1s cubic-bezier(0.16, 1, 0.3, 1),
    filter 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
  filter: none;
}
h2.reveal {
  position: relative;
}
header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 70;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s;
}
header.stuck {
  box-shadow: 0 8px 30px -16px rgba(0, 0, 0, 0.4);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  font: 600 1.55rem var(--serif);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.logo i {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  color: var(--on-accent);
  font: 600 1rem var(--serif);
  font-style: normal;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logo:hover i {
  transform: rotate(-12deg) scale(1.1);
}
nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--muted);
  position: relative;
  transition: color 0.3s;
}
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width 0.3s;
}
nav a:hover,
nav a.on {
  color: var(--ink);
}
nav a:hover::after,
nav a.on::after {
  width: 100%;
}
.tools {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.05rem;
  transition: transform 0.3s;
}
.icon-btn:active {
  transform: scale(0.9);
}
.burger {
  display: none;
  position: relative;
}
.burger span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition:
    transform 0.35s,
    opacity 0.2s;
}
.burger span:nth-child(1) {
  top: 16px;
}
.burger span:nth-child(2) {
  top: 21px;
}
.burger span:nth-child(3) {
  top: 26px;
}
.burger.x span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.burger.x span:nth-child(2) {
  opacity: 0;
}
.burger.x span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}
#progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.hero {
  position: relative;
  min-height: calc(100svh - 68px);
  display: grid;
  align-items: center;
  color: #fbefdc;
  overflow: hidden;
  padding: 60px 0;
  background:
    radial-gradient(900px 500px at 78% 20%, var(--hero-b), transparent 70%),
    linear-gradient(160deg, var(--hero-a), #23140a);
}
.grain {
  position: absolute;
  inset: -20%;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004 .09' numOctaves='4' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 .8 0 0 0 0 .5 0 0 0 0 .25 0 0 0 1.4 -.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  animation: drift 40s linear infinite;
}
@keyframes drift {
  to {
    transform: translate3d(-120px, 60px, 0);
  }
}
.rings {
  position: absolute;
  right: -12vw;
  top: 50%;
  width: min(70vw, 760px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at 46% 52%,
    #c98550 0 6px,
    #a86a35 6px 12px,
    #d9a06a 12px 17px,
    #8a5224 17px 24px
  );
  box-shadow:
    inset 0 0 120px rgba(0, 0, 0, 0.55),
    0 40px 120px rgba(0, 0, 0, 0.5);
  opacity: 0.9;
  animation: spin 120s linear infinite;
}
@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}
#dust {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    520px circle at var(--mx, 72%) var(--my, 28%),
    rgba(233, 166, 107, 0.24),
    transparent 62%
  );
}
.hero .wrap {
  position: relative;
  z-index: 2;
}
.hero h1 {
  font-size: clamp(3rem, 9.5vw, 8rem);
  max-width: 11ch;
}
.hero h1.reveal {
  opacity: 1;
  transform: none;
  filter: none;
}
.hero h1 em {
  color: #e9a66b;
  font-weight: 400;
}
.hero p {
  max-width: 520px;
  font-size: 1.15rem;
  color: #e6d3bb;
  margin: 1.6rem 0 2.2rem;
}
.hero .cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0 0.06em 0.14em 0;
  margin-bottom: -0.14em;
}
.w > span {
  display: inline-block;
  transform: translateY(112%) rotate(5deg);
  transform-origin: left bottom;
  animation: up 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes up {
  to {
    transform: none;
  }
}
.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  width: 24px;
  height: 40px;
  border: 2px solid #e6d3bb99;
  border-radius: 14px;
  z-index: 2;
}
.scroll-hint::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: #e6d3bb;
  border-radius: 3px;
  animation: wheel 1.8s infinite;
}
@keyframes wheel {
  50% {
    transform: translateY(12px);
    opacity: 0.2;
  }
}

.marquee {
  background: var(--accent);
  color: var(--on-accent);
  overflow: hidden;
  white-space: nowrap;
  padding: 16px 0;
  font: italic 400 1.5rem var(--serif);
}
.marquee div {
  display: inline-block;
  animation: marq 32s linear infinite;
}
.marquee:hover div {
  animation-play-state: paused;
}
.marquee span {
  margin: 0 1.6rem;
}
@keyframes marq {
  to {
    transform: translateX(-50%);
  }
}

.about {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(30px, 6vw, 90px);
  align-items: center;
}
.about p {
  color: var(--muted);
  font-size: 1.08rem;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.2rem;
}
.stat {
  border-top: 2px solid var(--accent);
  padding-top: 0.8rem;
}
.stat b {
  display: block;
  font: 600 clamp(2rem, 4vw, 2.8rem) var(--serif);
}
.stat small {
  color: var(--muted);
}
.plank {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
  background:
    repeating-linear-gradient(
      92deg,
      #a8693a 0 38px,
      #96592e 38px 41px,
      #b97a48 41px 90px,
      #8b5128 90px 93px
    ),
    #a8693a;
  transform: rotate(2deg);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.plank::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80px 220px at 30% 40%, #0002, transparent),
    radial-gradient(ellipse 60px 160px at 70% 70%, #0002, transparent);
}
.plank:hover {
  transform: rotate(0) scale(1.02);
}
.plank blockquote {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 2rem;
  background: linear-gradient(transparent, #1a0e06dd);
  color: #fbefdc;
  font: italic 1.35rem/1.3 var(--serif);
}

.head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.2rem 2rem;
  flex-wrap: wrap;
  margin-bottom: 2.6rem;
}
.head p {
  max-width: 420px;
  color: var(--muted);
  margin: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.3rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}
.card.reveal {
  transition:
    opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
    filter 1s,
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s,
    border-color 0.35s;
}
.card.done {
  transition:
    transform 0.2s ease-out,
    box-shadow 0.35s,
    border-color 0.35s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(
    260px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--accent) 20%, transparent),
    transparent 70%
  );
}
.card:hover {
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.card:hover::before {
  opacity: 1;
}
.card svg {
  width: 46px;
  height: 46px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 1.2rem;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card:hover svg {
  transform: scale(1.18) rotate(-6deg);
}
.card h3 {
  font-size: 1.45rem;
  margin-bottom: 0.6rem;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}

.process {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  counter-reset: s;
}
.steps::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 27px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 16px);
  opacity: 0.5;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.steps.in::before {
  transform: none;
}
.step {
  position: relative;
  counter-increment: s;
}
.step::before {
  content: counter(s);
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 1.3rem var(--serif);
  margin-bottom: 1.2rem;
  position: relative;
  box-shadow: 0 0 0 8px var(--surface);
}
.step.reveal::before {
  transform: scale(0);
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s;
}
.step.reveal.in::before {
  transform: scale(1);
}
.step h3 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}
.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.filters {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.filters button {
  padding: 0.65rem 1.3rem;
  min-height: 44px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: 500 0.92rem var(--sans);
  transition: all 0.3s;
}
.filters button.on,
.filters button:hover {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-auto-rows: 240px;
  gap: 1rem;
}
.tile {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 1.3rem;
  color: #fff6e8;
  animation: pop 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(20px);
  }
}
.tile.big {
  grid-row: span 2;
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--w);
  transition: transform 0.7s;
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 35%, #150a04cc);
}
.tile:hover::before {
  transform: scale(1.12) rotate(1deg);
}
.tile span {
  position: relative;
  z-index: 2;
  font: 600 1.3rem var(--serif);
  transform: translateY(8px);
  transition: transform 0.4s;
}
.tile small {
  display: block;
  font: 400 0.82rem var(--sans);
  opacity: 0;
  transition: opacity 0.4s;
  margin-top: 0.2rem;
}
.tile:hover span {
  transform: none;
}
.tile:hover small {
  opacity: 0.9;
}
.tile.hide {
  display: none;
}
.t1 {
  --w: repeating-linear-gradient(95deg, #8a5a34 0 30px, #7a4c28 30px 33px, #9c6a40 33px 70px);
}
.t2 {
  --w: repeating-linear-gradient(80deg, #d8b88a 0 26px, #c9a574 26px 29px, #e3c799 29px 64px);
}
.t3 {
  --w: repeating-linear-gradient(100deg, #4a2c18 0 34px, #3c2212 34px 37px, #573520 37px 80px);
}
.t5 {
  --w: repeating-linear-gradient(92deg, #6a4a2e 0 36px, #5a3d24 36px 39px, #7b5836 39px 76px);
}
.t6 {
  --w: repeating-linear-gradient(97deg, #caa273 0 28px, #b88f5f 28px 31px, #d6b384 31px 68px);
}

.mats {
  display: flex;
  gap: 0.8rem;
  height: 340px;
}
.mat {
  flex: 1;
  border-radius: var(--r);
  background: var(--w);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition:
    flex 0.6s cubic-bezier(0.2, 0.7, 0.2, 1),
    height 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.mat:hover,
.mat:focus,
.mat.open {
  flex: 3.2;
  outline: none;
}
.mat div {
  position: absolute;
  inset: auto 0 0;
  padding: 1.2rem;
  background: linear-gradient(transparent, #150a04dd);
  color: #fff6e8;
}
.mat b {
  font: 600 1.2rem var(--serif);
  display: block;
}
.mat small {
  display: block;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.5s;
}
.mat:hover small,
.mat:focus small,
.mat.open small {
  max-height: 80px;
  opacity: 0.9;
}

.contact {
  background: linear-gradient(160deg, var(--hero-a), #23140a);
  color: #fbefdc;
  position: relative;
  overflow: hidden;
}
.contact .eyebrow {
  color: #e9a66b;
}
.cgrid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(30px, 6vw, 80px);
}
.cgrid p {
  color: #d8c4a9;
}
.info {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 1rem;
}
.info li {
  display: flex;
  gap: 1rem;
  align-items: center;
  word-break: break-word;
}
.info i {
  font-style: normal;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffffff14;
}
form {
  display: grid;
  gap: 1rem;
  background: #ffffff0d;
  border: 1px solid #ffffff22;
  border-radius: var(--r);
  padding: clamp(1.2rem, 3vw, 2.2rem);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.f2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d8c4a9;
  display: grid;
  gap: 0.4rem;
}
input,
select,
textarea {
  font: inherit;
  font-size: 16px;
  color: #fff6e8;
  background: #00000033;
  border: 1px solid #ffffff2e;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  width: 100%;
  min-height: 48px;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #e9a66b;
  box-shadow: 0 0 0 4px rgba(233, 166, 107, 0.18);
}
select option {
  color: #222;
}
textarea {
  min-height: 120px;
  resize: vertical;
}
#ok {
  display: none;
  color: #9fe0a8;
  font-weight: 500;
}

footer {
  padding: 2.5rem 0 calc(2.5rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
#top {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s,
    transform 0.3s;
  z-index: 50;
  transform: translateY(10px);
}
#top.show {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
#bar {
  display: none;
}

@media (max-width: 860px) {
  .about,
  .cgrid {
    grid-template-columns: 1fr;
  }
  .plank {
    max-width: 420px;
    margin-inline: auto;
    aspect-ratio: 4/3.6;
  }
  .burger {
    display: inline-block;
  }
  nav ul {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100svh - 68px - env(safe-area-inset-top, 0px));
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
    padding: 0 8%;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition:
      opacity 0.35s,
      transform 0.35s,
      visibility 0.35s;
  }
  nav ul.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  nav li a {
    display: block;
    padding: 0.6rem 0;
    font: 600 clamp(2rem, 9vw, 2.8rem) var(--serif);
    color: var(--ink);
    border-bottom: 1px solid var(--line);
  }
  nav li a::after {
    display: none;
  }
  nav li {
    opacity: 0;
    transform: translateX(-20px);
    transition: 0.5s;
  }
  nav ul.open li {
    opacity: 1;
    transform: none;
  }
  nav ul.open li:nth-child(2) {
    transition-delay: 0.05s;
  }
  nav ul.open li:nth-child(3) {
    transition-delay: 0.1s;
  }
  nav ul.open li:nth-child(4) {
    transition-delay: 0.15s;
  }
  nav ul.open li:nth-child(5) {
    transition-delay: 0.2s;
  }
  nav ul.open li:nth-child(6) {
    transition-delay: 0.25s;
  }
  .mats {
    flex-direction: column;
    height: auto;
  }
  .mat {
    flex: none;
    height: 84px;
  }
  .mat:hover,
  .mat:focus {
    flex: none;
  }
  .mat.open {
    flex: none;
    height: 170px;
  }
  .steps::before {
    display: none;
  }
  .steps {
    gap: 1.6rem;
  }
  .f2 {
    grid-template-columns: 1fr;
  }
  .rings {
    opacity: 0.4;
    right: -30vw;
    width: 95vw;
  }
  .scroll-hint {
    display: none;
  }
  .hero {
    padding: 40px 0 90px;
  }
  #top {
    display: none;
  }
  #bar {
    display: flex;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 65;
    transform: translateY(140%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }
  #bar.show {
    transform: none;
  }
  #bar .btn {
    flex: 1;
    box-shadow: 0 14px 30px -8px rgba(0, 0, 0, 0.55);
  }
  footer {
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  }
}
@media (max-width: 700px) {
  .cards,
  .grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    margin-inline: -5vw;
    padding: 6px 5vw 18px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .cards::-webkit-scrollbar,
  .grid::-webkit-scrollbar {
    display: none;
  }
  .card {
    flex: 0 0 80%;
    scroll-snap-align: center;
  }
  .tile,
  .tile.big {
    flex: 0 0 78%;
    height: 280px;
    scroll-snap-align: center;
  }
}
@media (max-width: 520px) {
  .hero h1 {
    font-size: clamp(2.6rem, 14vw, 3.6rem);
  }
  .hero p {
    font-size: 1.02rem;
  }
  .hero .cta .btn {
    flex: 1 1 100%;
  }
  .stats {
    gap: 0.6rem;
  }
  .stat b {
    font-size: 1.7rem;
  }
  .stat small {
    font-size: 0.8rem;
  }
  .head {
    margin-bottom: 1.6rem;
  }
  .card {
    padding: 1.5rem;
  }
  .marquee {
    font-size: 1.2rem;
  }
  footer .wrap {
    flex-direction: column;
  }
}
@media (hover: none) {
  .tile small {
    opacity: 0.9;
  }
  .tile span {
    transform: none;
  }
  .card:hover::before {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }
  .w > span {
    transform: none;
  }
}

/* Pasos: cinta métrica que se llena al hacer scroll */
.steps {
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.steps::before,
.steps::after {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  height: 10px;
  opacity: 1;
  transform: none;
  transition: none;
  z-index: 0;
  display: block;
}
.steps::before {
  right: 0;
  background:
    linear-gradient(var(--line), var(--line)) bottom/100% 2px no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 2px, transparent 2px 12px);
}
.steps::after {
  width: calc(100% * var(--g, 0));
  background:
    linear-gradient(var(--accent), var(--accent)) bottom/100% 2px no-repeat,
    repeating-linear-gradient(90deg, var(--accent) 0 2px, transparent 2px 12px);
}
.step {
  z-index: 1;
}
.step::before {
  content: "";
  background: var(--surface);
  border: 2px solid var(--line);
}
.step.reveal::before {
  transition:
    transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s,
    background 0.5s,
    border-color 0.5s,
    box-shadow 0.5s;
}
.step.on::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow:
    0 0 0 8px var(--surface),
    0 12px 26px -8px var(--accent);
  animation: ring 1s 0.1s;
}
@keyframes ring {
  from {
    box-shadow:
      0 0 0 8px var(--surface),
      0 0 0 8px color-mix(in srgb, var(--accent) 55%, transparent);
  }
  to {
    box-shadow:
      0 0 0 8px var(--surface),
      0 0 0 30px transparent;
  }
}
.step::after {
  content: counter(s, decimal-leading-zero);
  position: absolute;
  right: 0;
  top: 4px;
  font: 600 3.2rem/1 var(--serif);
  color: var(--line);
  transition: color 0.6s;
  pointer-events: none;
}
.step.on::after {
  color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.ic {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  z-index: 2;
  transition:
    transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.45s,
    stroke 0.5s;
}
.step.reveal .ic {
  transform: scale(0);
}
.step.reveal.in .ic {
  transform: scale(1);
}
.step.on .ic {
  stroke: var(--on-accent);
}
.step h3 {
  transition:
    color 0.4s,
    transform 0.4s;
}
.step:hover h3 {
  color: var(--accent);
  transform: translateX(4px);
}
@media (max-width: 900px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }
  .steps::before,
  .steps::after {
    display: block;
    left: 22px;
    right: auto;
    top: 27px;
    width: 10px;
  }
  .steps::before {
    height: calc(100% - 27px);
    background:
      linear-gradient(var(--line), var(--line)) right/2px 100% no-repeat,
      repeating-linear-gradient(180deg, var(--line) 0 2px, transparent 2px 12px);
  }
  .steps::after {
    height: calc((100% - 27px) * var(--g, 0));
    background:
      linear-gradient(var(--accent), var(--accent)) right/2px 100% no-repeat,
      repeating-linear-gradient(180deg, var(--accent) 0 2px, transparent 2px 12px);
  }
  .step {
    padding-left: 82px;
    min-height: 54px;
  }
  .step::before {
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
  }
  .step::after {
    font-size: 2.6rem;
  }
  .step h3 {
    margin: 0.5rem 0 0.4rem;
  }
}
.logo img {
  height: 44px;
  width: auto;
  display: block;
  transition:
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 0.4s;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}
.logo:hover img {
  transform: rotate(-1.5deg) scale(1.05);
}
@media (max-width: 380px) {
  .logo img {
    height: 38px;
  }
}
