/* Home page — Yaron Levy Private Investigations */

.page {
  width: 1440px;
  margin: 0 auto;
  background: var(--color-bg);
}

/* Gate — fits one screen (100vh), no scroll */
.gate {
  height: 100vh;
  min-height: 640px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px var(--gutter) 40px;
  box-sizing: border-box;
}
/* Navbar (top of the gate) */
.gate > .gate__nav {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  padding: 30px var(--gutter);
  animation-delay: 2.2s;
}
.gate__nav-link {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-text);
}
.gate__nav-link:hover {
  color: var(--color-accent-light);
}
.gate__logo-link {
  display: block;
}
.gate__logo {
  display: block;
  width: 280px;
  height: auto;
}
.gate__title {
  margin: 18px 0 0;
  font-family: var(--font-heading);
  font-size: 46px;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: var(--leading-tight);
  text-align: center;
}
.gate__subtitle {
  margin: 10px 0 0;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
  text-align: center;
}
.gate__rule {
  margin-top: 16px;
}
.gate__actions {
  margin-top: 20px;
}
/* contact buttons: icon-only (no border/fill), same footprint; orange on hover */
.gate__actions .icon-btn,
.contact__actions .icon-btn {
  width: auto;
  height: auto;
  padding: 11px 30px;                          /* keep the same size */
  border: none;
  background: transparent;
  color: var(--color-text);
  transition: color 0.4s ease-in-out;
}
.gate__actions .icon-btn svg,
.contact__actions .icon-btn svg {
  width: 22px;
  height: 22px;
}
.gate__actions .icon-btn:hover,
.contact__actions .icon-btn:hover {
  color: var(--color-accent-light);
}

/* Lead form (gate) — one row, three columns, compact */
.lead-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 640px;
  margin-top: 20px;
  text-align: right;
}
.lead-form__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}
.lead-form__row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
}
.lead-form__phone {
  flex: 0 0 auto;
  width: 300px;
}
.lead-form__submit {
  flex: 0 0 auto;
  padding: 11px 46px;
}
/* phone field: transparent bg + animated border (as before), centered placeholder */
.gate__form .field__label {
  font-size: 13px;
}
.gate__form .field__input {
  padding: 11px 18px;
  font-size: 16px;
  text-align: center;
}
.gate__form .choice {
  gap: 8px;
}
.gate__form .choice__btn {
  flex: 0 0 auto;
  padding: 9px 14px;
  font-size: 14px;
}
/* centered field titles */
.gate__form .field {
  align-items: center;
}
.gate__form .field__label {
  text-align: center;
}

.gate__continue {
  margin-top: 30px;
}
/* section-2 cue — same component, anchored bottom-centre of the About section */
.about-continue {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  margin-top: 0;
  z-index: 2;
}
/* always bob up/down */
.gate__continue-bob {
  display: block;
  animation: continue-bob 2s ease-in-out infinite;
}
@keyframes continue-bob {
  0%, 100% { transform: translateY(-6px); }
  50%      { transform: translateY(6px); }
}
/* on hover: grow the whole thing by 10% */
.gate__continue-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transform-origin: center;
  transition: transform 0.3s ease;
}
.gate__continue:hover .gate__continue-inner {
  transform: scale(1.1);
}
.gate__continue .chevrons-down {
  width: 22px;
  height: 22px;
  display: block;
}
.gate__license {
  margin-top: 26px;
  text-align: center;
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text);
}

/* Entrance keyframes */
@keyframes gate-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes gate-in-muted {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 0.65; transform: translateY(0); }
}
@keyframes video-in {
  from { opacity: 0; }
  to   { opacity: 0.07; }
}
@keyframes intro-symbol {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.96); }
  30%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  68%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.02); }
}

/* Base entrance for every gate child (video + intro override below) */
.gate > * {
  position: relative;
  z-index: 1;
  animation: gate-in 0.9s ease-in both;
}

