/* =========================================
   TOPPAY — MAIN STYLESHEET
   Theme: TopPay Blue + Green
   File: css/style.css
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --blue: #299FE8;
  --blue-dark: #167FC4;
  --blue-light: #E8F5FF;
  --blue-pale: #F4FAFF;
  --green: #5AC51D;
  --green-dark: #3F9F10;
  --green-light: #EAF9DF;
  --green-pale: #F5FCEF;
  --ink: #191D26;
  --gray-900: #191D26;
  --gray-800: #252B35;
  --gray-700: #3F4855;
  --gray-600: #5D6876;
  --gray-500: #7A8491;
  --gray-400: #AAB2BC;
  --gray-300: #D5DCE4;
  --gray-200: #E7ECF1;
  --gray-100: #F3F6F9;
  --white: #FFFFFF;
  --page-bg: #F5F8FB;
  --red: #B91C1C;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --shadow-sm: 0 3px 12px rgba(25, 29, 38, .045);
  --shadow-md: 0 8px 28px rgba(25, 29, 38, .08);
  --shadow-blue: 0 8px 22px rgba(41, 159, 232, .20);
  --container-width: 760px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--gray-800);
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body, button, input, textarea, select {
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--blue-dark);
  text-decoration: none;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

a:hover {
  color: var(--green-dark);
}

button {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul, ol {
  padding-left: 22px;
}

li {
  margin-bottom: 8px;
}

p {
  margin-bottom: 14px;
  color: var(--gray-600);
  overflow-wrap: anywhere;
}

p:last-child {
  margin-bottom: 0;
}

h1, h2, h3, h4 {
  color: var(--gray-900);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}

h2 {
  font-size: 22px;
  margin-bottom: 14px;
}

h3 {
  font-size: 16px;
  margin: 20px 0 9px;
}

::selection {
  background: var(--blue-light);
  color: var(--gray-900);
}

/* Main container */
.shell {
  width: 100%;
  max-width: var(--container-width);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 18px;
  background: var(--white);
  box-shadow: 0 0 45px rgba(25, 29, 38, .035);
}

/* Header and brand */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  margin: 0 -18px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--gray-200);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--gray-900);
}

.brand:hover {
  color: var(--gray-900);
}

