/* ==========================================================================
   PLNEXO — studio portfolio stylesheet
   Dark, Stellar-inspired design system. No framework, no build step.
   Accent palette is cyan→emerald, deliberately distinct from any sibling
   site. Order: tokens → font → reset → base → header → hero → stats →
   sections → cards → work → process → CTA → contact → footer → 404 →
   reveal animation → responsive → reduced motion
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #0A1216;
  --bg-elev: #0F1B21;
  --surface: rgba(15, 27, 33, 0.55);
  --border: rgba(148, 180, 184, 0.14);
  --border-strong: rgba(148, 180, 184, 0.25);

  --text: #E3EAEB;
  --text-muted: #93A8AC;
  --text-faint: #64787C;

  --accent-1: #0891B2;
  --accent-2: #14B8A6;
  --accent-3: #34D399;
  --grad: linear-gradient(115deg, var(--accent-1), var(--accent-2) 55%, var(--accent-3));

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --container: 1120px;
  --header-h: 72px;

  --shadow-glow: 0 0 40px rgba(20, 184, 166, 0.22);
  --font: "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Font ---------- */
@font-face {
  font-family: "Inter Variable";
  src: url("/static/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* ---------- Base ---------- */
body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 500px at 50% -150px, rgba(8, 145, 178, 0.14), transparent 70%);
  background-repeat: no-repeat;
  overflow-x: hidden;
}

h1, h2, h3 {
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h3 { font-size: 1.125rem; }

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: rgba(13, 148, 136, 0.45);
  color: #fff;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent-1);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-3);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.08);
}

/* ---------- Glows ---------- */
.glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(10px);
}

.glow-hero-1 {
  width: 720px;
  height: 720px;
  top: -280px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(8, 145, 178, 0.26), transparent);
}

.glow-hero-2 {
  width: 460px;
  height: 460px;
  top: 120px;
  right: -160px;
  background: radial-gradient(closest-side, rgba(52, 211, 153, 0.12), transparent);
}

.glow-features {
  width: 640px;
  height: 640px;
  top: -200px;
  left: -240px;
  background: radial-gradient(closest-side, rgba(20, 184, 166, 0.1), transparent);
}

.glow-cta {
  width: 520px;
  height: 520px;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.18), transparent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 24px rgba(13, 148, 136, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(13, 148, 136, 0.5);
}

.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: rgba(148, 180, 184, 0.06);
}

.btn-ghost:hover {
  border-color: var(--accent-2);
  background: rgba(13, 148, 136, 0.12);
}

.btn-light {
  background: #fff;
  color: #134E4A;
}

.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(2, 10, 12, 0.35);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.875rem;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.site-header.scrolled {
  background: rgba(10, 18, 22, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(115deg, #fff, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  gap: 28px;
  margin-inline: auto;
}

.site-nav a {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(148, 180, 184, 0.06);
}

.lang-switch a {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.lang-switch a:hover {
  color: #fff;
}

.lang-switch a.active {
  background: var(--grad);
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(64px, 12vw, 130px));
  padding-bottom: clamp(48px, 8vw, 90px);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

#stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 860px;
}

.hero h1 {
  margin-top: 22px;
}

.hero-sub {
  max-width: 620px;
  margin: 22px auto 0;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

/* ---------- Stats band ---------- */
.stats {
  padding-block: clamp(28px, 4vw, 48px);
  border-block: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}

.stat dd {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat dt {
  margin-top: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding-block: clamp(64px, 10vw, 110px);
}

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(15, 27, 33, 0.6) 18%, rgba(15, 27, 33, 0.6) 82%, transparent);
  overflow: hidden;
}

.section-head {
  max-width: 640px;
  margin: 0 auto clamp(40px, 6vw, 64px);
  text-align: center;
}

.section-head h2 {
  margin-top: 14px;
}

.section-sub {
  margin-top: 14px;
  color: var(--text-muted);
}

.cards-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ---------- Service cards ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-elev), var(--bg-elev)) padding-box,
    linear-gradient(150deg, rgba(148, 180, 184, 0.28), rgba(148, 180, 184, 0.08) 45%, rgba(20, 184, 166, 0.35)) border-box;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(13, 148, 136, 0.14);
  color: var(--accent-3);
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.card h3 {
  font-size: 1.05rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  flex-grow: 1;
}

