/* ==========================================================================
   home.css — Home page sections
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
  --intro: 2.9s;
  /* waits for the loader to finish splitting open */
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 48px) 0 88px;
  overflow: hidden;
}

/* faint diagonal lines — a nod to the slashes in the logo */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(115deg,
      transparent 0 96px,
      rgba(221, 220, 215, 0.035) 96px 97px);
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

.hero__eyebrow {
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) calc(var(--intro) + 0.1s) both;
}

.hero__title {
  margin-top: 22px;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 9vw, 8rem);
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--cream);
}

.hero__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.04em;
}

.hero__title .line>span {
  display: inline-block;
  transform: translateY(105%);
  animation: lineUp 1s var(--ease-out) calc(var(--intro) + var(--i) * 0.12s) forwards;
}

@keyframes lineUp {
  to {
    transform: translateY(0);
  }
}

/* outlined word for emphasis */
.hero__title em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--cream);
}

.hero__lead {
  max-width: 520px;
  margin-top: 28px;
  font-size: 1.08rem;
  color: var(--cream-80);
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) calc(var(--intro) + 0.5s) both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) calc(var(--intro) + 0.7s) both;
}

.hero__meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(8px, 1.3vw, 18px);
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  font-size: clamp(0.62rem, 0.88vw, 0.74rem);
  font-weight: 700;
  letter-spacing: clamp(0.08em, 0.12vw, 0.12em);
  text-transform: uppercase;
  color: var(--cream-60);
  white-space: nowrap;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) calc(var(--intro) + 0.9s) both;
}

.hero__meta li {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.hero__meta li+li::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: clamp(8px, 1.3vw, 18px);
  background: var(--cream);
  opacity: 0.85;
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* Visual side: mouse-tilt wrapper */
.hero__visual {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1;
  justify-self: center;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s var(--ease-out);
}

.hero__halo {
  position: absolute;
  width: 92%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(221, 220, 215, 0.14), transparent 65%);
  animation: breathe 6s ease-in-out infinite;
}

@keyframes breathe {

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

  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

.hero__logo-float {
  position: relative;
  width: 84%;
}

.hero__logo {
  position: relative;
  width: 100%;
  height: auto;
  opacity: 0;
  filter: blur(12px);
  animation:
    heroLogoIn 1.4s var(--ease-out) calc(var(--intro) + 0.2s) forwards;
}

.hero__logo-float {
  animation: float 7s ease-in-out infinite;
}

.hero__logo-float .hero__logo {
  display: block;
}

/* Logo block tagline under VARKOD mark */
.hero__logo-caption {
  margin-top: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  opacity: 0;
  animation: heroLogoIn 1.2s var(--ease-out) calc(var(--intro) + 0.35s) forwards;
  max-width: 86%;
  margin-inline: auto;
}

.hero__logo-divider {
  display: block;
  width: min(110px, 32%);
  height: 1px;
  background: var(--cream-line);
  margin-bottom: 4px;
}

.hero__logo-tagline {
  margin: 0;
  font-family: var(--font-body);
  text-transform: uppercase;
  color: var(--cream);
  text-align: center;
  line-height: 1.35;
  white-space: nowrap;
}

.hero__logo-tagline--primary {
  font-size: clamp(0.62rem, 1.05vw, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.10em;
  color: var(--cream);
}

.hero__logo-tagline--secondary {
  font-size: clamp(0.52rem, 0.85vw, 0.65rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--cream-80);
}

@media (max-width: 600px) {
  .hero__logo-tagline--primary {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    white-space: normal;
  }

  .hero__logo-tagline--secondary {
    font-size: 0.50rem;
    letter-spacing: 0.14em;
  }
}

@keyframes heroLogoIn {
  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-14px) rotate(-1deg);
  }
}

/* Rotating circular badge */
.hero__badge {
  position: absolute;
  right: -24px;
  bottom: clamp(125px, 26%, 150px);
  width: 122px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  box-shadow: inset 0 0 0 1px var(--cream-line);
  z-index: 2;
}

.hero__badge-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 18s linear infinite;
}

.hero__badge-ring text {
  fill: var(--cream);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
}

.hero__badge-arrow {
  width: 34px;
  height: 34px;
  color: var(--cream);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  padding: 22px 0;
  border-block: 1px solid var(--cream-line);
  background: var(--cream-fill);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}

.marquee__track span {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--cream);
}

.marquee__dot {
  width: 10px;
  height: 10px;
  background: var(--cream);
  transform: rotate(45deg);
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Services ---------- */
.section {
  position: relative;
  padding: clamp(80px, 12vw, 140px) 0;
}

.section__head {
  max-width: 760px;
  margin-bottom: 56px;
}

.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--cream-line);
  border-left: 1px solid var(--cream-line);
}

