/* ==============================
   HERO
   ============================== */

.hero {
  position: relative;
  min-height: 560px;
  grid-template-columns: 44% 56%;
  background:
    radial-gradient(circle at 68% 58%, rgba(198, 161, 91, 0.14), transparent 25%),
    linear-gradient(180deg, #0A1726 0%, #07111F 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero__inner {
  width: var(--content);
  min-height: 465px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 48% 52%;
  align-items: stretch;
  position: relative;
}

.hero__copy {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 78px 0 70px;
  max-width: 560px;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.hero__eyebrow::before,
.hero__eyebrow::after {
  content: "";
  display: block;
  height: 1px;
  flex: 0 0 auto;
}

.hero__eyebrow::before {
  width: 24px;
  background: var(--accent-bright);
}

.hero__eyebrow::after {
  width: 58px;
  background: rgba(135, 130, 135, 0.58);
}

html.js .hero .hero__eyebrow::before,
html.js .hero .hero__eyebrow::after {
  transform: scaleX(0);
  transform-origin: left center;
}

html.js .hero.in-view .hero__eyebrow::before {
  transform: scaleX(1);
  transition: transform var(--t-enter) ease;
}

html.js .hero.in-view .hero__eyebrow::after {
  transform: scaleX(1);
  transition: transform var(--t-enter) ease calc(var(--t-enter) / 2);
}

.hero__title {
  margin: 0 0 24px;
  max-width: 560px;
  color: var(--cream);
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.055em;
  font-weight: 900;
}

.hero__title .blue {
  color: var(--blue-muted);
}

.hero__title .gold {
  color: var(--accent-bright);
}

.hero__text {
  max-width: 455px;
  color: var(--cream-muted);
  font-size: 14px;
  line-height: 1.76;
  margin: 0 0 28px;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.hero__socials {
  display: flex;
  gap: 22px;
  align-items: center;
  color: rgba(242, 234, 220, 0.86);
}

.hero__socials a {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  transition: color 180ms ease, transform 180ms ease;
}

.hero__socials a:hover {
  color: var(--accent-bright);
  transform: translateY(-2px);
}

.hero__socials svg {
  width: 19px;
  height: 19px;
  display: block;
}

.hero__visual {
  position: relative;
  min-height: 560px;
  overflow: hidden;
}

.portrait {
  position: absolute;
  z-index: 6;
  right: 275px;
  bottom: -12px;
  height: 540px;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: bottom right;
  filter: contrast(1.12) saturate(0.94) brightness(0.86);
}

.visual-block {
  position: absolute;
  z-index: 2;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

.visual-block--blue-back {
  width: 208px;
  height: 550px;
  left: 15px;
  bottom: 0;
  background: linear-gradient(180deg, rgba(101, 130, 170, 0.32), rgba(51, 70, 99, 0.20));
}

.visual-block--blue-front {
  width: 164px;
  height: 450px;
  left: -60px;
  bottom: 0;
  background: linear-gradient(180deg, rgba(242, 234, 220, 0.08), rgba(101, 130, 170, 0.18));
}

.visual-block--gold {
  width: 132px;
  height: 600px;
  right: 480px;
  bottom: 0;
  background: linear-gradient(180deg, rgba(198, 161, 91, 0.84), rgba(163, 81, 57, 0.72));
}

@keyframes glow-drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(14px, -10px, 0); }
}

.hero__glow {
  position: absolute;
  z-index: 1;
  animation: glow-drift 22s ease-in-out infinite;
  right: 205px;
  bottom: -70px;
  width: 480px;
  height: 300px;
  background: radial-gradient(circle, rgba(217, 154, 86, 0.28), transparent 62%);
  filter: blur(4px);
}

.hero__dots {
  position: absolute;
  z-index: 3;
  right: 280px;
  bottom: 240px;
  width: 190px;
  height: 145px;
  pointer-events: none;
  opacity: 0.55;
  overflow: hidden;
}

/* soft atmosphere behind the dots */
.hero__dots::before {
  content: "";
  position: absolute;
  inset: -90px;
  background:
    radial-gradient(circle at 45% 55%, rgba(217, 154, 86, 0.18), transparent 34%),
    radial-gradient(circle at 20% 35%, rgba(101, 130, 170, 0.15), transparent 38%);
  filter: blur(10px);
}

/* actual dot pattern */
.hero__dots::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    rgba(242, 234, 220, 0.58) 1px,
    transparent 1.8px
  );
  background-size: 24px 24px;
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    black 20%,
    black 78%,
    transparent 100%
  );
}

