/* ============================================================
   AUREN STUDIO — SECTION 04 / CONTACT + FOOTER
   Geometry as resolution / threshold. Quiet. Monumental.
   ============================================================ */

.contact {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--c-black);
  color: var(--c-ivory);
  overflow-x: hidden;
}

/* Studio → Contact boundary — single hairline, static */
.contact::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 3;
  width: min(90vw, calc(100% - (var(--gutter) * 2)));
  height: 1px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: rgba(240, 237, 229, 0.14);
}

.contact__env {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.16;
}
.contact__grid {
  width: 100%;
  height: 100%;
}
.contact__grid line {
  vector-effect: non-scaling-stroke;
  stroke-width: 1;
  fill: none;
}
.contact__grid .grid__v line { stroke: var(--hair); }
.contact__grid .grid__h line { stroke: rgba(255, 255, 255, 0.016); }
.contact__grid .grid__gold line { stroke: rgba(190, 145, 65, 0.07); }
.contact__grid line.grid__close { stroke: rgba(240, 237, 229, 0.06); }

.contact__glow {
  position: absolute;
  /* Soft circular gold halo — elegant separation, not a hard disc */
  left: 74vw;
  top: 52vh;
  width: min(58vw, 980px);
  height: min(58vw, 980px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle at center,
      rgba(190, 145, 65, 0.072) 0%,
      rgba(190, 145, 65, 0.04) 34%,
      rgba(190, 145, 65, 0.016) 58%,
      rgba(190, 145, 65, 0) 76%
    );
}

.contact__visual {
  position: absolute;
  top: 7vh;
  right: 0;
  bottom: 9vh;
  left: 50vw;
  z-index: 1;
  width: auto;
  min-height: 0;
  margin: 0;
  pointer-events: none;
  overflow: hidden;
}
.contact__visual::before {
  content: none;
}
.contact__canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: none;
  /* Parent visual is pe:none; keep canvas from re-enabling hit-testing */
  pointer-events: none;
}

.contact__layout {
  position: static;
  z-index: 2;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  grid-template-rows: auto 1fr;
  align-items: start;
  min-height: 0;
  padding: 13.5vh var(--gutter) 2.4vh;
}

.contact__intro {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 6;
  padding-top: 1.2vh;
}

.contact__label {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 clamp(10px, 1.4vh, 20px);
}
.contact__index {
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  color: var(--c-gold-42);
}
.contact__kicker {
  font-size: clamp(0.8125rem, 1.1vw, 0.9375rem);
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-ivory-60);
}
.contact__package {
  position: relative;
  z-index: 6;
  margin: 0 0 clamp(14px, 1.8vh, 22px);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  color: var(--c-gold-42);
}

.contact__headline {
  position: relative;
  z-index: 6;
  width: max-content;
  max-width: min(46vw, 760px);
  margin: 0;
  font-size: clamp(4.5rem, 7vw, 8rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  color: var(--c-ivory);
  isolation: isolate;
}
.contact__line {
  display: block;
  width: max-content;
  overflow: visible;
  padding: 0.02em 0.04em 0.05em 0;
  margin: -0.02em -0.04em -0.05em 0;
}
.contact__inner {
  display: block;
  white-space: nowrap;
  clip-path: inset(0 0 calc(var(--reveal, 0) * 110%) 0);
}

.contact__cta {
  position: relative;
  z-index: 6;
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  display: inline-flex;
  align-items: baseline;
  gap: 0.16em;
  width: max-content;
  margin: clamp(22px, 4vh, 42px) 0 0;
  padding: 0 0 8px;
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.45rem, 4.1vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0.006em;
  color: var(--c-ivory-warm);
  cursor: pointer;
  pointer-events: auto;
}
.contact__cta[aria-disabled='true'] {
  cursor: default;
}
.contact__cta::after {
  content: '';
  position: absolute;
  left: 2%;
  bottom: 0;
  width: 96%;
  height: 1px;
  background: rgba(240, 237, 229, 0.48);
  transform-origin: left center;
  transition: width 480ms var(--ease-premium), background-color 480ms var(--ease-premium);
}
.contact__cta:hover,
.contact__cta:focus-visible,
.contact__cta.is-hover {
  color: var(--c-ivory);
}
.contact__cta:hover::after,
.contact__cta:focus-visible::after,
.contact__cta.is-hover::after {
  width: 108%;
  background: rgba(240, 237, 229, 0.78);
}
.contact__arrow {
  display: inline-block;
  font-style: normal;
  font-size: 0.48em;
  transform: translate3d(0, -0.05em, 0);
  transition: transform 480ms var(--ease-premium);
}
.contact__cta:hover .contact__arrow,
.contact__cta:focus-visible .contact__arrow,
.contact__cta.is-hover .contact__arrow {
  transform: translate3d(4px, -2px, 0);
}

.contact__fallback {
  display: none;
  position: absolute;
  inset: 8% 0 8% 4%;
  width: auto;
  height: auto;
  max-width: none;
  pointer-events: none;
}
.no-webgl .contact__canvas,
.contact.no-webgl .contact__canvas { display: none; }
.no-webgl .contact__fallback,
.contact.no-webgl .contact__fallback { display: block; }

.contact__footer {
  position: relative;
  z-index: 6;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(28px, 4.2vw, 64px);
  margin-top: auto;
  padding: 22px var(--gutter) 28px;
  border-top: 1px solid rgba(240, 237, 229, 0.12);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(240, 237, 229, 0.62);
  pointer-events: auto;
}
.contact__footer::before {
  display: none;
}
.contact__copy {
  margin: 0;
  color: rgba(240, 237, 229, 0.55);
  letter-spacing: 0.18em;
}
.contact__meta {
  display: flex;
  align-items: center;
  gap: clamp(28px, 3.8vw, 56px);
}
.contact__link {
  position: relative;
  padding: 10px 0 6px;
  color: rgba(240, 237, 229, 0.62);
  cursor: pointer;
  pointer-events: auto;
  transition: color 320ms var(--ease-premium);
}
.contact__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 320ms var(--ease-premium);
}
.contact__link:hover,
.contact__link:focus-visible {
  color: rgba(240, 237, 229, 1);
}
.contact__link:hover::after,
.contact__link:focus-visible::after {
  width: 100%;
}
.contact__link.is-pending {
  cursor: default;
  pointer-events: none;
}
.contact__link.is-pending::after { display: none; }
.contact__to-top {
  margin-left: auto;
  letter-spacing: 0.18em;
  color: rgba(240, 237, 229, 0.58);
}
.contact__to-top span {
  display: inline-block;
  transition: transform 320ms var(--ease-premium);
}
.contact__to-top:hover span,
.contact__to-top:focus-visible span {
  transform: translateY(-3px);
}

