/* ── CONTACT (homepage) ──
   Left: title, intro, visiting address and a dotted world map with a purple laser pin
   on the studio. Right: the invitation on a card with a living grid in its corner.
   Motion (entrance, map waves, pin, grid, tilt, copying) lives in js/contact.js;
   the looping bits of the pin are plain CSS below. */

#contact {
  background: var(--bg);
  position: relative; overflow: hidden;
  isolation: isolate;
}

.ct-wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(3rem, 6vw, 7rem); align-items: start;
}

/* ── Left: details ── */
.ct-info { display: flex; flex-direction: column; min-width: 0; }
.ct-title { margin-bottom: 1.5rem; }

.ct-visit { display: flex; gap: 1.25rem; align-items: flex-start; margin-top: 2.75rem; }
/* the mail icon, on its own in purple */
.ct-icon { flex-shrink: 0; display: grid; place-items: center; width: 28px; height: 28px; margin-top: 1px; }
.ct-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ct-visit-text { font-size: 0.875rem; line-height: 1.7; color: var(--text-muted); max-width: 40ch; margin-bottom: 1rem; }
.ct-address {
  display: flex; flex-direction: column; font-style: normal;
  font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -0.02em;
  line-height: 1.25; color: var(--text); text-transform: uppercase;
}

/* ── Left: dotted world map ── */
.ct-map {
  position: relative; margin-top: 7rem; /* room for the pin's label above the map */
  aspect-ratio: 144 / 57; /* columns / rows of the dot grid in js/world-dots.js */
}
.ct-map-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  /* the map fades out at its edges into the page (the pin above it stays sharp) */
  -webkit-mask-image: radial-gradient(120% 110% at 50% 45%, #000 55%, transparent 78%);
          mask-image: radial-gradient(120% 110% at 50% 45%, #000 55%, transparent 78%);
}

/* The laser pin: its origin is the studio's spot on the map (left/top set by contact.js) */
.ct-pin { position: absolute; left: 51.3%; top: 35%; width: 0; height: 0; }
.ct-pin-dot {
  position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%;
  background: #d9b3ee;
  box-shadow: 0 0 0 2px rgba(139, 95, 163, 0.7), 0 0 14px 4px rgba(139, 95, 163, 0.9), 0 0 34px 10px rgba(139, 95, 163, 0.45);
}
/* flattened rings, as if lying on the map */
.ct-pin-ring {
  position: absolute; left: -28px; top: -28px; width: 56px; height: 56px; border-radius: 50%;
  border: 1.5px solid rgba(185, 138, 211, 0.85);
  background: radial-gradient(circle, rgba(139, 95, 163, 0.35), transparent 65%);
  transform: scaleY(0.42) scale(0.2); opacity: 0;
}
.ct-pin-beam {
  position: absolute; left: -1px; bottom: 0; width: 2px; height: 78px;
  background: linear-gradient(to top, #d9b3ee 0%, rgba(139, 95, 163, 0.9) 35%, rgba(139, 95, 163, 0) 100%);
  box-shadow: 0 0 10px 1px rgba(139, 95, 163, 0.65);
  transform-origin: 50% 0;
}
/* a spark of light running down the beam into the pin */
.ct-pin-beam i {
  position: absolute; left: -2px; top: 0; width: 6px; height: 18px; border-radius: 6px;
  background: radial-gradient(closest-side, #fff, rgba(217, 179, 238, 0.6), transparent);
  opacity: 0;
}
.ct-pin-label {
  position: absolute; left: 0; bottom: 86px; transform: translateX(-50%);
  padding: 7px 12px; border-radius: 999px; white-space: nowrap;
  font-family: var(--font-display); font-size: 0.875rem; letter-spacing: -0.02em; text-transform: uppercase;
  color: var(--text);
  background: rgba(34, 33, 35, 0.85);
  border: 1px solid rgba(139, 95, 163, 0.5);
  box-shadow: 0 0 24px -6px rgba(139, 95, 163, 0.7), inset 0 1px 0 rgba(236, 235, 225, 0.06);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
/* loops start once the pin has landed (class set by contact.js) */
.ct-pin.is-live .ct-pin-ring { animation: ctRing 2.8s cubic-bezier(0.2, 0.7, 0.3, 1) infinite; }
.ct-pin.is-live .ct-pin-ring + .ct-pin-ring { animation-delay: 1.4s; }
.ct-pin.is-live .ct-pin-beam i { animation: ctSpark 2.2s cubic-bezier(0.6, 0, 0.4, 1) infinite; }
.ct-pin.is-live .ct-pin-dot { animation: ctDot 2.8s ease-in-out infinite; }
@keyframes ctRing {
  0%   { transform: scaleY(0.42) scale(0.2); opacity: 0.95; }
  100% { transform: scaleY(0.42) scale(1.6); opacity: 0; }
}
@keyframes ctSpark {
  0%   { transform: translateY(0); opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateY(66px); opacity: 0; }
}
@keyframes ctDot {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.35); }
}

/* ── Right: the card ── */
.ct-card {
  position: relative; isolation: isolate;
  padding: clamp(28px, 3vw, 44px);
  border-radius: 28px;
  background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
  border: 1px solid rgba(236, 235, 225, 0.07);
  box-shadow: 0 0 90px -30px var(--accent-glow), inset 0 1px 0 rgba(236, 235, 225, 0.04);
}
/* grid of squares in the top corner; cells flicker and light up around the pointer */
.ct-card-grid {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%;
  border-radius: inherit; pointer-events: none;
  -webkit-mask-image: radial-gradient(85% 75% at 100% 0%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 75%);
          mask-image: radial-gradient(85% 75% at 100% 0%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 75%);
}
/* light on the card's edge that follows the pointer (--mx / --my set by contact.js) */
.ct-card-edge {
  position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(217, 179, 238, 0.9), rgba(139, 95, 163, 0.35) 35%, transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  opacity: var(--edge, 0);
  transition: opacity 0.5s ease;
}

/* the invitation: text, the mail address highlighted with a copy button, "Let's talk!" */
.ct-pitch { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
.ct-pitch-text { font-size: clamp(1.0625rem, 1.4vw, 1.25rem); line-height: 1.65; color: var(--text); max-width: 46ch; }
.ct-mail {
  display: inline-flex; align-items: center; gap: 2px; vertical-align: middle;
  margin: 0.15em 0.1em; padding: 3px 3px 3px 14px; border-radius: 999px;
  background: var(--accent-dim); border: 1px solid rgba(139, 95, 163, 0.55);
  box-shadow: 0 0 24px -8px var(--accent-glow);
}
.ct-mail-link { color: #d9b3ee; font-weight: 500; text-decoration: none; white-space: nowrap; }
.ct-mail-link:hover { color: var(--text); }
.ct-copy {
  position: relative; display: grid; place-items: center;
  width: 32px; height: 32px; margin-left: 6px; padding: 0;
  border: none; border-radius: 50%; background: var(--accent); color: var(--text);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.2, 1), background-color 0.3s ease;
}
.ct-copy:hover { transform: scale(1.08); }
.ct-copy:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.ct-copy svg { grid-area: 1 / 1; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.2, 1), opacity 0.25s ease; }
.ct-copy-done { opacity: 0; transform: scale(0.4); stroke-width: 2.4; }
/* copied: the icon turns into a check and a label pops up above */
.ct-copy.is-copied .ct-copy-icon { opacity: 0; transform: scale(0.4); }
.ct-copy.is-copied .ct-copy-done { opacity: 1; transform: none; }
.ct-copy-tip {
  position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translate(-50%, 6px);
  padding: 6px 10px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  background: var(--text); color: var(--bg);
  font-family: var(--font-display); font-size: 0.75rem; letter-spacing: -0.02em; text-transform: uppercase;
  opacity: 0; transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.ct-copy.is-copied .ct-copy-tip { opacity: 1; transform: translate(-50%, 0); }
.ct-talk { margin-top: 0.75rem; }

/* ── Right: the prices, a second card that folds open ── */
.ct-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ct-prices { padding: 0; }
.ct-prices-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; padding: clamp(20px, 2.2vw, 28px) clamp(28px, 3vw, 44px);
  border: none; background: none; color: var(--text); text-align: left;
}
.ct-prices-toggle:focus-visible { outline: 2px solid var(--text); outline-offset: -6px; border-radius: 28px; }
.ct-prices-title {
  font-family: var(--font-title); font-weight: 800; font-size: clamp(1.5rem, 2.2vw, 2rem);
  letter-spacing: -0.02em; text-transform: uppercase; line-height: 1;
}
/* a purple disc whose plus turns into a minus */
.ct-prices-icon {
  position: relative; flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent);
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.ct-prices-icon i {
  position: absolute; left: 50%; top: 50%; width: 16px; height: 1.5px; margin: -0.75px 0 0 -8px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
}
.ct-prices-icon i + i { transform: rotate(90deg); }
.ct-prices.is-open .ct-prices-icon i + i { transform: rotate(0deg); }
@media (hover: hover) { .ct-prices-toggle:hover .ct-prices-icon { transform: scale(1.06) rotate(90deg); } }

/* the body folds open to its own height (a grid row from 0fr to 1fr) */
.ct-prices-body {
  display: grid; grid-template-rows: 0fr; visibility: hidden;
  transition: grid-template-rows 0.7s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s linear 0.7s;
}
.ct-prices.is-open .ct-prices-body {
  grid-template-rows: 1fr; visibility: visible;
  transition: grid-template-rows 0.7s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s;
}
.ct-prices-inner { min-height: 0; overflow: hidden; padding: 0 clamp(28px, 3vw, 44px); }
.ct-prices-inner > * {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.35s ease, transform 0.6s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.ct-prices.is-open .ct-prices-inner > * { opacity: 1; transform: none; transition-delay: 0.2s; }
.ct-prices.is-open .ct-prices-inner > .ct-pkgs { transition-delay: 0.3s; }
.ct-prices.is-open .ct-prices-inner > .ct-prices-more { transition-delay: 0.4s; }

.ct-prices-intro { font-size: 0.875rem; line-height: 1.65; color: var(--text-muted); max-width: 52ch; }
.ct-pkgs { list-style: none; margin-top: 1.25rem; }
/* small link to the full list of services under the packages */
.ct-prices-more {
  display: inline-block; margin: 0.25rem 0 clamp(20px, 2.2vw, 28px);
  font-size: 0.8125rem; color: var(--text-muted);
  text-decoration: underline; text-underline-offset: 0.25em; text-decoration-color: rgba(139, 95, 163, 0.6);
  transition: color 0.3s ease;
}
.ct-prices-more:hover { color: #d9b3ee; }
.ct-pkg { padding: 1.1rem 0; border-top: 1px solid var(--border); }
.ct-pkg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.ct-pkg-head > div { flex: 1; min-width: 0; }
.ct-pkg-name {
  font-family: var(--font-display); font-weight: 400; font-size: 1.25rem;
  letter-spacing: -0.02em; text-transform: uppercase; line-height: 1.1; color: var(--text);
}
.ct-pkg-for { margin-top: 0.3rem; font-size: 0.8125rem; line-height: 1.45; color: var(--text-muted); }
.ct-pkg-price { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.ct-pkg-price strong {
  font-family: var(--font-display); font-weight: 400; font-size: 1.375rem;
  letter-spacing: -0.02em; line-height: 1.1; color: #d9b3ee; white-space: nowrap;
}
.ct-pkg-price span { margin-top: 0.3rem; font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
/* what's in it: small chips that wrap, so a package takes a few lines at most */
.ct-pkg-list { list-style: none; margin-top: 0.8rem; display: flex; flex-wrap: wrap; gap: 6px; }
.ct-pkg-list li {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px 5px 9px; border-radius: 999px;
  background: rgba(236, 235, 225, 0.04); border: 1px solid var(--border);
  font-size: 0.8125rem; line-height: 1.3; color: var(--text);
}
.ct-pkg-list li::before {
  content: ''; flex-shrink: 0; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px rgba(139, 95, 163, 0.8);
}

/* ── Smaller screens: one column, the card below the details ── */
@media (max-width: 900px) {
  .ct-wrap { grid-template-columns: minmax(0, 1fr); gap: 3.5rem; }
  .ct-map { max-width: 620px; }
}
@media (max-width: 600px) {
  .ct-card { padding: 22px 18px; border-radius: 22px; }
  .ct-prices { padding: 0; }
  .ct-prices-toggle { padding: 18px 18px 18px 20px; }
  .ct-prices-inner { padding: 0 18px; }
  .ct-pkg-price strong { font-size: 1.125rem; }
  .ct-address { font-size: 1.125rem; }
  .ct-pin-beam { height: 58px; }
  .ct-pin-label { bottom: 64px; font-size: 0.75rem; padding: 6px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .ct-pin.is-live .ct-pin-ring, .ct-pin.is-live .ct-pin-beam i, .ct-pin.is-live .ct-pin-dot { animation: none; }
  .ct-pin-ring { opacity: 0.6; transform: scaleY(0.42) scale(1); }
  .ct-prices-body, .ct-prices-inner > *, .ct-prices-icon, .ct-prices-icon i { transition-duration: 0.01s; transition-delay: 0s; }
}