.hero__words {
  position: absolute;
  z-index: 5;
  top: 170px;
  right: 100px;
  padding-left: 22px;
  border-left: 1px solid rgba(198, 161, 91, 0.78);
  display: grid;
  gap: 9px;
  color: rgba(242, 234, 220, 0.78);
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ==============================
   CAPABILITIES
   ============================== */

.capabilities {
  position: relative;
  padding: var(--section-pad-top) 0 60px;
  background:
    radial-gradient(circle at 20% 0%, rgba(101, 130, 170, 0.16), transparent 34%),
    linear-gradient(180deg, #0E1B2B 0%, #0B1526 100%);
  border-bottom: 1px solid var(--line);
}

.capabilities__grid {
  width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  column-gap: 36px;
  row-gap: 48px;
}

.cap-card {
  position: relative;
}

.cap-card__num {
  display: block;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 11px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0.22em;
}

.cap-card__icon {
  width: 38px;
  height: 38px;
  color: rgba(242, 234, 220, 0.95);
  margin-bottom: 20px;
  transition: transform var(--t-hover) ease, color var(--t-hover) ease;
}

.cap-card:hover .cap-card__icon {
  transform: translateY(-2px);
  color: var(--accent-bright);
}

.cap-card__title {
  margin: 0 0 10px;
  color: var(--cream);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.cap-card__text {
  margin: 0;
  color: var(--cream-muted);
  font-size: 12px;
  line-height: 1.6;
}

/* --- Icon micro-interactions --- */

.icon-gear {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 520ms var(--ease-overshoot);
}

.cap-card:hover .icon-gear {
  transform: rotate(90deg);
}

.icon-layer-top,
.icon-layer-bottom {
  transition: transform 260ms ease;
}

.cap-card:hover .icon-layer-top {
  transform: translateY(-1.2px);
}

.cap-card:hover .icon-layer-bottom {
  transform: translateY(1.2px);
}

.cap-card:hover .icon-check {
  animation: cap-redraw 520ms ease 1;
}

@keyframes cap-redraw {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}

/* --- Scroll-triggered reveal (active only when JS is present) --- */

html.js .capabilities .cap-card__icon :is(path, rect, circle) {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

html.js .capabilities.in-view .cap-card {
  opacity: 1;
  transform: none;
  transition: opacity var(--t-enter) ease, transform var(--t-enter) ease;
  transition-delay: calc(var(--i) * var(--stagger));
}

html.js .capabilities.in-view .cap-card__icon :is(path, rect, circle) {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--t-draw) ease;
  transition-delay: calc(140ms + var(--i) * var(--stagger));
}

@media (prefers-reduced-motion: reduce) {
  html.js .capabilities .cap-card__icon :is(path, rect, circle) {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    transition: none;
  }

  .cap-card__icon,
  .icon-gear,
  .icon-layer-top,
  .icon-layer-bottom {
    transition: none;
  }

  .cap-card:hover .cap-card__icon,
  .cap-card:hover .icon-gear,
  .cap-card:hover .icon-layer-top,
  .cap-card:hover .icon-layer-bottom {
    transform: none;
  }

  .cap-card:hover .icon-check {
    animation: none;
  }

  html.js .hero .hero__eyebrow::before,
  html.js .hero .hero__eyebrow::after {
    transform: none;
    transition: none;
  }

  .hero__glow {
    animation: none;
  }

}

.mini-link {
  color: var(--blue-muted);
  font-size: 11px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 180ms ease, gap 180ms ease;
}

.mini-link:hover {
  color: var(--accent-bright);
  gap: 14px;
}

.mini-link.gold {
  color: var(--accent-bright);
}

/* ==============================
   PROJECTS
   ============================== */

.projects {
  position: relative;
  padding: var(--section-pad-top) 0 58px;
  background:
    radial-gradient(circle at 40% 0%, rgba(101, 130, 170, 0.10), transparent 30%),
    linear-gradient(180deg, #07111F 0%, #08131F 100%);
  border-bottom: 1px solid var(--line);
}

.projects__grid {
  width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(14, 27, 43, 0.92), rgba(10, 23, 38, 0.98));
  border: 1px solid rgba(242, 234, 220, 0.14);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  transition: transform var(--t-hover) ease, box-shadow var(--t-hover) ease, border-color var(--t-hover) ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.36);
  border-color: rgba(242, 234, 220, 0.26);
}

html.js .projects .project-card {
  opacity: 0;
  transform: translateY(14px);
}

html.js .projects.in-view .project-card {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--t-enter) ease,
    transform var(--t-enter) ease,
    box-shadow var(--t-hover) ease,
    border-color var(--t-hover) ease;
}

html.js .projects.in-view .project-card:nth-child(1) { transition-delay: 0ms; }
html.js .projects.in-view .project-card:nth-child(2) { transition-delay: var(--stagger); }
html.js .projects.in-view .project-card:nth-child(3) { transition-delay: calc(var(--stagger) * 2); }

.project-card__media {
  position: relative;
  height: 122px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(7, 17, 31, 0.92), rgba(18, 34, 56, 0.86)),
    radial-gradient(circle at 70% 50%, rgba(101, 130, 170, 0.3), transparent 38%);
  border-bottom: 1px solid rgba(242, 234, 220, 0.08);
}

