/* Base styles */
:root {
  /* Dark theme (default) */
  --bg-top: #0b1220;
  --bg-bottom: #0f172a;
  --bg: #0f172a;
  --header-bg: rgba(17, 24, 39, 0.8);
  --border: #1f2937;
  --card: #111827;
  --surface: #0b1324;
  --surface-2: #0b1324;
  --muted: #1f2937;
  --accent: #22d3ee;
  --text: #e5e7eb;
  --sub: #9ca3af;
  --ring: rgba(34, 211, 238, 0.4);
}

/* Light theme */
:root[data-theme="light"] {
  --bg-top: #f7fafc;
  --bg-bottom: #eef2f7;
  --bg: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.8);
  --border: #e5e7eb;
  --card: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7fafc;
  --muted: #e5e7eb;
  --accent: #0ea5e9;
  --text: #0f172a;
  --sub: #475569;
  --ring: rgba(14, 165, 233, 0.35);
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
    Noto Sans, sans-serif;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  color: var(--text);
}
body.no-scroll {
  overflow: hidden;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

/* Header / Nav */
.header {
  position: sticky;
  top: 0;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 140;
  box-shadow: 0 4px 10px rgba(2, 6, 23, 0.24);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
/* Make right controls (theme + hamburger) stay together on the right */
.nav > .theme-toggle { margin-left: auto; }
.nav > .hamburger { margin-left: 8px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.brand .logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background-image: url("../man.jpg");
  background-size: cover;
  background-position: center;
  outline: 1px solid #164e63;
  box-shadow: 0 6px 14px rgba(2, 6, 23, 0.5), 0 0 0 4px rgba(34, 211, 238, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.brand:hover .logo {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.6), 0 0 0 5px rgba(34, 211, 238, 0.12);
}
.menu {
  display: none;
  gap: 14px;
  align-items: center;
}
.menu a {
  position: relative;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--sub);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.menu a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #22d3ee, #0ea5e9);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}
.menu a.active,
.menu a:hover {
  color: var(--text);
  background: var(--surface-2);
  outline: 1px solid var(--border);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.06);
  transform: translateY(-1px);
}
.menu a.active::after,
.menu a:hover::after {
  transform: scaleX(1);
}

/* Mobile nav trigger */
.hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
  box-shadow: 0 0 0 0 var(--ring);
}
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: background .16s ease;
}
.hamburger span::before,
.hamburger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .22s ease, top .22s ease, opacity .22s ease;
}
.hamburger span::before { top: -6px; }
.hamburger span::after { top: 6px; }
.hamburger:hover { transform: translateY(-1px); box-shadow: 0 0 0 4px var(--ring); }
.hamburger:focus-visible { outline: 0; box-shadow: 0 0 0 4px var(--ring); }
/* Morph to X when sidebar open */
.hamburger.active span { background: transparent; }
.hamburger.active span::before { top: 0; transform: rotate(45deg); }
.hamburger.active span::after { top: 0; transform: rotate(-45deg); }

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.theme-toggle:hover {
  transform: translateY(-1px);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}
.theme-toggle .sun {
  display: none;
}
.theme-toggle[data-mode="light"] .sun {
  display: block;
}
.theme-toggle[data-mode="light"] .moon {
  display: none;
}

