:root {
  --usp-teal: #1094ab;
  --usp-teal-dark: #0a6677;
  --usp-teal-deep: #084f5e;
  --usp-cyan: #00c5d4;
  --usp-yellow: #ffb500;
  --ink: #223746;
  --ink-strong: #142b3a;
  --muted: #516d7d;
  --line: #d7e1e7;
  --surface: #ffffff;
  --page: #f5f8fa;
  --soft-teal: #edf8fa;
  --soft-blue: #eef5f8;
  --success: #16724c;
  --warning: #946312;
  --shadow: 0 12px 28px rgba(20, 52, 66, .08);
  --shadow-hover: 0 18px 34px rgba(16, 93, 112, .14);
  --radius: 12px;
  --font: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  background: var(--page);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }

/* Faixa cromática inspirada diretamente no topo institucional da USP. */
.usp-colorbar {
  height: 11px;
  background:
    linear-gradient(to bottom,
      #2f2e36 0 1px,
      var(--usp-yellow) 1px 5px,
      #ddb71d 5px 6px,
      #0ec4c8 6px 7px,
      var(--usp-cyan) 7px 10px,
      var(--usp-teal) 10px 11px);
}
.usp-topbar {
  background: var(--usp-teal-dark);
  color: #fff;
}
.usp-topbar-inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: .82rem;
}
.usp-topbar-title { font-weight: 700; letter-spacing: .015em; }
.usp-topbar-nav { display: flex; align-items: center; gap: 18px; }
.usp-topbar-nav a { color: #fff; text-decoration: none; }
.usp-topbar-nav a:hover,
.usp-topbar-nav a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.usp-brand { display: flex; align-items: center; min-width: 0; }
.usp-brand img {
  width: min(430px, 100%);
  max-height: 72px;
  object-fit: contain;
  object-position: left center;
}
.portal-identity {
  flex: 0 0 auto;
  padding-left: 24px;
  border-left: 1px solid var(--line);
  text-align: right;
}
.portal-identity small {
  display: block;
  color: var(--usp-teal-dark);
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.portal-identity strong {
  display: block;
  margin-top: 2px;
  color: var(--ink-strong);
  font-size: .98rem;
}

.hero {
  padding: 44px 0 30px;
  background: linear-gradient(180deg, #fff 0, #f7fafb 100%);
  border-bottom: 1px solid #e4ecef;
}
.hero-content {
  max-width: 900px;
  padding-left: 22px;
  border-left: 5px solid var(--usp-teal);
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--usp-teal-dark);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -.025em;
}
.hero p.lead {
  max-width: 830px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
}

.services { padding: 34px 0 56px; }
.section-heading { margin-bottom: 18px; }
.section-heading h2 { margin: 0; color: var(--ink-strong); font-size: 1.48rem; }
.section-heading p { margin: 5px 0 0; color: var(--muted); }
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.service-card {
  position: relative;
  display: flex;
  min-height: 205px;
  flex-direction: column;
  gap: 13px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 4px solid var(--usp-teal);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 3px 12px rgba(20, 52, 66, .04);
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.service-card:hover,
.service-card:focus-visible {
  transform: translateY(-2px);
  border-color: #9ac7d0;
  border-top-color: var(--usp-teal-dark);
  box-shadow: var(--shadow-hover);
  outline: none;
}
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.icon-box {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--soft-teal);
  color: var(--usp-teal-dark);
}
.icon-box svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.card-chip {
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--soft-blue);
  color: #3d6578;
  font-size: .69rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .045em;
}
.service-card h3 { margin: 2px 0 0; color: var(--ink-strong); font-size: 1.22rem; }
.service-card p { margin: 0; color: var(--muted); }
.card-action {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--usp-teal-dark);
  font-size: .92rem;
  font-weight: 800;
}
.card-action span { transition: transform .16s ease; }
.service-card:hover .card-action span { transform: translateX(3px); }
.app-card { border-top-color: #21835c; }
.app-card .icon-box { background: #edf8f2; color: var(--success); }
.support-card { border-top-color: #c48716; }
.support-card .icon-box { background: #fff6e4; color: var(--warning); }

.app-page { padding: 34px 0 58px; }
.app-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 26px;
  align-items: start;
}
.app-panel,
.qr-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.app-panel { padding: 30px; border-top: 4px solid var(--usp-teal); }
.app-panel h1 { font-size: clamp(1.8rem, 4vw, 2.65rem); }
.app-panel .lead { margin: 13px 0 0; color: var(--muted); font-size: 1.04rem; }
.store-area { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.store-title { margin: 0 0 12px; color: var(--ink); font-size: .93rem; font-weight: 700; }
.store-links { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store-link {
  display: inline-flex;
  min-width: 185px;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid #1f2933;
  border-radius: 10px;
  background: #111;
  transition: transform .15s ease, box-shadow .15s ease;
}
.store-link:hover,
.store-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0,0,0,.14);
  outline: 3px solid rgba(16,148,171,.20);
}
.store-link img { display: block; width: auto; max-height: 40px; }
/* O asset do Google Play tem texto preto/transparente: precisa de fundo claro. */
.store-link.play {
  min-width: 205px;
  background: #fff;
  border-color: #aeb8be;
}
.store-link.play img { width: 183px; max-height: none; }
.platform-note { margin: 13px 0 0; color: var(--muted); font-size: .9rem; }
.back-link {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--usp-teal-dark);
  font-weight: 800;
  text-decoration: none;
}
.back-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.qr-panel { padding: 24px; text-align: center; border-top: 4px solid var(--usp-yellow); }
.qr-panel img { width: min(240px, 100%); image-rendering: pixelated; }
.qr-panel h2 { margin: 12px 0 4px; color: var(--ink-strong); font-size: 1.05rem; }
.qr-panel p { margin: 0; color: var(--muted); font-size: .9rem; }
.utility-actions { margin-top: 18px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.utility-link {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--usp-teal-dark); font-size: .88rem; font-weight: 800; text-decoration: none;
}
.utility-link:hover { background: var(--soft-teal); }

.site-footer {
  flex: 0 0 auto;
  margin-top: auto;
  border-top: 4px solid var(--usp-yellow);
  background: var(--usp-teal-deep);
  color: #fff;
}
.footer-inner {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #e7f5f7;
  font-size: .86rem;
}
.footer-inner strong { color: #fff; }
.footer-inner a { color: #fff; }

.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

@media (max-width: 820px) {
  .container { width: min(100% - 28px, 1160px); }
  .usp-topbar-nav { display: none; }
  .header-inner { min-height: 88px; }
  .portal-identity { display: none; }
  .usp-brand img { max-height: 62px; }
  .hero { padding-top: 32px; }
  .hero-content { padding-left: 16px; border-left-width: 4px; }
  .app-layout { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 185px; }
  .qr-panel { order: -1; }
  .qr-panel img { width: 190px; }
  .footer-inner { padding: 20px 0; min-height: 0; align-items: flex-start; flex-direction: column; gap: 8px; }
}

@media (max-width: 520px) {
  body { font-size: 15px; }
  .usp-topbar-inner { min-height: 34px; }
  .header-inner { min-height: 78px; }
  .usp-brand img { max-height: 54px; }
  .hero { padding: 26px 0 22px; }
  .services { padding: 28px 0 40px; }
  .service-card, .app-panel { padding: 19px; }
  .store-links { align-items: stretch; flex-direction: column; }
  .store-link { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
