:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e5e7eb;
  --panel: rgba(255, 255, 255, 0.96);
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.12);
  --vh: 100vh;
  --primary: #0f172a;
}

html.dark {
  --bg: #020617;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
  --panel: rgba(2, 6, 23, 0.88);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --primary: #38bdf8;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand img {
  height: 80px;
}

@media (max-width: 768px) {
  .brand img {
    height: 72px;
  }
}

@media (max-width: 480px) {
  .brand img {
    height: 72px;
  }
}

.brand img:hover {
  transform: scale(1.05);
  opacity: 0.95;
}

#logo {
  transition: opacity 0.2s ease;
}

body {
  margin: 0;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: var(--vh);
  padding-top: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 32px 32px 31px;
}

#siteHeader {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(12px) saturate(1.2);
  transition:
    background 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

#siteHeader.scrolled {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  border-bottom-color: var(--border);
}

html.dark #siteHeader {
  background: rgba(2, 6, 23, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

html.dark #siteHeader.scrolled {
  background: rgba(2, 6, 23, 0.85);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 56px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--muted);
  position: relative;
  padding: 4px 0;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--text);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.nav a:hover::after {
  width: 100%;
}

html,
body {
  transition:
    background-color 0.35s ease,
    color 0.35s ease;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Menu Button */
#menuBtn {
  display: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s ease;
}

html.dark #menuBtn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

#menuBtn:hover {
  transform: scale(1.02);
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
}

.actions button {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
}

.actions button:hover {
  color: var(--text);
  transform: translateY(-1px);
  background: transparent;
  border: none;
  box-shadow: none;
}

html.dark .actions button {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

html.dark .actions button:hover {
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

#work,
#about,
#contact {
  scroll-margin-top: 110px;
}

.hero {
  margin-top: 120px;
  max-width: 900px;
}

.kicker {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
  margin: 16px 0 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-tagline {
  margin-top: 8px;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  line-height: 1.5;
  font-weight: 500;
  color: var(--muted);
  max-width: 720px;
}

.lead {
  font-size: 18px;
  max-width: 620px;
  color: var(--muted);
}

/* ===== Primary Buttons (Hero CTA) ===== */
.hero-actions {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-decoration: none;
  font-size: 16px;
  line-height: 1;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
  will-change: transform;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

html.dark .btn-primary {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.btn-tertiary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 16px;
  line-height: 1;
  color: var(--muted);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    color 0.2s ease;
}

.btn-tertiary:hover {
  transform: translateY(-2px);
  opacity: 0.9;
  color: var(--text);
}

.hero-micro {
  margin-top: 14px;
}

.portfolio {
  margin-top: 160px;
}

.portfolio h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 48px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.01);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-8px);
  border-color: var(--text);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  background: var(--bg);
}

