/* "Our philosophy" page. Loaded after site.css and uses its tokens (night, gold, moon, ivory). */

.ph { background: var(--night); }
.ph-wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.ph p { margin: 0; }

/* header link back to the readings */
.ph-nav { margin-left: auto; }
.ph-nav a { color: var(--moon-dim); text-decoration: none; font-weight: 600; padding: 10px 12px; border-radius: var(--radius-s); }
.ph-nav a:hover { color: var(--moon); background: var(--rule-soft); }
.ph .brand { margin-right: 0; }
@media (max-width: 600px) { .ph-nav { display: none; } .ph .lang { margin-left: auto; } }

/* ------------------------------------------------------------------ hero */
.ph-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(56px, 10vw, 128px) 0 clamp(64px, 10vw, 120px);
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255,255,255,.75), transparent 60%),
    radial-gradient(1px 1px at 28% 68%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 44% 14%, rgba(235,203,134,.8), transparent 60%),
    radial-gradient(1px 1px at 58% 48%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1.2px 1.2px at 71% 82%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1px 1px at 86% 30%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 93% 64%, rgba(235,203,134,.7), transparent 60%),
    radial-gradient(1px 1px at 6% 86%, rgba(255,255,255,.45), transparent 60%),
    radial-gradient(1px 1px at 36% 40%, rgba(255,255,255,.4), transparent 60%),
    radial-gradient(120% 90% at 85% 10%, rgba(214,174,92,.14), transparent 55%),
    linear-gradient(180deg, #0B1630, var(--night));
}
.ph-hero__sky { position: absolute; z-index: -1; right: -12vw; top: 50%; width: min(720px, 80vw); aspect-ratio: 1; transform: translateY(-50%); pointer-events: none; }
.ph-orbit { position: absolute; inset: 0; margin: auto; border-radius: 50%; border: 1px solid rgba(214,174,92,.22); }
.ph-orbit--1 { width: 100%; height: 100%; }
.ph-orbit--2 { width: 72%; height: 72%; border-style: dashed; border-color: rgba(236,230,214,.12); }
.ph-orbit--3 { width: 42%; height: 42%; background: radial-gradient(circle, rgba(214,174,92,.18), transparent 70%); }
.ph-planet {
  position: absolute; inset: 0; margin: auto; width: 72%; height: 72%;
  animation: ph-spin 60s linear infinite;
}
.ph-planet::after {
  content: ''; position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #F3D9A0, #B9852F); box-shadow: 0 0 24px rgba(235,203,134,.55);
}
@keyframes ph-spin { to { transform: rotate(360deg); } }

.ph-crumbs { font-size: .85rem; color: var(--moon-faint); margin-bottom: 28px; }
.ph-crumbs a { color: var(--moon-dim); }
.ph-eyebrow {
  font-family: var(--font-body); font-size: .8rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
}
.ph-eyebrow::before { content: ''; width: 36px; height: 1px; background: var(--gold); }
.is-hi .ph-eyebrow { letter-spacing: .04em; text-transform: none; font-size: 1rem; }
.ph-hero__line {
  font-family: var(--font-display); font-size: clamp(2.3rem, 1.3rem + 4.4vw, 4.6rem); line-height: 1.08;
  max-width: 15ch; color: var(--moon);
}
.is-hi .ph-hero__line { line-height: 1.3; max-width: 18ch; }
.ph-hero__sub { margin-top: 20px; font-family: var(--font-display); font-size: clamp(1.15rem, 1rem + .8vw, 1.6rem); color: var(--gold-hi); }

/* ------------------------------------------------------------------ chapters */
.ph-ch { padding: clamp(56px, 8vw, 104px) 0 0; }
.ph-ch__label {
  display: flex; align-items: center; gap: 14px; margin-bottom: 26px;
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--moon-faint);
}
.is-hi .ph-ch__label { letter-spacing: .03em; text-transform: none; font-size: .95rem; }
.ph-ch__label span {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--gold); color: var(--gold-hi); font-family: var(--font-display); font-size: 1rem; letter-spacing: 0;
}
.ph-ch__label::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

.ph-lead { font-family: var(--font-display); font-size: clamp(1.3rem, 1.1rem + 1vw, 1.9rem); color: var(--gold-hi); margin-bottom: 22px; }
.ph-big { font-family: var(--font-display); font-size: clamp(1.45rem, 1.15rem + 1.5vw, 2.35rem); line-height: 1.3; color: var(--moon); max-width: 30ch; }
.is-hi .ph-big { line-height: 1.55; }
.ph-body { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.7; color: var(--moon-dim); max-width: 60ch; }
.ph-accent { color: var(--gold-hi); }

