:root {
  --navy: #0b1f3a;
  --navy-2: #12345f;
  --gold: #d7a84b;
  --gold-dark: #b8892f;
  --bg: #eef6ff;
  --card: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: rgba(11, 31, 58, 0.12);
  --shadow: 0 14px 40px rgba(11, 31, 58, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #eaf4ff 0%, #ffffff 55%, #f8fbff 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 84px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 3vw, 32px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 14px;
  filter: drop-shadow(0 8px 16px rgba(215, 168, 75, 0.28));
}

.brand h1 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--navy);
}

.brand p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.install-btn,
.primary-btn,
.secondary-btn,
.portal-card a,
.action-list a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  border: 0;
  cursor: pointer;
}

.install-btn {
  padding: 0 16px;
  background: var(--gold);
  color: var(--navy);
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 330px);
  align-items: center;
  gap: clamp(18px, 4vw, 42px);
  margin: 22px 0 18px;
  padding: clamp(28px, 6vw, 64px);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(215, 168, 75, 0.28), transparent 34%),
    linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #ffffff;
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-monogram-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-monogram {
  width: min(100%, 320px);
  height: auto;
  object-fit: contain;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.98);
  padding: 16px;
  filter: drop-shadow(0 22px 42px rgba(0, 0, 0, 0.28));
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 900;
  font-size: 0.78rem;
}

.hero h2 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-text {
  max-width: 680px;
  color: rgba(255,255,255,0.84);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.primary-btn {
  padding: 0 22px;
  background: var(--gold);
  color: var(--navy);
}

.secondary-btn {
  padding: 0 22px;
  border: 1px solid rgba(255,255,255,0.4);
  color: #ffffff;
}

.status-card {
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(11, 31, 58, 0.06);
  color: var(--muted);
}

.status-card.online span {
  color: #057a55;
  font-weight: 800;
}

.status-card.offline span {
  color: #b42318;
  font-weight: 800;
}

.section-heading {
  margin: 30px 0 14px;
}

.section-heading h2,
.quick-actions h2,
.notice h2 {
  margin: 0 0 6px;
  color: var(--navy);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.portal-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 235px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(11, 31, 58, 0.07);
}

.portal-card .tag {
  width: fit-content;
  padding: 6px 10px;
  background: rgba(215, 168, 75, 0.16);
  color: var(--gold-dark);
  border: 1px solid rgba(215, 168, 75, 0.3);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
}

.portal-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.25rem;
}

.portal-card p {
  margin: 0;
  color: var(--muted);
  flex: 1;
}

.portal-card a {
  padding: 0 18px;
  background: var(--navy);
  color: #ffffff;
}

.quick-actions,
.notice {
  margin-top: 18px;
  padding: 22px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(11, 31, 58, 0.06);
}

.action-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.action-list a {
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #f7fbff;
  color: var(--navy);
}

.notice p {
  margin: 0;
  color: var(--muted);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 25;
  width: min(620px, calc(100% - 24px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.bottom-nav a {
  min-height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--navy);
  font-weight: 900;
  font-size: 0.86rem;
}

.bottom-nav a:active,
.bottom-nav a:hover {
  background: rgba(215, 168, 75, 0.18);
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-monogram {
    width: min(100%, 260px);
  }

  .portal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  main {
    width: min(100% - 24px, 1120px);
  }

  .topbar {
    padding: 12px;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
  }

  .hero-monogram-wrap {
    display: none;
  }

  .install-btn {
    padding: 0 12px;
    font-size: 0.84rem;
  }

  .hero {
    border-radius: 24px;
  }

  .portal-grid {
    grid-template-columns: 1fr;
  }

  .portal-card {
    min-height: auto;
  }

  .bottom-nav a {
    font-size: 0.78rem;
  }
}


.install-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(11, 31, 58, 0.62);
  backdrop-filter: blur(8px);
}

.install-modal[hidden] {
  display: none;
}

.install-modal-card {
  position: relative;
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border-radius: 28px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.install-modal-card h2 {
  margin: 0 34px 8px 0;
  color: var(--navy);
  letter-spacing: -0.04em;
  font-size: clamp(1.6rem, 4vw, 2.25rem);
}

.modal-intro,
.modal-note {
  color: var(--muted);
}

.install-steps {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.install-steps div {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #f7fbff;
}

.install-steps h3 {
  margin: 0 0 5px;
  color: var(--navy);
}

.install-steps p {
  margin: 0;
  color: var(--muted);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 31, 58, 0.08);
  color: var(--navy);
  font-size: 1.5rem;
  font-weight: 900;
  cursor: pointer;
}

.pwa-ready-note {
  margin-top: 10px;
  color: rgba(255,255,255,0.74);
  font-size: 0.92rem;
}