html.dark .project-card:hover,
html.dark .project-card:focus-visible {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-card:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

.project-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.project-card p {
  color: var(--muted);
  line-height: 1.6;
}

.project-link {
  margin-top: auto;
  padding-top: 18px;
  font-weight: 500;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.project-card:hover .project-thumb img,
.project-card:focus-visible .project-thumb img {
  transform: scale(1.04);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tags span {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}

.contact {
  margin-top: 180px;
  padding-top: 120px;
  border-top: 1px solid var(--border);
}

.contact h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 24px;
}

.contact-actions {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.contact .section-lead {
  margin-bottom: 32px;
}

.contact .contact-actions {
  margin-top: 32px;
}

.contact-btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.contact-btn:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}

.contact-btn.secondary {
  color: var(--muted);
}

.contact-btn.primary {
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
  font-weight: 600;
}

html.dark .contact-btn.primary {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.contact-checklist {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.contact-checklist li {
  margin: 6px 0;
}

.cta-micro {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Animations ===== */

.services {
  margin-top: 160px;
}

.section-lead {
  max-width: 640px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 56px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.service-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}

.service-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--muted);
  line-height: 1.6;
}

.service-card ul {
  margin-top: 16px;
  padding-left: 18px;
}

.service-card li {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 6px;
}

.about {
  margin-top: 160px;
}

.about p {
  max-width: 680px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.about-micro {
  font-size: 14px;
  color: var(--muted);
}

.principles {
  margin-top: 160px;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.principle-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.principle-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.workflow {
  margin-top: 160px;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.workflow-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}

.workflow-card .step {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.workflow-card h3 {
  margin: 10px 0 8px;
}

/* ===== Pricing Snapshot (homepage guide) ===== */
.pricing-snapshot {
  margin-top: 46px;
}

.pricing-lead {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 70ch;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.price-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  background: rgba(0, 0, 0, 0.02);
}

html.dark .price-card {
  background: rgba(255, 255, 255, 0.03);
}

.price-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.price {
  margin: 6px 0 10px;
  font-size: 28px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.price-card p {
  margin: 0;
  color: var(--muted);
}

.mini-link {
  display: inline-flex;
  margin-top: 12px;
  font-weight: 600;
  text-decoration: none;
}

.pricing-meta {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

/* ===== Proof / Deliverables ===== */
.proof {
  margin-top: 140px;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.proof-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.02);
}

html.dark .proof-card {
  background: rgba(255, 255, 255, 0.03);
}

.proof-card h3 {
  margin: 0 0 8px;
}

.proof-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.proof-links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.trust {
  margin-top: 160px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 40px;
  align-items: stretch;
}

.trust-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  background: rgba(0, 0, 0, 0.02);

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 96px;
}

.project-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 18px;
  background: #f1f5f9;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

html.dark .project-thumb {
  background: #020617;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.project-card:hover .project-thumb img {
  transform: scale(1.04);
}

/* ================= Fullscreen Overlay ================= */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px) saturate(1.8);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

html.dark .menu-overlay {
  background: rgba(2, 6, 23, 0.98);
}

.menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

html.dark .close-btn {
  background: rgba(255, 255, 255, 0.1);
}

.close-btn:hover {
  transform: rotate(90deg);
  background: var(--text);
  color: var(--bg);
}

.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 32px;
  text-align: center;
}

.menu-link {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 750;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
  opacity: 0.6;
  letter-spacing: -0.02em;
}

.menu-link:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.menu-link.active {
  opacity: 1;
}

.menu-actions {
  margin-top: 56px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.menu-theme-btn {
  padding: 12px 24px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.menu-theme-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

html.dark .menu-theme-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ===== Mobile Polish (Refined) ===== */
@media (max-width: 900px) {
  #siteHeader .header-inner {
    padding: 0 20px;
  }

  #siteHeader .nav,
  #siteHeader .actions {
    display: none;
  }

  #siteHeader #menuBtn {
    display: inline-flex;
  }

  .container {
    padding: 20px;
  }

  h1 {
    font-size: 40px;
  }

  .hero-tagline {
    font-size: 1.05rem;
  }

  .hero {
    margin-top: 72px;
  }

  .start {
    margin-top: 100px;
  }

  .portfolio {
    margin-top: 120px;
  }

  .contact {
    margin-top: 120px;
    padding-top: 80px;
  }

  .parallax-bg {
    display: none;
  }

  .project-card {
    padding: 22px;
  }

  .contact-actions {
    flex-direction: column;
  }

  .contact-btn {
    text-align: center;
    width: 100%;
  }
}

.about {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  align-items: start;
}

.about-profile img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--border);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  image-rendering: -webkit-optimize-contrast;
  cursor: zoom-in;
  transition: transform 0.25s ease;
  object-position: center 20%;
}

.about-profile img:hover {
  transform: scale(1.03);
}

@media (max-width: 640px) {
  .about {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-profile img {
    margin: 0 auto 12px;
  }
}

/* ================= Image Zoom ================= */
.image-zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 20, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
  transition: opacity 0.25s ease;
}

.image-zoom-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.image-zoom-overlay img {
  max-width: min(90vw, 520px);
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.25s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ================= Footer ================= */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 160px;
  padding: 80px 0 40px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-tagline {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 300px;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 6px 12px;
  border-radius: 999px;
  width: fit-content;
}

.footer-status::before {
  content: "";
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.footer-column h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
  color: var(--text);
  font-weight: 600;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav a,
.footer-nav span {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
  width: fit-content;
  display: block;
}

.footer-nav a:hover {
  color: var(--text);
  transform: translateX(4px);
}

.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.footer-social a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.footer-social a:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.footer-bottom {
  max-width: 1200px;
  margin: 80px auto 0;
  padding: 32px 32px 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 968px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-brand {
    grid-column: span 2;
    margin-bottom: 20px;
  }
}

@media (max-width: 640px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: span 1;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ===== Parallax Style ===== */
.parallax-section {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  margin: 80px 0;
  padding: 80px 40px;
  background: var(--bg);
  border: 1px solid var(--border);
  z-index: 1;
}

.parallax-bg {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 140%;
  z-index: -1;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.05) 0%,
    rgba(2, 6, 23, 0) 100%
  );
  pointer-events: none;
  transition: transform 0.1s linear;
  will-change: transform;
}

html.dark .parallax-bg {
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.1) 0%,
    rgba(2, 6, 23, 0) 100%
  );
}

/* ===== Premium Hover Cards ===== */
.project-card,
.service-card,
.principle-card,
.workflow-card {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  transform: translateY(-8px);
}

