:root {
  --bg: #070b16;
  --bg-raise: rgba(255, 255, 255, 0.08);
  --bg-soft: rgba(255, 255, 255, 0.05);
  --ink: #ffffff;
  --muted: #c5cbe0;
  --faint: #9aa3bd;
  --line: rgba(255, 255, 255, 0.22);
  --gold: #f8c810;
  --gold-text: #f8c810;
  --blue: #183888;
  --navy: #070b16;
  --header-h: 72px;
  --header: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(7, 11, 22, 0.42));
  --glass: linear-gradient(165deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06) 42%, rgba(24, 56, 136, 0.22));
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 16px 40px rgba(0, 0, 0, 0.22);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --danger: #ffb4b4;
  --ok: #b7f3c8;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #eef2fb;
  --bg-raise: rgba(255, 255, 255, 0.62);
  --bg-soft: rgba(255, 255, 255, 0.45);
  --ink: #10192d;
  --muted: #3d4d68;
  --faint: #5c6d88;
  --line: rgba(255, 255, 255, 0.8);
  --gold: #f8c810;
  --gold-text: #8a6408;
  --header: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.5));
  --glass: linear-gradient(165deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42));
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 14px 34px rgba(24, 56, 136, 0.08);
  --shadow: 0 16px 40px rgba(24, 56, 136, 0.08);
  --danger: #9f1d1d;
  --ok: #0f6b32;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  position: relative;
  margin: 0;
  padding-top: var(--header-h);
  overflow-x: clip;
  font-family: "Space Grotesk", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

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

a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--gold);
  color: #1b1604;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-weight: 700;
}