.project-card__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(242, 234, 220, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 234, 220, 0.04) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.55;
}

.project-card__media.server::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(101, 130, 170, 0.26) 19px 22px, transparent 23px 46px),
    linear-gradient(90deg, transparent 0 38%, rgba(242, 234, 220, 0.34) 49%, transparent 60%),
    radial-gradient(circle at 50% 76%, rgba(217, 154, 86, 0.50), transparent 34%);
  opacity: 0.74;
}

.project-card__media.map::after {
  content: "";
  position: absolute;
  inset: 18px 28px;
  border-radius: 4px;
  border: 1px solid rgba(101, 130, 170, 0.28);
  background:
    radial-gradient(circle at 50% 50%, rgba(101, 130, 170, 0.34) 0 16px, transparent 17px),
    radial-gradient(circle at 68% 44%, rgba(242, 234, 220, 0.36) 0 3px, transparent 4px),
    linear-gradient(90deg, rgba(101, 130, 170, 0.12), rgba(242, 234, 220, 0.04));
  box-shadow: inset 0 0 46px rgba(101, 130, 170, 0.22);
}

.project-card__media.dashboard::after {
  content: "";
  position: absolute;
  inset: 18px 24px;
  border-radius: 5px;
  border: 1px solid rgba(101, 130, 170, 0.24);
  background:
    radial-gradient(circle at 22% 50%, transparent 0 17px, rgba(198, 161, 91, 0.9) 18px 23px, transparent 24px),
    linear-gradient(180deg, rgba(242, 234, 220, 0.12) 0 7px, transparent 8px),
    repeating-linear-gradient(90deg, transparent 0 20px, rgba(101, 130, 170, 0.28) 21px 24px);
  box-shadow: inset 0 0 42px rgba(101, 130, 170, 0.20);
}

.project-card__body {
  padding: 22px 24px 26px;
}

.project-card h3 {
  margin: 0 0 10px;
  color: var(--cream);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 850;
}

.project-card p {
  margin: 0;
  color: var(--cream-muted);
  font-size: 13px;
  line-height: 1.55;
}

/* ==============================
   ABOUT / STATS
   ============================== */

