:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --text: #28221d;
  --muted: #74695f;
  --line: rgba(40, 34, 29, 0.08);
  --sand-deep: #c9a985;
  --shadow: 0 28px 60px rgba(87, 63, 38, 0.12);
}

* { box-sizing: border-box; }

html {
  view-transition-name: none;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(240, 222, 195, 0.78), transparent 22%),
    radial-gradient(circle at top right, rgba(233, 216, 194, 0.8), transparent 24%),
    linear-gradient(180deg, #fbf8f3 0%, #f4f1ea 48%, #efe8dd 100%);
  opacity: 1;
  transition: opacity 0.32s ease, transform 0.32s ease;
}

body.page-enter {
  opacity: 0;
  transform: translateY(12px);
}

body.page-leave {
  opacity: 0;
  transform: translateY(10px) scale(0.992);
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 280ms;
  animation-timing-function: ease;
}

.shell {
  width: min(calc(100% - 32px), 1120px);
  margin: 0 auto;
  padding: 26px 0 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brand-copy small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-copy strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(32, 36, 58, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.lang-toggle button,
.toplink {
  appearance: none;
  border: 0;
  text-decoration: none;
  color: inherit;
}

.lang-toggle button {
  width: 48px;
  height: 36px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.lang-toggle button.active {
  background: rgba(32, 36, 58, 0.08);
  color: var(--text);
}

.toplink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 116px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(32, 36, 58, 0.08);
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.hero {
  margin-top: 18px;
  padding: 40px 32px 34px;
  border-radius: 34px;
  background:
    radial-gradient(circle at top left, rgba(240, 222, 195, 0.88), transparent 20%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--sand-deep);
  box-shadow: 0 0 18px rgba(201, 169, 133, 0.65);
}

h1 {
  margin: 18px 0 0;
  max-width: 10ch;
  font-size: clamp(42px, 8vw, 82px);
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.hero p,
.section p,
.app-card p {
  color: var(--muted);
  line-height: 1.75;
}

.hero p {
  margin: 18px 0 0;
  max-width: 46rem;
  font-size: 19px;
}

.grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-card,
.section {
  border-radius: 28px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.app-card {
  padding: 24px;
  transition: transform 0.28s ease, box-shadow 0.28s ease, opacity 0.28s ease;
}

.app-card.is-entering {
  transform: translateY(-8px) scale(1.02);
  opacity: 0.82;
}

.app-card-spy {
  background:
    radial-gradient(circle at top right, rgba(235, 108, 108, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(40, 34, 55, 0.95), rgba(24, 21, 33, 0.98));
  color: #f8f4ff;
}

.app-card-spy .subtitle,
.app-card-spy p {
  color: rgba(239, 232, 255, 0.76);
}

.app-card-timer {
  background:
    radial-gradient(circle at top left, rgba(191, 218, 255, 0.95), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 248, 255, 0.95));
}

.app-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: block;
  box-shadow: 0 18px 30px rgba(58, 82, 141, 0.16);
  flex: none;
}

.app-label {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.label-spy {
  background: rgba(221, 70, 70, 0.14);
  color: #ffbcbc;
}

.label-timer {
  background: rgba(112, 159, 231, 0.14);
  color: #537fca;
}

.app-card h2 {
  margin: 16px 0 0;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.subtitle {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 600;
}

.app-card p {
  margin: 16px 0 0;
  font-size: 16px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.btn-spy {
  background: linear-gradient(135deg, #8a66ff, #dd4646);
  color: white;
  box-shadow: 0 18px 32px rgba(123, 87, 199, 0.28);
}

.btn-timer {
  background: linear-gradient(135deg, #709fe7, #c4ddff);
  color: white;
  box-shadow: 0 18px 32px rgba(112, 159, 231, 0.22);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(32, 36, 58, 0.08);
  color: var(--text);
}

.section {
  margin-top: 18px;
  padding: 24px;
}

.section h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.section p {
  margin: 10px 0 0;
  max-width: 46rem;
  font-size: 16px;
}

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

@media (max-width: 640px) {
  .shell {
    width: min(calc(100% - 20px), 1120px);
    padding-top: 16px;
  }

  .topbar,
  .hero,
  .app-card,
  .section {
    border-radius: 24px;
  }

  .topbar {
    padding: 12px 14px;
  }

  .hero {
    padding: 28px 22px 24px;
  }

  .app-card,
  .section {
    padding: 20px 18px;
  }

  h1 {
    max-width: 100%;
  }
}
