/* ============================================================
   TERRASSE PREMIUM — hero, pre-3D section, page transitions
   ============================================================ */

/* ── Page Transition Overlay ─────────────────────────────── */
#page-transition-overlay {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

#page-transition-overlay.is-active {
  opacity: 1;
  pointer-events: all;
}

/* ── Premium Hero ────────────────────────────────────────── */
.th-hero {
  position: relative;
  height: 88vh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* Hero background image with slow Ken Burns */
.th-hero-bg {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.th-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: thKenBurns 22s ease-in-out infinite alternate;
  transform-origin: center center;
}

.th-hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 65%;
  display: block;
}

@keyframes thKenBurns {
  from { transform: scale(1.0); }
  to   { transform: scale(1.055); }
}

/* Cinematic gradient overlay */
.th-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(10,10,10,0.30) 0%,
      rgba(10,10,10,0.20) 30%,
      rgba(10,10,10,0.60) 65%,
      rgba(10,10,10,0.72) 82%,
      rgba(10,10,10,0.38) 100%
    );
}

/* Architectural window-frame depth cues */
.th-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.th-frame-left {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: min(15vw, 160px);
  background: linear-gradient(to right, rgba(8,8,8,0.32), transparent);
}

.th-frame-right {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(15vw, 160px);
  background: linear-gradient(to left, rgba(8,8,8,0.32), transparent);
}

.th-frame-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(10,10,10,0.22), transparent);
}

/* Subtle horizontal "sill" line near bottom */
.th-frame-sill {
  position: absolute;
  bottom: 140px;
  left: 6%;
  right: 6%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.12) 20%,
    rgba(255,255,255,0.18) 50%,
    rgba(255,255,255,0.12) 80%,
    transparent 100%
  );
}

/* Hero content */
.th-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: 80px;
}

/* Breadcrumb */
.th-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  opacity: 0;
  animation: thFadeUp 0.8s 0.2s var(--ease) forwards;
}

.th-breadcrumb a,
.th-breadcrumb span {
  font-size: 12.5px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.th-breadcrumb a:hover {
  color: rgba(255,255,255,0.85);
}

/* Eyebrow */
.th-eyebrow {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
  opacity: 0;
  animation: thFadeUp 0.85s 0.32s var(--ease) forwards;
}

/* Headline */
.th-headline {
  font-size: clamp(48px, 8.5vw, 100px);
  font-weight: 800;
  line-height: 1.0;
  color: var(--white);
  letter-spacing: -0.035em;
  margin-bottom: 22px;
  opacity: 0;
  animation: thFadeUp 0.9s 0.45s var(--ease) forwards;
}

/* Sub-headline */
.th-subtitle {
  font-size: clamp(15px, 1.6vw, 18px);
  color: rgba(255,255,255,0.72);
  line-height: 1.65;
  max-width: 540px;
  margin-bottom: 40px;
  opacity: 0;
  animation: thFadeUp 0.9s 0.58s var(--ease) forwards;
}

.th-br { display: inline; }

/* CTA row */
.th-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: thFadeUp 0.9s 0.70s var(--ease) forwards;
}

/* Primary CTA */
.th-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition:
    background 0.3s var(--ease),
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.th-cta-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(46,94,62,0.42);
}

.th-cta-primary svg {
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}

.th-cta-primary:hover svg {
  transform: translateX(4px);
}

/* Secondary CTA */
.th-cta-secondary {
  display: inline-flex;
  align-items: center;
  padding: 15px 28px;
  color: rgba(255,255,255,0.82);
  font-size: 15px;
  font-weight: 500;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition:
    color 0.3s var(--ease),
    border-color 0.3s var(--ease),
    background 0.3s var(--ease);
}

.th-cta-secondary:hover {
  color: var(--white);
  border-color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.08);
}

/* Nav 3D CTA — works as both <a> and <button> */
button.nav-cta {
  font-family: var(--font);
  font-size: 14px;
  cursor: pointer;
  border: none;
  line-height: 1;
}

/* Override the scrolled-state rule from main.css (same specificity, later file = wins) */
.th-nav-3d-cta,
#navbar.scrolled .th-nav-3d-cta {
  background: var(--accent) !important;
  color: var(--white) !important;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.25s;
}

.th-nav-3d-cta:hover,
#navbar.scrolled .th-nav-3d-cta:hover {
  background: var(--accent-dark) !important;
  color: var(--white) !important;
  transform: none;
  box-shadow: none;
}

/* Scroll indicator */
.th-scroll-indicator {
  position: absolute;
  bottom: 28px;
  right: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
  opacity: 0;
  animation: thFadeUp 1s 1.0s var(--ease) forwards;
}

.th-scroll-indicator span {
  color: rgba(255,255,255,0.38);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  writing-mode: vertical-lr;
  line-height: 1;
}

.th-scroll-line {
  width: 1px;
  height: 56px;
  background: rgba(255,255,255,0.18);
  position: relative;
  overflow: hidden;
}

.th-scroll-line::after {
  content: '';
  position: absolute;
  top: -56px;
  left: 0;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.75));
  animation: thScrollPulse 2.4s ease-in-out infinite;
}

@keyframes thScrollPulse {
  0%   { top: -56px; opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { top: 112px; opacity: 0; }
}

/* Hero entrance animation */
@keyframes thFadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Pre-3D Section ──────────────────────────────────────── */
.pre3d-section {
  position: relative;
  background: var(--black);
  padding: var(--section-gap) 0;
  overflow: hidden;
}

/* Subtle architectural grid */
.pre3d-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

/* Radial glow center */
.pre3d-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 60%,
    rgba(46,94,62,0.12) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.pre3d-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 660px;
  margin: 0 auto;
}

.pre3d-eyebrow {
  color: var(--accent) !important;
}

.pre3d-headline {
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 22px;
}

.pre3d-text {
  font-size: 16px;
  color: rgba(255,255,255,0.58);
  line-height: 1.78;
  margin-bottom: 44px;
}

.pre3d-features {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin-bottom: 52px;
  flex-wrap: wrap;
}

.pre3d-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.55);
  font-size: 13.5px;
}

.pre3d-feature svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* Big CTA */
.pre3d-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 38px;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.35s var(--ease),
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.pre3d-cta:hover {
  background: var(--accent-dark);
  transform: translateY(-3px);
  box-shadow: 0 18px 48px rgba(46,94,62,0.48);
}

.pre3d-cta svg {
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}

.pre3d-cta:hover svg {
  transform: translateX(5px);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .th-hero { min-height: 620px; }
  .th-headline { font-size: clamp(42px, 7vw, 72px); }
  .th-frame-sill { display: none; }
  .th-scroll-indicator { right: 24px; }
}

@media (max-width: 768px) {
  .th-hero { height: 100svh; min-height: 580px; }
  .th-headline { font-size: clamp(38px, 9vw, 58px); }
  .th-subtitle { font-size: 15px; }
  .th-br { display: none; }
  .th-actions { gap: 10px; }
  .th-cta-primary,
  .th-cta-secondary { padding: 13px 22px; font-size: 14px; }
  .th-scroll-indicator { display: none; }
  .th-frame-left,
  .th-frame-right { display: none; }
  .pre3d-features { gap: 20px; }
  .pre3d-cta { padding: 15px 28px; font-size: 15px; }
}

@media (max-width: 480px) {
  .th-actions { flex-direction: column; align-items: flex-start; }
  .th-cta-primary,
  .th-cta-secondary { width: 100%; justify-content: center; }
}
