:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #586663;
  --paper: #f7f9f8;
  --white: #ffffff;
  --teal: #0f766e;
  --teal-dark: #0a4f4a;
  --yellow: #f4b740;
  --coral: #e85d4a;
  --line: #d9e1df;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  position: relative;
  z-index: 20;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px max(20px, calc((100% - var(--max)) / 2));
  color: var(--white);
  background: var(--teal-dark);
}
.brand, .footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 720;
  text-decoration: none;
}
.brand img, .footer-brand img { border-radius: 7px; }
nav { display: flex; align-items: center; gap: 22px; }
nav a { font-size: 14px; font-weight: 650; text-decoration: none; }
.nav-download {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 7px;
}
.language-button {
  width: 38px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 7px;
  color: var(--white);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: min(680px, calc(100svh - 96px));
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 64px max(20px, calc((100% - var(--max)) / 2));
  color: var(--white);
  background:
    linear-gradient(100deg, rgba(8,63,59,.98) 0%, rgba(15,118,110,.94) 55%, rgba(15,118,110,.78) 100%),
    url("assets/rayquaza-tag.webp") right 10% center / 520px auto no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 7px;
  background: linear-gradient(90deg, var(--yellow) 0 38%, var(--coral) 38% 64%, #ffffff 64%);
}
.hero-copy { position: relative; z-index: 2; width: min(620px, 58%); }
.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
.hero .eyebrow { color: #ffcc69; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { margin: 0; font-size: 58px; line-height: 1.06; letter-spacing: 0; }
h2 { margin: 0; font-size: 36px; line-height: 1.18; letter-spacing: 0; }
h3 { margin: 0; font-size: 20px; line-height: 1.25; letter-spacing: 0; }
.hero-summary { max-width: 590px; margin: 22px 0 0; color: rgba(255,255,255,.86); font-size: 18px; }
.hero-actions { display: flex; align-items: center; gap: 18px; margin-top: 30px; }
.primary-button, .secondary-button, .support-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  border-radius: 7px;
  font-weight: 780;
  text-decoration: none;
}
.primary-button { padding: 0 20px; color: #2a210d; background: var(--yellow); }
.primary-button span:first-child { font-size: 20px; }
.secondary-link { color: rgba(255,255,255,.82); font-size: 14px; font-weight: 760; text-decoration: underline; text-underline-offset: 4px; }
.build-note { color: rgba(255,255,255,.72); font-size: 13px; }

.phone-scene {
  position: absolute;
  z-index: 1;
  right: max(28px, calc((100% - var(--max)) / 2));
  top: 50%;
  width: 310px;
  transform: translateY(-48%) rotate(2deg);
}
.mobile-phone-scene { display: none; }
.phone-shell {
  overflow: hidden;
  border: 8px solid #192220;
  border-radius: 30px;
  background: #eef3f2;
  box-shadow: 0 28px 70px rgba(0,0,0,.34);
}
.phone-header { display: flex; align-items: center; gap: 8px; min-height: 62px; padding: 12px 12px 10px; color: white; background: var(--teal); }
.phone-header strong { flex: 1; font-size: 14px; }
.phone-header span { padding: 3px 6px; border: 1px solid rgba(255,255,255,.55); border-radius: 5px; font-size: 11px; }
.phone-menu { font-size: 18px; line-height: 1; }
.phone-content { padding: 18px; color: var(--ink); background: white; }
.phone-subtitle { min-height: 44px; margin: 0; color: var(--muted); font-size: 12px; text-align: center; }
.phone-controls { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.phone-controls span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
}
.phone-result { margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfc; }
.phone-result > p { margin: 0 0 10px; color: var(--teal); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.tag-preview { display: block; width: 100%; height: 142px; object-fit: contain; background: #f2f5f4; }
.match-line { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; }
.match-line strong { font-size: 21px; }
.match-line span { color: var(--teal); font-weight: 800; }
.phone-content small { display: block; margin-top: 5px; color: var(--muted); }
.phone-action { width: 104px; height: 104px; display: grid; place-items: center; margin: 18px auto 0; border-radius: 50%; color: white; background: var(--teal); font-weight: 800; box-shadow: 0 12px 26px rgba(15,118,110,.22); }

.section-band, .guide-band, .download-band, .info-band, .about-band, .support-band, .faq-band, .text-page { padding: 78px max(20px, calc((100% - var(--max)) / 2)); }
.section-band { background: var(--white); }
.guide-band, .faq-band { background: var(--white); }
.section-heading { margin-bottom: 34px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.feature-item { padding: 22px 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); }
.feature-number { display: block; margin-bottom: 18px; color: var(--coral); font-size: 13px; font-weight: 850; }
.feature-item p, .download-option p, .support-band p { margin: 10px 0 0; color: var(--muted); }
.app-showcase {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 18px;
  margin-top: 18px;
}
.app-showcase-heading {
  margin-top: 42px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
.app-preview {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f8faf9;
  box-shadow: 0 18px 48px rgba(23,33,31,.08);
}
.preview-header {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  color: white;
  background: var(--teal);
}
.preview-header strong { flex: 1; }
.preview-header img { border-radius: 6px; }
.preview-header span, .preview-title-row > span {
  border: 1px solid rgba(15,118,110,.28);
  border-radius: 7px;
  padding: 4px 8px;
  color: var(--teal);
  background: white;
  font-size: 11px;
  font-weight: 850;
}
.preview-copy { min-height: 44px; margin: 16px 18px 0; color: var(--muted); text-align: center; }
.preview-controls { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.preview-controls span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--teal);
  background: white;
  font-size: 12px;
  font-weight: 800;
}
.preview-main-button {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  margin: 18px auto;
  border-radius: 50%;
  color: white;
  background: var(--teal);
  font-weight: 850;
  box-shadow: 0 14px 30px rgba(15,118,110,.22);
}
.preview-result {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
  margin: 0 16px 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.preview-result img { width: 116px; height: 88px; object-fit: contain; background: #f2f5f4; }
.preview-result strong, .library-row strong { display: block; font-size: 17px; line-height: 1.2; }
.preview-result span, .preview-result small, .library-row small { display: block; color: var(--muted); font-size: 12px; }
.preview-result button, .library-row button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--teal);
  font-size: 12px;
}
.preview-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  background: white;
}
.preview-title-row.compact {
  padding: 16px 18px 0;
  background: transparent;
}
.preview-title-row .eyebrow { margin-bottom: 6px; }
.library-list { display: grid; gap: 10px; padding: 0 16px 16px; }
.library-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.library-row img { width: 84px; height: 64px; object-fit: contain; background: #f2f5f4; border-radius: 6px; }

.article-grid, .faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.article-panel, .faq-grid article {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.article-panel p, .faq-grid p, .info-list p { margin: 12px 0 0; color: var(--muted); }
.text-page {
  min-height: 70vh;
  background: var(--white);
}
.text-page .section-heading {
  max-width: 860px;
}
.text-page .section-heading p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}
.text-stack {
  display: grid;
  gap: 18px;
  max-width: 900px;
}
.text-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.text-card p {
  margin: 12px 0 0;
  color: var(--muted);
}
.text-card ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
}
.text-card li + li { margin-top: 8px; }
.info-band { background: #f3f8f7; }
.info-list {
  display: grid;
  gap: 0;
  border: 1px solid #c9dad6;
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}
.info-list > div {
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.info-list > div:last-child { border-bottom: 0; }

.download-band { background: #e9f3f1; }
.standalone-download { min-height: 62vh; }
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.download-option { min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: 26px; border: 1px solid #bfd2ce; border-radius: 8px; background: var(--white); }
.download-option.recommended { border-top: 5px solid var(--yellow); padding-top: 22px; }
.edition-label { display: inline-block; margin-bottom: 10px; color: var(--teal); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.secondary-button { width: 100%; padding: 0 18px; color: var(--white); background: var(--teal); }
.download-intro { max-width: 760px; margin: 0 0 24px; color: var(--muted); }
.download-page-button { width: min(360px, 100%); margin-top: 2px; }
.install-note { max-width: 760px; margin: 22px 0 0; color: var(--muted); font-size: 13px; }
.transition-card { max-width: 720px; margin: 12px auto 0; padding: 38px; border: 1px solid #bfd2ce; border-radius: 8px; text-align: center; background: var(--white); box-shadow: 0 18px 48px rgba(23,33,31,.08); }
.transition-card .eyebrow { margin-bottom: 10px; }
.transition-card p:not(.eyebrow):not(.redirect-note) { max-width: 560px; margin: 12px auto 0; color: var(--muted); }
.transition-button { width: min(300px, 100%); margin: 24px auto 0; }
.redirect-note { margin: 18px 0 0; color: var(--muted); font-size: 13px; }
.redirect-note strong { color: var(--teal); }

.about-band { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 28px; background: var(--white); }
.page-about {
  min-height: 45vh;
}
.about-mark {
  width: 82px;
  height: 82px;
  display: block;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 12px 28px rgba(23,33,31,.16);
  object-fit: cover;
}
.about-band p { max-width: 720px; margin: 10px 0 0; color: var(--muted); }
.profile-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border: 1px solid var(--teal); border-radius: 7px; color: var(--teal); font-weight: 760; text-decoration: none; }

.support-band { display: flex; align-items: center; justify-content: space-between; gap: 48px; color: white; background: #202b29; }
.support-band > div { max-width: 760px; }
.support-band .eyebrow { color: #ffcc69; }
.support-band p { color: rgba(255,255,255,.72); }
.support-button { flex: 0 0 auto; padding: 0 22px; color: #2a210d; background: var(--yellow); }
.support-button[hidden] { display: none; }

footer { display: flex; justify-content: space-between; gap: 30px; padding: 32px max(20px, calc((100% - var(--max)) / 2)); color: #d7dfdd; background: #111917; }
footer p { max-width: 650px; margin: 0; color: #98a5a2; font-size: 12px; text-align: right; }

a:focus-visible, button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
@media (hover: hover) {
  .primary-button:hover, .support-button:hover { background: #ffc857; }
  .secondary-button:hover { background: var(--teal-dark); }
  nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
}

@media (max-width: 920px) {
  .hero-copy { width: min(570px, 66%); }
  h1 { font-size: 48px; }
  .phone-scene { right: -74px; width: 280px; opacity: .76; }
  .feature-grid { grid-template-columns: 1fr; }
  .app-showcase { grid-template-columns: 1fr; }
  .article-grid, .faq-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .site-header { min-height: 62px; padding: 9px 14px; }
  .brand span { font-size: 14px; }
  nav { gap: 10px; }
  nav a { display: none; }
  .hero {
    min-height: auto;
    flex-direction: column;
    align-items: flex-start;
    padding: 58px 20px 54px;
    background: linear-gradient(100deg, rgba(8,63,59,.98) 0%, rgba(15,118,110,.94) 100%);
  }
  .hero-copy { width: 100%; }
  h1 { max-width: 330px; font-size: 42px; }
  h2 { font-size: 30px; }
  .hero-summary { max-width: 92%; font-size: 16px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 10px; }
  .desktop-phone-scene { display: none; }
  .mobile-phone-scene {
    display: block;
    position: relative;
    right: auto;
    top: auto;
    width: min(270px, 82vw);
    margin: 26px auto 0;
    opacity: 1;
    transform: none;
  }
  .phone-shell {
    border-width: 6px;
    border-radius: 24px;
    box-shadow: 0 18px 44px rgba(0,0,0,.26);
  }
  .phone-header {
    min-height: 48px;
    padding: 8px 10px;
  }
  .phone-header img { width: 22px; height: 22px; }
  .phone-header strong { font-size: 12px; }
  .phone-content { padding: 12px; }
  .phone-subtitle {
    min-height: auto;
    font-size: 11px;
  }
  .phone-controls { margin-top: 8px; }
  .phone-controls span {
    min-height: 26px;
    padding: 0 8px;
    font-size: 10px;
  }
  .phone-action {
    width: 78px;
    height: 78px;
    margin-top: 12px;
    font-size: 12px;
  }
  .phone-result {
    margin-top: 12px;
    padding: 9px;
  }
  .phone-result > p { margin-bottom: 7px; font-size: 10px; }
  .tag-preview { height: 96px; }
  .match-line { margin-top: 8px; }
  .match-line strong { font-size: 16px; }
  .match-line span, .phone-content small { font-size: 10px; }
  .section-band, .guide-band, .download-band, .info-band, .about-band, .support-band, .faq-band, .text-page { padding: 56px 20px; }
  .app-showcase-heading {
    margin-top: 34px;
    padding-top: 28px;
  }
  .preview-result { grid-template-columns: 92px minmax(0, 1fr) 30px; }
  .preview-result img { width: 92px; height: 72px; }
  .library-row { grid-template-columns: 74px minmax(0, 1fr) 30px; }
  .library-row img { width: 74px; height: 58px; }
  .download-grid { grid-template-columns: 1fr; }
  .transition-card { padding: 28px 20px; }
  .about-band { grid-template-columns: 64px minmax(0, 1fr); gap: 18px; }
  .about-mark { width: 60px; height: 60px; }
  .profile-button { grid-column: 1 / -1; width: 100%; }
  .support-band { align-items: flex-start; flex-direction: column; }
  .support-button { width: 100%; }
  footer { align-items: flex-start; flex-direction: column; }
  footer p { text-align: left; }
}

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