:root {
  --primary: #0f63c7;
  --primary-dark: #063f86;
  --secondary: #198754;
  --secondary-dark: #0f5d3a;
  --purple: #7c3aed;
  --orange: #f59e0b;
  --ink: #102033;
  --muted: #607086;
  --line: rgba(15, 35, 70, 0.12);
  --line-strong: rgba(15, 35, 70, 0.18);
  --bg: #eef4fb;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(12, 33, 65, 0.14);
  --soft-shadow: 0 14px 34px rgba(12, 33, 65, 0.10);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --sticky-top: clamp(8px, 1.4vw, 16px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 99, 199, 0.20), transparent 34rem),
    radial-gradient(circle at 90% 10%, rgba(25, 135, 84, 0.16), transparent 30rem),
    linear-gradient(135deg, #f7fbff 0%, var(--bg) 52%, #f3f8ff 100%);
  padding: clamp(14px, 2vw, 28px);
  overflow-x: hidden;
}

h1, h2, h3, p { margin-block-start: 0; }
.material-symbols-rounded {
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
  vertical-align: middle;
}

.background-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.background-orbs span {
  position: absolute;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  filter: blur(16px);
  opacity: .22;
  animation: floatOrb 13s ease-in-out infinite;
}
.background-orbs span:nth-child(1) { background: #6bb8ff; left: -7rem; top: 6rem; }
.background-orbs span:nth-child(2) { background: #68e0ad; right: -8rem; top: 20rem; animation-delay: -4s; }
.background-orbs span:nth-child(3) { background: #b794f4; left: 45%; bottom: -10rem; animation-delay: -8s; }

@keyframes floatOrb {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(22px, -26px, 0) scale(1.08); }
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1760px);
  margin: 0 auto;
}

.appbar-card,
.product-card,
.footer-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.appbar-card {
  position: sticky;
  top: var(--sticky-top);
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 470px);
  gap: clamp(14px, 2vw, 24px);
  align-items: center;
  border-radius: var(--radius-xl);
  padding: clamp(16px, 2.2vw, 22px);
  margin-bottom: clamp(20px, 3vw, 30px);
  overflow: hidden;
  isolation: isolate;
}
.appbar-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 99, 199, .10), rgba(25, 135, 84, .06), rgba(255,255,255,.22)),
    radial-gradient(circle at 12% 0%, rgba(255,255,255,.45), transparent 34%);
  pointer-events: none;
  z-index: -1;
}
.appbar-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.62));
  pointer-events: none;
}

.appbar-content { display: grid; gap: 14px; }
.appbar-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.appbar-icon {
  width: clamp(54px, 6vw, 72px);
  height: clamp(54px, 6vw, 72px);
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--primary), #2b88e6);
  box-shadow: 0 16px 30px rgba(15, 99, 199, .28);
}
.appbar-icon .material-symbols-rounded { font-size: clamp(28px, 3vw, 38px); }
.appbar-kicker,
.section-badge,
.pill,
.carousel-tip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.appbar-kicker {
  color: var(--primary-dark);
  font-weight: 800;
  font-size: .96rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}
