/* ============================================================
   HEADER — GLOBAL + SUBPAGE
============================================================ */
header {
  width: 100%;
  padding-inline: 0;
}

/* Subpage header: 3‑zone layout */
body:not(.page-home) header {
  background-color: var(--header-bg);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 6px clamp(16px, 3vw, 40px);
}

.header-left {
  flex: 0.7;
  display: flex;
  align-items: center;
  min-width: 140px;
}

.header-center {
  flex: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-right {
  flex: 0.7;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

/* Logo sizes */
body:not(.page-home) .site-branding img {
  height: clamp(70px, 10vw, 110px);
  width: auto;
}

.header-ao-logo {
  width: clamp(70px, 10vw, 110px);
  height: clamp(70px, 10vw, 110px);
  border-radius: 50%;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

.header-ao-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-right .header-name {
  color: #ffffff !important;
  white-space: nowrap;
}

.intro-break {
  line-height: 1.8;
}

.spacer {
  height: 24px;
}

/* ============================================================
   NAVIGATION — CIRCLE NAV
============================================================ */
.circle-nav {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: clamp(30px, 4vw, 60px) 0;
  overflow: visible;
}

/* Scale nav as one unit */
.nav-scale-wrapper {
  display: inline-block;
  transform-origin: top center;
}

@media (max-width: 900px) {
  .nav-scale-wrapper {
    transform: scale(calc(100vw / 600));
  }
}

/* Yellow line behind circles */
.nav-circles {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
  white-space: nowrap;
}

/* Yellow line behind circles — anchored only to real circles */
.nav-circles {
  position: relative;
}

.nav-circles::before {
  content: "";
  position: absolute;
  top: 50%;
  height: 4px;
  background: var(--accent-yellow);
  border-radius: 2px;
  transform: translateY(-50%);
  z-index: 1;

  /* Start at center of first REAL circle (Home) */
  left: calc(clamp(52px, 4.5vw, 72px) / 2);

  /* End at center of last REAL circle */
  right: calc(clamp(52px, 4.5vw, 72px) / 2);
}

@media (min-width: 901px) {
  .nav-circles::before {
    left: clamp(52px, 4.5vw, 72px);
    right: clamp(52px, 4.5vw, 72px);
  }
}

/* Subpage circles */
.nav-circle {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  font-weight: bold;
  color: var(--dark-blue);

  width: clamp(52px, 4.5vw, 72px);
  height: clamp(52px, 4.5vw, 72px);

  border-radius: 50%;
  border: 3px solid var(--accent-lime);
  background-color: #DCEBB4;

  transition: transform 0.25s ease, background-color 0.25s ease;
}

/* Desktop nav text */
.circle-nav .nav-circle {
  font-size: clamp(8px, 0.55vw, 9px);
}

/* Home circle text */
.circle-nav .nav-circle.home {
  font-size: clamp(12px, 1.15vw, 26px);
}

/* Make ALL non-home nav text smaller on the HOME PAGE */
.page-home .nav-circle:not(.home) {
  font-size: clamp(20px, 1.15vw, 50px) !important;
}

/* Hover */
.nav-circle:hover {
  transform: scale(1.12);
  background-color: var(--accent-lime);
}

/* Home circle larger */
.nav-circle.home {
  transform: scale(1.25);
  font-weight: 700;
  margin-right: 10px;
}

/* Active page */
.page-illustration .nav-circle.illustration,
.page-logos        .nav-circle.logos,
.page-branding     .nav-circle.branding,
.page-home         .nav-circle.home,
.page-app          .nav-circle.app,
.page-animation    .nav-circle.animation,
.page-about-me     .nav-circle.about-me {
  pointer-events: none;
  transform: scale(1.12);
  background-color: var(--accent-lime);
  border-width: 4px;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.18);
}

body:not(.page-home) .nav-circle.home:hover {
  transform: scale(1.35);
}

/* Mobile circle sizes */
@media (max-width: 900px) {
  .nav-circle {
    width: 72px !important;
    height: 72px !important;
    font-size: 11px !important;
  }

  .nav-circle.home {
    width: 150px !important;
    height: 150px !important;
    font-size: 22px !important;
  }
}

.nav-circle.home {
  position: relative;
  z-index: 3;
}

.nav-circles::before {
  z-index: 1;
}

.nav-circle.nav-spacer {
  visibility: visible;
  pointer-events: none;
  width: clamp(70px, 5vw, 95px);
  height: clamp(70px, 5vw, 95px);
  transform: scale(2);

  background-color: var(--header-bg);
  border-color: transparent;
  z-index: 3;
}



/* ============================================================
   MEDIA ITEM + CAPTION
============================================================ */
.media-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 40px;
}

.media-caption {
  font-size: clamp(14px, 1.2vw, 18px);
  color: var(--dark-blue);
  text-align: center;
  font-weight: 300;
}

.home-what-i-do .media-caption {
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 500;
}

/* Larger category labels */
.branding-section-title {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  text-align: center;
  color: var(--dark-blue);
  margin-bottom: 10px;
}

/* Prevent clipping */
.media-item,
.media-grid--2col > .media-item,
.media-grid--3col > .media-item {
  overflow: visible;
}

/* ============================================================
   IMAGE WRAPPER + WATERMARK
============================================================ */
.image-wrapper {
  position: relative;
  width: 100%;
  overflow: visible;
  display: block;
}

.image-wrapper img {
  will-change: transform;
  transform: translateZ(0);
}

.protected-image {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

.overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: auto;
}

.watermark {
  position: absolute;
  inset: 0;
  background-image: url("images/watermark/your-watermark.png");
  background-repeat: repeat;
  background-size: 60%;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
  transform: rotate(38deg);
  background-position: 67% 67%;
  transition: opacity 0.3s ease;
}

@media print {
  .watermark {
    opacity: 0.72;
  }
}

.image-wrapper:hover .watermark {
  opacity: 0.05;
}

.image-wrapper.hover-zoom img {
  transition: transform 0.3s ease;
  will-change: transform;
  transform: translateZ(0);
}

.image-wrapper.hover-zoom:hover img {
  transform: scale(1.07);
}

.home-what-i-do .image-wrapper {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-what-i-do .image-wrapper img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

/* ============================================================
   CAROUSEL — ANIMATION PAGE
============================================================ */
.animation-carousel {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.carousel-stage {
  position: relative;
  width: 100%;
  max-width: 1200px;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 0;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-caption {
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--dark-blue);
  text-align: center;
  font-weight: 500;
  position: relative;
  z-index: 5;
}

.carousel-video {
  width: 400px;
  max-width: 1000px;
  max-height: 600px;
  object-fit: contain;
  border-radius: 10px;
  position: relative;
  z-index: 1;
}

.carousel-video.flour-sack {
  max-width: 900px !important;
  height: auto !important;
  width: auto !important;
}

.carousel-video.lower {
  transform: translate(-50%, 20px);
}

.carousel-video.raise-small {
  transform: translate(0, -20px);
}

.carousel-video.raise-med {
  transform: translate(0, -50px);
}

.carousel-controls {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 10;
}

.carousel-btn {
  background: var(--dark-blue);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  font-size: 24px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.carousel-btn:hover {
  background: #1a3a63;
  transform: translateY(-1px);
}

/* ============================================================
   FOOTER
============================================================ */
footer {
  width: 100%;
  margin: 0;
  padding: 20px 0;
  background-color: var(--header-bg);
  color: #fff;
  text-align: center;
}

/* ============================================================
   MOBILE HEADER + NAV (900px)
============================================================ */
@media (max-width: 900px) {

  .header-left,
  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .header-center {
    order: 3;
    margin-top: 8px;
  }

  .circle-nav {
    margin: 20px 0 0;
    justify-content: center;
    padding-inline: clamp(16px, 3vw, 40px);
  }

  .nav-circles {
    width: auto !important;
    max-width: none !important;
    gap: 16px !important;
    justify-content: center !important;
  }

  .nav-circles::before {
    width: 80%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 4px;
  }
}

/* ============================================================
   FIX MOBILE BREAKPOINT + AO LOGO DISTORTION (1100px)
============================================================ */
@media (max-width: 1100px) {

  .header-left,
  .header-right {
    width: auto !important;
    flex: 0 0 auto !important;
    justify-content: center !important;
  }

  .header-ao-logo {
    aspect-ratio: 1 / 1 !important;
    flex-shrink: 0 !important;
  }

  .header-center {
    order: 3;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 12px;
  }
}

/* ============================================================
   MOBILE HEADER — EXACT 2-ROW LAYOUT (900px)
============================================================ */
@media (max-width: 900px) {

  header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 10px;
  }

  .header-top-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: clamp(16px, 4vw, 40px);
  }

  .header-name {
    flex: 1;
    text-align: center;
    white-space: nowrap;
  }

  .header-left,
  .header-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
  }

  .header-center {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 4px;
  }
}

/* ============================================================
   FINAL DESKTOP HEADER RESTORE (OVERRIDES MOBILE)
============================================================ */
@media (min-width: 901px) {

  /* Force header back to one row */
  body:not(.page-home) header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  /* Disable the mobile 2-row wrapper */
  .header-top-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding-inline: 0 !important;
    margin: 0 !important;
  }

  /* Restore left zone */
  .header-left {
    flex: 0.7 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-width: 140px !important;
  }

  /* Restore center zone */
  .header-center {
    flex: 2 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    order: 0 !important;
    margin-top: 0 !important;
    width: auto !important;
  }

  /* Restore right zone */
  .header-right {
    flex: 0.7 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    min-width: 140px !important;
  }
}

