@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("./fonts/SourceSerif4-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bone: #fbf8f2;
  --bone-deep: #f1ece1;
  --surface: #ffffff;
  --ink: #16181d;
  --body: #30333a;
  --muted: #65635e;
  --line: #e3ddcf;
  --line-soft: #eee8dc;
  --clay: #b66a3f;
  --clay-dark: #7a4124;
  --clay-soft: #f2dfcc;
  --navy: #1b2735;
  --navy-soft: #263545;
  --on-navy: #fbf8f2;
  --radius: 8px;
  --container: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bone);
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--bone);
  color: var(--body);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.62;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-color: rgba(182, 106, 63, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--clay-dark);
  text-decoration-color: var(--clay);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--clay-soft);
  outline-offset: 4px;
}

p,
li {
  overflow-wrap: anywhere;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 10;
  transform: translateY(-160%);
  border-radius: var(--radius);
  background: var(--on-navy);
  color: var(--navy);
  padding: 0.6rem 0.85rem;
  font-weight: 600;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  min-height: 100vh;
  background: var(--bone);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(227, 221, 207, 0.9);
  background: rgba(251, 248, 242, 0.94);
  backdrop-filter: blur(16px);
}

.nav,
.container,
.hero-inner,
.footer-inner {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 8px;
}

.brand span {
  font-size: 1rem;
  line-height: 1;
}

.nav-links,
.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.8rem, 3vw, 1.45rem);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
}

.nav-links a,
.footer-links a {
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
}

.hero {
  background:
    radial-gradient(circle at 78% 18%, rgba(182, 106, 63, 0.18), transparent 28rem),
    var(--navy);
  color: var(--on-navy);
}

.hero-inner {
  min-height: min(650px, calc(100vh - 96px));
  display: flex;
  align-items: center;
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(3.5rem, 7vw, 5rem);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #e7c3a7;
}

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