h1 {
  font-size: clamp(1.9rem, 3.5vw, 3.5rem);
  line-height: 1.02;
  margin: 6px 0 10px;
  letter-spacing: -0.055em;
}
.appbar-subtitle,
.section-heading p,
.info-card p,
.step-card p,
.notice-card p,
.credential-main p,
.credential-note p,
.footer-card p,
.feature-card small,
.qr-copy small {
  color: var(--muted);
  line-height: 1.65;
}
.appbar-subtitle {
  max-width: 980px;
  font-size: clamp(.98rem, 1.2vw, 1.15rem);
  margin-bottom: 0;
}
.appbar-pills,
.credential-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pill {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .9);
  border-radius: 999px;
  padding: 9px 14px;
  color: #23344d;
  font-size: .88rem;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(12, 33, 65, .07);
}
.pill strong { font-weight: 900; }
.soft-blue { color: #0f63c7; background: #e9f3ff; }
.soft-green { color: #16724b; background: #e9f9f1; }
.soft-purple { color: #6d28d9; background: #f2ecff; }
.soft-orange { color: #9a5a00; background: #fff6df; }

.toggle-container {
  display: grid;
  gap: 12px;
  min-width: min(420px, 100%);
}
.toggle-btn {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon title" "icon subtitle";
  gap: 0 12px;
  align-items: center;
  text-align: left;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  padding: 15px 18px;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease, border-color .22s ease;
}
.toggle-btn .material-symbols-rounded { grid-area: icon; font-size: 30px; }
.toggle-btn span:not(.material-symbols-rounded) { grid-area: title; font-weight: 900; }
.toggle-btn small { grid-area: subtitle; color: var(--muted); font-weight: 700; }
.toggle-btn:hover { transform: translateY(-2px); box-shadow: var(--soft-shadow); }
.toggle-btn.active {
  background: linear-gradient(135deg, var(--primary), #2b88e6);
  color: #fff;
  border-color: rgba(255,255,255,.25);
  box-shadow: 0 18px 38px rgba(15, 99, 199, .28);
}
.toggle-btn.active small { color: rgba(255,255,255,.84); }

.card-section { display: none; animation: sectionIn .42s ease both; }
.card-section.active { display: block; }
@keyframes sectionIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.product-card {
  border-radius: var(--radius-xl);
  padding: clamp(18px, 3vw, 34px);
  margin-bottom: 24px;
}
.product-card.multi { border-top: 6px solid var(--primary); }
.product-card.myahgora { border-top: 6px solid var(--secondary); }

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: clamp(18px, 3vw, 28px);
  align-items: stretch;
  margin-bottom: 24px;
}
.section-badge {
  width: fit-content;
  border-radius: 999px;
  padding: 8px 13px;
  font-weight: 900;
  font-size: .84rem;
}
.section-badge.blue { background: #e9f3ff; color: var(--primary-dark); }
.section-badge.green { background: #e9f9f1; color: var(--secondary-dark); }
.support-badge { background: #e8fff3; color: var(--secondary-dark); border: 1px solid rgba(25,135,84,.16); }

h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.45rem);
  line-height: 1.14;
  letter-spacing: -0.035em;
  margin: 12px 0 12px;
}

.qr-card,
.credential-panel,
.notice-card,
.info-card,
.step-card,
.feature-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.88);
  box-shadow: var(--soft-shadow);
}
.qr-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.qr-card::after,
.info-card::after,
.step-card::after,
.feature-card::after {
  content: "";
  position: absolute;
  inset: auto -30% -60% -30%;
  height: 130px;
  background: radial-gradient(circle, rgba(15, 99, 199, .16), transparent 65%);
  pointer-events: none;
}
.qr-card.green-tone::after,
.feature-card::after { background: radial-gradient(circle, rgba(25, 135, 84, .14), transparent 65%); }
.qr-copy { display: grid; gap: 6px; }
.qr-copy .material-symbols-rounded { color: var(--primary); font-size: 30px; }
.green-tone .qr-copy .material-symbols-rounded { color: var(--secondary); }
.qr-copy strong { font-size: 1.05rem; }
.qr-img { width: 118px; border-radius: 16px; cursor: zoom-in; }

.info-grid,
.feature-grid {
  display: grid;
  gap: 14px;
}
.info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 22px;
}
.feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
  margin-bottom: 0;
}
.info-card,
.feature-card,
.step-card {
  position: relative;
  overflow: hidden;
}
.info-card,
.feature-card { transition: transform .22s ease, box-shadow .22s ease; }
.info-card,
.feature-card { padding: 18px; }
.info-card:hover,
.step-card:hover,
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 22px 44px rgba(12, 33, 65, .15); }
.info-card .material-symbols-rounded { font-size: 31px; color: var(--primary); }
.info-card h3 { margin: 10px 0 6px; font-size: 1.05rem; }
.info-card p { margin-bottom: 0; font-size: .92rem; }
.feature-card { display: grid; gap: 7px; }
.feature-card .material-symbols-rounded { color: var(--secondary); font-size: 30px; }
.feature-card strong { font-size: 1.03rem; }