/* Hero */
.hero {
  padding: 64px 0 30px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
}
.card {
  position: relative;
  background: linear-gradient(180deg, var(--card), var(--surface));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 30px rgba(2, 6, 23, 0.18);
  transition: transform 0.24s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.24s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    rgba(34, 211, 238, 0.25),
    rgba(14, 165, 233, 0.05) 40%,
    rgba(34, 211, 238, 0.25)
  );
  opacity: 0;
  transition: opacity 0.24s ease;
  pointer-events: none;
  z-index: -1;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 36px rgba(2, 6, 23, 0.5);
}
.card:hover::before {
  opacity: 1;
}
.card .p {
  padding: 32px;
}
/* When element uses combined classes 'card p' (no inner .p) */
.card.p {
  padding: 32px;
}
.kicker {
  color: #93c5fd;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  margin-bottom: 8px;
}
.h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  margin: 0 0 10px;
}
.lead {
  color: var(--sub);
  font-size: 15px;
  line-height: 1.8;
}
.cta {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn .icn {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: -3px;
  margin-right: 8px;
}
.btn.primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #22d3ee, #0ea5e9);
  color: #062033;
  border-color: #155e75;
  box-shadow: 0 10px 20px rgba(34, 211, 238, 0.15);
}
.btn.primary::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -30%;
  width: 40%;
  height: 200%;
  transform: skewX(-25deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  filter: blur(3px);
  opacity: 0;
  transition: opacity 0.15s ease, left 0.6s ease;
}
.btn.primary:hover::after {
  opacity: 1;
  left: 140%;
}

/* Sections */
.section {
  padding: 48px 0;
}
.grid-3 {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
}
.feature {
  padding: 18px;
}
.feature h3 {
  margin: 8px 0 6px;
  font-size: 18px;
}
.feature p {
  color: var(--sub);
  font-size: 14px;
  line-height: 1.7;
}

/* Social buttons grid */
.social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.btn.is-social {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: 14px;
  font-weight: 600;
}
.btn.is-social .icn {
  margin-right: 8px;
}
@media (max-width: 520px) {
  .social-grid {
    grid-template-columns: 1fr;
  }
}

/* Footer */
.footer {
  margin-top: 36px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  color: var(--sub);
  text-align: center;
}

/* Form Page */
.form-wrap {
  padding: 28px;
}
fieldset {
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 18px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
legend {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.06);
}
.form-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  align-items: center;
}
.label {
  color: var(--sub);
  font-size: 14px;
}
.input,
.select,
.textarea,
.file {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline: 0;
  box-shadow: 0 0 0 0 var(--ring);
}
.input:focus,
.select:focus,
.textarea:focus,
.file:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 4px var(--ring);
}
.textarea {
  min-height: 110px;
  resize: vertical;
}
.inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 8px;
}
.option {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn.ghost {
  background: var(--surface);
  color: var(--sub);
}

/* Gallery */
.masonry {
  columns: 1 280px;
  column-gap: 16px;
}
.tile {
  break-inside: avoid;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin: 0 0 16px;
  overflow: hidden;
}
.tile .p {
  padding: 12px;
}
.tile h4 {
  margin: 6px 0 0;
  font-size: 15px;
}
.tile span {
  color: #9ca3af;
  font-size: 12px;
}

/* Utilities */
.sep {
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}
.note {
  color: #93c5fd;
  font-size: 12px;
}
.align-end {
  align-self: end;
}
.right {
  justify-content: flex-end;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .align-end {
    align-self: unset;
  }
}

/* Extra small screens: stack inline inputs and options to prevent overflow */
@media (max-width: 520px) {
  .inline { flex-direction: column; align-items: stretch; }
  .options { grid-template-columns: 1fr; }
}

/* Extra sections (Gallery layout like screenshots) */
.hero-cover {
  position: relative;
  min-height: 58vh;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.hero-cover .bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.65);
  transform: scale(1.03);
}
.hero-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.35));
  z-index: 0;
}
.hero-cover .inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 20px;
  text-align: center;
}
.hero-cover .title {
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.1;
  color: #e8f0ff;
  font-weight: 800;
  text-shadow: 0 6px 26px rgba(0, 0, 0, 0.6);
}
.hero-cover .subtitle {
  margin: 16px auto 0;
  color: #dbeafe;
  max-width: 760px;
  font-weight: 600;
}
.hero-cover .desc {
  margin: 18px auto 0;
  max-width: 860px;
  line-height: 1.8;
  color: #cfe0ff;
}

