/* ===== Altnets Portfolio ===== */

:root {
  --an-dark: #0a0a0a;
  --an-lime: #E0FD36;
  --an-teal: #009592;
  --an-deep: #095C64;
  --an-white: #FFFFFF;
  --an-orange: #F6AD71;
  --an-gray: #CECECE;
  --an-bg: #0C4A4E;
}

/* Hide loading/scroll placeholders from core template */
.loadingSection,
.scrollStartSection {
  display: none;
}

/* ===== GLOBAL ===== */

main {
  background: var(--an-bg);
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 80px 80px;
  overflow-x: clip;
  color: var(--an-white);
}

.an-section-label {
  font-family: 'Matter', sans-serif;
  font-size: clamp(0.75rem, 1vw, 0.875rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--an-lime);
  margin-bottom: 1.5rem;
}

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

.an-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  min-height: 600px;
  background: var(--an-deep);
  overflow: visible;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Grid overlay on hero (matching body grid) */
.an-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 80px 80px;
  z-index: 0;
  pointer-events: none;
}

/* Glow light — matching altnets.co.uk visual */
.an-hero__light {
  position: absolute;
  top: -20%;
  left: -15%;
  width: 90%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(180, 255, 253, 0.75) 0%, rgba(80, 245, 240, 0.45) 15%, rgba(0, 210, 208, 0.25) 30%, rgba(0, 149, 146, 0.1) 48%, transparent 62%);
  pointer-events: none;
  z-index: 1;
}

/* Snake SVG background — matching altnets.co.uk (scale 120%) */
.an-hero__snake {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: visible;
  pointer-events: none;
  transform: scale(1.2);
}

.an-hero__snake-path {
  stroke-dasharray: 3000;
  stroke-dashoffset: 3000;
  animation: snakeDraw 3s ease-out 0.5s forwards;
}

@keyframes snakeDraw {
  to { stroke-dashoffset: 0; }
}

/* Title */
.an-hero__title {
  position: relative;
  z-index: 2;
  text-align: center;
  pointer-events: none;
  width: 90%;
  max-width: 800px;
}

.an-hero__logo {
  width: 220px;
  height: auto;
  margin: 0 auto 2rem;
  display: block;
}

.an-hero__title h1 {
  font-family: 'Matter', sans-serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--an-white);
  margin: 0;
}

.an-hero__title h1 em {
  font-style: normal;
  color: var(--an-lime);
}

.an-hero__tagline {
  font-family: 'Matter', sans-serif;
  font-size: clamp(0.875rem, 1.5vw, 1.125rem);
  color: rgba(255,255,255,0.6);
  margin-top: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Scroll indicator */
.an-hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.4);
  font-family: 'Matter', sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  pointer-events: none;
  z-index: 2;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== OVERVIEW (2-col matching SE) ===== */

.an-overview {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.an-overview__left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.an-overview__logo {
  width: 180px;
  height: auto;
  margin-bottom: 0.5rem;
}

.an-overview__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.an-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.2);
  font-family: 'Matter', sans-serif;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.8);
}

.an-pill strong {
  color: var(--an-lime);
  font-weight: 600;
}

.an-overview__btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: var(--an-lime);
  color: var(--an-dark);
  font-family: 'Matter', sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  border-radius: 100px;
  transition: transform 0.2s, box-shadow 0.2s;
  align-self: flex-start;
}

.an-overview__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(224, 253, 54, 0.3);
}

.an-overview__right p {
  font-family: 'Matter', sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.25rem;
}

.an-overview__right p:last-child {
  margin-bottom: 0;
}

/* ===== SHOWCASE (video) ===== */

.an-showcase {
  padding: 0 2rem 6rem;
  max-width: 1200px;
  margin: 0 auto;
}

.an-showcase__browser {
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 20px 80px rgba(0,0,0,0.4);
}

.an-showcase__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: #222;
}

.an-showcase__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}

.an-showcase__url {
  margin-left: auto;
  font-family: 'Matter', sans-serif;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}

.an-showcase__browser video {
  width: 100%;
  height: auto;
  display: block;
}

.an-showcase__caption {
  font-family: 'Matter', sans-serif;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
  text-align: center;
  margin-top: 1.25rem;
}

/* ===== SCOPE ===== */

.an-scope {
  padding: 4rem 2rem 6rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.an-scope__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.an-scope__item {
  padding: 0.75rem 2rem;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.2);
  font-family: 'Matter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--an-white);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.an-scope__item:hover {
  background: var(--an-lime);
  color: var(--an-dark);
  border-color: var(--an-lime);
}

