:root {
  --bg: #0a0d14;
  --fg: #f4f5f7;
  --muted: rgba(244, 245, 247, 0.72);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-edge: rgba(255, 255, 255, 0.22);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --rig-color: #ff6b35;
  --spray-color: #14b8a6;
  --paint-color: #f5a524;

  --accent: var(--rig-color);
  --orb-a: rgba(255, 107, 53, 0.55);
  --orb-b: rgba(99, 102, 241, 0.45);
  --orb-c: rgba(255, 107, 53, 0.35);
}

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

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body[data-theme="managemyrig"] {
  --accent: var(--rig-color);
  --orb-a: rgba(255, 107, 53, 0.55);
  --orb-b: rgba(99, 102, 241, 0.45);
  --orb-c: rgba(255, 107, 53, 0.35);
}

body[data-theme="sprayfoamai"] {
  --accent: var(--spray-color);
  --orb-a: rgba(20, 184, 166, 0.55);
  --orb-b: rgba(56, 189, 248, 0.45);
  --orb-c: rgba(34, 211, 238, 0.35);
}

body[data-theme="paintsprayersai"] {
  --accent: var(--paint-color);
  --orb-a: rgba(245, 165, 36, 0.6);
  --orb-b: rgba(255, 247, 220, 0.42);
  --orb-c: rgba(251, 191, 36, 0.4);
}

.ambient {
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, var(--orb-a) 0%, transparent 38%),
    radial-gradient(circle at 82% 30%, var(--orb-b) 0%, transparent 40%),
    radial-gradient(circle at 50% 88%, var(--orb-c) 0%, transparent 36%);
  filter: blur(70px) saturate(140%);
  transition: background 0.9s ease;
}

.transition-veil {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 100%, color-mix(in srgb, var(--accent) 70%, #fff 10%) 0%, var(--accent) 45%, color-mix(in srgb, var(--accent) 60%, #0a0d14 30%) 100%);
  clip-path: circle(0% at 50% 105%);
  transition: clip-path 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}

.transition-veil-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 50% 50%, rgba(255, 255, 255, 0.22) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.55s ease 0.15s;
}

body.is-transitioning .transition-veil {
  clip-path: circle(160% at 50% 105%);
  pointer-events: auto;
}

body.is-transitioning .transition-veil-glow {
  opacity: 1;
}

body.is-transitioning .hero.is-active .hero-inner {
  opacity: 0;
  transform: translateY(-18px) scale(0.98);
  transition: opacity 0.4s ease, transform 0.55s cubic-bezier(0.65, 0, 0.35, 1);
}

body.is-transitioning .site-header,
body.is-transitioning .notice-banner {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.35s ease, transform 0.45s ease;
}

body.is-transitioning .ambient {
  opacity: 0;
  transition: opacity 0.4s ease;
}

a { color: inherit; }

.notice-banner {
  position: relative;
  z-index: 9;
  padding: 9px clamp(20px, 4vw, 36px);
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  text-align: center;
}

.notice-banner p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.notice-banner a {
  color: var(--rig-color);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid color-mix(in srgb, var(--rig-color) 50%, transparent);
  transition: border-color 0.2s ease;
}

.notice-banner a:hover {
  border-bottom-color: var(--rig-color);
}

.notice-arrow {
  display: inline-block;
  color: var(--rig-color);
  transition: transform 0.2s ease;
}

.notice-banner a:hover + .notice-arrow {
  transform: translateX(2px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px clamp(20px, 4vw, 36px);
  background: rgba(10, 13, 20, 0.45);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

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

.header-spacer { justify-self: end; }

.tabs {
  justify-self: center;
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--glass-edge);
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 500;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.tab:hover { color: var(--fg); }

.tab.is-active {
  background: rgba(255, 255, 255, 0.92);
  color: #0a0d14;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.tab:focus-visible {
  outline: 2px solid var(--glass-edge);
  outline-offset: 2px;
}

main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  padding: clamp(28px, 5vw, 72px) clamp(20px, 4vw, 48px);
}

.hero {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px) scale(0.985);
  transition:
    opacity 0.45s ease,
    transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0s linear 0.45s;
}

.hero.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition:
    opacity 0.45s ease,
    transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0s linear 0s;
}

.hero.is-active .hero-eyebrow { animation: heroRise 0.55s 0.08s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hero.is-active .hero-title   { animation: heroRise 0.6s  0.16s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hero.is-active .hero-tagline { animation: heroRise 0.6s  0.22s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hero.is-active .hero-body    { animation: heroRise 0.6s  0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hero.is-active .cta          { animation: heroRise 0.6s  0.36s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

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

.hero-inner {
  position: relative;
  max-width: 760px;
  width: 100%;
  padding: clamp(36px, 5vw, 64px) clamp(28px, 4.5vw, 56px);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 60%, rgba(255, 255, 255, 0.07) 100%);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 var(--glass-edge);
  text-align: center;
  overflow: hidden;
}

.hero-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.14), transparent 60%);
}

.hero-eyebrow {
  display: inline-block;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  font-weight: 600;
  margin: 0 0 22px;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  color: color-mix(in srgb, var(--accent) 85%, #fff);
}

.hero-title {
  position: relative;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.hero-tagline {
  position: relative;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  margin: 0 auto 18px;
  max-width: 600px;
  opacity: 0.92;
}

.hero-body {
  position: relative;
  font-size: 1rem;
  margin: 0 auto 36px;
  max-width: 580px;
  opacity: 0.78;
}

.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  background: var(--accent);
  color: #0a0d14;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, #fff 0%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow:
    0 14px 36px color-mix(in srgb, var(--accent) 35%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow:
    0 20px 44px color-mix(in srgb, var(--accent) 45%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.cta:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 50%, #fff);
  outline-offset: 3px;
}

.cta-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.cta:hover .cta-arrow { transform: translateX(3px); }

.cta--disabled {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(244, 245, 247, 0.65);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-edge);
  cursor: not-allowed;
  pointer-events: none;
  letter-spacing: 0.02em;
}

.cta--disabled:hover {
  transform: none;
  filter: none;
  box-shadow: inset 0 1px 0 var(--glass-edge);
}

.site-footer {
  padding: 16px clamp(20px, 4vw, 48px);
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  background: rgba(10, 13, 20, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-footer a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--glass-border);
}

.site-footer a:hover { border-bottom-color: var(--fg); }

@media (max-width: 720px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
    padding: 14px 20px;
  }
  .brand, .header-spacer { justify-self: center; }
  .header-spacer { display: none; }
  .brand-logo { height: 38px; }
  .tab { padding: 6px 12px; font-size: 0.78rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cta, .cta-arrow, .tab, .ambient, .hero { transition: none; }
  .hero.is-active .hero-eyebrow,
  .hero.is-active .hero-title,
  .hero.is-active .hero-tagline,
  .hero.is-active .hero-body,
  .hero.is-active .cta { animation: none; }
  .transition-veil, .transition-veil-glow { transition: none; }
}
