/* ═══════════════════════════════════════════════════
   ATELIER — type-as-hero, photo masked inside word
   ═══════════════════════════════════════════════════ */

.variant-atelier {
  background: #f4efe6; /* warm paper */
  color: #181410;
}
.variant-atelier .nav { display: none; }

/* ─── Nav ─── */
.at-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 22px 48px;
  font-family: var(--font-sans);
  background: linear-gradient(to bottom, rgba(244,239,230,0.94), rgba(244,239,230,0));
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}
.at-nav-logo img {
  height: 42px;
  width: auto;
  filter: brightness(0.4) saturate(1.1);
}
.at-nav-mid {
  display: flex;
  gap: 28px;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: #2a221c;
}
.at-nav-mid a { transition: color 0.25s var(--ease); padding-bottom: 2px; border-bottom: 1px solid transparent; }
.at-nav-mid a:hover { color: #0b0b0b; border-bottom-color: currentColor; }

.at-nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.at-nav-phone { color: #2a221c; }
.at-nav-cta {
  padding: 11px 22px;
  border: 1px solid #181410;
  border-radius: 100px;
  color: #181410;
  font-size: 11px;
  letter-spacing: 0.22em;
  transition: all 0.3s var(--ease);
}
.at-nav-cta:hover { background: #181410; color: #f4efe6; }

/* ─── Stage ─── */
.at {
  --mx: 0;
  --my: 0;
  position: relative;
  min-height: 100vh;
  width: 100%;
  padding: 140px 56px 56px;
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ─── Floating frame top-right ─── */
.at-frame {
  position: absolute;
  top: 130px;
  right: 56px;
  width: 220px;
  aspect-ratio: 3 / 4;
  z-index: 4;
  transform: rotate(2deg) translate(calc(var(--mx) * -10px), calc(var(--my) * -8px));
  transition: transform 0.6s var(--ease);
  box-shadow: 0 30px 60px rgba(40,30,20,0.25);
  background: #1a1a1a;
}
.at-frame-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.at-frame-img.is-active { opacity: 1; }
.at-frame-meta {
  position: absolute;
  left: 0; right: 0; bottom: -32px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.32em;
  color: #2a221c;
  text-transform: uppercase;
}
.at-frame-rule {
  flex: 1;
  height: 1px;
  background: #181410;
  opacity: 0.35;
}

/* ─── Type stage ─── */
.at-stage {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.at-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #2a221c;
  margin-bottom: 36px;
}
.at-eyebrow-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.at-title {
  font-family: var(--font-display);
  font-weight: 300;
  color: #181410;
  line-height: 0.92;
  letter-spacing: -0.012em;
  margin-bottom: 40px;
}
.at-title-line {
  display: block;
  overflow: hidden;
}
.at-title-pre {
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  font-style: italic;
  font-weight: 300;
  color: rgba(24,20,16,0.7);
  margin-bottom: 8px;
  padding-left: 0.04em;
  transform: translateY(110%);
  opacity: 0;
}
.at-title-post {
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  font-style: italic;
  color: rgba(24,20,16,0.7);
  margin-top: 6px;
  text-align: right;
  padding-right: 0.04em;
  transform: translateY(110%);
  opacity: 0;
}
.at-title-post em { color: var(--accent); font-style: italic; font-weight: 300; }

/* ─── Masked POOLS word ─── */
.at-title-mask {
  position: relative;
  display: block;
  /* Reserve the space the text occupies so absolute fills can size against it */
  font-size: clamp(5rem, 18vw, 17rem);
  letter-spacing: -0.02em;
  line-height: 0.85;
  font-weight: 300;
  text-transform: uppercase;
  isolation: isolate;
}

/* Spacer text — invisible, sets the box dimensions */
.at-mask-text {
  display: block;
  color: transparent;
  -webkit-text-fill-color: transparent;
  user-select: none;
  pointer-events: none;
}

/* Each fill is an absolutely-positioned copy of "POOLS" with a photo background, clipped to text */
.at-mask-fill {
  position: absolute;
  inset: 0;
  background-size: 130% auto;
  background-position: calc(50% + var(--mx, 0) * 40px) calc(50% + var(--my, 0) * 30px);
  background-repeat: no-repeat;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  filter: brightness(1.08) saturate(1.12) contrast(1.05);
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.7, 0, 0.2, 1), background-position 0.4s var(--ease);
  /* Render the same "POOLS" via ::before so the clip-to-text has actual glyphs */
}
.at-mask-fill::before {
  content: "POOLS";
  display: block;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  font-weight: inherit;
  text-transform: inherit;
}
.at-mask-fill.is-active { opacity: 1; }

/* Subtle dark stroke behind for legibility on lighter photos */
.at-title-mask::after {
  content: "POOLS";
  position: absolute;
  inset: 0;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 0.85;
  text-transform: uppercase;
  color: rgba(24,20,16,0.06);
  z-index: 0;
  pointer-events: none;
}

/* ─── Row: copy + tabs ─── */
.at-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: end;
  margin-top: 12px;
}

.at-copy {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1.4;
  color: #2a221c;
  max-width: 520px;
  font-style: italic;
}

.at-tabs {
  position: relative;
  display: flex;
  gap: 32px;
  border-bottom: 1px solid rgba(24,20,16,0.2);
  padding-bottom: 12px;
  align-self: end;
  font-family: var(--font-sans);
}
.at-tab {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: rgba(24,20,16,0.5);
  transition: color 0.3s var(--ease);
}
.at-tab.is-active { color: #181410; }
.at-tab-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--accent);
}
.at-tab-label {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.at-tab-ink {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--accent);
  transition: transform 0.55s cubic-bezier(0.7, 0, 0.2, 1), width 0.55s cubic-bezier(0.7, 0, 0.2, 1);
}

/* ─── Foot ─── */
.at-foot {
  margin-top: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(24,20,16,0.2);
  font-family: var(--font-sans);
}
.at-foot-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #181410;
}
.at-foot-cta-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotPulse 2.4s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.3); opacity: 1; }
}
.at-foot-cta:hover svg { transform: translateX(4px); }
.at-foot-cta svg { transition: transform 0.3s var(--ease); }

