/* =========================================================
   ROOT THEME
   ========================================================= */

:root {
  --bg: #0b1220;
  --panel: #111827;
  --card: #0f172a;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #2563eb;
  --radius: 20px;
}

/* =========================================================
   BASE RESET
   ========================================================= */

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

html, body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  overscroll-behavior-y: auto;
}

html, body {
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  scroll-behavior: smooth;

  /* SINGLE CONTINUOUS BACKGROUND */
  background:
    radial-gradient(
      60% 40% at 50% -10%,
      rgba(37,99,235,0.35),
      transparent 60%
    ),
    radial-gradient(
      50% 30% at 20% 30%,
      rgba(56,189,248,0.18),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      #020617 0%,
      #020617 40%,
      #020617 100%
    );
}


/* =========================================================
   HEADER (Apple-style translucent)
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(14px);
  background: rgba(11, 18, 32, 0.72);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}

nav a {
  color: var(--text);
  text-decoration: none;
  margin-left: 24px;
  font-size: 14px;
  opacity: 0.85;
}

nav a:hover {
  opacity: 1;
}

nav a.nav-signup {
  opacity: 1;
  padding: 9px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.14);
  box-shadow: 0 6px 18px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.25);
}

nav a.nav-signup:hover {
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.6);
}

/* =========================================================
   HERO SECTION
   ========================================================= */

.hero {
  position: sticky;
  top: 0;
  height: 100vh;

  /* background stays here */
  background: transparent !important;

  display: flex;
  align-items: center;
  justify-content: center;
}


.hero-inner {
  max-width: 900px;
  padding: 0 24px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(42px, 7vw, 84px);
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  will-change: transform, opacity, filter;
}

.hero p {
  font-size: 20px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 40px;
  will-change: transform, opacity;
}

.hero-spacer {
  height: 300vh; /* THIS controls duration */
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
  transition: background .25s ease;
}

.btn-primary:hover {
  background: #1d4ed8;
}

/* =========================================================
   SERVICES STAGE (Apple scroll narrative)
   ========================================================= */

.services-stage {
  min-height: 130vh;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 2;
  background: transparent !important;
}

.stage-inner {
  max-width: 1100px;
  padding: 140px 24px;
  text-align: center;
}

.stage-inner h2 {
  font-size: 52px;
  margin-bottom: 12px;
  letter-spacing: -0.025em;
}

.stage-sub {
  color: var(--muted);
  margin-bottom: 80px;
  font-size: 18px;
}

/* =========================================================
   GRID LAYOUTS
   ========================================================= */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 32px;
}

/* =========================================================
   CARDS (Base)
   ========================================================= */

.card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), transparent),
    var(--card);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid rgba(255,255,255,.07);
  box-shadow:
    0 1px 0 rgba(255,255,255,.05) inset,
    0 20px 40px rgba(0,0,0,.25);
  text-decoration: none;
  color: inherit;
  position: relative;
  transition:
    transform .6s cubic-bezier(.2,.6,.2,1),
    box-shadow .6s cubic-bezier(.2,.6,.2,1),
    opacity .6s cubic-bezier(.2,.6,.2,1);
}

/* =========================================================
   SERVICE CARDS (Morph Targets)
   ========================================================= */

.service-card {
  opacity: 0.85;
  transform: scale(0.97);
  filter: saturate(0.9) brightness(0.95);
  transition:
    opacity .6s cubic-bezier(.2,.6,.2,1),
    transform .6s cubic-bezier(.2,.6,.2,1),
    filter .6s cubic-bezier(.2,.6,.2,1);
}

.service-card.active {
  opacity: 1;
  transform: scale(1);
  filter: saturate(1.05) brightness(1.05);
}

.service-card::after {
  content: "Open →";
  position: absolute;
  bottom: 22px;
  right: 24px;
  font-size: 13px;
  opacity: 0;
  color: var(--accent);
  transition: opacity .35s ease;
}

.service-card.active::after {
  opacity: 1;
}

/* =========================================================
   SERVICE ICONS
   ========================================================= */

.service-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
}

.service-icon svg {
  width: 100%;
  height: 100%;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.8;
}

/* =========================================================
   SERVICES BAR (Hidden until scroll)
   ========================================================= */

.services-bar {
  position: sticky;
  top: 56px;
  z-index: 90;
  background: rgba(11,18,32,.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.06);

  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;

  transition:
    transform .5s cubic-bezier(.2,.6,.2,1),
    opacity .4s ease;
}

.services-bar.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.services-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  gap: 32px;
  overflow-x: auto;
}

.services-bar a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  opacity: .8;
}

.services-bar a:hover {
  opacity: 1;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  padding: 64px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    transform: none !important;
    animation: none !important;
    filter: none !important;
  }
}

.section-chapter {
  position: relative;
  padding: 160px 24px 120px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-chapter::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;

  background: radial-gradient(
    60% 30% at 50% 100%,
    rgba(255,255,255,0.05),
    transparent 70%
  );
}



.section-header {
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: clamp(40px, 5vw, 56px);
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.section-header p {
  font-size: 18px;
  color: var(--muted);
  max-width: 520px;
}

.collapse-toggle {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.collapse-title {
  font-size: clamp(40px, 5vw, 56px);
  letter-spacing: -0.02em;
}

.collapse-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 22px;
  line-height: 1;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.08);
  transition: transform 200ms ease, background 200ms ease, border-color 200ms ease;
}