/* ---------- Work filter ---------- */
.work-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: clamp(32px, 5vw, 48px);
}

.work-filter button {
  padding: 8px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(148, 180, 184, 0.06);
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.work-filter button:hover {
  color: #fff;
  border-color: var(--accent-2);
}

.work-filter button.active {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
}

/* ---------- Work cards ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.work-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: rgba(20, 184, 166, 0.4);
  box-shadow: var(--shadow-glow);
}

.work-card.hidden {
  display: none;
}

.work-art {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

/* Abstract mockup backdrops per category — no real screenshots, by rule. */
.art-saas   { background: linear-gradient(135deg, #164E63, #0891B2 60%, #22D3EE); }
.art-edu    { background: linear-gradient(135deg, #134E4A, #0D9488 55%, #34D399); }
.art-biz    { background: linear-gradient(135deg, #1E3A5F, #0E7490 55%, #2DD4BF); }
.art-event  { background: linear-gradient(135deg, #14532D, #059669 55%, #6EE7B7); }
.art-data   { background: linear-gradient(135deg, #0C4A6E, #0284C7 55%, #38BDF8); }
.art-mobile { background: linear-gradient(135deg, #115E59, #14B8A6 60%, #5EEAD4); }

.work-art-panel {
  position: absolute;
  inset: 30px 24px -16px;
  border-radius: 10px 10px 0 0;
  background: rgba(10, 18, 22, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: none;
}

.work-art-icon {
  position: absolute;
  top: 52%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.85);
}

.shot-chrome {
  position: absolute;
  top: 12px;
  left: 18px;
  display: flex;
  gap: 6px;
  z-index: 1;
}

.shot-chrome span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.work-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  flex-grow: 1;
}

.work-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.work-head h3 {
  font-size: 1rem;
}

.work-body > p {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-grow: 1;
}

.work-stack {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

.tag {
  flex: none;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-3);
  background: rgba(13, 148, 136, 0.14);
  border: 1px solid rgba(13, 148, 136, 0.3);
}

/* ---------- Process ---------- */
.process-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}

.process-step {
  position: relative;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.25s ease;
}

.process-step:hover {
  border-color: rgba(20, 184, 166, 0.4);
}

.process-num {
  display: block;
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.process-step h3 {
  font-size: 1rem;
}

.process-step p {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  padding: clamp(48px, 8vw, 80px) 32px;
  border-radius: var(--radius-lg);
  background: var(--grad);
  text-align: center;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(13, 148, 136, 0.35);
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  max-width: 480px;
  margin: 14px auto 28px;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Contact ---------- */
.section-contact .section-head {
  margin-bottom: 32px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(15, 27, 33, 0.5);
  padding-block: clamp(40px, 6vw, 64px) 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer-brand p {
  margin-top: 16px;
  max-width: 320px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-col h3 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 0.925rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ---------- 404 ---------- */
.notfound {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
  overflow: hidden;
}

.notfound-code {
  font-size: clamp(4.5rem, 14vw, 8rem);
  font-weight: 800;
  line-height: 1;
}

.notfound-desc {
  color: var(--text-muted);
  max-width: 420px;
}

.notfound .btn {
  margin-top: 14px;
}

/* ---------- Scroll reveal ---------- */
/* Hiding rules only apply when JS is present (html.js), so content is
   always visible without JavaScript. */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--reveal-delay, 0s);
}

html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards-4,
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 40;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 12px 24px 20px;
    background: rgba(10, 18, 22, 0.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }

  .site-nav a {
    padding: 10px 0;
    font-size: 1rem;
  }

  .nav-open .site-nav {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .nav-open .site-header {
    background: rgba(10, 18, 22, 0.96);
    border-bottom-color: var(--border);
  }

  .nav-toggle {
    display: flex;
  }

  .header-cta {
    display: none;
  }

  .work-grid,
  .cards-4,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