.at-foot-meta {
  font-size: 10px;
  letter-spacing: 0.36em;
  color: rgba(24,20,16,0.55);
  text-transform: uppercase;
}

/* Entrance animation */
.at.is-ready .at-title-pre,
.at.is-ready .at-title-post {
  animation: lineRise 1s 0.2s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}
.at.is-ready .at-title-post { animation-delay: 0.5s; }

@keyframes lineRise {
  0%   { transform: translateY(110%); opacity: 0; }
  100% { transform: translateY(0);    opacity: 1; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .at-title-pre, .at-title-post { transform: none; opacity: 1; animation: none !important; }
  .at-mask-fill { transition: none; }
  .at-frame { transition: none; transform: rotate(2deg); }
  .at-foot-cta-dot { animation: none; }
  .at-tab-ink { transition: none; }
}

/* Responsive */
@media (max-width: 960px) {
  .at-nav { padding: 16px 24px; gap: 14px; }
  .at-nav-mid { display: none; }
  .at { padding: 120px 24px 56px; }
  .at-frame {
    position: relative;
    top: auto; right: auto;
    width: 60%;
    margin: 0 auto 56px;
    transform: rotate(0);
  }
  .at-frame-meta { bottom: -28px; }
  .at-row { grid-template-columns: 1fr; gap: 32px; }
  .at-foot { flex-direction: column; gap: 14px; align-items: flex-start; }
}
@media (max-width: 480px) {
  .at-title-mask { font-size: clamp(4rem, 26vw, 9rem); }
  .at-copy { font-size: 1.15rem; }
  .at-tab-label { font-size: 18px; }
  .at-foot-cta { font-size: 11px; letter-spacing: 0.22em; }
}