.about {
  position: relative;
  padding: var(--section-pad-top) 0 34px;
  background:
    radial-gradient(circle at 78% 50%, rgba(101, 130, 170, 0.14), transparent 28%),
    linear-gradient(180deg, #0A1726 0%, #07111F 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.about::after {
  content: "";
  position: absolute;
  right: 45px;
  bottom: -8px;
  width: 150px;
  height: 180px;
  opacity: 0.25;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(198, 161, 91, 0.8) 0 20px, transparent 21px),
    radial-gradient(ellipse at 54% 36%, rgba(198, 161, 91, 0.7) 0 18px, transparent 19px),
    radial-gradient(ellipse at 70% 53%, rgba(198, 161, 91, 0.68) 0 17px, transparent 18px),
    linear-gradient(122deg, transparent 0 49%, rgba(198, 161, 91, 0.88) 50% 52%, transparent 53%);
  transform: rotate(-18deg);
}

.about__inner {
  position: relative;
  z-index: 2;
  width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.95fr 1.55fr;
  align-items: center;
  gap: 64px;
}

.about__copy {
  max-width: 440px;
}

.about__title {
  margin: 0 0 13px;
  color: var(--cream);
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1.16;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.about__text {
  margin: 0;
  max-width: 390px;
  color: var(--cream-muted);
  font-size: 12px;
  line-height: 1.65;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-left: 1px solid var(--line);
}

.stat {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 0 28px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

html.js .about .about__copy,
html.js .about .stat {
  opacity: 0;
  transform: translateY(14px);
}

html.js .about.in-view .about__copy,
html.js .about.in-view .stat {
  opacity: 1;
  transform: none;
  transition: opacity var(--t-enter) ease, transform var(--t-enter) ease;
}

html.js .about.in-view .stat:nth-child(1) { transition-delay: var(--stagger); }
html.js .about.in-view .stat:nth-child(2) { transition-delay: calc(var(--stagger) * 2); }
html.js .about.in-view .stat:nth-child(3) { transition-delay: calc(var(--stagger) * 3); }

.stat svg {
  width: 34px;
  height: 34px;
  margin: 0 auto 12px;
  color: var(--blue-muted);
}

.stat__num {
  color: var(--cream);
  font-size: 35px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -0.04em;
  margin-bottom: 10px;
}

.stat__label {
  color: rgba(242, 234, 220, 0.82);
  font-size: 11px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ==============================
   CONTACT
   ============================== */

.contact {
  position: relative;
  padding: var(--section-pad-top) 0 40px;
  background:
    linear-gradient(90deg, rgba(217, 154, 86, 0.24), rgba(5, 10, 17, 0.18) 42%),
    linear-gradient(90deg, #2B2F37 0%, #151F2B 55%, #07111F 100%);
  overflow: hidden;
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0 50% 0 0;
  background:
    radial-gradient(circle at 24% 20%, rgba(217, 154, 86, 0.26), transparent 32%),
    linear-gradient(90deg, rgba(217, 154, 86, 0.12), transparent);
  pointer-events: none;
}

html.js .contact .contact__inner {
  opacity: 0;
  transform: translateY(14px);
}

html.js .contact.in-view .contact__inner {
  opacity: 1;
  transform: none;
  transition: opacity var(--t-enter) ease, transform var(--t-enter) ease;
}

.contact__inner {
  position: relative;
  z-index: 2;
  width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr;
  align-items: center;
  gap: 42px;
}

.contact__title {
  margin: 0;
  color: var(--accent-bright);
  font-size: clamp(21px, 2.2vw, 27px);
  line-height: 1.22;
  letter-spacing: -0.04em;
  font-weight: 500;
}

.contact__info {
  display: grid;
  gap: 12px;
  color: rgba(242, 234, 220, 0.78);
  font-size: 13px;
  line-height: 1;
}

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

.contact__row svg {
  width: 16px;
  height: 16px;
  color: rgba(242, 234, 220, 0.72);
  flex: 0 0 auto;
}

/* ==============================
   REDUCED MOTION — entrance states
   (kept last so these always win the cascade)
   ============================== */

@media (prefers-reduced-motion: reduce) {
  html.js .projects .project-card,
  html.js .about .about__copy,
  html.js .about .stat,
  html.js .contact .contact__inner {
    opacity: 1;
    transform: none;
    transition: none;
    transition-delay: 0ms;
  }

  .project-card,
  .project-card:hover {
    transform: none;
    transition: none;
  }
}
