:root {
  --bg: #050b08;
  --green: #0aad48;
  --green-bright: #12d45a;
  --text: #8a9990;
  --text-bright: #c8d5cc;
  --text-dim: #3d4d43;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ══════════════════════════════════
   BACKGROUND
══════════════════════════════════ */
.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-wave {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg-wave img {
  width: min(55vw, 440px);
  height: auto;
  opacity: 0.14;
  animation: breathe 14s ease-in-out infinite alternate;
}

@keyframes breathe {
  0%   { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.04) rotate(0.5deg); }
}

.bg-light {
  position: absolute;
  top: -20%;
  left: 50%;
  width: 600px;
  height: 800px;
  transform: translateX(-50%);
  background: conic-gradient(
    from 180deg at 50% 0%,
    transparent 40%,
    rgba(10,173,72,0.03) 47%,
    rgba(10,173,72,0.06) 50%,
    rgba(10,173,72,0.03) 53%,
    transparent 60%
  );
  mask-image: linear-gradient(to bottom, white 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, white 0%, transparent 85%);
}

.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  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");
  background-repeat: repeat;
  background-size: 200px;
}

/* ══════════════════════════════════
   PAGE
══════════════════════════════════ */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  padding: 2rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.25rem, 3vh, 2.25rem);
}

/* ══════════════════════════════════
   LOGO
══════════════════════════════════ */
.logo-wrap {
  animation: logo-in 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.logo {
  width: clamp(170px, 30vw, 280px);
  height: auto;
  filter: drop-shadow(0 0 50px rgba(10,173,72,0.1))
          drop-shadow(0 0 100px rgba(10,173,72,0.04));
}

@keyframes logo-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ══════════════════════════════════
   TABS
══════════════════════════════════ */
.tabs {
  display: flex;
  gap: 0;
  position: relative;
  animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.tabs::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255,255,255,0.04);
}

.tab-line {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--green);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 8px rgba(10,173,72,0.5),
              0 0 20px rgba(10,173,72,0.2),
              0 1px 3px rgba(10,173,72,0.4);
  z-index: 1;
}

.tab {
  position: relative;
  z-index: 1;
  font-family: 'Space Mono', monospace;
  font-size: clamp(0.65rem, 1.2vw, 0.82rem);
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: none;
  border: none;
  padding: 0.6rem clamp(0.65rem, 2vw, 1.2rem);
  cursor: pointer;
  transition: color 0.4s ease, text-shadow 0.4s ease;
  white-space: nowrap;
}

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

.tab.active {
  color: var(--green);
  text-shadow: 0 0 16px rgba(10,173,72,0.35);
}

/* ══════════════════════════════════
   PANEL STAGE
   JS sets height to tallest panel.
   flex:1 on .panel-inner centers text
   vertically within that fixed height.
══════════════════════════════════ */
.panel-stage {
  position: relative;
  width: 100%;
  animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.panel {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.panel.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.panel p {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  font-weight: 300;
  line-height: 1.85;
  max-width: 560px;
  color: var(--text);
}

.panel p strong {
  color: var(--text-bright);
  font-weight: 500;
}

/* Contact panel needs column for btn */
.panel-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1.5vh, 0.85rem);
  text-align: left;
  width: 100%;
  max-width: 560px;
}

.service-item {
  font-size: clamp(0.92rem, 1.6vw, 1.05rem);
  font-weight: 300;
  line-height: 1.7;
  padding-left: 1.2rem;
  position: relative;
  color: var(--text);
}

.service-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.45;
  box-shadow: 0 0 6px rgba(10,173,72,0.3);
}

.service-item strong {
  color: var(--text-bright);
  font-weight: 500;
}

.panel .btn { margin-top: 1.5rem; }

/* ══════════════════════════════════
   CTA
══════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'Space Mono', monospace;
  font-size: clamp(0.76rem, 1.2vw, 0.88rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--green);
  text-decoration: none;
  padding: 0.6rem 1.4rem;
  border: none;
  border-bottom: 1px solid rgba(10,173,72,0.3);
  border-radius: 0;
  background: transparent;
  transition: all 0.35s ease;
  position: relative;
}

.btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--green);
  box-shadow: 0 0 6px rgba(10,173,72,0.4),
              0 0 16px rgba(10,173,72,0.15);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.btn:hover {
  color: var(--green-bright);
  text-shadow: 0 0 14px rgba(10,173,72,0.3);
}

.btn:hover::after { opacity: 1; }

.btn svg {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover svg { transform: translateX(3px); }

/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
.foot {
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 480px) {
  .page { padding: 2rem 1.25rem; }
  .bg-wave img { width: 85vw; opacity: 0.1; }
  .bg-light { width: 400px; }
  .tab { padding: 0.5rem clamp(0.5rem, 3vw, 0.8rem); }
}

@media (max-width: 370px) {
  .tab {
    font-size: 0.58rem;
    padding: 0.45rem 0.4rem;
    letter-spacing: 0.04em;
  }
  .logo { width: 140px; }
}

@media (min-height: 800px) and (max-width: 500px) {
  .logo { width: clamp(180px, 45vw, 240px); }
}

@media (min-width: 768px) and (min-height: 900px) {
  .logo { width: 300px; }
  .panel p { font-size: 1.1rem; }
  .service-item { font-size: 1.05rem; }
}

@media (min-width: 1200px) and (min-height: 800px) {
  .page { max-width: 680px; }
  .logo { width: 320px; }
  .panel p { font-size: 1.12rem; }
  .service-item { font-size: 1.08rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