/* 01 observations */
.ph-obs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ph-card {
  display: flex; flex-direction: column; gap: 18px; padding: 22px; border-radius: 18px;
  background: linear-gradient(180deg, var(--night-2), rgba(15,29,56,.4)); border: 1px solid var(--line-soft);
}
.ph-card p { font-size: 1.08rem; line-height: 1.55; color: var(--moon); }
.ph-card__art { height: 96px; display: grid; place-items: center; border-radius: 12px; background: rgba(10,20,40,.6); padding: 10px 14px; }
.ph-card__art svg { width: 100%; height: 100%; }
.ph-moon-dark { fill: #1B2C55; stroke: rgba(214,174,92,.3); stroke-width: 1; }
.ph-moon-lit { fill: #F1E4C2; }
.ph-arc { fill: none; stroke: rgba(214,174,92,.35); stroke-width: 1.5; stroke-dasharray: 4 6; }
.ph-horizon { stroke: rgba(236,230,214,.25); stroke-width: 1.5; }
.ph-sun-dot { fill: rgba(235,203,134,.45); }
.ph-sun-dot.is-big { fill: #EBCB86; }
.ph-sun-arrow { fill: none; stroke: rgba(236,230,214,.35); stroke-width: 1.2; }
.ph-arrowhead { fill: rgba(236,230,214,.5); }
.ph-ring { fill: none; stroke: rgba(214,174,92,.3); stroke-width: 1.2; stroke-dasharray: 3 5; }
.ph-constellation { fill: none; stroke: rgba(236,230,214,.35); stroke-width: 1; }
.ph-star { fill: #F5EEDC; }
.ph-star.is-big { fill: #EBCB86; }
.ph-ring-dot { fill: #EBCB86; }

.ph-outcome { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ph-outcome span {
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); color: var(--moon-dim); font-size: 1.02rem;
}
.ph-outcome .is-key { border-color: var(--gold); background: var(--gold); color: var(--night); font-weight: 600; }

/* 02 Jyotish: one whole, then two threads */
.ph-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.ph-split__text .ph-body { margin-top: 18px; }
.ph-whole { margin: 0; display: grid; gap: 18px; justify-items: center; }
.ph-whole__ring {
  width: min(250px, 70vw); aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; text-align: center; gap: 4px;
  border: 1px solid var(--gold); position: relative;
  background: radial-gradient(circle at 50% 40%, rgba(214,174,92,.22), var(--night-2) 70%);
  box-shadow: 0 0 0 10px rgba(214,174,92,.05), 0 0 0 22px rgba(214,174,92,.03);
}
.ph-whole__ring::before { content: ''; position: absolute; inset: 14px; border-radius: 50%; border: 1px dashed rgba(236,230,214,.18); }
.ph-whole__name { font-family: var(--font-display); font-size: 2.2rem; color: var(--gold-hi); line-height: 1.1; }
.ph-whole__alt { font-size: .95rem; color: var(--moon-faint); }
.ph-whole__halves { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.ph-half {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 14px 12px; border-radius: 14px; border: 1px solid var(--line-soft); background: var(--night-2);
  font-size: .95rem; line-height: 1.45; color: var(--moon);
}
.ph-half svg { width: 30px; height: 30px; }
.ph-half--maths { border-top: 2px solid var(--gold); }
.ph-half--meaning { border-top: 2px solid #7FB2E5; }

.ph-parting { margin-top: clamp(36px, 6vw, 64px); display: grid; gap: 14px; }
.ph-thread { width: 100%; height: 110px; }
.ph-thread-a, .ph-thread-b { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.ph-thread-a { stroke: var(--gold); }
.ph-thread-b { stroke: #7FB2E5; }
.ph-knot { fill: var(--gold-hi); stroke: var(--night); stroke-width: 3; }
.ph-parting__text { text-align: center; margin: 0 auto; }

.ph-quote { margin: clamp(30px, 5vw, 48px) 0 0; padding: 6px 0 6px 24px; border-left: 3px solid var(--gold); }
.ph-quote p { font-family: var(--font-display); font-size: clamp(1.4rem, 1.15rem + 1.3vw, 2.2rem); line-height: 1.35; color: var(--gold-hi); max-width: 34ch; }

/* band: "So that's where Rashi Mandal starts." */
.ph-band {
  margin-top: clamp(56px, 8vw, 104px); padding: clamp(48px, 8vw, 96px) 0; text-align: center;
  background: radial-gradient(80% 140% at 50% 0%, #FFFDF6, var(--ivory) 60%, #F3EAD3);
  border-block: 1px solid var(--rule);
}
.ph-band__text { font-family: var(--font-display); font-size: clamp(1.8rem, 1.2rem + 3vw, 3.6rem); line-height: 1.2; color: var(--ink); max-width: 22ch; margin: 0 auto !important; }
.is-hi .ph-band__text { line-height: 1.45; }
.ph-band__text::after { content: '✦'; display: block; margin-top: 18px; font-size: 1.1rem; color: var(--gold-deep); }

/* 03 the maths */
.ph-sources { margin-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ph-source { padding: 24px; border-radius: 18px; background: var(--night-2); border: 1px solid var(--line-soft); display: grid; gap: 14px; align-content: start; }
.ph-source__head { display: flex; align-items: center; gap: 14px; }
.ph-source__icon {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none;
  border: 1px solid var(--gold); color: var(--gold-hi); font-size: 1.35rem; background: radial-gradient(circle at 35% 30%, var(--night-3), var(--night));
}
.ph-source__name { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.1; }
.ph-source__tag { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-top: 4px !important; }
.is-hi .ph-source__tag { letter-spacing: .04em; }
.ph-source > p { color: var(--moon-dim); line-height: 1.65; }

.ph-quote--mars { display: flex; align-items: center; gap: 20px; border-left: 0; padding: clamp(22px, 4vw, 34px); border-radius: 20px;
  background: linear-gradient(120deg, rgba(224,122,79,.16), rgba(15,29,56,.3) 60%); border: 1px solid rgba(224,122,79,.35); }
.ph-quote--mars p { color: var(--moon); }
.ph-quote__icon { flex: none; width: 56px; height: 56px; }
.ph-quote__icon svg { width: 100%; height: 100%; }
.ph-quote--mars .ph-i-line { stroke: #E89A72; }

.ph-check { margin-top: 28px; display: grid; gap: 14px; justify-items: start; }
.ph-check__lead { color: var(--moon-faint); }
.ph-ticket {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 18px; border-radius: 14px; max-width: 100%;
  background: var(--night-2); border: 1px dashed var(--gold); font-size: 1.1rem; color: var(--moon);
}
.ph-ticket__glyph { color: #F1E4C2; font-size: 1.4rem; font-family: 'Segoe UI Symbol', 'Noto Sans Symbols', var(--font-display); }
.ph-ticket__arrow { color: var(--moon-faint); }
.ph-ticket__time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--night); background: var(--gold); padding: 2px 10px; border-radius: 8px; }
.ph-check__text { font-size: 1.12rem; color: var(--moon-dim); max-width: 60ch; }
.ph-check__text b { color: var(--moon); font-weight: 600; }
.ph-check__live { font-size: .9rem; }
.ph-check__live a { color: var(--gold-hi); }

/* 04 nature */
.ph-tiles { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1.35fr 1fr; gap: 16px; }
.ph-tile { padding: 24px; border-radius: 18px; border: 1px solid var(--line-soft); display: grid; gap: 16px; align-content: start; }
.ph-tile p { font-size: 1.06rem; line-height: 1.6; color: var(--moon); }
.ph-tile__icon { width: 48px; height: 48px; }
.ph-tile__icon svg { width: 100%; height: 100%; }
.ph-tile--sun { background: linear-gradient(160deg, rgba(235,170,80,.18), var(--night-2) 65%); }
.ph-tile--moon { background: linear-gradient(160deg, rgba(127,178,229,.18), var(--night-2) 65%); }
.ph-tile--leaf { background: linear-gradient(160deg, rgba(141,179,107,.2), var(--night-2) 65%); }
.ph-i-fill { fill: currentColor; }
.ph-i-line { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ph-tile--sun .ph-tile__icon { color: #EBB45C; }
.ph-tile--moon .ph-tile__icon { color: #A9CBEE; }
.ph-tile--leaf .ph-tile__icon { color: #9DC27A; }
.ph-half--maths { color: var(--moon); }
.ph-half--maths svg { color: #E89A72; }
.ph-half--meaning svg { color: #A9CBEE; }
.ph-quote__icon { color: #E89A72; }

.ph-elders {
  margin: 16px 0 0; position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center;
  padding: clamp(24px, 4vw, 40px); border-radius: 20px; background: #0E1A35; border: 1px solid var(--line);
}
.ph-elders__moon { width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FFF6DD, #D9C79C 60%, #B9A57A); box-shadow: 0 0 40px rgba(241,228,194,.35); }
.ph-elders blockquote { margin: 0; }
.ph-elders p { font-family: var(--font-display); font-size: clamp(1.2rem, 1.05rem + .8vw, 1.65rem); line-height: 1.45; color: var(--moon); }
.ph-elders .ph-elders__more { color: var(--gold-hi); margin-top: 6px !important; }

/* 05 fact and meaning */
.ph-compare { margin-top: 32px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: stretch; }
.ph-side { padding: 26px; border-radius: 20px; display: grid; gap: 12px; align-content: start; }
.ph-side--fact { background: var(--night-2); border: 1.5px solid var(--gold); }
.ph-side--meaning { background: rgba(15,29,56,.5); border: 1.5px dashed rgba(127,178,229,.55); }
.ph-side__label { justify-self: start; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; }
.is-hi .ph-side__label { letter-spacing: .03em; font-size: .9rem; }
.ph-side--fact .ph-side__label { background: var(--gold); color: var(--night); }
.ph-side--meaning .ph-side__label { background: rgba(127,178,229,.18); color: #BFD8F2; }
.ph-side__text { font-family: var(--font-display); font-size: clamp(1.25rem, 1.1rem + .7vw, 1.6rem); line-height: 1.4; color: var(--moon); }
.ph-side__more { color: var(--moon-dim); line-height: 1.6; }
.ph-side__eg { margin-top: 6px !important; padding-top: 12px; border-top: 1px solid var(--line-soft); color: var(--moon-dim); font-size: .95rem; }
.ph-side__eg span { color: #E89A72; }
.ph-side__eg b { color: var(--moon); font-variant-numeric: tabular-nums; }
.ph-compare__vs { align-self: center; font-size: 2.2rem; color: var(--gold); font-family: var(--font-display); }
.ph-apart { margin-top: 24px; }

/* closing */
.ph-close {
  margin-top: clamp(64px, 9vw, 120px); padding: clamp(64px, 10vw, 120px) 0; text-align: center;
  border-top: 1px solid var(--line-soft);
  background: radial-gradient(70% 90% at 50% 100%, rgba(214,174,92,.16), transparent 70%);
}
.ph-close__use { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1.8vw, 2.6rem); line-height: 1.3; color: var(--moon); }
.ph-close__use span:nth-child(2) { color: var(--moon-dim); }
.ph-close__use span:nth-child(3) { color: var(--moon-dim); font-size: .8em; }
.ph-close__dont {
  display: inline-block; margin-top: 34px !important; padding: 14px 26px; border-radius: 999px;
  border: 1px solid var(--gold); color: var(--gold-hi); font-weight: 600; font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem);
}
.ph-close__cta { margin-top: 36px !important; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ------------------------------------------------------------------ gentle reveal on scroll (browsers that support it; no JavaScript) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .ph-card, .ph-whole, .ph-quote, .ph-source, .ph-tile, .ph-elders, .ph-side, .ph-band__text, .ph-ticket {
      animation: ph-rise linear both; animation-timeline: view(); animation-range: entry 5% entry 45%;
    }
    @keyframes ph-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  }
}

/* ------------------------------------------------------------------ smaller screens */
@media (max-width: 900px) {
  .ph-obs { grid-template-columns: 1fr; }
  .ph-card { flex-direction: row; align-items: center; }
  .ph-card__art { width: 46%; flex: none; height: 84px; }
  .ph-split { grid-template-columns: 1fr; }
  .ph-tiles { grid-template-columns: 1fr; }
  .ph-sources { grid-template-columns: 1fr; }
  .ph-compare { grid-template-columns: 1fr; }
  .ph-compare__vs { justify-self: center; transform: rotate(90deg); font-size: 1.8rem; line-height: 1; }
  .ph-hero__sky { right: -40vw; opacity: .7; }
}
@media (max-width: 520px) {
  .ph-card { flex-direction: column; align-items: stretch; }
  .ph-card__art { width: 100%; height: 80px; }
  .ph-elders { grid-template-columns: 1fr; justify-items: start; }
  .ph-elders__moon { width: 56px; height: 56px; }
  .ph-quote--mars { flex-direction: column; align-items: flex-start; }
  .ph-ticket { font-size: 1rem; gap: 10px; padding: 10px 14px; }
  .ph-hero__sky { width: 130vw; right: -70vw; opacity: .55; }
  .ph-close__dont { border-radius: 18px; }
}
