/* Smart Society — Public marketing site */
:root {
  --pub-bg: #f8fafc;
  --pub-bg-elevated: #ffffff;
  --pub-ink: #0f172a;
  --pub-ink-muted: #64748b;
  --pub-ink-soft: #94a3b8;
  --pub-primary: #0d9488;
  --pub-primary-dark: #0f766e;
  --pub-primary-glow: rgba(13, 148, 136, 0.35);
  --pub-accent: #f59e0b;
  --pub-border: rgba(15, 23, 42, 0.08);
  --pub-radius: 16px;
  --pub-radius-lg: 24px;
  --pub-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --pub-shadow-lg: 0 24px 64px rgba(15, 23, 42, 0.12);
  --pub-font: "DM Sans", system-ui, sans-serif;
  --pub-display: "Fraunces", Georgia, serif;
  --pub-header-h: 72px;
  --pub-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

.public-body {
  margin: 0;
  font-family: var(--pub-font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--pub-ink);
  background: var(--pub-bg);
  -webkit-font-smoothing: antialiased;
}

.public-body a { color: var(--pub-primary-dark); text-decoration: none; transition: color 0.2s var(--pub-ease); }
.public-body a:hover { color: var(--pub-primary); }

/* Header */
.pub-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  height: var(--pub-header-h);
  transition: background 0.35s var(--pub-ease), box-shadow 0.35s var(--pub-ease), backdrop-filter 0.35s;
}
.pub-header.is-scrolled {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--pub-border);
}
.pub-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--pub-header-h);
  gap: 1rem;
}
.pub-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--pub-ink);
  font-weight: 600;
  font-size: 1.05rem;
}
.pub-brand:hover { color: var(--pub-ink); }
.pub-brand-logo { border-radius: 10px; object-fit: cover; }
.pub-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pub-primary), #0891b2);
}
.pub-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.pub-nav-link {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  color: var(--pub-ink-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}
.pub-nav-link:hover,
.pub-nav-link.is-active { color: var(--pub-ink); background: rgba(15, 23, 42, 0.05); }
.pub-nav-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--pub-border);
}
.pub-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px;
}
.pub-nav-toggle span {
  display: block;
  height: 2px;
  background: var(--pub-ink);
  border-radius: 2px;
  transition: transform 0.3s var(--pub-ease), opacity 0.3s;
}
.pub-nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.pub-nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.pub-nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 991.98px) {
  .pub-nav-toggle { display: flex; }
  .pub-nav {
    position: fixed;
    top: var(--pub-header-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    background: var(--pub-bg-elevated);
    transform: translateX(100%);
    transition: transform 0.4s var(--pub-ease);
    overflow-y: auto;
  }
  .pub-nav.is-open { transform: translateX(0); }
  .pub-nav-link { padding: 0.85rem 1rem; border-radius: var(--pub-radius); }
  .pub-nav-actions {
    flex-direction: column;
    margin: 1rem 0 0;
    padding: 1rem 0 0;
    border-left: none;
    border-top: 1px solid var(--pub-border);
  }
  .pub-nav-actions .btn { width: 100%; justify-content: center; }
}

/* Buttons */
.btn-pub-primary {
  background: linear-gradient(135deg, var(--pub-primary), #0891b2);
  color: #fff !important;
  border: none;
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  box-shadow: 0 4px 20px var(--pub-primary-glow);
  transition: transform 0.2s var(--pub-ease), box-shadow 0.2s;
}
.btn-pub-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px var(--pub-primary-glow);
  color: #fff !important;
}
.btn-pub-ghost {
  background: transparent;
  color: var(--pub-ink) !important;
  border: 1px solid var(--pub-border);
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
}
.btn-pub-ghost:hover {
  background: rgba(15, 23, 42, 0.04);
  color: var(--pub-ink) !important;
}
.btn-pub-outline-light {
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff !important;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.65rem 1.35rem;
}
.btn-pub-outline-light:hover { background: rgba(255,255,255,0.1); color: #fff !important; }

/* Hero */
.pub-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: calc(var(--pub-header-h) + 3rem) 0 4rem;
  overflow: hidden;
}
.pub-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.pub-hero-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.45;
}
.pub-hero-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(13, 148, 136, 0.25), transparent 55%),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(245, 158, 11, 0.12), transparent 50%),
    linear-gradient(165deg, #0f172a 0%, #1e293b 45%, #134e4a 100%);
}
.pub-hero-bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.pub-hero-content { position: relative; z-index: 1; color: #f8fafc; }
.pub-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.75);
  margin-bottom: 1.25rem;
}
.pub-hero-eyebrow::before {
  content: "";
  width: 32px;
  height: 2px;
  background: var(--pub-accent);
  border-radius: 2px;
}
.pub-hero-title {
  font-family: var(--pub-display);
  font-size: clamp(2.35rem, 5vw, 3.75rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  max-width: 14ch;
}
.pub-hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: rgba(248, 250, 252, 0.78);
  max-width: 42rem;
  margin-bottom: 2rem;
}
.pub-hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2.5rem; }
.pub-hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.pub-hero-trust-item strong {
  display: block;
  font-family: var(--pub-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: #fff;
}
.pub-hero-trust-item span { font-size: 0.875rem; color: rgba(248,250,252,0.65); }

.pub-hero-visual {
  position: relative;
  z-index: 1;
}
.pub-hero-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(16px);
  border-radius: var(--pub-radius-lg);
  padding: 1.75rem;
  box-shadow: var(--pub-shadow-lg);
}
.pub-hero-card-title { font-weight: 600; margin-bottom: 1rem; color: #fff; }
.pub-hero-card-list { list-style: none; padding: 0; margin: 0; }
.pub-hero-card-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: rgba(248,250,252,0.85);
  font-size: 0.9375rem;
}
.pub-hero-card-list li:last-child { border-bottom: none; }
.pub-hero-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pub-primary);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  color: #fff;
}