/* scattered triangles that glow in/out over the video, below the content */
.gate > .gate__sparks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;                                   /* above video, below the content */
  pointer-events: none;
  animation-delay: 1s;
}
.gate-spark {
  fill: var(--color-accent-light);
  opacity: 0;
  transition: opacity 1.3s ease;
}
/* some sparks are outline-only — orange border, no fill */
.gate-spark--outline {
  fill: none;
  stroke: var(--color-accent-light);
  stroke-width: 1.6;
}
.gate-spark.on {
  opacity: 0.42;                                /* dimmer, more discreet */
}

/* 1) Background video — fades in behind everything, just after the intro symbol appears */
.gate__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  animation: video-in 1s ease-in 0.7s both;
}

/* 2) Intro — large symbol on black, fades in, holds, then fades out before content */
.gate__intro-symbol {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 260px;
  height: auto;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: intro-symbol 2.3s ease-in-out forwards;
}

/* 3) Content — reveals in order AFTER the intro symbol has faded out */
.gate__logo-link { animation-delay: 2.30s; }
.gate__title     { animation-delay: 2.44s; }
.gate__rule      { animation-delay: 2.58s; }
.gate__form      { animation-delay: 2.74s; }
.gate__actions   { animation-delay: 2.92s; }
.gate__license   { animation-delay: 3.10s; }
.gate__continue  { animation-delay: 3.26s; }

@media (prefers-reduced-motion: reduce) {
  .gate > * { animation: none; }
  .gate__video { opacity: 0.07; }
  .gate__intro-symbol { display: none; }
  .gate__continue-bob { animation: none; }
}

/* About — taller section, content vertically centered, over a background image */
.about-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;                           /* crop the mosaic that bleeds off the edge */
  background: var(--color-primary);           /* black + subtle mosaic motif */
}
.about-section__bg {
  position: absolute;
  inset: auto;
  left: 0;                                     /* base on the section edge, apex points inward */
  top: 50%;
  margin-top: -27.7vw;                         /* vertical center (half of height) */
  width: 48vw;                                 /* bigger — base bleeds past top/bottom (cropped) */
  height: 55.4vw;                              /* = width / 0.866 → perfect equilateral box */
  z-index: 0;
  opacity: 0;
}
.about-section .container {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(18px);
}
/* entrance (JS adds .is-in): mosaic fades in first, then the content */
.about-section.is-in .about-section__bg {
  opacity: 1;
  transition: opacity 1s ease;
}
.about-section.is-in .container {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s ease 0.55s, transform 0.8s ease 0.55s;
}
@media (prefers-reduced-motion: reduce) {
  .about-section__bg,
  .about-section .container {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
.about {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: var(--space-xl);
  align-items: start;
  width: 100%;
}
.about__body {
  max-width: 640px;
}
.about__text {
  margin: 0;
}
.about__cta {
  display: inline-flex;
  margin-top: var(--space-lg);
}
.about__license {
  margin: var(--space-lg) 0 0;
  font-size: var(--text-small);
  font-weight: 300;
  color: var(--color-text-muted);
}

/* Services — PINNED white panel; JS scroll-scrubs the cards so that after the
   last card they move up TOGETHER as one unit (no card covering another). */
.services-section {
  position: relative;
  border-top: none;
  /* tall: provides the scroll length the JS maps to card motion. Tuned with
     entryFrac in services.js — most of it is entry, a short tail is the exit. */
  height: 320vh;
}
.services-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--color-primary);            /* brand black — consistent with the rest of the site */
}
/* white panel; smaller orange triangles on the sides whose outlines draw
   themselves (lines stretch), then erase from the start — looping seamlessly */
.services-section__bg {
  position: absolute;
  inset: auto;
  right: 0;                                    /* mirror of section 2 — base on the right edge */
  left: auto;
  top: 50%;
  margin-top: -27.7vw;
  width: 48vw;
  height: 55.4vw;
  z-index: 0;
  pointer-events: none;
}
.tri-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* filled triangle mosaic — orange concentrated at the BOTTOM, fading up to white.
   Random groups glow via the .glow class (services.js). */
