/* Layout and motion corrections following the desktop/mobile review. */

.header .mobile-nav {
  display: none;
}

/* Use a clip-path reveal so descenders never sit inside a cropped line box. */
.hero h1 span {
  overflow: visible;
  padding: 0;
  margin: 0;
}

.hero h1 b {
  animation: hero-rise-safe 1.05s var(--ease) both;
}

.hero h1 span:nth-child(2) b {
  animation-delay: 0.12s;
}

@keyframes hero-rise-safe {
  from {
    opacity: 0;
    transform: translateY(0.48em);
    clip-path: inset(0 0 45% 0);
  }
  to {
    opacity: 1;
    transform: none;
    clip-path: inset(-10% -2% -24% -2%);
  }
}

/* The idea section is a compact scene, not a scroll-distance spacer. */
.intro {
  height: auto;
  min-height: 0;
  padding: clamp(120px, 16vh, 190px) var(--pad);
}

.intro-stage {
  position: relative;
  top: auto;
  height: auto;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
}

.intro h2 b {
  transform: none !important;
}

.intro-copy {
  margin-top: clamp(30px, 4vw, 54px);
}

/* Keep portfolio rhythm purposeful and remove oversized gaps. */
.work {
  padding-top: clamp(110px, 15vh, 180px);
  padding-bottom: clamp(110px, 15vh, 180px);
}

.section-head {
  margin-bottom: clamp(100px, 14vh, 165px);
}

.project {
  margin-bottom: clamp(130px, 18vh, 210px);
}

.project-two {
  margin-bottom: 0;
}

/* Normal-flow process: no pinned scene and no artificial scroll capture. */
.process {
  height: auto;
  padding: clamp(120px, 17vh, 210px) var(--pad);
}

.process-stage {
  position: relative;
  top: auto;
  height: auto;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0;
  display: block;
  overflow: visible;
}

.process-heading {
  position: relative;
  left: auto;
  top: auto;
  max-width: 850px;
}

.process ol {
  position: relative;
  height: auto;
  margin: clamp(80px, 10vh, 120px) 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 70px);
}

.process li,
.process li.active,
.process li.past {
  position: relative;
  inset: auto;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-content: initial;
  opacity: 1;
  transform: none;
}

.process li[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s var(--ease), transform 0.85s var(--ease);
}

.process li[data-reveal].visible {
  opacity: 1;
  transform: none;
}

.process li:nth-child(2) { transition-delay: 0.07s; }
.process li:nth-child(3) { transition-delay: 0.14s; }
.process li:nth-child(4) { transition-delay: 0.21s; }

.viewer-controls small i {
  font-style: normal;
}

.mobile-hint {
  display: none;
}

.step {
  width: 40px;
  height: 40px;
}

.viewer-controls {
  grid-template-columns: auto 40px 1fr 40px 38px;
}

.range {
  min-height: 36px;
}

.process li > span {
  padding-top: 0;
  margin-bottom: auto;
}

.process h3 {
  font-size: clamp(42px, 4vw, 66px);
  line-height: 0.95;
}

.process li p {
  margin-top: 22px;
  font-size: 14px;
  line-height: 1.55;
}

.process-count {
  display: none;
}

.pricing {
  padding-top: clamp(120px, 17vh, 210px);
  padding-bottom: clamp(120px, 17vh, 210px);
}

.plans {
  margin-top: clamp(72px, 9vh, 112px);
  gap: clamp(18px, 2vw, 30px);
}