/* Sections */
.pub-section { padding: 5rem 0; }
.pub-section-alt { background: var(--pub-bg-elevated); }
.pub-section-header { max-width: 40rem; margin-bottom: 3rem; }
.pub-section-eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pub-primary);
  margin-bottom: 0.75rem;
}
.pub-section-title {
  font-family: var(--pub-display);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: var(--pub-ink);
}
.pub-section-lead { color: var(--pub-ink-muted); margin: 0; font-size: 1.125rem; }

.pub-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 768px) {
  .pub-stat-grid { grid-template-columns: repeat(4, 1fr); }
}
.pub-stat {
  background: var(--pub-bg-elevated);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.25s var(--pub-ease), box-shadow 0.25s;
}
.pub-stat:hover { transform: translateY(-4px); box-shadow: var(--pub-shadow); }
.pub-stat-value {
  font-family: var(--pub-display);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--pub-ink);
  line-height: 1.1;
}
.pub-stat-label { font-size: 0.875rem; color: var(--pub-ink-muted); margin-top: 0.35rem; }

.pub-feature-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .pub-feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .pub-feature-grid { grid-template-columns: repeat(3, 1fr); }
}
.pub-feature {
  background: var(--pub-bg);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius);
  padding: 1.75rem;
  height: 100%;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.pub-section-alt .pub-feature { background: var(--pub-bg-elevated); }
.pub-feature:hover {
  border-color: rgba(13, 148, 136, 0.25);
  box-shadow: var(--pub-shadow);
}
.pub-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(13,148,136,0.15), rgba(8,145,178,0.08));
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}
.pub-feature h3 { font-size: 1.125rem; font-weight: 600; margin: 0 0 0.5rem; }
.pub-feature p { margin: 0; font-size: 0.9375rem; color: var(--pub-ink-muted); }

.pub-card-grid { display: grid; gap: 1.25rem; }
@media (min-width: 768px) {
  .pub-card-grid { grid-template-columns: repeat(3, 1fr); }
}
.pub-card {
  background: var(--pub-bg-elevated);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--pub-ease), box-shadow 0.25s;
}
.pub-card:hover { transform: translateY(-4px); box-shadow: var(--pub-shadow-lg); }
.pub-card-media {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  object-fit: cover;
  width: 100%;
}
.pub-card-body { padding: 1.35rem; flex: 1; display: flex; flex-direction: column; }
.pub-card-meta { font-size: 0.8125rem; color: var(--pub-ink-soft); margin-bottom: 0.5rem; }
.pub-card-title { font-weight: 600; font-size: 1.05rem; margin: 0 0 0.5rem; color: var(--pub-ink); }
.pub-card-text { font-size: 0.9375rem; color: var(--pub-ink-muted); margin: 0 0 1rem; flex: 1; }
.pub-card-link { font-weight: 600; font-size: 0.9375rem; }

.pub-about-split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 992px) {
  .pub-about-split { grid-template-columns: 1fr 1fr; }
}
.pub-about-panel {
  background: linear-gradient(135deg, #0f172a, #134e4a);
  color: #f8fafc;
  border-radius: var(--pub-radius-lg);
  padding: 2.5rem;
}
.pub-about-panel p { color: rgba(248,250,252,0.8); margin-bottom: 0; }

.pub-faq .accordion-item {
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius) !important;
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--pub-bg-elevated);
}
.pub-faq .accordion-button {
  font-weight: 600;
  font-size: 1rem;
  padding: 1.15rem 1.35rem;
  background: transparent;
  box-shadow: none !important;
}
.pub-faq .accordion-button:not(.collapsed) {
  color: var(--pub-primary-dark);
  background: rgba(13, 148, 136, 0.06);
}
.pub-faq .accordion-body { padding: 0 1.35rem 1.25rem; color: var(--pub-ink-muted); }