.tri-cell {
  fill: var(--color-accent);                  /* brand orange #e85d00 */
  transition: opacity 0.28s ease, fill 0.28s ease;
}
.tri-cell.glow {
  fill: #ffb457;                              /* brighter glow */
  opacity: 1 !important;
}
.services-section__head {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 3;
  padding-top: 88px;
  pointer-events: none;                         /* decorative heading must not steal card clicks */
  will-change: opacity, transform;
}
.services-section .heading-2 {
  color: var(--color-text);                     /* light heading on the dark panel */
}
.svc-stack {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.svc-card {
  position: absolute;
  left: 50%;
  top: 0;
  width: 70%;
  max-width: 1000px;
  height: calc(100vh - 360px);
  min-height: 380px;
  box-sizing: border-box;
  padding: 64px 72px;
  border: 1px solid rgba(242, 241, 237, 0.10); /* faint edge separates cards from the black panel */
  border-radius: 22px;
  box-shadow: 0 -8px 26px rgba(0, 0, 0, 0.45), 0 20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;                    /* heading + subheading vertically centered */
  align-items: flex-start;                    /* RTL: content hugs the right, leaving the left free */
  cursor: pointer;
  overflow: hidden;                            /* clip the cutout to the rounded card */
  transform: translate(-50%, 100vh);          /* JS overrides every frame */
  will-change: transform;
}
/* cutout graphic on the left — PLACEHOLDER silhouette; real per-service cutouts
   drop in during the content stage */
.svc-card__media {
  position: absolute;
  left: 44px;
  top: 50%;
  transform: translateY(-50%);                /* vertically centered (same horizontal spot) */
  width: 52%;
  max-width: 460px;
  height: 92%;
  object-fit: contain;
  object-position: center;
  opacity: 1;                                 /* fully visible */
  pointer-events: none;
}
/* click: animate the slide-up (ease-in). Toggled by JS only during click, so it
   never interferes with the frame-by-frame scroll-scrub. */
.svc-card--anim {
  transition: transform 0.45s ease-in;
}
/* card colours derived from the logo (symbol-primary): black -> logo grey ->
   lighter grade -> logo orange gradient */
.svc-card:nth-of-type(1) { background: #0a0a0a; }
.svc-card:nth-of-type(2) { background: #2a2f38; }
.svc-card:nth-of-type(3) { background: #565c66; }
.svc-card:nth-of-type(4) { background: linear-gradient(145deg, #cd4e00 0%, #ee7822 100%); }

/* click to inspect — JS handles the transform (lift + push others down); this
   only carries the depth cue */
.svc-card.is-open {
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5);
  z-index: 60;
}

/* small tab label (top-right) — visible in the peek strip, like a folder tab */
.svc-card__tab {
  position: absolute;
  top: 26px;
  right: 40px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--color-secondary);
  opacity: 0.85;
}
.svc-card__title {
  margin: 0 0 8px;
  max-width: 46%;                             /* right side only — left is reserved for a graphic */
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 900;
  line-height: var(--leading-tight);
  color: var(--color-secondary);
}
.svc-card__desc {
  margin: 0;
  max-width: 46%;
  font-size: var(--text-body);
  font-weight: 300;
  line-height: var(--leading-normal);
  color: rgba(242, 241, 237, 0.82);
}

@media (prefers-reduced-motion: reduce) {
  .services-section__bg::before { animation: none; }
}

/* Contact section — mirrors the gate; downward mosaic flows in from section 3 */
.contact-section {
  position: relative;
  background: var(--color-primary);
}
.contact-section__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.contact-section .container {
  position: relative;
  z-index: 1;
}
.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.contact__logo {
  display: block;
  width: 260px;
  height: auto;
}
.contact__title {
  margin: 30px 0 0;
  text-align: center;
}
.contact__rule {
  margin-top: 16px;
}
.contact__form {
  margin-top: 26px;
}
.contact__actions {
  margin-top: 24px;
}
.contact__license {
  margin-top: 26px;
}

/* Footer */
.footer {
  border-top: var(--border-width) solid var(--color-border);
}
.footer__inner {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.footer__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer__symbol {
  display: block;
  width: 40px;
  height: auto;
  flex: none;
}
.footer__links {
  display: flex;
  gap: 32px;
}
.footer__links a {
  color: var(--color-text-muted);
}
.footer__links a:hover {
  color: var(--color-text-muted);
}
.footer__license {
  opacity: 0.65;
}