html.dark .project-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ===== Footer Alignment Fix ===== */
.footer-nav-item {
  display: flex !important;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
  width: fit-content;
}

.footer-nav-item:hover {
  color: var(--text);
  transform: translateX(4px);
}

.footer-nav-item i {
  font-size: 16px;
  opacity: 0.7;
}

html.dark #siteHeader {
  background: rgba(2, 6, 23, 0.65);
}

#siteHeader.scrolled {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

html.dark #siteHeader.scrolled {
  background: rgba(2, 6, 23, 0.8);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* ===== Mobile Premium Header Polish ===== */
@media (max-width: 768px) {
  .header-inner {
    height: 64px;
    padding: 0 20px;
  }

  .nav {
    gap: 16px;
  }

  .nav a {
    font-size: 13px;
    letter-spacing: 0.01em;
  }

  .actions {
    gap: 10px;
  }

  .actions button {
    padding: 6px 14px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    height: 56px;
    padding: 0 16px;
    gap: 8px;
  }

  .nav {
    gap: 12px;
  }

  .nav a {
    font-size: 12px;
  }

  .actions {
    gap: 8px;
  }

  .actions button {
    padding: 5px 10px;
    font-size: 11px;
    letter-spacing: 0.02em;
  }

  .brand img {
    height: 64px;
  }
}

@media (max-width: 640px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .service-card {
    padding: 20px;
    border-radius: 14px;
  }

  .service-card h3 {
    font-size: 1.1rem;
  }

  .service-card p {
    font-size: 0.95rem;
  }

  .service-card li {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .parallax-section {
    padding: 20px;
  }

  .section-lead {
    margin-bottom: 30px;
  }

  .hero-actions {
    align-items: center;
    margin: 20px;
  }
}

/* Accessibility: skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 12px;
  z-index: 2000;
  color: var(--text);
  box-shadow: var(--shadow);
}

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

/* Mobile sticky CTA (conversion) */
.sticky-cta {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex;
  gap: 10px;
  z-index: 999;

  padding: 10px;
  border-radius: 14px;

  /* Light theme surface */
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.12);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html.dark .sticky-cta {
  /* Dark theme surface */
  background: rgba(2, 6, 23, 0.78);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.sticky-cta a {
  flex: 1;
  min-height: 48px;
  text-align: center;
  padding: 12px 10px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.sticky-cta a:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.35);
  outline-offset: 2px;
}

.sticky-cta .cta-primary {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid transparent;
}

/* Secondary: outline in light, subtle fill in dark */
.sticky-cta .cta-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

html.dark .sticky-cta .cta-secondary {
  background: rgba(255, 255, 255, 0.08);
}

/* Prevent content being hidden behind sticky CTA on mobile */
@media (max-width: 819px) {
  body {
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
  }
}

@media (min-width: 820px) {
  .sticky-cta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sticky-cta {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ✅ FIX: Mobile optimizations - kurangkan blur dan effects */
@media (max-width: 768px) {
  #siteHeader {
    backdrop-filter: blur(6px) saturate(1.1);
    -webkit-backdrop-filter: blur(6px) saturate(1.1);
  }

  .menu-overlay {
    backdrop-filter: blur(10px) saturate(1.2);
  }

  .project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
  }

  /* ✅ FIX: Disable semua parallax effects pada mobile */
  .parallax-bg {
    display: none !important;
  }

  /* ✅ FIX: Reduce motion untuk better performance */
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: opacity 0.3s ease !important;
  }
}

/* ✅ FIX: Reduced motion fallback untuk accessibility */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .parallax-bg {
    display: none !important;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.btn-emphasis {
  font-weight: 600;
}

.hero-actions-spaced {
  margin-top: 22px;
}

.portfolio-subtitle-spaced {
  margin-top: 64px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .trust-item {
    padding: 16px 14px;
    min-height: 84px;
  }

  .footer-bottom,
  .footer-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
  }
}

.scroll-top-btn {
  position: fixed;
  right: calc(24px + env(safe-area-inset-right));
  bottom: calc(24px + env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #111827;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
  touch-action: manipulation;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s ease;
}

.scroll-top-btn svg {
  width: 34px;
  height: 34px;
  display: block;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top-btn:hover {
  transform: translateY(-2px);
}

.scroll-top-btn:focus-visible {
  outline: none;
}

html.dark .scroll-top-btn {
  background: transparent;
  color: #ffffff;
  box-shadow: none;
}

@media (max-width: 819px) {
  .scroll-top-btn {
    right: calc(12px + env(safe-area-inset-right));
    bottom: calc(104px + env(safe-area-inset-bottom));
    width: 52px;
    height: 52px;
  }

  .scroll-top-btn svg {
    width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-top-btn {
    transition: none;
  }
}
