/* ==========================================================================
   Panchariya Foundation — Coming Soon
   Brand tokens are taken from the main website (staging.panchariyagroup.com):
   - Fonts:   DM Serif Display (headings), Mulish (body)
   - Gold:    --primarys #f0d254, --darkyellow #b18a2c, logo gradient #F0D565 → #B18A2C → #885F05
   - Navy:    --darkblue #081d3c, --dark #010713, night gradient #09252f → #0b0e19 → #000410
   ========================================================================== */

/* ---------- 1. Fonts (self-hosted, identical files to the main site) ---------- */
@font-face {
  font-family: "DM Serif Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dm-serif-display-regular-latin.woff2") format("woff2");
}
@font-face {
  font-family: "DM Serif Display";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dm-serif-display-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/mulish-variable-latin.woff2") format("woff2");
}

/* ---------- 2. Design tokens ---------- */
:root {
  /* Brand palette */
  --gold: #f0d254;            /* --primarys */
  --gold-light: #f0d565;
  --gold-soft: #e1c357;
  --gold-deep: #b18a2c;       /* --darkyellow */
  --gold-shadow: #885f05;
  --navy: #081d3c;            /* --darkblue / --secondarys */
  --ink: #010713;             /* --dark */
  --night: #000410;
  --night-mid: #0b0e19;
  --night-teal: #09252f;

  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.76);
  --text-subtle: rgba(255, 255, 255, 0.62);
  --hairline: rgba(240, 210, 84, 0.22);

  --gradient-gold: linear-gradient(90deg, var(--gold-soft) 0%, var(--gold-deep) 100%);
  --gradient-gold-text: linear-gradient(
    100deg,
    var(--gold-deep) 0%,
    var(--gold-light) 22%,
    #fff3c4 32%,
    var(--gold-light) 42%,
    var(--gold-deep) 62%,
    var(--gold-shadow) 80%,
    var(--gold-deep) 100%
  );

  /* Typography */
  --font-display: "DM Serif Display", "Times New Roman", serif;
  --font-body: "Mulish", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);

  /* Layout */
  --gutter: clamp(1rem, 4vw, 3rem);
}

/* ---------- 3. Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  /* Same "night" radial used on the main site's dark sections */
  background-color: var(--night);
  background-image: radial-gradient(104.86% 100% at 49.84% 100%, var(--night-teal) 0%, var(--night-mid) 71.15%, var(--night) 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

p,
h1 {
  margin: 0;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

/* ==========================================================================
   4. Cinematic backdrop
   ========================================================================== */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  animation: fade-in 2.4s var(--ease-out) both;
}

.scene > * {
  position: absolute;
}

/* Flowing contour lines — the main site's own background artwork */
.scene__waves {
  inset: -10% -15%;
  background: url("../images/waves.png") center / cover no-repeat;
  opacity: 0.55;
  will-change: transform;
  animation: waves-drift 32s var(--ease-inout) infinite alternate;
}

/* Soft volumetric light beams from above */
/* A soft wedge of light: conic gradient anchored at the top, faded out downward */
.scene__beam {
  top: -12%;
  width: 90vmax;
  height: 120%;
  opacity: 0.16;
  mix-blend-mode: screen;
  background: conic-gradient(
    from 180deg at 50% 0,
    transparent 168deg,
    rgba(240, 213, 101, 0.55) 176deg,
    rgba(255, 236, 170, 0.8) 180deg,
    rgba(240, 213, 101, 0.55) 184deg,
    transparent 192deg
  );
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 85%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 85%);
  transform-origin: 50% 0;
  will-change: transform, opacity;
}
.scene__beam--left {
  left: calc(22% - 45vmax);
  transform: rotate(-14deg);
  animation: beam-sway-left 16s var(--ease-inout) infinite alternate;
}
.scene__beam--right {
  left: calc(78% - 45vmax);
  transform: rotate(14deg);
  animation: beam-sway-right 19s var(--ease-inout) infinite alternate;
}

/* Golden horizon glow (mirrors the site's "circle at center bottom, --primarys" light) */
.scene__horizon {
  left: 50%;
  bottom: -38vmax;
  width: 110vmax;
  height: 70vmax;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(240, 210, 84, 0.32) 0%, rgba(177, 138, 44, 0.14) 45%, transparent 100%);
  will-change: transform, opacity;
  animation: breathe 9s var(--ease-inout) infinite alternate;
}

/* Wireframe globe — the main site's global-presence motif, echoing the logo emblem.
   The source art is very faint, so it is layered three times for presence. */