.steps-wrapper { display: grid; gap: 12px; }
.mobile-only { display: none; }
.carousel-tip {
  width: fit-content;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: .9rem;
  background: #edf5ff;
  border: 1px solid rgba(15, 99, 199, .12);
  padding: 8px 12px;
  border-radius: 999px;
}
.steps-grid {
  display: grid;
  gap: 16px;
}
.steps-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.steps-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.step-card {
  padding: 13px;
  transition: transform .22s ease, box-shadow .22s ease;
}
.step-top {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  margin-bottom: 11px;
}
.step-top span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #e9f3ff;
  color: var(--primary-dark);
  font-weight: 950;
}
.myahgora .step-top span { background: #e9f9f1; color: var(--secondary-dark); }
.step-top strong { line-height: 1.15; }
.step-card img {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--line);
  border-radius: 18px;
  cursor: zoom-in;
  box-shadow: 0 14px 26px rgba(12, 33, 65, .09);
  transition: transform .24s ease, filter .24s ease;
}
.step-card img:hover { transform: scale(1.015); filter: saturate(1.08) contrast(1.02); }
.step-card p { margin: 12px 2px 2px; font-size: .9rem; }
.wide-step img { aspect-ratio: 10 / 13; object-fit: contain; background: linear-gradient(180deg, #f8fbff, #eef5ff); }

.notice-card,
.credential-panel {
  margin-top: 20px;
  padding: 18px;
}
.notice-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: linear-gradient(135deg, #e9f3ff, rgba(255,255,255,.96));
}
.notice-card .material-symbols-rounded { color: var(--primary); font-size: 34px; }
.notice-card strong { color: var(--primary-dark); }
.notice-card p { margin: 4px 0 0; }

.credential-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
}
.highlight-panel {
  background:
    linear-gradient(135deg, rgba(25,135,84,.08), rgba(255,255,255,.96)),
    radial-gradient(circle at top right, rgba(15,99,199,.08), transparent 40%);
  border: 1px solid rgba(25,135,84,.18);
  box-shadow: 0 18px 42px rgba(25, 135, 84, .10);
}
.credential-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.credential-main {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.credential-main .material-symbols-rounded { font-size: 36px; color: var(--secondary); }
.credential-main h3 { margin: 0 0 4px; font-size: 1.3rem; }
.credential-main p { margin: 0; }
.credential-request-box {
  display: grid;
  gap: 12px;
  border: 1px dashed rgba(25,135,84,.25);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255,255,255,.82);
}
.request-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--secondary-dark);
}
.request-title .material-symbols-rounded { font-size: 22px; }
.highlight-pills .pill { background: #fff; border-color: rgba(25,135,84,.12); }
.credential-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(233, 249, 241, .75);
  border: 1px solid rgba(25,135,84,.12);
}
.credential-note .material-symbols-rounded { color: var(--secondary); }
.credential-note p { margin: 0; }

.footer-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 20px;
  padding: 15px 18px;
  margin-bottom: 4px;
}
.footer-card .material-symbols-rounded { color: var(--primary); }
.footer-card p { margin: 0; font-size: .92rem; }