.brand img {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.brand-text strong {
  color: var(--gray-900);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.04em;
}

.brand-text small {
  margin-top: 3px;
  color: var(--gray-500);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .035em;
}

/* Mobile menu button */
.hamburger {
  display: flex;
  flex: 0 0 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

.hamburger:hover {
  background: var(--blue-pale);
  border-color: var(--blue);
}

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 5px;
  background: var(--gray-800);
  transition: transform .2s ease, opacity .2s ease;
}

.hamburger[aria-expanded="true"] span:first-child {
  transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

/* Navigation */
.nav-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 12px;
  left: 12px;
  display: none;
  flex-direction: column;
  gap: 3px;
  max-height: min(72vh, 520px);
  padding: 10px;
  overflow-y: auto;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.nav-menu.open {
  display: flex;
  animation: menuDrop .18s ease-out;
}

.nav-menu a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 13px;
  border-radius: 10px;
  color: var(--gray-700);
  font-size: 12px;
  font-weight: 700;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  background: var(--blue-pale);
  color: var(--blue-dark);
  outline: none;
}

@keyframes menuDrop {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 34px 20px 28px;
  text-align: center;
  background:
    radial-gradient(ellipse at 12% 8%, rgba(90, 197, 29, .10), transparent 42%),
    radial-gradient(ellipse at 90% 0%, rgba(41, 159, 232, .15), transparent 45%),
    linear-gradient(145deg, #F5FCFF, #FFFFFF 68%, #F7FDF2);
  border: 1px solid #E2F1FB;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.hero::after {
  position: absolute;
  right: -50px;
  bottom: -75px;
  width: 180px;
  height: 180px;
  border: 24px solid rgba(41, 159, 232, .06);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-logo {
  width: 94px;
  height: 94px;
  margin-bottom: 16px;
  object-fit: contain;
  border-radius: 18px;
  background: #FFFFFF;
  box-shadow: 0 8px 22px rgba(41, 159, 232, .13);
}

.section-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.hero .section-label {
  padding: 6px 11px;
  border: 1px solid #D6ECFC;
  border-radius: 999px;
  background: rgba(255, 255, 255, .8);
}

.hero h1 {
  max-width: 600px;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: clamp(25px, 5vw, 36px);
  line-height: 1.2;
  letter-spacing: -.045em;
}

.hero p {
  max-width: 540px;
  margin-bottom: 22px;
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.8;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  width: 100%;
  margin-bottom: 10px;
}

.btn {
  display: inline-flex;
  flex: 1 1 180px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(120deg, var(--blue), #168CD7);
  color: var(--white);
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
  background: var(--blue-dark);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(41, 159, 232, .25);
}

.btn-outline {
  border-color: var(--green);
  background: var(--white);
  color: var(--green-dark);
}

.btn-outline:hover {
  background: var(--green-pale);
  color: var(--green-dark);
}

/* Content sections */
.content-card {
  margin: 18px 0;
  padding: 24px 22px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 88px;
}

.content-card .section-label {
  margin-bottom: 9px;
}

.content-card h2 {
  margin-top: 2px;
  margin-bottom: 13px;
  font-size: clamp(20px, 3vw, 24px);
}

.content-card h3 {
  margin-top: 20px;
  margin-bottom: 8px;
  font-size: 15px;
}

.content-card p {
  font-size: 13px;
  line-height: 1.9;
}

.content-card ul,
.content-card ol {
  margin-top: 10px;
  margin-bottom: 15px;
  padding-left: 21px;
  color: var(--gray-600);
  font-size: 13px;
  line-height: 1.8;
}

.content-card li {
  padding-left: 2px;
  margin-bottom: 8px;
}

.content-card li::marker {
  color: var(--blue-dark);
  font-weight: 800;
}

/* Feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.feature-card {
  min-width: 0;
  padding: 17px 15px;
  border: 1px solid #DCEFFB;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--blue-pale), #FFFFFF 75%);
  transition: transform .2s ease, box-shadow .2s ease;
}

.feature-card:nth-child(even) {
  border-color: #E0F2D4;
  background: linear-gradient(145deg, var(--green-pale), #FFFFFF 75%);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  border-radius: 11px;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 800;
}

.feature-card:nth-child(even) .feature-icon {
  background: var(--green-light);
  color: var(--green-dark);
}

.feature-card h3 {
  margin: 0 0 7px;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: -.02em;
}

.feature-card p {
  margin: 0;
  color: var(--gray-600);
  font-size: 11.5px;
  line-height: 1.75;
}

/* Numbered steps */
.steps-list {
  list-style: none;
  counter-reset: step-counter;
  padding-left: 0 !important;
}

.steps-list li {
  position: relative;
  min-height: 40px;
  margin-bottom: 14px;
  padding: 1px 0 0 43px;
  counter-increment: step-counter;
}

.steps-list li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--blue-light);
  color: var(--blue-dark);
  content: counter(step-counter, decimal-leading-zero);
  font-size: 10px;
  font-weight: 800;
}

.steps-list li strong {
  display: block;
  margin-bottom: 3px;
  color: var(--gray-800);
}

/* Check lists */
.check-list {
  list-style: none;
  padding-left: 0 !important;
}

.check-list li {
  position: relative;
  padding-left: 27px;
}

.check-list li::before {
  position: absolute;
  top: 3px;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-dark);
  content: "✓";
  font-size: 10px;
  font-weight: 800;
}

/* Notice and disclaimer boxes */
.notice-box {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #D6ECFC;
  border-left: 4px solid var(--blue);
  border-radius: 13px;
  background: var(--blue-pale);
}

.notice-box strong {
  display: block;
  margin-bottom: 6px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 800;
}

.notice-box p {
  margin: 0;
  color: var(--gray-700);
  font-size: 12px;
}

.disclaimer-card {
  border-color: #D8EED0;
  background: linear-gradient(145deg, #F7FDF3, #FFFFFF);
}

.disclaimer-card h2 {
  color: var(--green-dark);
}

/* Internal text links */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
}

.text-link:hover {
  color: var(--green-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Quick links */
.link-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
}

.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: #FFFFFF;
  color: var(--gray-700);
  font-size: 12px;
  font-weight: 700;
}

.link-list a span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.link-list a span:last-child {
  flex: 0 0 auto;
  color: var(--blue-dark);
  font-size: 17px;
}

.link-list a:hover {
  border-color: #B9E1FA;
  background: var(--blue-pale);
  color: var(--blue-dark);
  transform: translateX(2px);
}

/* FAQ accordion */
.faq-item {
  margin: 10px 0;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: 13px;
  background: var(--white);
}

.faq-item summary {
  position: relative;
  padding: 14px 38px 14px 14px;
  color: var(--gray-800);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.65;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--blue-dark);
  content: "+";
  font-size: 20px;
  font-weight: 500;
  transform: translateY(-50%);
}