.scene__globe {
  left: 50%;
  bottom: 0;
  width: min(1180px, 150vw);
  aspect-ratio: 808 / 366;
  translate: -50% 0;
  background-image: url("../images/globe.png"), url("../images/globe.png"), url("../images/globe.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 55%);
  mask-image: linear-gradient(to top, transparent 0%, #000 55%);
  will-change: transform;
  animation: globe-float 26s var(--ease-inout) infinite alternate;
}

/* Rising gold dust */
.scene__particles {
  inset: 0;
}
.scene__particles span {
  position: absolute;
  bottom: -2vh;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 10px 2px rgba(240, 210, 84, 0.55);
  opacity: 0;
  will-change: transform, opacity;
  animation: rise var(--t) linear var(--d) infinite;
}

.scene__vignette {
  inset: 0;
  background: radial-gradient(ellipse 85% 75% at 50% 45%, transparent 35%, rgba(0, 4, 16, 0.65) 75%, rgba(0, 4, 16, 0.95) 100%);
}

/* Film grain for a cinematic, non-digital finish */
.scene__grain {
  inset: 0;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   5. Page layout
   ========================================================================== */
.page {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  padding:
    max(clamp(1.5rem, 5vh, 3.5rem), env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right))
    max(1.25rem, env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-left));
}

/* ---------- Logo ---------- */
.brand {
  display: flex;
  justify-content: center;
}

.brand__logo {
  position: relative;
  display: inline-block;
  border-radius: 4px;
  animation: logo-in 1.6s var(--ease-out) 0.3s both;
}

/* Breathing gold halo behind the emblem */
.brand__logo::before {
  content: "";
  position: absolute;
  inset: -35% -45%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(240, 210, 84, 0.22), transparent 70%);
  animation: breathe 6s var(--ease-inout) infinite alternate;
}

.brand__logo img {
  height: clamp(4.5rem, 9vw, 7.5rem);
  width: auto; /* keeps the original 80:60 proportions */
}

.brand__logo:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 8px;
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding-block: clamp(2rem, 6vh, 4.5rem);
  text-align: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  margin-bottom: clamp(1rem, 2.5vh, 1.75rem);
  font-size: clamp(0.6875rem, 0.6rem + 0.3vw, 0.875rem);
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  /* compensate trailing letter-spacing for optical centring */
  padding-left: 0.32em;
  animation: fade-up 1.2s var(--ease-out) 0.9s both;
}

.hero__rule {
  display: block;
  width: clamp(1.75rem, 5vw, 3.5rem);
  height: 1px;
  background: var(--gradient-gold);
  transform-origin: right center;
  animation: draw-line 1.4s var(--ease-out) 1.2s both;
}
.hero__rule:last-child {
  transform-origin: left center;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft));
}

.hero__title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 0.24em;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.4rem, 1rem + 10vw, 10rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--text);
  text-shadow: 0 10px 50px rgba(0, 4, 16, 0.6);
}

/* Masked line-by-line text reveal */
.reveal {
  display: inline-block;
  overflow: hidden;
  /* room for descenders & italic overhang */
  padding: 0.04em 0.08em 0.12em;
  margin: -0.04em -0.08em -0.12em;
}

.reveal__inner {
  display: inline-block;
  animation: reveal-up 1.5s var(--ease-out) both;
}
.reveal:nth-child(1) .reveal__inner { animation-delay: 1.05s; }
.reveal:nth-child(2) .reveal__inner { animation-delay: 1.25s; }

/* "Soon" — DM Serif italic in a slow-moving gold sheen */
.hero__title-accent {
  font-style: italic;
  color: var(--gold);
  text-shadow: none;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero__title-accent {
    background-image: var(--gradient-gold-text);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation:
      reveal-up 1.5s var(--ease-out) 1.25s both,
      sheen 9s linear 2.8s infinite;
  }
}

/* Gold accent rule — echoes the underline used on the main site's headings */
.hero__underline {
  display: block;
  width: clamp(7rem, 18vw, 15rem);
  height: 2px;
  margin-top: clamp(1rem, 2.5vh, 1.6rem);
  background: linear-gradient(90deg, transparent, var(--gold-deep) 18%, var(--gold) 50%, var(--gold-deep) 82%, transparent);
  box-shadow: 0 0 18px rgba(240, 210, 84, 0.45);
  animation: draw-line-center 1.4s var(--ease-out) 1.85s both;
}