.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.wrap {
  width: min(1180px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  min-height: var(--header-h);
  backdrop-filter: blur(22px) saturate(1.6);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  background: var(--header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  margin-right: auto;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
}

.brand-name {
  font-family: "Chakra Petch", sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.brand-name small {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  color: var(--faint);
  letter-spacing: 0.04em;
  font-size: 0.72rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav a, .text-btn, .theme-btn {
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  color: #d6d6d6;
  cursor: pointer;
  font-size: 0.95rem;
}

html[data-theme="light"] .nav a,
html[data-theme="light"] .text-btn,
html[data-theme="light"] .theme-btn { color: #2a2a2a; }

.nav a:hover, .nav a[aria-current="page"], .text-btn:hover, .theme-btn:hover {
  color: var(--ink);
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  flex: none;
}
.theme-btn svg { width: 18px; height: 18px; }
html[data-theme="light"] .icon-sun { display: none; }
html:not([data-theme="light"]) .icon-moon { display: none; }

.menu-btn { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
}

.btn-gold {
  background: linear-gradient(180deg, #ffe56a 0%, #f8c810 52%, #e2b000 100%);
  color: #1b1604;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 10px 24px rgba(248, 200, 16, 0.28);
}
.btn-gold:hover { filter: brightness(1.06); }
.btn.header-cta, .btn-line {
  background: var(--glass);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn.header-cta {
  border-radius: 999px;
  padding: 0.55rem 1rem;
}
html[data-theme="light"] .btn.header-cta,
html[data-theme="light"] .btn-line { border-color: rgba(255, 255, 255, 0.9); }
.btn.header-cta:hover, .btn-line:hover { border-color: rgba(248, 200, 16, 0.8); }

.hero, .section { scroll-margin-top: calc(var(--header-h) + 8px); }
.hero { padding: 4.75rem 0 1.5rem; }
.tech-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.tech-dots,
.tech-sparks {
  position: absolute;
  inset: 0;
}
.tech-dots, .tech-sparks { display: none; }
.tech-field::before,
.tech-field::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}
.tech-field::before {
  width: min(760px, 70vw);
  height: min(760px, 70vw);
  top: -10vh;
  right: -8vw;
  background: radial-gradient(circle, rgba(248, 200, 16, 0.34), transparent 68%);
  filter: blur(6px);
  animation: glow-drift 18s ease-in-out infinite alternate;
}
.tech-field::after {
  width: min(860px, 80vw);
  height: min(860px, 80vw);
  left: -18vw;
  bottom: -20vh;
  background: radial-gradient(circle, rgba(24, 56, 136, 0.72), transparent 70%);
  filter: blur(8px);
  animation: glow-drift 24s ease-in-out infinite alternate-reverse;
}
html[data-theme="light"] .tech-field::before {
  background: radial-gradient(circle, rgba(248, 200, 16, 0.45), transparent 68%);
}
html[data-theme="light"] .tech-field::after {
  background: radial-gradient(circle, rgba(24, 56, 136, 0.22), transparent 70%);
}
main, .site-footer { position: relative; z-index: 1; }
@keyframes glow-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(36px, 28px, 0); }
}

.hero-grid, .split, .contact-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.kicker {
  margin: 0 0 0.85rem;
  color: var(--gold-text);
  font-family: "Chakra Petch", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

h1, h2, h3, .font-heading { font-family: "Chakra Petch", sans-serif; }

h1 {
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 4.35rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.lede {
  margin: 1.25rem 0 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.12rem;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }

.hero-photo, .project-photo, .frame {
  display: grid;
  place-items: center;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: var(--glass-edge), 0 0 40px rgba(24, 56, 136, 0.25);
  aspect-ratio: 16 / 10;
  padding: 0.35rem 0.6rem;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}

.project .project-photo { aspect-ratio: 16 / 11; }

.mark {
  width: 100%;
  height: auto;
  display: block;
  color: #f8c810;
  --mark-soft: #7aa2f7;
  --mark-faint: rgba(255, 255, 255, 0.28);
}

html[data-theme="light"] .mark {
  color: #183888;
  --mark-soft: #8a6408;
  --mark-faint: rgba(16, 25, 45, 0.22);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 3.5rem;
  background: transparent;
  border: 0;
  border-top: 0;
  border-radius: 0;
  overflow: visible;
  padding-top: 0.4rem;
}

.metrics article, .panel, .service, .step, .project, .org {
  background: var(--bg-raise);
}
.metrics article {
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  box-shadow: var(--glass-edge);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

.metrics article { padding: 1.1rem 1.2rem; }
.metrics strong {
  display: block;
  font-family: "Chakra Petch", sans-serif;
  font-size: 1.7rem;
  line-height: 1;
}
.metrics span { color: var(--muted); font-size: 0.92rem; }

.section { padding: 5rem 0; }
.section-head { max-width: 40rem; margin-bottom: 2rem; }
#services .section-head, #method .section-head, #about .section-head {
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
}
.section-head h2, .contact-copy h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.section-head p, .contact-copy p { color: var(--muted); }

.orgs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.org {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  color: var(--muted);
  background: var(--glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.work-list, .services, .steps, .projects { display: grid; gap: 1rem; }
.services { grid-template-columns: repeat(4, 1fr); }
.steps { grid-template-columns: repeat(5, 1fr); }

.work-row, .project {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  background: var(--glass);
  box-shadow: var(--glass-edge);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

.work-row:nth-child(even) .project-photo { order: 2; }

.service, .step {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  padding: 1.35rem 1.2rem 1.4rem;
  background: var(--glass);
  box-shadow: var(--glass-edge);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

.service h3, .step h3, .project h2, .work-row h3 { margin: 0.2rem 0 0.45rem; letter-spacing: -0.02em; }
.service p, .step p, .project p, .work-row p { margin: 0; color: var(--muted); }
.index-no {
  font-family: "Chakra Petch", sans-serif;
  color: var(--gold-text);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
}

.index-table { width: 100%; border-collapse: collapse; }
.index-table a { text-decoration: none; }
.index-table tr { border-top: 1px solid var(--line); }
.index-table td { padding: 0.95rem 0.4rem; vertical-align: baseline; }
.index-table td:last-child { color: var(--faint); text-align: right; }
.index-table tr:hover td { color: var(--ink); }

.filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin: 1.4rem 0 1.2rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.filters button { color: var(--muted); }
.filters button[aria-pressed="true"] {
  background: linear-gradient(180deg, #ffe56a, #f8c810);
  color: #1b1604;
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.project { grid-template-columns: 280px 1fr; align-items: start; }
.project[hidden] { display: none; }
.meta { color: var(--faint); margin-bottom: 0.35rem; }

details { margin-top: 0.9rem; }
summary {
  cursor: pointer;
  color: var(--gold-text);
  font-weight: 600;
  width: fit-content;
}
.notes { margin: 0.8rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.55rem; }
.notes li { color: var(--muted); padding-left: 0.9rem; border-left: 2px solid var(--gold); }

.contact-grid { align-items: start; }
.phones { display: grid; gap: 0.7rem; margin: 1.2rem 0; }
.phones a, .mail-link {
  display: block;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  background: var(--glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.phones small, .mail-link small { display: block; color: var(--faint); }
.phones strong, .mail-link strong { font-family: "Chakra Petch", sans-serif; font-size: 1.15rem; }

form { display: grid; gap: 0.8rem; }
label span { display: block; margin-bottom: 0.35rem; color: var(--muted); font-size: 0.92rem; }
input, select, textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
}
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(24, 56, 136, 0.16);
}
textarea { min-height: 140px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.form-status { min-height: 1.4rem; margin: 0; }
.form-status.error { color: var(--danger); }
.form-status.ok { color: var(--ok); }
.panel {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 22px;
  padding: 1.35rem;
  box-shadow: var(--glass-edge);
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 6.5rem;
  color: var(--faint);
}
.footer-inner, .footer-links { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-links { justify-content: flex-end; }
.footer-links a { color: var(--muted); text-decoration: none; }

.whatsapp-btn {
  position: fixed;
  z-index: 14;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  background: #25d366;
  color: #06210f;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.whatsapp-btn svg { width: 20px; height: 20px; flex: none; }
.whatsapp-btn:hover { filter: brightness(1.05); }

@media (max-width: 1100px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .menu-btn { display: inline-flex; margin-left: auto; min-height: 42px; }
  .header-inner { min-height: var(--header-h); gap: 0.55rem; }
  .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
  .nav {
    display: none;
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    top: calc(var(--header-h) + 8px);
    z-index: 31;
    flex-direction: column;
    align-items: stretch;
    padding: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 18px;
    background: var(--glass);
    box-shadow: var(--glass-edge);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.9rem 1rem; font-size: 1.05rem; }
  .hero { padding: 2rem 0 1rem; }
  .section { padding: 2.75rem 0; }
  h1 { font-size: clamp(2.35rem, 11vw, 3.2rem); }
  .hero-grid, .split, .contact-grid, .work-row, .project, .services, .steps { grid-template-columns: 1fr; }
  .work-row:nth-child(even) .project-photo { order: 0; }
  .metrics { grid-template-columns: 1fr; }
  .header-cta { display: none; }
  .brand-name small { display: none; }
  .whatsapp-btn {
    left: 0.75rem;
    right: 0.75rem;
    bottom: max(0.75rem, env(safe-area-inset-bottom));
  }
  .site-footer { padding-bottom: calc(6.2rem + env(safe-area-inset-bottom)); }
  .actions .btn { width: 100%; }
  .index-table td { padding-right: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
