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

:root {
  --accent: #0f5b4d;
}

.hero h1 span:nth-child(2) b {
  color: #2f806c;
}

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

.footer-contact {
  text-align: center;
}

.footer-contact small {
  display: block;
  margin-bottom: 7px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: 8px;
}

.footer-contact p {
  display: flex;
  gap: 16px;
  margin: 0;
}

.footer-contact a {
  transition: color .25s ease;
}

.footer-contact a:hover,
.footer-contact a:focus-visible {
  color: #fff;
}

/* 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%);
  }
}

/* Ambient web fields add depth without changing any section geometry. */
.intro,
.work,
.process,
.pricing {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.intro-stage,
.work > *,
.process-stage,
.pricing > * {
  position: relative;
  z-index: 1;
}

.intro::before,
.work::before,
.process::before {
  --ambient-web-opacity: .15;
  --ambient-web-line: rgba(15,91,77,.42);
  content: "";
  position: absolute;
  z-index: 0;
  width: min(58vw, 820px);
  aspect-ratio: 1.18;
  border-radius: 50%;
  background:
    repeating-radial-gradient(ellipse at center, transparent 0 28px, var(--ambient-web-line) 29px 30px, transparent 31px 44px),
    repeating-conic-gradient(from -4deg at center, transparent 0 31deg, var(--ambient-web-line) 32deg 32.4deg, transparent 33deg 45deg);
  -webkit-mask: radial-gradient(ellipse at center, transparent 0 5%, #000 5.5% 71%, transparent 71.5%);
  mask: radial-gradient(ellipse at center, transparent 0 5%, #000 5.5% 71%, transparent 71.5%);
  opacity: 0;
  clip-path: circle(0% at 50% 50%);
  pointer-events: none;
  animation: ambient-web-build 18s var(--ease) infinite;
  will-change: opacity, clip-path, transform;
}

.intro::before {
  top: -12%;
  right: -14%;
}

.work::before {
  top: 38%;
  right: auto;
  left: -21%;
  width: min(64vw, 900px);
  animation-delay: -6s;
  animation-duration: 21s;
}

.process::before {
  --ambient-web-opacity: .24;
  --ambient-web-line: rgba(47,128,108,.5);
  top: 12%;
  right: -17%;
  width: min(62vw, 900px);
  animation-delay: -11s;
  animation-duration: 20s;
}

@keyframes ambient-web-build {
  0%, 8% {
    opacity: 0;
    clip-path: circle(0% at 50% 50%);
    transform: rotate(-5deg) scale(.94);
  }
  45%, 72% {
    opacity: var(--ambient-web-opacity);
    clip-path: circle(78% at 50% 50%);
    transform: rotate(1deg) scale(1);
  }
  92%, 100% {
    opacity: 0;
    clip-path: circle(78% at 50% 50%);
    transform: rotate(5deg) scale(1.025);
  }
}

/* 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(15,91,77,.2) 6px 12px, transparent 13px),
    linear-gradient(145deg, #f0eee9 0%, #e7e4dc 100%);
  box-shadow: 0 26px 70px rgba(29, 25, 20, .055);
  cursor: pointer;
  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%);
}

.plan-web {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 285px;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  clip-path: circle(0% at 50% 52%);
  animation: plan-web-build 7s var(--ease) infinite;
}

.plan-web-small {
  left: 11%;
  right: 11%;
  width: 78%;
  height: 245px;
  bottom: 16px;
}

.plan-web-large {
  height: 300px;
  bottom: 0;
  animation-duration: 8.8s;
}

.plan-web-rings,
.plan-web-spokes {
  position: absolute;
  inset: 4%;
  display: block;
  pointer-events: none;
}

.plan-web-rings {
  border-radius: 50%;
  background: repeating-radial-gradient(ellipse at 50% 52%, transparent 0 19px, rgba(15,91,77,.5) 20px 21px, transparent 22px 34px);
}

.plan-web-spokes {
  background: repeating-conic-gradient(from -1deg at 50% 52%, rgba(77,62,51,.42) 0 .7deg, transparent .8deg 51.428deg);
  -webkit-mask: radial-gradient(ellipse at 50% 52%, transparent 0 5%, #000 5.5% 72%, transparent 72.5%);
  mask: radial-gradient(ellipse at 50% 52%, transparent 0 5%, #000 5.5% 72%, transparent 72.5%);
}

.plan-web-large .plan-web-rings {
  background: repeating-radial-gradient(ellipse at 50% 52%, transparent 0 15px, rgba(51,44,38,.4) 16px 17px, transparent 18px 28px);
}

.plan-web-large .plan-web-spokes {
  background: repeating-conic-gradient(from -1deg at 50% 52%, rgba(42,37,32,.46) 0 .62deg, transparent .72deg 27.692deg);
  -webkit-mask: radial-gradient(ellipse at 50% 52%, transparent 0 3.5%, #000 4% 76%, transparent 76.5%);
  mask: radial-gradient(ellipse at 50% 52%, transparent 0 3.5%, #000 4% 76%, transparent 76.5%);
}

.plan-web b {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 52%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 7px rgba(15,91,77,.12), 0 0 24px rgba(15,91,77,.34);
  transform: translate(-50%, -50%);
  animation: plan-web-pulse 1.9s ease-in-out infinite;
}

@keyframes plan-web-build {
  0% { opacity: 0; clip-path: circle(0% at 50% 52%); }
  7% { opacity: 1; }
  68% { opacity: 1; clip-path: circle(78% at 50% 52%); }
  86% { opacity: 1; clip-path: circle(78% at 50% 52%); }
  100% { opacity: 0; clip-path: circle(78% at 50% 52%); }
}

@keyframes plan-web-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(.82); }
  50% { transform: translate(-50%, -50%) scale(1.18); }
}

.plans article > *:not(.plan-web) {
  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);
}

.plan-details {
  display: flex;
  align-items: center;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  width: fit-content;
  gap: 22px;
  padding: 8px 0 5px;
  border-top: 0;
  border-right: 0;
  border-left: 0;
  border-bottom: 1px solid rgba(23,21,18,.45);
  font-size: 11px;
  transition: color .3s ease, border-color .3s ease;
}

.plan-details i {
  font-style: normal;
  font-size: 16px;
}

.plans article:hover,
.plans article:focus-within {
  transform: translateY(-7px);
  border-color: rgba(15,91,77,.24);
  box-shadow: 0 34px 86px rgba(29,25,20,.1);
}

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

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

body.plan-open {
  overflow: hidden;
}

.plan-dialog {
  width: min(1040px, calc(100vw - 48px));
  max-width: none;
  max-height: min(860px, calc(100svh - 48px));
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: #f3f1eb;
  color: var(--black);
  box-shadow: 0 40px 130px rgba(0,0,0,.32);
  overflow: hidden;
}

.plan-dialog::backdrop {
  background: rgba(5,5,5,.68);
  backdrop-filter: blur(12px);
}

.plan-dialog-shell {
  position: relative;
  max-height: min(860px, calc(100svh - 48px));
  padding: clamp(40px, 5vw, 72px);
  overflow-y: auto;
}

.plan-dialog-close {
  position: sticky;
  z-index: 5;
  top: 0;
  float: right;
  width: 42px;
  height: 42px;
  margin: -18px -18px 0 24px;
  border: 1px solid rgba(20,18,15,.16);
  border-radius: 50%;
  background: rgba(243,241,235,.88);
  color: var(--black);
  font: 300 23px/1 "Manrope", sans-serif;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.plan-dialog-head {
  max-width: 790px;
}

.plan-dialog-head .label {
  color: var(--accent);
}

.plan-dialog-head h3 {
  margin: 22px 0 0;
  font: 400 clamp(48px, 6vw, 82px)/.92 "Manrope", sans-serif;
  letter-spacing: -.065em;
}

.plan-dialog-head h3 em {
  color: var(--accent);
  font-style: normal;
}

.plan-dialog-head strong {
  display: block;
  margin-top: 22px;
  font: 400 26px/1 "Manrope", sans-serif;
}

.plan-dialog-head > p:last-child {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.plan-dialog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(38px, 6vw, 76px);
  margin-top: 52px;
}

.plan-dialog-grid h4 {
  margin: 0 0 22px;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 9px;
}

.plan-dialog-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-dialog-grid li {
  padding: 14px 0;
  border-top: 1px solid rgba(20,18,15,.12);
}

.plan-dialog-grid li b,
.plan-dialog-grid li span {
  display: block;
}

.plan-dialog-grid li b {
  font-size: 13px;
  font-weight: 500;
}

.plan-dialog-grid li span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.plan-limit {
  margin: 22px 0 0;
  padding: 18px;
  border-radius: 14px;
  background: #e8e4da;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.plan-limit b {
  display: block;
  margin-bottom: 4px;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 8px;
}

.plan-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 46px;
}

.plan-dialog-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 0;
  padding: 18px 22px;
  border-radius: 99px;
  background: var(--black);
  color: #fff;
  font-size: 11px;
  transition: background .3s ease;
}

.plan-dialog-cta:hover,
.plan-dialog-cta:focus-visible {
  background: var(--accent);
}

.plan-dialog-cta-email {
  border: 1px solid rgba(20,18,15,.18);
  background: transparent;
  color: var(--black);
}

.plan-dialog-cta-email:hover,
.plan-dialog-cta-email:focus-visible {
  border-color: var(--accent);
  color: #fff;
}

.plan-dialog-cta i {
  font-style: normal;
  font-size: 17px;
}

@media (max-width: 900px) {
  .header {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
  }

  .header .header-cta {
    display: inline-flex;
    justify-self: end;
    white-space: nowrap;
    padding: 9px 12px;
    font-size: 8px;
  }

  .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;
  }

  .header .header-cta {
    padding: 8px 10px;
  }

  .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;
  }

  .intro::before,
  .work::before,
  .process::before {
    width: 760px;
    max-width: none;
  }

  .intro::before {
    top: 0;
    right: -470px;
  }

  .work::before {
    top: 42%;
    left: -510px;
  }

  .process::before {
    top: 12%;
    right: -500px;
  }

  .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(15,91,77,.14));
  }

  .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(15,91,77,.2));
  }

  .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;
  }

  .plan-web {
    height: 245px;
  }

  .plan-web-small {
    left: 8%;
    right: 8%;
    width: 84%;
    height: 215px;
    bottom: 12px;
  }

  .plan-web-large {
    height: 255px;
  }

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

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

  .care {
    margin-top: 32px;
  }

  .plan-dialog {
    width: 100%;
    max-height: 92svh;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
  }

  .plan-dialog-shell {
    max-height: 92svh;
    padding: 34px 22px 38px;
  }

  .plan-dialog-close {
    margin: -13px -3px 0 18px;
  }

  .plan-dialog-head h3 {
    font-size: clamp(42px, 12.5vw, 58px);
  }

  .plan-dialog-grid {
    grid-template-columns: 1fr;
    gap: 34px;
    margin-top: 38px;
  }

  .plan-dialog-actions {
    position: sticky;
    z-index: 5;
    bottom: 0;
    grid-template-columns: 1fr;
    padding-top: 10px;
    background: linear-gradient(180deg, rgba(243,241,235,0), #f3f1eb 14px);
  }

  footer {
    grid-template-columns: 1fr auto;
    gap: 22px 14px;
    padding-block: 30px;
  }

  .footer-contact {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: left;
  }

  .footer-contact p {
    flex-direction: column;
    gap: 5px;
  }
}

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

  .plan-web {
    opacity: .86;
    clip-path: circle(78% at 50% 52%);
    animation: none;
  }

  .plan-web b {
    animation: none;
  }

  .intro::before,
  .work::before,
  .process::before {
    opacity: var(--ambient-web-opacity);
    clip-path: circle(78% at 50% 50%);
    transform: none;
    animation: none;
  }
}
