* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(37, 99, 235, 0.2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 24%),
    linear-gradient(180deg, #f7faff 0%, #eef4ff 100%);
  color: #1f2933;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, #0f172a, #172554);
  color: #ffffff;
  padding: 1.2rem 0;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  color: #ffffff;
  text-decoration: none;
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 0.03em;
  line-height: 1;
  flex: 1 1 260px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 420px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle-bar {
  display: block;
  width: 26px;
  height: 2px;
  margin: 0 auto;
  background-color: #ffffff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links a {
  position: relative;
  display: inline-block;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 2px;
  background-color: #60a5fa;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.28s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #bfdbfe;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.hero {
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.22), transparent 28%),
    linear-gradient(135deg, #dbeafe, #eff6ff);
  padding: 4rem 0;
}

.hero-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-text h1 {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(24px);
  animation: heroHeadlineIn 0.9s ease-out 0.15s forwards;
}

.hero-text > p:not(.tag) {
  font-size: 1.2rem;
  line-height: 1.7;
  color: #475569;
  max-width: 46ch;
  margin: 0 0 1.5rem;
}

.hero-punch {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1d4ed8;
  line-height: 1.35;
  margin: 0.25rem 0 1.5rem;
  max-width: 46ch;
}

.tag {
  color: #1d4ed8;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 16px rgba(59, 130, 246, 0.12);
}

.hero-card,
.card,
.work-highlight {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(147, 197, 253, 0.35);
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.08),
    0 0 0 rgba(59, 130, 246, 0);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.hero-card:hover,
.card:hover,
.work-highlight:hover,
.portfolio-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow:
    0 18px 36px rgba(15, 23, 42, 0.12),
    0 0 24px rgba(96, 165, 250, 0.12);
}

.section {
  padding: 3rem 0;
}

.reveal-section {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.alt-section {
  background:
    linear-gradient(180deg, rgba(219, 234, 254, 0.75), rgba(234, 242, 255, 0.95));
}

.section h2 {
  margin-top: 0;
  font-size: 2rem;
}

.card p,
.portfolio-card p {
  font-size: 1.02rem;
  line-height: 1.65;
  color: #475569;
}

.section-intro {
  max-width: 65ch;
  margin-bottom: 2rem;
  font-size: 1.1rem;
  line-height: 1.7;
  color: #475569;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.portfolio-card {
  margin: 0;
  background-color: #ffffff;
  border: 1px solid rgba(147, 197, 253, 0.3);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.08),
    0 0 0 rgba(59, 130, 246, 0);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.portfolio-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.gallery-image {
  cursor: pointer;
}

.portfolio-card:hover img {
  transform: scale(1.03);
  filter: saturate(1.05);
}

.portfolio-card figcaption {
  padding: 1rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.demo-button {
  align-self: flex-start;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  padding: 0.55rem 1rem;
}

.nav-demo-button {
  font-size: 0.9rem;
  padding: 0.45rem 1rem;
  box-shadow: none;
}

.portfolio-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.portfolio-card p {
  margin: 0;
}

.portfolio-card-wide {
  grid-column: 1 / -1;
}

.button {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.button:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.28);
  filter: brightness(1.03);
}

.secondary-button {
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  margin-top: 1rem;
}

.hidden-info {
  display: none;
  margin-top: 1rem;
}

.hidden-info.show {
  display: block;
}

.site-footer {
  background: linear-gradient(135deg, #0f172a, #172554);
  color: #ffffff;
  text-align: center;
  padding: 1.5rem 0;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.92);
  padding: 2rem;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.show {
  display: flex;
}

.lightbox img {
  max-width: min(1000px, 92vw);
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: #ffffff;
  color: #0f172a;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  font-size: 1rem;
}

/* ─── Intro Overlay ─────────────────────────────────────── */
body.intro-active {
  overflow: hidden;
}

#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  cursor: pointer;
}

#intro-panel-left,
#intro-panel-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: #0b0c0e;
  z-index: 1;
  transition: transform 0.85s cubic-bezier(0.76, 0, 0.24, 1);
}

#intro-panel-left {
  left: 0;
  border-right: 1px solid #1a1f28;
}

#intro-panel-right {
  right: 0;
}

#intro-overlay.split #intro-panel-left {
  transform: translateX(-100%);
}

#intro-overlay.split #intro-panel-right {
  transform: translateX(100%);
}

#intro-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: opacity 0.3s ease;
}

#intro-status {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  color: #4a5260;
  margin: 0;
  text-transform: uppercase;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

#lock-ring-wrapper {
  position: relative;
  width: 300px;
  height: 300px;
}

#rings-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#lock-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 70px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: filter 0.3s ease;
}

#lock-icon:hover {
  filter: drop-shadow(0 0 14px rgba(30, 144, 255, 0.65));
}

#lock-icon:hover .lock-body,
#lock-icon:hover .lock-shackle {
  stroke: #1e90ff;
}

.lock-body {
  fill: #0f1318;
  stroke: #3a4555;
  stroke-width: 1.5;
  transition: stroke 0.3s ease;
}

.lock-shackle {
  fill: none;
  stroke: #3a4555;
  stroke-width: 1.5;
  stroke-linecap: round;
  transition: stroke 0.3s ease;
}

.lock-hole {
  fill: #0b0c0e;
}

#intro-cta {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  color: #3a4555;
  margin: 0;
  text-transform: uppercase;
  animation: cta-pulse 2s ease-in-out infinite;
  transition: opacity 0.2s ease;
}

#progress-wrap {
  width: 240px;
  height: 1px;
  background: #1a1f28;
}

#progress-bar {
  height: 100%;
  width: 0;
  background: #1e90ff;
  box-shadow: 0 0 8px rgba(30, 144, 255, 0.55);
}

@keyframes cta-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

@keyframes spin-cw {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spin-ccw {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

/* ─── End Intro Overlay ──────────────────────────────────── */

@keyframes heroHeadlineIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .hero-text h1 {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .reveal-section {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .nav-links a::after {
    transition: none;
  }
}

@media (max-width: 768px) {
  .hero-content,
  .services-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2.5rem 0;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text > p:not(.tag) {
    font-size: 1.08rem;
  }

  .hero-punch {
    font-size: 1.2rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  .section h2 {
    font-size: 1.7rem;
  }

  /* ── Mobile navigation ── */
  .nav {
    flex-wrap: wrap;
    align-items: center;
  }

  .logo {
    font-size: 1.6rem;
    flex: 1 1 auto;
  }

  .nav-toggle {
    display: flex;
    flex: 0 0 auto;
  }

  .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.25rem;
    margin-top: 1rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links > li > a {
    display: block;
    padding: 0.75rem 0.25rem;
    font-size: 1.05rem;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-demo-button {
    text-align: center;
    margin-top: 0.5rem;
    padding: 0.7rem 1rem;
  }

  .portfolio-card img {
    height: 220px;
  }

  .lightbox {
    padding: 1rem;
  }

  .lightbox img {
    max-width: 95vw;
    max-height: 72vh;
  }

  /* ── Intro overlay on small screens ── */
  #intro-content {
    gap: 1.5rem;
    padding: 0 1rem;
  }

  #intro-status {
    font-size: 0.58rem;
    letter-spacing: 0.15em;
    text-align: center;
    max-width: 100%;
  }

  #lock-ring-wrapper {
    width: 220px;
    height: 220px;
  }

  #progress-wrap {
    width: 180px;
  }
}
