@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --bg: #f8f5eb;
  --bg-accent: #ebe3cc;
  --ink: #1f2a21;
  --ink-soft: #415148;
  --brand: #14673f;
  --brand-strong: #0e4d30;
  --line: #c8bea3;
  --warn: #9b4600;
  --card: #fffdf4;
  --shadow: 0 18px 40px rgba(20, 103, 63, 0.12);
  --topbar-height: 64px;
  --footer-height: 56px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(20, 103, 63, 0.12), transparent 30%),
    radial-gradient(circle at 90% 84%, rgba(238, 238, 210, 0.9), transparent 35%),
    linear-gradient(140deg, var(--bg), var(--bg-accent));
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  background: #fff;
  border: 2px solid var(--brand);
  padding: 0.4rem 0.7rem;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 244, 0.92);
  backdrop-filter: blur(8px);
}

.brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-icon {
  width: 32px;
  height: 32px;
}

.brand-name {
  font: 700 1.2rem/1 "Fraunces", Georgia, serif;
  letter-spacing: 0.03em;
}

.brand-name-image {
  height: 22px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  border-bottom-color: var(--brand);
}

main {
  width: 100%;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(var(--topbar-height) + 1.4rem) 1rem calc(var(--footer-height) + 1.6rem);
  scroll-padding-top: calc(var(--topbar-height) + 1rem);
}

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--footer-height);
  z-index: 20;
  width: 100%;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 244, 0.85);
}

.footer-inner {
  height: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-inner span {
  color: var(--ink-soft);
  font-weight: 500;
}

.footer-social {
  min-height: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

.hero {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}

.hero-text {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.2rem;
  animation: rise 520ms ease-out;
}

.hero-text h1 {
  margin: 0.2rem 0 0.8rem;
  font: 700 clamp(1.8rem, 5vw, 2.9rem)/1.05 "Fraunces", Georgia, serif;
}

.eyebrow {
  margin: 0;
  font-weight: 700;
  text-transform: lowercase;
  color: var(--brand-strong);
  letter-spacing: 0.03em;
}

.cta {
  display: inline-block;
  margin-top: 0.7rem;
  padding: 0.62rem 0.95rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.cta:hover,
.cta:focus-visible {
  background: var(--brand-strong);
}

.hero-card {
  min-height: 220px;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: linear-gradient(25deg, #0f4a2f, #208641);
  animation: rise 700ms ease-out;
}

.hero-grid {
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.35) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.35) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.28) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.28) 75%);
  background-size: 70px 70px;
  background-position: 0 0, 0 35px, 35px -35px, -35px 0;
}

.section {
  margin-top: 1.8rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 244, 0.86);
}

.section-head h2 {
  margin: 0;
  font: 700 1.6rem/1.1 "Fraunces", Georgia, serif;
}

.section-head p {
  margin: 0.4rem 0 0.8rem;
  color: var(--ink-soft);
}

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

.tutorial-sequence {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tutorial-slideshow {
  margin-top: 0.9rem;
}

.tutorial-viewport {
  margin-top: 0.7rem;
}

.tutorial-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.tutorial-progress {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}

.tutorial-nav[disabled] {
  opacity: 0.6;
}

.tutorial-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.8rem;
}

.tutorial-card h3 {
  margin: 0 0 0.5rem;
}

.tutorial-card p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
}

.tutorial-images {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.6rem;
}

.tutorial-images figure {
  margin: 0;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.tutorial-image-trigger {
  border: 0;
  background: transparent;
  padding: 0;
  width: 100%;
  border-radius: 6px;
  display: block;
}

.tutorial-image-trigger:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.tutorial-images img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  background: #faf8ef;
}

.tutorial-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 11, 9, 0.9);
  padding: 1.2rem;
}

.tutorial-modal.is-open {
  display: flex;
}

.tutorial-modal-shell {
  width: min(92vw, 1360px);
  height: min(90vh, 920px);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tutorial-modal-context {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 1360px);
  max-height: min(36vh, 220px);
  overflow-y: auto;
  z-index: 10020;
  padding: 0.7rem 0.95rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 20, 16, 0.86);
  color: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.tutorial-modal-step-meta {
  margin: 0;
  font: 700 0.95rem/1.2 "Space Grotesk", "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
}

.tutorial-modal-step-text {
  margin: 0.35rem 0 0;
  font: 500 0.9rem/1.35 "Space Grotesk", "Segoe UI", sans-serif;
  color: rgba(255, 255, 255, 0.94);
  white-space: pre-line;
}

.tutorial-modal-content {
  margin-top: clamp(4.4rem, 14vh, 8.2rem);
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tutorial-modal-content img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.45);
  background: rgba(250, 248, 239, 0.95);
}

.tutorial-modal-arrow,
.tutorial-modal-close {
  position: fixed;
  z-index: 10030;
  border: 0;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(2px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tutorial-modal-arrow {
  top: 50%;
  transform: translateY(-50%);
}

.tutorial-modal-prev {
  left: 1rem;
}

.tutorial-modal-next {
  right: 1rem;
}

.tutorial-modal-close {
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
}

.tutorial-modal-arrow span {
  font-size: 1.3rem;
  line-height: 1;
}

.tutorial-modal-arrow:disabled {
  opacity: 0.4;
}

body.tutorial-modal-open {
  overflow: hidden;
}

.download-shell {
  display: grid;
  gap: 1rem;
}

.download-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.9rem;
}

.download-group h3 {
  margin: 0;
}

.download-group-internal {
  background: #fafffb;
}

.download-group-store {
  background: #fffef7;
}

.download-platform-list {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.8rem;
}

.download-platform-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.8rem;
  display: grid;
  gap: 0.65rem;
}

