:root {
  --bg: #f3f7f1;
  --paper: #fffefa;
  --ink: #171717;
  --muted: #646b60;
  --line: #d9e2d4;
  --green: #115a48;
  --lime: #d9ee8b;
  --coral: #d75f40;
  --blue: #265f91;
  --violet: #563d7d;
  --gold: #c78d27;
  --shadow: 0 24px 70px rgba(29, 36, 27, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(243, 247, 241, 0.9);
  border-bottom: 1px solid rgba(23, 23, 23, 0.08);
  backdrop-filter: blur(18px);
}

.scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--green), var(--coral), var(--blue));
}

.brand,
.nav,
.language-switcher,
.hero-actions,
.store-row,
.contact-actions,
.footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-size: 14px;
}

.nav {
  gap: 8px;
}

.nav a {
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.nav a:hover {
  background: rgba(17, 90, 72, 0.1);
  color: var(--green);
}

.nav a.is-active {
  background: rgba(17, 90, 72, 0.12);
  color: var(--green);
}

.language-switcher {
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 8px;
  background: rgba(255, 254, 250, 0.72);
}

.language-switcher button {
  min-width: 38px;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.language-switcher button.is-active {
  background: var(--green);
  color: #fff;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, 660px) minmax(360px, 500px);
  justify-content: center;
  gap: clamp(24px, 4vw, 56px);
  min-height: calc(100vh - 72px);
  padding: clamp(58px, 10vw, 118px) clamp(18px, 4vw, 56px) clamp(44px, 7vw, 90px);
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(17, 90, 72, 0.2), transparent 44%),
    radial-gradient(circle at 84% 18%, rgba(215, 95, 64, 0.2), transparent 30%),
    linear-gradient(180deg, #fbfdf6 0%, #eaf2e7 100%);
}

.hero-copy {
  align-self: center;
  max-width: 780px;
}

.eyebrow,
.project-kind {
  margin: 0 0 14px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(34px, 5.2vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
}

.hero-actions,
.store-row,
.contact-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.store-row {
  align-items: center;
}

.button,
.store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
}

.store-row .store {
  min-height: 63px;
  padding: 0 22px;
}

.button img,
.store img {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.primary {
  color: #fff;
  background: var(--green);
}

.primary:hover {
  background: #0c4638;
}

.ghost {
  border-color: rgba(23, 23, 23, 0.15);
  background: rgba(255, 254, 250, 0.72);
}

.ghost:hover {
  border-color: var(--green);
}

.hero-art {
  position: relative;
  min-height: 470px;
  align-self: center;
}

.icon-card {
  position: absolute;
  display: block;
  height: var(--card-size);
  object-fit: cover;
  border: 8px solid rgba(255, 254, 250, 0.8);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.icon-card-main {
  --card-size: clamp(260px, 22vw, 330px);
  top: 42px;
  right: 46px;
  width: var(--card-size);
  aspect-ratio: 1;
}

.icon-card-one,
.icon-card-two {
  --card-size: clamp(112px, 10vw, 148px);
  width: var(--card-size);
  aspect-ratio: 1;
}

.icon-card-one {
  left: 0;
  bottom: 102px;
  transform: rotate(-8deg);
}

.icon-card-two {
  right: 6px;
  bottom: 28px;
  transform: rotate(7deg);
}

.hero-note {
  position: absolute;
  left: 42px;
  top: 18px;
  width: min(240px, 60%);
  padding: 18px;
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 8px;
  background: rgba(255, 254, 250, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-note strong {
  display: block;
  margin-bottom: 6px;
  font-size: 24px;
}

.hero-note span {
  color: var(--muted);
}

.intro {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  transform: translateY(-34px);
}

.intro div {
  min-height: 132px;
  padding: 26px;
  background: var(--paper);
}

.intro strong {
  display: block;
  margin-bottom: 8px;
  font-size: 30px;
  line-height: 1.1;
}

.intro span {
  color: var(--muted);
}

.section-head {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(54px, 9vw, 100px) 18px 28px;
  text-align: center;
}

.section-head p {
  color: var(--muted);
  font-size: 18px;
}

.section-head .eyebrow {
  color: var(--blue);
}

.project {
  display: grid;
  grid-template-columns: minmax(360px, 620px) minmax(320px, 440px);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  min-height: 560px;
  width: min(1180px, calc(100% - 36px));
  margin: 20px auto;
  padding: clamp(30px, 6vw, 72px);
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.project:nth-of-type(even) .project-copy {
  order: initial;
}

.project:nth-of-type(even) .project-media {
  order: initial;
}

.project-copy {
  max-width: 720px;
}

.project-copy p:not(.project-kind) {
  max-width: 680px;
  color: rgba(23, 23, 23, 0.72);
  font-size: 18px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 640px;
  margin: 22px 0 0;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.54);
  color: rgba(23, 23, 23, 0.7);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.features {
  display: grid;
  gap: 10px;
  max-width: 620px;
  margin: 26px 0 28px;
  padding: 0;
  list-style: none;
}

.features li {
  position: relative;
  padding-left: 24px;
  color: rgba(23, 23, 23, 0.72);
}

.features li::before {
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.project-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  justify-self: center;
  width: 100%;
}

.project-media::before {
  position: absolute;
  width: min(100%, 430px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  content: "";
}

.project-media img {
  position: relative;
  z-index: 1;
  --project-image-size: clamp(250px, 26vw, 330px);
  display: block;
  width: var(--project-image-size);
  height: var(--project-image-size);
  aspect-ratio: 1;
  object-fit: cover;
  border: 10px solid rgba(255, 255, 255, 0.72);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.project-media span {
  position: absolute;
  right: 10px;
  bottom: 24px;
  z-index: 2;
  padding: 10px 13px;
  border-radius: 8px;
  background: rgba(255, 254, 250, 0.82);
  color: rgba(23, 23, 23, 0.76);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
  box-shadow: 0 12px 32px rgba(23, 23, 23, 0.12);
}

.store.google {
  color: #fff;
  background: #1f1f1f;
}

.store.rustore {
  color: #fff;
  background: #0b7f63;
}

.store:hover {
  transform: translateY(-1px);
}

.rustore-button-frame {
  display: block;
  width: 210px;
  max-width: 100%;
  height: 80px;
  border: 0;
}

.rustore-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 63px;
  line-height: 0;
  text-decoration: none;
}

.rustore-badge img {
  display: block;
  width: 188px;
  height: 63px;
  object-fit: contain;
}

.account-delete {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-top: 8px;
  color: rgba(23, 23, 23, 0.72);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.account-delete:hover {
  color: var(--coral);
  text-decoration: underline;
}

.js .reveal-ready {
  opacity: 0;
  transform: translateY(22px);
}

.js .reveal-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 600ms ease, transform 600ms ease;
}

.galaxy {
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.32), transparent 28%),
    linear-gradient(135deg, #dfeefa 0%, #d7e8fb 44%, #f6f9fb 100%);
}

.happy {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.35), transparent 28%),
    linear-gradient(135deg, #dff2c2 0%, #f5df8f 48%, #fff8df 100%);
}

.buest {
  background:
    radial-gradient(circle at 85% 22%, rgba(255, 255, 255, 0.28), transparent 30%),
    linear-gradient(135deg, #f0ddc7 0%, #d6c1a6 52%, #f8f0e4 100%);
}

.chrono {
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.28), transparent 30%),
    linear-gradient(135deg, #e9e4d0 0%, #cfd7df 54%, #f8f8f0 100%);
}

.yape {
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.32), transparent 28%),
    linear-gradient(135deg, #f7d2d7 0%, #e7def7 48%, #fff4f7 100%);
}

.clip {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.34), transparent 28%),
    linear-gradient(135deg, #d6f0e4 0%, #d9e5ff 52%, #f6fbff 100%);
}

.contact {
  display: grid;
  grid-template-columns: minmax(360px, 680px) minmax(260px, 420px);
  gap: 30px;
  align-items: center;
  justify-content: center;
  margin-top: 70px;
  padding: clamp(56px, 9vw, 100px) clamp(18px, 4vw, 56px);
  background: #16251f;
  color: #fff;
}

.contact > * {
  min-width: 0;
}

.contact p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
}

.contact .eyebrow {
  color: var(--lime);
}

.contact .ghost {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.footer {
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 4vw, 56px);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 980px) {
  .hero,
  .project,
  .contact {
    grid-template-columns: 1fr;
  }

  .project:nth-of-type(even) .project-copy,
  .project:nth-of-type(even) .project-media {
    order: initial;
  }

  .hero-art {
    min-height: 360px;
  }

  .project {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .language-switcher {
    align-self: stretch;
    justify-content: center;
  }

  .nav a {
    padding-inline: 8px;
  }

  .intro {
    grid-template-columns: 1fr;
    transform: none;
  }

  .hero {
    min-height: auto;
    padding-top: 44px;
  }

  .hero-art {
    min-height: 310px;
  }

  .icon-card-main {
    --card-size: 230px;
    right: 20px;
  }

  .icon-card-one,
  .icon-card-two {
    --card-size: 108px;
  }

  .hero-note {
    left: 0;
    top: 0;
  }

  .project {
    margin-inline: 12px;
    padding: 24px;
  }

  .project-media {
    min-height: 320px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .brand {
    font-size: 15px;
  }

  .nav a {
    font-size: 13px;
  }

  .button,
  .store,
  .rustore-button-frame,
  .rustore-badge,
  .hero-actions,
  .store-row,
  .contact-actions {
    width: 100%;
  }

  .rustore-badge {
    justify-content: flex-start;
  }

  .project-media img {
    --project-image-size: min(82vw, 250px);
  }
}

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

  .store:hover,
  .js .reveal-ready,
  .js .reveal-visible {
    transform: none;
  }

  .js .reveal-ready {
    opacity: 1;
  }

  .js .reveal-visible {
    transition: none;
  }
}