/* ============================================================
   FIX: Disable header-top-row on desktop
============================================================ */
@media (min-width: 901px) {
  .header-top-row {
    display: contents !important;
  }
}

/* Force correct header order on desktop: ADL — NAV — AO */
@media (min-width: 901px) {
  .header-left {
    order: 1 !important;  /* ADL logo */
  }

  .header-center {
    order: 2 !important;  /* NAV */
  }

  .header-right {
    order: 3 !important;  /* AO + name */
  }
}

/* ============================================================
   FIX: Put ADL logo on the very top layer
   ============================================================ */
.header-left .site-branding {
  position: relative;
  z-index: 9999; /* ADL logo above everything */
}

/* Home circle above yellow line but below ADL logo */
.nav-circle.home {
  position: relative;
  z-index: 3;
}

/* Spacer above yellow line but below ADL logo */
.nav-circle.nav-spacer {
  position: relative;
  z-index: 3;
}

/* Yellow line stays behind everything */
.nav-circles::before {
  z-index: 1;
}

/* ============================================================
Interactive Prototype
   ============================================================ */

.interactive-prototype-section {
  text-align: center;
  margin-top: 80px;
}

.phone-mockup-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.phone-frame {
  position: relative;
  width: 1000px; /* adjust to match your mockup */
}

.phone-frame-image {
  width: 100%;
  display: block;
  position: relative;
  pointer-events: none;
  z-index: 3;
}

.phone-screen-embed {
  position: absolute;
  top: 9.9%;      /* lowered to match the thicker top bezel */
  left: 37.6%;     /* pulled inward to match left bezel */
  width: 24.66%;   /* narrower to match screen width */
  height: 79.82%;  /* shorter to match screen height */
  overflow: hidden;
  border-radius: 24px;
  z-index: 2;
  background: rgba(255, 0, 0, 0.3);
}

.xd-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 24px; /* match or slightly exceed */
  position: relative;
  z-index: 1;
}