.pub-cta {
  background: linear-gradient(135deg, #0f172a 0%, #115e59 100%);
  border-radius: var(--pub-radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  color: #f8fafc;
  position: relative;
  overflow: hidden;
}
.pub-cta::before {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--pub-primary-glow), transparent 70%);
  top: -200px;
  right: -100px;
  pointer-events: none;
}
.pub-cta h2 {
  font-family: var(--pub-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: 0.75rem;
  position: relative;
}
.pub-cta p { color: rgba(248,250,252,0.78); max-width: 32rem; margin: 0 auto 1.5rem; position: relative; }
.pub-cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; position: relative; }

/* Inner pages */
.pub-page-hero {
  padding: calc(var(--pub-header-h) + 3rem) 0 2.5rem;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
}
.pub-page-hero .pub-breadcrumb {
  font-size: 0.875rem;
  color: rgba(248,250,252,0.55);
  margin-bottom: 0.75rem;
}
.pub-page-hero .pub-breadcrumb a { color: rgba(248,250,252,0.75); }
.pub-page-hero h1 {
  font-family: var(--pub-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 0;
}
.pub-page-content {
  padding: 3rem 0 5rem;
}
.pub-prose {
  background: var(--pub-bg-elevated);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius-lg);
  padding: 2rem 2.25rem;
  max-width: 52rem;
}
.pub-prose p:last-child { margin-bottom: 0; }

.pub-contact-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .pub-contact-grid { grid-template-columns: repeat(3, 1fr); }
}
.pub-contact-tile {
  background: var(--pub-bg-elevated);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius);
  padding: 1.5rem;
}
.pub-contact-tile strong { display: block; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--pub-ink-soft); margin-bottom: 0.35rem; }

/* Auth shell */
.pub-auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: calc(var(--pub-header-h) + 2rem) 1rem 3rem;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(13,148,136,0.12), transparent),
    var(--pub-bg);
}
.pub-auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--pub-bg-elevated);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius-lg);
  padding: 2.25rem;
  box-shadow: var(--pub-shadow-lg);
}
.pub-auth-card h1 { font-family: var(--pub-display); font-size: 1.65rem; margin-bottom: 0.35rem; }
.pub-auth-card .form-label { font-weight: 600; font-size: 0.875rem; }
.pub-auth-card .form-control,
.pub-auth-card .form-select {
  border-radius: 12px;
  border-color: var(--pub-border);
  padding: 0.65rem 0.85rem;
}
.pub-auth-card .form-control:focus,
.pub-auth-card .form-select:focus {
  border-color: var(--pub-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.pub-auth-page .pub-header { background: rgba(255,255,255,0.92); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--pub-border); }

.nav-pills .nav-link.active { background: var(--pub-primary); }
.nav-pills .nav-link { color: var(--pub-ink-muted); border-radius: 999px; }

/* Footer */
.pub-footer {
  background: #0f172a;
  color: rgba(248, 250, 252, 0.72);
  padding: 4rem 0 0;
  font-size: 0.9375rem;
}
.pub-footer-brand {
  font-family: var(--pub-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.75rem;
}
.pub-footer-lead { margin-bottom: 1rem; }
.pub-footer-meta { font-size: 0.875rem; color: rgba(248,250,252,0.55); }
.pub-footer-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(248,250,252,0.45);
  margin-bottom: 1rem;
}
.pub-footer-links,
.pub-footer-contact { list-style: none; padding: 0; margin: 0; }
.pub-footer-links li { margin-bottom: 0.5rem; }
.pub-footer-links a { color: rgba(248,250,252,0.75); }
.pub-footer-links a:hover { color: #fff; }
.pub-footer-contact li { margin-bottom: 0.65rem; }
.pub-footer-contact span { display: block; font-size: 0.75rem; color: rgba(248,250,252,0.45); }
.pub-footer-contact a { color: #fff; }
.pub-footer-bottom {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
  color: rgba(248,250,252,0.45);
}
.pub-footer-admin { color: rgba(248,250,252,0.35) !important; font-size: 0.8125rem; }
.pub-footer-admin:hover { color: rgba(248,250,252,0.6) !important; }

/* Carousel on hero optional */
.pub-banner-strip {
  margin-top: -2rem;
  position: relative;
  z-index: 2;
}
.pub-banner-strip .carousel {
  border-radius: var(--pub-radius-lg);
  overflow: hidden;
  box-shadow: var(--pub-shadow-lg);
  max-width: 900px;
  margin: 0 auto;
}
.pub-banner-strip .carousel-item img { height: 280px; object-fit: cover; width: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