.download-platform-row h4 {
  margin: 0;
  font: 700 1.1rem/1.1 "Fraunces", Georgia, serif;
}

.platform-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.platform-logo {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  object-fit: contain;
}

.variant-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.variant-tile {
  min-width: 170px;
  max-width: 100%;
  flex: 0 1 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffefb;
  padding: 0.6rem;
  display: grid;
  gap: 0.5rem;
}

.variant-title {
  margin: 0;
  font-weight: 700;
}

.variant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.store-badge-link {
  display: inline-flex;
  flex-direction: column;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--ink);
}

.store-badge-link:hover .store-badge,
.store-badge-link:focus-visible .store-badge {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
}

.store-badge {
  width: 200px;
  height: auto;
  display: block;
  transition: transform 120ms ease, box-shadow 120ms ease;
  border-radius: 10px;
}

.store-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

button {
  cursor: pointer;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-strong);
  padding: 0.5rem 0.85rem;
  font: 600 0.92rem/1 "Space Grotesk", "Segoe UI", sans-serif;
}

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

button.warn {
  background: var(--warn);
  border-color: var(--warn);
  color: #fff;
}

button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.download-channel-tag {
  display: inline-block;
  vertical-align: middle;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  text-transform: lowercase;
  border-radius: 999px;
  padding: 0.13rem 0.38rem;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.38);
}

.helper-text {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.warning {
  color: var(--warn);
  font-weight: 600;
}

.credits-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.credits-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.8rem;
}

.credits-card h3,
.credits-card p {
  margin: 0;
}

.credits-value {
  margin-top: 0.35rem;
  font-weight: 600;
}

.credits-list {
  margin: 0.45rem 0 0;
  padding-left: 1.15rem;
}

.credits-list li + li {
  margin-top: 0.22rem;
}

.credits-card a,
.credits-note a,
.legal-block a {
  color: var(--brand-strong);
  font-weight: 700;
}

.credits-note {
  margin: 0.9rem 0 0;
  color: var(--ink-soft);
}

.legal-block {
  margin-top: 0.9rem;
  padding: 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.android-testers-modal {
  position: fixed;
  inset: 0;
  z-index: 10010;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 11, 9, 0.72);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.android-testers-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.android-testers-dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 1.3rem 1.2rem 1.15rem;
  background: linear-gradient(150deg, #fffef7, #f8efda);
  box-shadow: 0 22px 58px rgba(8, 22, 13, 0.35);
  transform: translateY(8px) scale(0.985);
  opacity: 0;
}

.android-testers-modal.is-open .android-testers-dialog {
  animation: android-testers-dialog-in 260ms ease-out forwards;
}

.android-testers-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  font-size: 1.35rem;
  line-height: 1;
}

.android-testers-kicker {
  margin: 0 0 0.3rem;
  font: 700 0.86rem/1.2 "Space Grotesk", "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-strong);
}

#android-testers-title {
  margin: 0;
  padding-right: 3rem;
  font: 700 clamp(1.55rem, 3.8vw, 2.45rem)/1.04 "Fraunces", Georgia, serif;
}

.android-testers-body {
  margin-top: 0.75rem;
}

.android-testers-body p {
  margin: 0;
}

.android-testers-body p + p {
  margin-top: 0.62rem;
}

.android-testers-body a {
  color: var(--brand-strong);
  font-weight: 700;
}

.android-testers-actions {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.android-testers-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font: 600 0.92rem/1 "Space Grotesk", "Segoe UI", sans-serif;
}

.android-testers-cta:hover,
.android-testers-cta:focus-visible {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}

.cookie-banner,
.consent-notice {
  position: fixed;
  bottom: calc(var(--footer-height) + 1rem);
  left: 1rem;
  right: 1rem;
  z-index: 10015;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border: 1px solid #ccc;
  background: #eee;
  visibility: visible;
  opacity: 1;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-banner.hidden,
.consent-notice.hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.cookie-banner p,
.consent-notice p {
  margin: 0;
}

.consent-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: 380px;
}

dialog::backdrop {
  background: rgba(10, 16, 12, 0.42);
}

@keyframes android-testers-dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.982);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rise {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 780px) {
  :root {
    --topbar-height: 120px;
    --footer-height: 88px;
  }

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.25rem;
  }

  .cookie-banner,
  .consent-notice {
    flex-direction: column;
    align-items: flex-start;
  }

  .tutorial-modal {
    padding: 0.7rem;
  }

  .tutorial-modal-context {
    width: calc(100vw - 1.4rem);
    max-height: 40vh;
    padding: 0.65rem 0.75rem;
  }

  .tutorial-modal-content {
    margin-top: clamp(5.2rem, 20vh, 10rem);
  }

  .tutorial-modal-arrow,
  .tutorial-modal-close {
    width: 40px;
    height: 40px;
  }

  .tutorial-modal-prev {
    left: 0.55rem;
  }

  .tutorial-modal-next {
    right: 0.55rem;
  }

  .android-testers-modal {
    padding: 0.7rem;
  }

  .android-testers-dialog {
    max-height: calc(100dvh - 1.4rem);
    border-radius: 14px;
    padding: 1.05rem 0.9rem 0.95rem;
  }

  #android-testers-title {
    padding-right: 2.35rem;
  }

  .android-testers-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .android-testers-cta,
  #android-testers-later {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .store-badge {
    width: min(100%, 240px);
  }
}