.service {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 36px 28px 44px;
  border-right: 1px solid var(--cream-line);
  border-bottom: 1px solid var(--cream-line);
  transition: color 0.5s;
}

/* cream panel rises on hover */
.service::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--cream);
  transform: translateY(101%);
  transition: transform 0.6s var(--ease-out);
}

.service:hover::before {
  transform: translateY(0);
}

.service__index {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--cream-60);
  transition: color 0.5s;
}

.service__title {
  margin: 56px 0 14px;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color 0.5s;
}

.service__text {
  font-size: 0.95rem;
  color: var(--cream-80);
  transition: color 0.5s;
}

/* diagonal "slash" from the logo, grows on hover */
.service__line {
  position: absolute;
  top: 30px;
  right: 24px;
  width: 44px;
  height: 1.5px;
  background: var(--cream);
  transform: rotate(-45deg);
  transform-origin: right center;
  transition:
    width 0.6s var(--ease-out),
    background-color 0.5s;
}

.service:hover {
  color: var(--green);
}

.service:hover .service__index,
.service:hover .service__title,
.service:hover .service__text {
  color: var(--green);
}

.service:hover .service__line {
  width: 72px;
  background: var(--green);
}

/* ---------- Bento service card tags ---------- */
.bento__card {
  display: flex;
  flex-direction: column;
}

.bento__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;

  margin: auto 0 0;
  padding: 0;

  list-style: none;
}

.bento__tags::before,
.bento__tags::after,
.bento__tags li::before,
.bento__tags li::after {
  content: none !important;
  display: none !important;
}

.bento__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;

  margin: 0;
  padding: 8px 18px;

  border: 1px solid rgba(229, 226, 218, 0.28);
  border-radius: 999px;
  background: transparent;

  color: #e5e2da;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Why VARKOD ---------- */
.section--split {
  border-top: 1px solid var(--cream-line);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 64px;
}

.pillars {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pillar {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  padding: 28px 0;
  border-top: 1px solid var(--cream-line);
}

.pillar:last-child {
  border-bottom: 1px solid var(--cream-line);
}

.pillar__num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: var(--cream-60);
}

.pillar h3 {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pillar p {
  color: var(--cream-80);
}

/* ---------- Projects teaser ---------- */
.projects-teaser {
  padding: clamp(32px, 6vw, 72px);
  border: 1px solid var(--cream-line);
}

.projects-teaser__slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.slot {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  border: 1px dashed var(--cream-line);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-60);
  transition:
    border-color 0.5s,
    background-color 0.5s,
    color 0.5s;
}

.slot:hover {
  border-color: var(--cream);
  background: var(--cream-fill);
  color: var(--cream);
}

/* ---------- Call to action (cream band) ---------- */
.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(96px, 14vw, 160px) 0;
  background: var(--cream);
  color: var(--green);
}

.cta__inner {
  display: grid;
  justify-items: start;
}

.cta .eyebrow {
  color: rgba(42, 59, 25, 0.7);
}

.cta__title {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--green);
}

.cta .section__text {
  color: rgba(42, 59, 25, 0.85);
}

.cta__actions {
  margin-top: 36px;
}

.cta .btn--solid {
  background: var(--green);
  border-color: var(--green);
  color: var(--cream);
}

.cta .btn--solid:hover {
  background: transparent;
  color: var(--green);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding-bottom: 72px;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero__visual {
    max-width: 340px;
  }

  .hero__badge {
    width: 96px;
    right: -14px;
    bottom: 105px;
  }

  .hero__badge-arrow {
    width: 24px;
    height: 24px;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 640px) {
  .hero__meta {
    gap: 6px;
    font-size: clamp(0.48rem, 2.1vw, 0.60rem);
    letter-spacing: 0.05em;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .hero__meta::-webkit-scrollbar {
    display: none;
  }

  .hero__meta li+li::before {
    width: 4px;
    height: 4px;
    margin-right: 6px;
  }

  .hero__badge {
    width: 80px;
    right: -8px;
    bottom: 84px;
  }

  .services {
    grid-template-columns: 1fr;
  }

  .projects-teaser__slots {
    grid-template-columns: 1fr;
  }

  .slot {
    aspect-ratio: 16 / 7;
  }

  .hero__actions .btn,
  .cta__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .pillar {
    grid-template-columns: 48px 1fr;
  }

  .bento__tags {
    flex-wrap: wrap;
    gap: 10px 12px;
    margin-top: auto;
    padding: 0;
  }

  .bento__tag {
    font-size: 12px;
    padding: 8px 16px;
  }
}