.plans article {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 680px;
  padding: clamp(30px, 3vw, 46px) clamp(28px, 3vw, 46px) 300px;
  border: 1px solid rgba(26, 23, 18, .055);
  border-radius: clamp(22px, 2.1vw, 32px);
  background:
    radial-gradient(circle at 50% calc(100% - 134px), var(--accent) 0 5px, rgba(187,116,72,.2) 6px 12px, transparent 13px),
    linear-gradient(145deg, #f0eee9 0%, #e7e4dc 100%);
  box-shadow: 0 26px 70px rgba(29, 25, 20, .055);
  transition: transform .55s var(--ease), box-shadow .55s var(--ease), border-color .55s var(--ease);
}

.plans article:nth-child(2) {
  background:
    radial-gradient(circle at 50% calc(100% - 134px), #161513 0 4px, rgba(22,21,19,.12) 5px 12px, transparent 13px),
    linear-gradient(145deg, #ebe8e0 0%, #dfdacf 100%);
}

.plans article::before,
.plans article::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: 25px;
  width: min(76%, 330px);
  aspect-ratio: 1.25;
  transform: translateX(-50%);
  pointer-events: none;
}

.plans article::before {
  border-radius: 50%;
  background: repeating-radial-gradient(ellipse at center, transparent 0 27px, rgba(187,116,72,.24) 28px 29px, transparent 30px 43px);
}

.plans article::after {
  background: repeating-conic-gradient(from 5deg at 50% 50%, transparent 0 28deg, rgba(59,52,44,.16) 29deg 30deg);
  -webkit-mask: radial-gradient(ellipse at center, transparent 0 16px, #000 17px 128px, transparent 129px);
  mask: radial-gradient(ellipse at center, transparent 0 16px, #000 17px 128px, transparent 129px);
}

.plans article > * {
  position: relative;
  z-index: 2;
}

.plans article > p {
  color: #5f5b54;
}

.plans h3 {
  margin-top: 24px;
  font-size: clamp(82px, 8vw, 122px);
}

.plans ul {
  margin: 36px 0 24px;
}

.plans li {
  color: #49463f;
  transition: color .3s ease, transform .4s var(--ease);
}

.plans a {
  width: fit-content;
  gap: 22px;
  padding: 8px 0 5px;
  border-top: 0;
  border-bottom: 1px solid rgba(23,21,18,.45);
  transition: color .3s ease, border-color .3s ease;
}

.plans article:hover,
.plans article:focus-within {
  transform: translateY(-7px);
  border-color: rgba(187,116,72,.22);
  box-shadow: 0 34px 86px rgba(29,25,20,.1);
}

.plans article:hover li,
.plans article:focus-within li {
  color: #26231f;
  transform: translateX(3px);
}

.plans a:hover,
.plans a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 900px) {
  .header .mobile-nav {
    display: flex !important;
  }
  .intro {
    padding-block: 120px;
  }

  .process-heading {
    position: relative;
    left: auto;
    top: auto;
  }

  .process ol {
    margin-top: 80px;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .menu {
    width: 44px;
    height: 44px;
  }

  .desktop-hint {
    display: none;
  }

  .mobile-hint {
    display: inline;
  }

  .step {
    width: 44px;
    height: 44px;
  }

  .viewer-controls {
    grid-template-columns: 44px 1fr 44px 34px;
  }

  .range {
    min-height: 44px;
  }
  .hero {
    height: 112svh;
    min-height: 720px;
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(0,0,0,.08) 0%, rgba(0,0,0,.16) 52%, rgba(0,0,0,.72) 100%),
      linear-gradient(90deg, rgba(0,0,0,.38), transparent 72%);
  }

  #webCanvas {
    opacity: 1;
    filter: saturate(1.2) drop-shadow(0 0 18px rgba(187,116,72,.1));
  }

  .hero-inner {
    justify-content: flex-start;
    padding-top: calc(var(--header) + 66px);
    padding-bottom: 28px;
  }

  .hero h1 {
    margin-top: 38px;
    font-size: clamp(54px, 15.5vw, 72px);
    line-height: .9;
  }

  .hero-foot {
    margin-top: auto;
    align-items: flex-end;
  }

  .hero-foot p {
    max-width: 205px;
    color: rgba(255,255,255,.72);
  }

  .intro {
    padding-top: 112px;
    padding-bottom: 86px;
    background: linear-gradient(180deg, var(--black) 0, var(--white) 78px);
  }

  .intro-copy {
    width: 100%;
    margin-top: 26px;
  }

  .thread {
    height: 2px;
    background: transparent;
  }

  .thread i {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent) 24%, rgba(187,116,72,.18));
  }

  .work {
    padding-top: 86px;
    padding-bottom: 76px;
    background: linear-gradient(180deg, var(--white) 0%, var(--white) calc(100% - 82px), var(--black) 100%);
  }

  .section-head {
    margin-bottom: 90px;
  }

  .project {
    margin-bottom: 120px;
  }

  .project.project-two {
    margin-bottom: 0;
  }

  .process {
    height: auto;
    padding-top: 84px;
    padding-bottom: 104px;
    background: linear-gradient(180deg, var(--black) 0%, var(--black) calc(100% - 88px), var(--white) 100%);
  }

  .process-stage {
    padding-top: 0;
  }

  .process-heading {
    position: relative;
    top: auto;
  }

  .process ol {
    height: auto;
    margin-top: 70px;
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .process li,
  .process li.active,
  .process li.past {
    min-height: 0;
    display: grid;
    grid-template-columns: 36px 1fr;
  }

  .process li > span {
    margin-bottom: 0;
  }

  .process h3 {
    font-size: 46px;
  }

  .process li p {
    margin-top: 14px;
  }

  .pricing {
    padding-top: 82px;
    padding-bottom: 104px;
    background: linear-gradient(180deg, var(--white) 0%, var(--white) calc(100% - 88px), var(--black) 100%);
  }

  .plans {
    margin-top: 58px;
    gap: 22px;
  }

  .plans article {
    min-height: 610px;
    padding: 28px 24px 245px;
    border-radius: 24px;
  }

  .plans article::before,
  .plans article::after {
    bottom: 18px;
    width: min(84%, 300px);
  }

  .plans h3 {
    margin-top: 19px;
    font-size: clamp(76px, 23vw, 100px);
  }

  .plans ul {
    margin: 28px 0 18px;
  }

  .care {
    margin-top: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .process li[data-reveal] {
    opacity: 1;
    transform: none;
  }
}