/* ===== WANTED ===== */

.an-wanted {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.an-wanted__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.an-wanted__img-wrap img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.an-wanted__text p {
  font-family: 'Matter', sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
}

/* ===== PHASE HEADERS ===== */

.an-phase {
  padding: 4rem 2rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.an-phase__num {
  display: inline-block;
  font-family: 'Matter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--an-lime);
  margin-bottom: 0.75rem;
}

.an-phase__title {
  font-family: 'Matter', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--an-white);
  margin: 0;
}

.an-phase__text {
  font-family: 'Matter', sans-serif;
  font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
  max-width: 700px;
  margin: 1.5rem auto 0;
}

/* ===== BRAND ===== */

.an-brand {
  padding: 4rem 2rem 6rem;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.an-brand__swatches {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.an-brand__swatch {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  display: flex;
  align-items: flex-end;
  padding: 6px;
  position: relative;
}

.an-brand__swatch span {
  font-family: 'Matter', sans-serif;
  font-size: 0.625rem;
  color: var(--an-dark);
  font-weight: 600;
}

.an-brand__swatch--light {
  border: 1px solid rgba(255,255,255,0.2);
}

.an-brand__fonts {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.an-brand__fonts img {
  width: 100%;
  max-width: 300px;
  height: auto;
  filter: brightness(0) invert(1);
}

/* ===== WIREFRAMES ===== */

.an-wireframes {
  padding: 2rem 2rem 6rem;
  max-width: 1200px;
  margin: 0 auto;
}

.an-wireframes__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.an-wireframes__card {
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,0.3);
}

.an-wireframes__card img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== ANIMATIONS (matching SE) ===== */

.an-animations {
  padding: 2rem 2rem 6rem;
  max-width: 1200px;
  margin: 0 auto;
}

.an-animations__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.an-animations__cell {
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,0.3);
}

.an-animations__cell video {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== BEFORE / AFTER ===== */

.an-before-after-wrap {
  padding: 4rem 2rem;
  height: 220vh;
}

.an-before-after {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.an-before-after__effect {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  width: 100%;
  max-width: 1100px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.4);
}

.an-before-after__figure {
  width: 100%;
}

.an-before-after__figure img {
  width: 100%;
  height: auto;
  display: block;
}

.an-before-after__figure--after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%);
}

.an-before-after__figure--after img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== FULL PAGE ===== */

.an-fullpage {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.an-fullpage img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* ===== UNIQUE ===== */

.an-unique {
  padding: 6rem 2rem;
  position: relative;
}

.an-unique__inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.an-unique__heading {
  font-family: 'Matter', sans-serif;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 500;
  line-height: 1.6;
  color: rgba(255,255,255,0.65);
}

.an-unique__heading em {
  font-style: normal;
  color: var(--an-lime);
  font-weight: 600;
}

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

.an-stats {
  padding: 4rem 2rem 6rem;
  max-width: 1200px;
  margin: 0 auto;
}

.an-stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.an-stats__card {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
}

.an-stats__num {
  display: block;
  font-family: 'Matter', sans-serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--an-lime);
}

.an-stats__label {
  display: block;
  font-family: 'Matter', sans-serif;
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.65);
  margin-top: 0.5rem;
}

/* ===== CTA ===== */

.an-cta {
  padding: 6rem 2rem;
  text-align: center;
}

.an-cta__inner {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.an-cta__bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: auto;
  opacity: 0.15;
  pointer-events: none;
}

.an-cta h2 {
  font-family: 'Matter', sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--an-white);
  position: relative;
  z-index: 1;
  margin: 0 0 2rem;
}

.an-cta__btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--an-lime);
  color: var(--an-dark);
  font-family: 'Matter', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 100px;
  position: relative;
  z-index: 1;
  transition: transform 0.2s, box-shadow 0.2s;
}

.an-cta__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(224, 253, 54, 0.3);
}

/* ===== TESTIMONIALS WRAPPER ===== */

.an-testimonials-wrap .portfolio-testimonials {
  background: var(--an-bg) !important;
}

/* ===== REVEAL ANIMATIONS ===== */

[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
  .an-overview {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .an-wanted__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .an-brand {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .an-wireframes__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .an-animations__grid {
    grid-template-columns: 1fr;
  }

  .an-stats__grid {
    grid-template-columns: 1fr;
  }

  .an-hero__light {
    width: 120%;
  }
}

@media (max-width: 480px) {
  .an-wireframes__grid {
    grid-template-columns: 1fr;
  }
}