/* ---- js initial states ------------------------------------ */
.js .contact__label,
.js .contact__cta,
.js .contact__footer { opacity: 0; }
.js .contact__glow { opacity: 0; }
.js .contact__inner { --reveal: 1; }

/* ---- reduced motion --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .js .contact__label,
  .js .contact__cta,
  .js .contact__footer { opacity: 1; }
  .js .contact__glow { opacity: 1; }
  .js .contact__inner { --reveal: 0; }

  .contact__cta::after,
  .contact__arrow,
  .contact__link::after,
  .contact__to-top span {
    transition: none;
  }
  .contact__cta::after { width: 96%; }
  .contact__cta:hover .contact__arrow,
  .contact__cta:focus-visible .contact__arrow {
    transform: translate3d(0, -0.05em, 0);
  }
  .contact__cta:hover::after,
  .contact__cta:focus-visible::after {
    width: 96%;
  }
}

/* ---- mobile / tablet -------------------------------------- */
@media (max-width: 900px) {
  .contact { min-height: auto; }
  .contact::before {
    width: min(88vw, calc(100% - 44px));
    background: rgba(240, 237, 229, 0.12);
  }
  .contact__glow {
    /*
      Section-level glow is vw/vh-based for desktop. On stacked mobile
      layout it no longer sits behind the ring — hide it and use a
      local radial on .contact__visual instead.
    */
    opacity: 0 !important;
    visibility: hidden;
  }
  .contact__visual::before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    top: 50%;
    width: min(118%, 460px);
    height: min(118%, 460px);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    /* Soft gold atmosphere — slightly more present on mobile, still feathered */
    background:
      radial-gradient(
        circle at 50% 48%,
        rgba(190, 145, 65, 0.22) 0%,
        rgba(190, 145, 65, 0.11) 28%,
        rgba(152, 106, 44, 0.055) 48%,
        rgba(190, 145, 65, 0.018) 64%,
        rgba(190, 145, 65, 0) 78%
      );
  }
  .contact__layout {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: auto;
    padding: 10vh 22px 2vh;
  }
  .contact__intro,
  .contact__headline,
  .contact__cta {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
  }
  .contact__headline {
    max-width: none;
    width: auto;
    font-size: clamp(2.7rem, 12vw, 4.2rem);
    line-height: 0.94;
  }
  .contact__visual {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    max-width: none;
    height: clamp(300px, 40vh, 440px);
    min-height: 0;
    margin: 12px 0 6px;
    align-self: stretch;
    overflow: hidden;
  }
  .contact__canvas {
    z-index: 1;
  }
  .contact__cta {
    grid-column: auto;
    grid-row: auto;
    margin-top: 18px;
    font-size: clamp(2.15rem, 8vw, 3rem);
  }
  .contact__footer {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 20px 22px 32px;
    font-size: 0.75rem;
  }
  .contact__footer::before {
    display: none;
  }
  .contact__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .contact__link,
  .contact__to-top {
    margin: 0;
    padding: 12px 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .contact__to-top { margin-top: 8px; }
}

@media (max-width: 430px) {
  .contact__layout { padding-left: 20px; padding-right: 20px; }
  .contact__visual {
    width: 100%;
    margin-right: 0;
    height: clamp(290px, 38vh, 380px);
  }
  .contact__visual::before {
    width: min(120%, 420px);
    height: min(120%, 420px);
  }
}