.hero h1,
.page-hero h1,
.not-found h1 {
  margin-bottom: 0;
  color: inherit;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2.7rem, 8vw, 4.65rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 42rem;
  margin: 1.35rem 0 0;
  color: rgba(251, 248, 242, 0.83);
  font-size: clamp(1.05rem, 2.1vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0.72rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.button-primary {
  background: var(--clay);
  color: #fff9f2;
}

.button-primary:hover {
  background: var(--clay-dark);
  color: #fff9f2;
}

.button-secondary {
  border: 1px solid rgba(251, 248, 242, 0.34);
  color: var(--on-navy);
}

.button-secondary:hover {
  border-color: rgba(251, 248, 242, 0.62);
  color: var(--on-navy);
}

.button-light {
  border-color: var(--line);
  color: var(--ink);
}

.button-light:hover {
  border-color: var(--clay);
  color: var(--clay-dark);
}

.section {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

.band {
  background: var(--bone-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-header {
  max-width: 720px;
}

.section-header h2,
.content h2,
.support-grid h2,
.contact-panel h2 {
  margin-bottom: 0.75rem;
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.08;
}

.section-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

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

.tutorial-section {
  border-top: 1px solid var(--line-soft);
}

.tutorial-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 420px);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.tutorial-copy {
  max-width: 36rem;
}

.tutorial-copy h2 {
  margin-bottom: 0.75rem;
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.08;
}

.tutorial-copy p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.tutorial-video-frame {
  width: 100%;
  max-width: 420px;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 22px 48px rgba(27, 39, 53, 0.14);
}

.tutorial-video-player {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: calc(var(--radius) - 2px);
  background: var(--navy);
  object-fit: cover;
}

.card,
.contact-panel,
.faq-item,
.disclaimer {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card {
  padding: 1.25rem;
}

.card-index {
  display: inline-block;
  margin-bottom: 1.4rem;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 600;
}

.card h3,
.faq-item h3 {
  margin-bottom: 0.45rem;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

.card p,
.faq-item p,
.contact-panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.split,
.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.48fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

.disclaimer {
  padding: 1rem;
  color: var(--muted);
}

.disclaimer strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ink);
}

.page-hero,
.not-found {
  padding: clamp(4rem, 9vw, 6.5rem) 0 clamp(2.75rem, 6vw, 4.5rem);
  background: var(--navy);
  color: var(--on-navy);
}

.page-hero p,
.not-found .hero-lede {
  max-width: 44rem;
  margin: 1rem 0 0;
  color: rgba(251, 248, 242, 0.82);
  font-size: 1.05rem;
}

.page-hero a {
  color: var(--on-navy);
}

.content {
  max-width: 760px;
  padding-top: clamp(3rem, 6vw, 4.5rem);
  padding-bottom: clamp(4rem, 7vw, 5.5rem);
}

.content h2 {
  margin-top: 2.25rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.content h2:first-child {
  margin-top: 0;
}

.content p,
.content li {
  color: var(--muted);
}

.content ul {
  padding-left: 1.25rem;
}

.content .disclaimer {
  margin-top: 2.25rem;
}

.faq-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.faq-item,
.contact-panel {
  padding: 1rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bone);
}

.footer-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.not-found {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
}

.not-found .hero-actions {
  margin-top: 1.75rem;
}

@media (max-width: 760px) {
  .nav,
  .container,
  .hero-inner,
  .footer-inner {
    width: min(100% - 1.25rem, var(--container));
  }

  .nav {
    min-height: 64px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .hero-inner {
    min-height: auto;
  }

  .grid-three,
  .split,
  .support-grid,
  .tutorial-layout {
    grid-template-columns: 1fr;
  }

  .tutorial-video-frame {
    margin: 0 auto;
  }

  .card,
  .faq-item,
  .contact-panel,
  .disclaimer {
    padding: 1rem;
  }

  .footer-inner {
    min-height: auto;
    padding: 1.25rem 0;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .nav-links,
  .footer-links {
    gap: 0.75rem;
    font-size: 0.9rem;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .button {
    padding-inline: 0.75rem;
  }
}

/* Language selector (no-JS <details> dropdown) */
.language-menu {
  position: relative;
  flex-shrink: 0;
}

.language-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.26rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
  user-select: none;
  background: transparent;
  line-height: 1;
}

.language-menu > summary::-webkit-details-marker {
  display: none;
}

.language-menu > summary::after {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.58;
  transform: translateY(-0.08rem) rotate(45deg);
  transform-origin: center;
  transition: transform 0.15s ease;
  flex: 0 0 auto;
}

.language-menu[open] > summary::after {
  transform: translateY(0.08rem) rotate(225deg);
}

.language-menu > summary:hover {
  background: var(--bone-deep);
  color: var(--ink);
}

.language-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 5px);
  min-width: 142px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
  z-index: 30;
  overflow: hidden;
}

.language-menu-dropdown a {
  display: block;
  padding: 0.55rem 0.85rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.language-menu-dropdown a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  background: var(--bone-deep);
}

.language-menu-dropdown a:hover {
  background: var(--bone-deep);
  color: var(--ink);
}

/* Mobile nav: brand + language selector on row 1; nav links wrap to row 2 */
@media (max-width: 520px) {
  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: auto;
    padding: 0.55rem 0;
    column-gap: 0.75rem;
    row-gap: 0.18rem;
    align-items: center;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .language-menu {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: flex-start;
    padding-bottom: 0.35rem;
  }
}

/* Store badges */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.68rem 1.15rem 0.7rem 1rem;
  border-radius: 12px;
  background: #0f0f0f;
  color: #fff;
  text-decoration: none;
  min-width: 224px;
  min-height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.store-badge:hover {
  background: #1a1a1a;
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  transform: translateY(-1px);
}

.store-badge-icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

.store-badge-icon-play {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.28));
}

.store-badge-icon-apple {
  color: #fff;
}

.store-badge-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.store-badge-sub {
  font-size: 0.76rem;
  font-weight: 400;
  opacity: 0.82;
  letter-spacing: 0;
  text-transform: uppercase;
  line-height: 1.05;
}

.store-badge-name {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0;
}

.store-badge[aria-disabled="true"] {
  opacity: 0.82;
  cursor: not-allowed;
  pointer-events: none;
  background: #0f0f0f;
  color: rgba(255, 255, 255, 0.86);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
}

.store-badge[aria-disabled="true"] .store-badge-icon {
  opacity: 0.82;
}

.store-badge[aria-disabled="true"] .store-badge-sub {
  opacity: 0.62;
}

@media (max-width: 430px) {
  .store-badge {
    min-width: 0;
    width: 100%;
  }
}