.faq-item[open] summary {
  border-bottom: 1px solid var(--gray-200);
  background: var(--blue-pale);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0;
  padding: 13px 14px 15px;
  color: var(--gray-600);
  font-size: 12px;
  line-height: 1.85;
}

/* Footer */
.site-footer {
  margin: 24px -18px 0;
  padding: 28px 20px 22px;
  border-top: 1px solid var(--gray-200);
  background:
    radial-gradient(ellipse at 10% 0%, rgba(90, 197, 29, .08), transparent 40%),
    linear-gradient(135deg, #F1F9FF, #FFFFFF);
  text-align: center;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--gray-900);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.04em;
}

.footer-brand:hover {
  color: var(--blue-dark);
}

.site-footer > p {
  max-width: 480px;
  margin: 0 auto 14px;
  color: var(--gray-600);
  font-size: 11px;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 15px;
  margin: 17px 0;
}

.footer-links a {
  color: var(--gray-600);
  font-size: 10.5px;
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer .copyright {
  margin-top: 17px;
  margin-bottom: 7px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-200);
  color: var(--gray-700);
  font-size: 10px;
  font-weight: 700;
}

.site-footer .footer-note {
  margin-bottom: 0;
  color: var(--gray-500);
  font-size: 9.5px;
}

/* Focus accessibility */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(41, 159, 232, .45);
  outline-offset: 3px;
}

/* Tablet and desktop */
@media (min-width: 600px) {
  body {
    padding: 24px 0;
  }

  .shell {
    min-height: auto;
    padding: 0 22px;
    border: 1px solid var(--gray-200);
    border-radius: 25px;
    overflow: visible;
  }

  .site-header {
    margin: 0 -22px;
    padding-right: 22px;
    padding-left: 22px;
    border-radius: 24px 24px 0 0;
  }

  .hamburger {
    display: none;
  }

  .nav-menu {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 2px;
    max-height: none;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .nav-menu a {
    min-height: 36px;
    padding: 8px 9px;
    font-size: 10px;
  }

  .hero {
    margin-top: 22px;
    padding: 40px 30px 32px;
  }

  .content-card {
    padding: 27px 26px;
  }

  .site-footer {
    margin-right: -22px;
    margin-left: -22px;
    border-radius: 0 0 24px 24px;
  }
}

@media (min-width: 760px) {
  .nav-menu a {
    padding-right: 10px;
    padding-left: 10px;
    font-size: 11px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Small screens */
@media (max-width: 420px) {
  .shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .site-header {
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .hero {
    padding: 27px 14px 22px;
    border-radius: 20px;
  }

  .hero-logo {
    width: 82px;
    height: 82px;
  }

  .hero h1 {
    font-size: 25px;
  }

  .hero p {
    font-size: 12.5px;
  }

  .btn-row {
    gap: 8px;
  }

  .btn {
    flex-basis: 100%;
  }

  .content-card {
    padding: 20px 15px;
    border-radius: 18px;
  }

  .content-card h2 {
    font-size: 20px;
  }

  .feature-grid {
    gap: 9px;
  }

  .feature-card {
    padding: 13px 10px;
  }

  .site-footer {
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


/* ---------- TOPPAY SCREENSHOT GALLERY ---------- */

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  margin: 20px 0 14px;
}

.screenshot-card {
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--blue-pale), #FFFFFF 55%);
  box-shadow: var(--shadow-sm);
}

.screenshot-card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: #FFFFFF;
}

.screenshot-card figcaption {
  margin-top: 10px;
  color: var(--gray-800);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.55;
  text-align: center;
  overflow-wrap: anywhere;
}

.screenshot-note {
  padding: 12px 14px;
  border: 1px solid #DCEFFB;
  border-radius: 12px;
  background: var(--blue-pale);
  color: var(--gray-600);
  font-size: 11px !important;
}

.screenshot-note code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #E3F2FD;
  color: var(--blue-dark);
  font-size: 10px;
}

@media (max-width: 520px) {
  .screenshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .screenshot-card {
    padding: 7px;
  }

  .screenshot-card figcaption {
    font-size: 10px;
  }
}

@media (max-width: 340px) {
  .screenshot-grid {
    grid-template-columns: 1fr;
  }

  .screenshot-card {
    max-width: 230px;
    width: 100%;
    margin: 0 auto;
  }
}