.hero__lead {
  max-width: 36rem;
  margin-top: clamp(1.25rem, 3vh, 2rem);
  font-size: clamp(1rem, 0.92rem + 0.35vw, 1.25rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-muted);
  text-wrap: balance;
  animation: fade-up 1.3s var(--ease-out) 2.05s both;
}

/* Sector line — a single row on wide screens, a tidy grid on smaller ones */
.sectors {
  display: flex;
  justify-content: center;
  margin-top: clamp(2rem, 5vh, 3.25rem);
  font-size: clamp(0.6875rem, 0.64rem + 0.15vw, 0.8125rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-subtle);
  animation: fade-in 1.6s var(--ease-out) 2.4s both;
}

.sectors li {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.sectors li + li::before {
  content: "";
  width: 4px;
  height: 4px;
  margin-inline: clamp(0.75rem, 1.6vw, 1.25rem);
  background: var(--gold-deep);
  transform: rotate(45deg);
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--hairline) 20%, var(--hairline) 80%, transparent) 1;
  font-size: 0.8125rem;
  color: var(--text-subtle);
  animation: fade-in 1.6s var(--ease-out) 2.7s both;
}

.footer__tagline {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.72);
  text-wrap: balance;
}

/* ==========================================================================
   6. Keyframes
   ========================================================================== */
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translate3d(0, 24px, 0); }
  to   { opacity: 1; transform: none; }
}

@keyframes logo-in {
  from { opacity: 0; transform: translate3d(0, -14px, 0) scale(0.92); filter: blur(10px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes reveal-up {
  from { transform: translate3d(0, 115%, 0) skewY(4deg); }
  to   { transform: none; }
}

@keyframes draw-line {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

@keyframes draw-line-center {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

@keyframes sheen {
  from { background-position: 100% 0; }
  to   { background-position: -150% 0; }
}

@keyframes breathe {
  from { opacity: 0.7; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.06); }
}

@keyframes waves-drift {
  from { transform: translate3d(-3%, 1%, 0) scale(1.02); }
  to   { transform: translate3d(3%, -2%, 0) scale(1.08); }
}

@keyframes beam-sway-left {
  from { transform: rotate(-8deg);  opacity: 0.12; }
  to   { transform: rotate(-20deg); opacity: 0.24; }
}

@keyframes beam-sway-right {
  from { transform: rotate(8deg);  opacity: 0.22; }
  to   { transform: rotate(20deg); opacity: 0.11; }
}

@keyframes globe-float {
  from { transform: translate3d(0, 4%, 0) rotate(-1.5deg); }
  to   { transform: translate3d(0, -2%, 0) rotate(1.5deg); }
}

@keyframes rise {
  0%   { opacity: 0;   transform: translate3d(0, 0, 0); }
  12%  { opacity: 0.9; }
  70%  { opacity: 0.5; }
  100% { opacity: 0;   transform: translate3d(2.5vw, -95vh, 0); }
}

/* ==========================================================================
   7. Responsive
   ========================================================================== */

/* Large monitors */
@media (min-width: 1920px) {
  :root { --gutter: 4.5rem; }
  .hero__title { font-size: clamp(10rem, 7.5vw, 13rem); }
  .hero__lead  { max-width: 42rem; font-size: 1.375rem; }
  .brand__logo img { height: 8.5rem; }
}


/* Mobile */
@media (max-width: 600px) {
  .footer {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
  .scene__waves { inset: -10% -60%; opacity: 0.45; }
  .scene__particles span:nth-child(even) { display: none; }
  /* values become a centred 3 × 2 grid */
  .sectors {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 0.75rem 1.75rem;
    letter-spacing: 0.14em;
  }
  .sectors li { justify-content: center; }
  .sectors li + li::before { display: none; }
}

/* Small mobile */
@media (max-width: 380px) {
  .hero__title { font-size: 3rem; }
  .hero__eyebrow { letter-spacing: 0.24em; padding-left: 0.24em; }
  .sectors { gap: 0.7rem 0.9rem; font-size: 0.625rem; letter-spacing: 0.08em; }
}

/* Short landscape screens (phones turned sideways) */
@media (max-height: 520px) and (orientation: landscape) {
  .page { padding-top: 1rem; }
  .brand__logo img { height: 3.5rem; }
  .hero { padding-block: 1.25rem; }
  .hero__title { font-size: clamp(2.75rem, 9vh + 2rem, 5rem); }
  .sectors { margin-top: 1.25rem; }
}

/* ==========================================================================
   8. Accessibility — respect reduced-motion preferences
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scene__particles { display: none; }
}