.collapse-toggle:hover .collapse-icon {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.5);
}

.is-collapsed .collapsible-body {
  display: none;
}

.is-expanded .collapse-icon {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.6);
}


.section-chapter .card {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.04),
    rgba(255,255,255,0.01)
  );
}


.signup-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
}

.signup-inner {
  max-width: 900px;
  padding: 0 24px;
  opacity: 0;
  transform: translateY(60px) scale(0.95);
  transition: none;
}

.signup-stage h2 {
  font-size: clamp(42px, 6vw, 72px);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.signup-stage p {
  color: var(--muted);
  font-size: 20px;
  max-width: 600px;
  margin: 0 auto 40px;
}

.signup-btn {
  display: inline-block;
  padding: 18px 44px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: white;
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}

.signup-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 20px 50px rgba(37,99,235,0.35);
}

.tag {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.tag.none { background: rgba(16,185,129,.15); color: #10b981; }
.tag.minor { background: rgba(245,158,11,.15); color: #f59e0b; }
.tag.major { background: rgba(249,115,22,.15); color: #f97316; }
.tag.critical { background: rgba(239,68,68,.15); color: #ef4444; }


/* =========================================================
   PLANNED MAINTENANCE (SVG ICON)
   ========================================================= */

#status-maintenance .card {
  position: relative;
  padding-left: 56px;
  border-left: 3px solid #38bdf8;
}

#status-maintenance .card::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 22px;
  width: 20px;
  height: 20px;

  background-color: #38bdf8;

  mask: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>\
<path d='M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h3l2-3h6l2 3h3a2 2 0 0 1 2 2z'/>\
<circle cx='12' cy='13' r='4'/>\
</svg>");

  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

/* =========================================================
   RESPONSIVE OVERRIDES (MOBILE/TABLET)
   ========================================================= */

@media (max-width: 900px) {
  .nav {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 18px 14px;
    gap: 14px;
  }

  .logo {
    font-size: 16px;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
  }

  nav a {
    margin-left: 0;
    font-size: 13px;
  }

  nav a.nav-signup {
    padding: 8px 12px;
    border-radius: 12px;
  }

  .services-bar {
    display: none;
  }

  .services-bar-inner {
    padding: 12px 16px;
    gap: 18px;
  }

  .hero {
    position: relative;
    top: auto;
    min-height: 72svh;
    height: auto;
    padding: 46px 0 36px;
  }

  .hero-inner {
    padding: 0 18px;
    text-align: left;
  }

  .hero h1 {
    font-size: clamp(34px, 10vw, 60px);
    margin-bottom: 18px;
  }

  .hero p {
    font-size: 17px;
    margin-bottom: 28px;
    max-width: 100%;
  }

  .hero-spacer {
    height: 0;
  }

  .stage-inner {
    padding: 72px 18px;
    text-align: left;
  }

  .stage-inner h2 {
    font-size: clamp(34px, 8vw, 46px);
  }

  .grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
  }

  .card {
    padding: 22px;
    border-radius: 16px;
  }

  .section-chapter {
    padding: 110px 18px 90px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-header h2,
  .collapse-title {
    font-size: clamp(32px, 8vw, 44px);
  }

  .section-header p {
    font-size: 16px;
    max-width: 100%;
  }

  .signup-stage {
    min-height: 60svh;
    padding: 24px 0 8px;
    place-items: start center;
  }

  .signup-stage h2 {
    font-size: clamp(34px, 9vw, 58px);
  }

  .signup-stage p {
    font-size: 17px;
    margin-bottom: 30px;
  }

  .signup-btn {
    padding: 16px 30px;
    font-size: 17px;
    min-height: 52px;
  }

  .site-footer {
    padding: 48px 18px;
  }

  .collapse-toggle {
    width: 100%;
    justify-content: space-between;
    text-align: left;
  }

  .collapse-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }

  #status-maintenance .card {
    padding-left: 48px;
  }

  #status-maintenance .card::before {
    left: 14px;
  }
}

@media (max-width: 640px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .mobile-hide-nav-link {
    display: none;
  }

  nav {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }

  .hero h1 {
    font-size: clamp(30px, 10vw, 44px);
    line-height: 1.08;
  }

  .hero p {
    font-size: 16px;
  }

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

  .service-card::after {
    opacity: 1;
  }

  .signup-btn {
    width: 100%;
    max-width: 320px;
  }

  .section-chapter {
    padding: 88px 16px 72px;
  }

  .section-header {
    margin-bottom: 28px;
  }

  .section-header h2,
  .collapse-title {
    font-size: clamp(28px, 10vw, 36px);
    margin-bottom: 10px;
  }

  .stage-inner {
    padding: 56px 16px;
  }

  .services-stage {
    min-height: auto;
  }

  .signup-inner {
    width: 100%;
    padding: 0 16px;
    opacity: 1;
    transform: none;
  }

  .site-footer {
    font-size: 12px;
    text-align: left;
  }
}

@media (hover: none) and (pointer: coarse) {
  .signup-btn:hover {
    transform: none;
    box-shadow: none;
  }

  .service-card {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .service-card::after {
    opacity: 1;
  }
}