/* Page intro overlay */
.page-intro {
  position: fixed;
  inset: 0;
  background: radial-gradient(
      1200px 600px at 50% -10%,
      rgba(14, 165, 233, 0.15),
      transparent 60%
    ),
    var(--bg-top);
  z-index: 100;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.page-intro.hide {
  opacity: 0;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.show {
  opacity: 1;
  transform: none;
}

/* Full-screen loader (particles + progress) */
.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(
      1000px 600px at 50% -10%,
      rgba(34, 211, 238, 0.18),
      transparent 60%
    ),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loader.hide {
  opacity: 0;
  visibility: hidden;
}
.loader .panel {
  width: min(720px, 92%);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.3);
  padding: 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  max-height: 92vh;
  display: grid;
  gap: 12px;
}
.loader .logo {
  width: 78px;
  height: 78px;
  border-radius: 18px;
  margin: 0 auto 14px;
  background: url("../man.jpg") center/cover no-repeat;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.55), 0 0 0 6px rgba(34, 211, 238, 0.1);
}
.loader .title {
  font-size: clamp(26px, 5vw, 42px);
  font-weight: 800;
  margin: 0;
  color: var(--text);
}
.loader .subtitle {
  margin: 8px auto 12px;
  max-width: 520px;
  color: var(--sub);
}
.progress {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}
.progress .bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #0ea5e9);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.25);
  transition: width 0.3s ease;
}
.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.7);
  filter: blur(0.2px);
  animation: float 3s linear infinite;
}
@keyframes float {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  to {
    transform: translateY(-40px);
    opacity: 0;
  }
}

/* Back to Top */
#toTop {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.2);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
#toTop.show {
  opacity: 1;
  transform: translateY(0);
}

.wa-bar {
  margin-top: 18px;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
.wa-bar .row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.wa-bar .label {
  font-size: 22px;
  font-weight: 800;
}
.wa-bar .inline {
  flex: 1;
  justify-content: flex-end;
}
.wa-input {
  flex: 1;
  min-width: 220px;
}

.btn.orange {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #22d3ee, #0ea5e9);
  color: #062033;
  border-color: #155e75;
  box-shadow: 0 10px 20px rgba(34, 211, 238, 0.15);
}
.btn.orange::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -30%;
  width: 40%;
  height: 200%;
  transform: skewX(-25deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  filter: blur(3px);
  opacity: 0;
  transition: opacity 0.15s ease, left 0.6s ease;
}
.btn.orange:hover {
  filter: brightness(1.04);
}
.btn.orange:hover::after {
  opacity: 1;
  left: 140%;
}

.two-col {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
}
.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  color: var(--text);
  text-align: justify;
}
.side-card h4 {
  margin: 6px 0 10px;
}
.side-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--sub);
}
.side-card li {
  margin: 8px 0;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.list .item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  color: var(--text);
}
.list .item h4 {
  margin: 0 0 6px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
.contact-card .row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: center;
}
.contact-card .row + .row {
  margin-top: 10px;
}
.contact-card .actions {
  margin-top: 8px;
}

/* Justified paragraphs in content cards */
.card p,
.side-card p,
.list .item p {
  text-align: justify;
}

@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
  }
  .wa-bar .label {
    flex: 1 0 100%;
  }
}

/* Off-canvas sidebar */
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(2px);
  z-index: 95;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.backdrop.show {
  opacity: 1;
  visibility: visible;
}
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(84vw, 340px);
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}
.sidebar .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
}
.sidebar .links {
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 8px;
}
.sidebar .links a {
  padding: 12px;
  border-radius: 12px;
  color: var(--sub);
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
}
.sidebar .links a.active {
  color: var(--text);
}
.sidebar .links a:hover { transform: translateY(-1px); box-shadow: 0 0 0 4px var(--ring); color: var(--text); }
.sidebar .close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  transition: transform .16s ease, box-shadow .16s ease;
}
.sidebar .close:hover { transform: translateY(-1px); box-shadow: 0 0 0 4px var(--ring); }
.sidebar.show {
  transform: translateX(0);
}

/* Responsive: swap desktop menu with hamburger */
@media (max-width: 820px) {
  .menu { display: none; }
  .hamburger { display: inline-flex; }
}

/* Headings */
h1,
h2,
h3,
h4 {
  color: var(--text);
}
