@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/Inter-Bold.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('/fonts/Inter-Black.woff2') format('woff2');
}

:root {
  --bg: #f3f3f1;
  --surface: #ffffff;
  --text: #0a0a0a;
  --muted: #6b6b6b;
  --border: rgba(10, 10, 10, 0.1);
  --dark: #0a0a0a;
  --dark-soft: #141414;
  --on-dark: #ffffff;
  --on-dark-muted: rgba(255, 255, 255, 0.6);
  --live: #16a34a;
  --font: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Hero header (dark band) ── */
.portal-header {
  position: relative;
  background: var(--dark);
  color: var(--on-dark);
  padding: clamp(3rem, 8vw, 5.5rem) 1.5rem clamp(2.5rem, 6vw, 4rem);
  overflow: hidden;
  text-align: center;
}

.portal-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 20%, transparent 75%);
  pointer-events: none;
}

.portal-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.portal-logo {
  display: block;
  height: clamp(3.25rem, 11vw, 5.25rem);
  width: auto;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.4));
  animation: logoIn 1s var(--ease) both;
}

@keyframes logoIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.brand-sub {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  padding-left: 0.5em;
}

.portal-tagline {
  position: relative;
  z-index: 1;
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--on-dark-muted);
  letter-spacing: 0.04em;
}

.portal-status {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); }
}

/* ── Main ── */
.portal-main {
  flex: 1;
  position: relative;
  z-index: 1;
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem 4rem;
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.section-head h1 {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.section-head p {
  font-size: 0.88rem;
  color: var(--muted);
}

.section-count {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.6rem;
  min-height: 230px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
  opacity: 0;
  animation: cardIn 0.6s var(--ease) forwards;
}

.service-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--text);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.service-card:hover:not(.service-card--soon) {
  transform: translateY(-4px);
  border-color: rgba(10, 10, 10, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.service-card:hover:not(.service-card--soon)::after {
  transform: scaleY(1);
}

.service-card--soon {
  opacity: 0.55;
  cursor: default;
  background: transparent;
  border-style: dashed;
}

.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.7rem;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 1.2rem;
  line-height: 1;
}

.service-card:hover:not(.service-card--soon) .service-icon {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

.service-status {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.service-card:not(.service-card--soon) .service-status {
  color: var(--live);
  border-color: rgba(22, 163, 74, 0.35);
}

.service-card:not(.service-card--soon) .service-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
}

.service-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.service-desc {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1.1rem;
}

.service-link {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Footer (dark) ── */
.portal-footer {
  position: relative;
  z-index: 1;
  background: var(--dark);
  color: var(--on-dark-muted);
  text-align: center;
  padding: 2.25rem 1.5rem;
  font-size: 0.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.portal-footer a {
  color: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: color 0.2s, border-color 0.2s;
}

.portal-footer a:hover { color: var(--on-dark); border-color: var(--on-dark); }

@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .service-card, .portal-logo { animation: none; opacity: 1; }
  .status-dot { animation: none; }
}