.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 12, 24, 0.88);
  backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
  padding: 20px;
  animation: fadeIn .22s ease both;
}
.lightbox.open { display: flex; }
.lightbox-content {
  max-width: min(96vw, 1120px);
  max-height: 92vh;
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0,0,0,.45);
  animation: zoomIn .22s ease both;
}
.close {
  position: absolute;
  top: 18px;
  right: 24px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: white;
  font-size: 34px;
  cursor: pointer;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 1320px) {
  .appbar-card { grid-template-columns: 1fr; }
  .toggle-container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { grid-template-columns: 1fr; }
  .steps-grid.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  body { padding: 12px; }
  .app-shell { width: 100%; }
  .appbar-card, .product-card { border-radius: 22px; }
  .toggle-container { grid-template-columns: 1fr; min-width: 0; }
  .info-grid, .feature-grid { grid-template-columns: 1fr; }
  .section-heading { grid-template-columns: 1fr; }
  .qr-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .qr-copy { justify-items: center; }
  .qr-img { width: 150px; }
  .appbar-pills .pill,
  .credential-pills .pill { width: max-content; }

  .mobile-only { display: inline-flex; }
  .mobile-carousel {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 14px;
    padding: 4px 2px 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .mobile-carousel > .step-card {
    min-width: min(84vw, 340px);
    flex: 0 0 min(84vw, 340px);
    scroll-snap-align: start;
  }
  .steps-grid.five,
  .steps-grid.two { grid-template-columns: none; }
  .step-card img,
  .wide-step img { max-height: 640px; object-fit: contain; background: #f8fbff; }
  .footer-card { align-items: flex-start; }
}

@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.55rem; }
  .appbar-card { padding: 16px; }
  .product-card { padding: 14px; }
  .step-card { padding: 11px; }
  .notice-card, .credential-main, .footer-card { flex-direction: column; }
  .credential-header { flex-direction: column; }
  .appbar-main { grid-template-columns: 1fr; }
  .appbar-icon { margin-bottom: 2px; }
  .lightbox-content { max-width: 98vw; max-height: 86vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

/* Ajuste extra: appbar compacta no mobile, estilo app */
@media (max-width: 640px) {
  body {
    padding: 0;
  }

  .app-shell {
    width: 100%;
  }

  .appbar-card {
    top: 0;
    border-radius: 0 0 22px 22px;
    padding: 14px 14px 12px;
    gap: 10px;
    margin-bottom: 14px;
    box-shadow: 0 14px 32px rgba(12, 33, 65, 0.14);
  }

  .appbar-card::after {
    height: 14px;
  }

  .appbar-content {
    gap: 10px;
  }

  .appbar-main {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
  }

  .appbar-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    margin-bottom: 0;
  }

  .appbar-icon .material-symbols-rounded {
    font-size: 28px;
  }

  .appbar-kicker {
    font-size: 0.74rem;
    line-height: 1.25;
    margin-bottom: 2px;
  }

  h1 {
    font-size: 1.25rem;
    line-height: 1.05;
    margin: 0;
    letter-spacing: -0.04em;
  }

  .appbar-subtitle {
    display: none;
  }

  .appbar-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding: 2px 1px 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .appbar-pills::-webkit-scrollbar {
    display: none;
  }

  .appbar-pills .pill {
    white-space: nowrap;
    flex: 0 0 auto;
    width: auto;
    justify-content: flex-start;
    font-size: 0.78rem;
    padding: 8px 11px;
    box-shadow: 0 4px 12px rgba(12, 33, 65, 0.06);
  }

  .toggle-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    gap: 8px;
  }

  .toggle-btn {
    padding: 10px 12px;
    border-radius: 16px;
    gap: 0 8px;
  }

  .toggle-btn .material-symbols-rounded {
    font-size: 22px;
  }

  .toggle-btn span:not(.material-symbols-rounded) {
    font-size: 0.92rem;
  }

  .toggle-btn small {
    font-size: 0.7rem;
    line-height: 1.15;
  }

  main,
  .footer-card {
    padding-left: 12px;
    padding-right: 12px;
  }

  .product-card {
    border-radius: 20px;
  }
}

@media (max-width: 420px) {
  .appbar-card {
    padding: 12px 12px 10px;
  }

  .appbar-icon {
    width: 46px;
    height: 46px;
  }

  h1 {
    font-size: 1.15rem;
  }

  .appbar-kicker {
    font-size: 0.7rem;
  }

  .appbar-pills .pill {
    font-size: 0.74rem;
    padding: 7px 10px;
  }

  .toggle-btn {
    padding: 9px 10px;
  }

  .toggle-btn span:not(.material-symbols-rounded) {
    font-size: 0.86rem;
  }

  .toggle-btn small {
    font-size: 0.66rem;
  }
}
