/* Nabgol platform home — flagship surface */
:root {
  --ph-ink: #050f0c;
  --ph-deep: #0a1c17;
  --ph-forest: #12352c;
  --ph-leaf: #1fba86;
  --ph-leaf-2: #4ae0ad;
  --ph-mint: #d4f7e9;
  --ph-sand: #eaf7f1;
  --ph-muted: rgba(234, 247, 241, 0.68);
  --ph-faint: rgba(234, 247, 241, 0.4);
  --ph-line: rgba(234, 247, 241, 0.11);
  --ph-warm: #efc27a;
  --ph-radius: 22px;
  --ph-max: 1040px;
  --ph-font: "Vazirmatn", Tahoma, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--ph-ink);
  color: var(--ph-sand);
  font-family: var(--ph-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.ph {
  position: relative;
  overflow-x: hidden;
}

.ph-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1000px 680px at 90% -12%, rgba(31, 186, 134, 0.34), transparent 56%),
    radial-gradient(820px 560px at -8% 22%, rgba(239, 194, 122, 0.13), transparent 50%),
    radial-gradient(700px 480px at 50% 115%, rgba(12, 42, 34, 0.95), transparent 55%),
    linear-gradient(170deg, #071611 0%, #0a1c17 46%, #050f0c 100%);
}

.ph-orb {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: ph-float 18s ease-in-out infinite alternate;
}
.ph-orb-a {
  width: min(42vw, 420px);
  height: min(42vw, 420px);
  top: 8%;
  left: -8%;
  background: radial-gradient(circle, rgba(74, 224, 173, 0.28), transparent 70%);
}
.ph-orb-b {
  width: min(36vw, 360px);
  height: min(36vw, 360px);
  right: -6%;
  bottom: 18%;
  background: radial-gradient(circle, rgba(239, 194, 122, 0.18), transparent 70%);
  animation-delay: -6s;
}

@keyframes ph-float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(3%, -4%, 0) scale(1.08); }
}
@keyframes ph-rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.ph-shell,
.ph-foot {
  position: relative;
  z-index: 1;
}

.ph-shell {
  max-width: var(--ph-max);
  margin: 0 auto;
  padding: 0 22px calc(64px + env(safe-area-inset-bottom));
}

.ph-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(18px + env(safe-area-inset-top)) 0 8px;
  animation: ph-rise 0.65s ease both;
}

.ph-brand {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ph-brand-mark {
  font-size: clamp(1.85rem, 4.6vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  background: linear-gradient(118deg, #fff 6%, var(--ph-leaf-2) 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ph-brand-sub {
  font-size: 0.8rem;
  color: var(--ph-muted);
  font-weight: 600;
}

.ph-nav-cta,
.ph-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ph-nav-cta { justify-content: flex-end; }

.ph-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, filter 0.18s ease;
  white-space: nowrap;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.ph-btn:hover { transform: translateY(-1px); }
.ph-btn:active { transform: translateY(0); }
.ph-btn-lg {
  padding: 0.95rem 1.5rem;
  font-size: 1rem;
  min-height: 52px;
}
.ph-btn-ghost {
  color: var(--ph-muted);
  background: transparent;
  border-color: var(--ph-line);
  font-weight: 600;
}
.ph-btn-ghost:hover {
  color: var(--ph-sand);
  border-color: rgba(74, 224, 173, 0.3);
}

/* Live power CTAs — twin of tutor «رفع اشکال زنده» */
.ph-btn-live {
  color: #ecfdf5;
  font-weight: 800;
  letter-spacing: 0.01em;
  border-color: rgba(52, 211, 153, 0.55);
  background:
    radial-gradient(120% 180% at 10% 20%, rgba(110, 231, 183, 0.35), transparent 55%),
    linear-gradient(135deg, #065f46 0%, #047857 42%, #0f766e 100%);
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.25),
    0 8px 28px rgba(16, 185, 129, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  animation: ph-live-breathe 2.4s ease-in-out infinite;
  transform: translateZ(0);
}
.ph-btn-live:hover,
.ph-btn-live:focus-visible {
  color: #fff;
  border-color: rgba(167, 243, 208, 0.85);
  background:
    radial-gradient(120% 180% at 15% 15%, rgba(167, 243, 208, 0.45), transparent 50%),
    linear-gradient(135deg, #047857 0%, #059669 45%, #14b8a6 100%);
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.45),
    0 12px 36px rgba(16, 185, 129, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.ph-btn-live-soft {
  border-color: rgba(52, 211, 153, 0.4);
  background:
    radial-gradient(120% 180% at 12% 18%, rgba(110, 231, 183, 0.18), transparent 55%),
    linear-gradient(135deg, rgba(6, 95, 70, 0.55) 0%, rgba(15, 118, 110, 0.42) 100%);
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.18),
    0 8px 24px rgba(16, 185, 129, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.ph-btn-live-soft:hover,
.ph-btn-live-soft:focus-visible {
  border-color: rgba(167, 243, 208, 0.7);
  background:
    radial-gradient(120% 180% at 15% 15%, rgba(167, 243, 208, 0.28), transparent 50%),
    linear-gradient(135deg, rgba(4, 120, 87, 0.72) 0%, rgba(20, 184, 166, 0.55) 100%);
}

.ph-live-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 0 0 rgba(110, 231, 183, 0.75);
  animation: ph-live-pulse 1.6s ease-out infinite;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.ph-live-ring {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  background: conic-gradient(
    from 180deg,
    transparent 0deg,
    rgba(167, 243, 208, 0.55) 70deg,
    transparent 140deg,
    rgba(45, 212, 191, 0.4) 220deg,
    transparent 300deg
  );
  opacity: 0.55;
  animation: ph-live-spin 4.5s linear infinite;
  z-index: 0;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  padding: 2px;
}
.ph-live-label {
  position: relative;
  z-index: 1;
}
.ph-live-arrow {
  position: relative;
  z-index: 1;
  font-size: 1.15em;
  line-height: 1;
  opacity: 0.92;
  display: inline-block;
  transition: transform 0.18s ease;
}
.ph-btn-live:hover .ph-live-arrow,
.ph-dest:hover .ph-live-arrow {
  transform: translateX(-3px);
}
.ph-dest-go .ph-live-arrow {
  margin-inline-start: 0.15rem;
  color: inherit;
}

@keyframes ph-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(110, 231, 183, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(110, 231, 183, 0); }
  100% { box-shadow: 0 0 0 0 rgba(110, 231, 183, 0); }
}
@keyframes ph-live-breathe {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}
@keyframes ph-live-spin {
  to { transform: rotate(360deg); }
}

.ph-hero {
  min-height: min(78vh, 700px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 7vh, 78px) 0 clamp(48px, 7vh, 72px);
  animation: ph-rise 0.8s 0.06s ease both;
}
.ph-kicker {
  margin: 0 0 16px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ph-warm);
}
.ph-title {
  margin: 0 0 20px;
  font-size: clamp(2.4rem, 7.2vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.08;
  max-width: 11ch;
}
.ph-lead {
  margin: 0 0 28px;
  max-width: 34rem;
  font-size: clamp(1.05rem, 2.3vw, 1.28rem);
  line-height: 1.85;
  color: var(--ph-muted);
  font-weight: 500;
}
.ph-hero-cta { margin-top: 4px; }
.ph-hero-compact {
  min-height: auto;
  padding: clamp(28px, 5vh, 48px) 0 24px;
}
.ph-proof {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 28rem;
}
.ph-proof li {
  padding: 14px 12px;
  border-radius: 16px;
  border: 1px solid var(--ph-line);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ph-proof strong {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ph-leaf-2);
}
.ph-proof span {
  font-size: 0.8rem;
  color: var(--ph-muted);
  font-weight: 600;
}

.ph-section {
  padding: 34px 0 10px;
  animation: ph-rise 0.75s ease both;
}
.ph-section + .ph-section { margin-top: 10px; }
.ph-section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
  max-width: 36rem;
}
.ph-section-head-center {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  align-items: center;
}
.ph-section-head-center .ph-section-desc {
  max-width: 34rem;
}
.ph-section-title {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.ph-section-desc {
  margin: 0;
  color: var(--ph-muted);
  line-height: 1.8;
  font-size: 1rem;
}

.ph-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.ph-dest {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 22px 22px;
  border-radius: var(--ph-radius);
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--ph-line);
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015)),
    rgba(7, 26, 21, 0.62);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.ph-dest::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% 30%;
  height: 70%;
  background: radial-gradient(circle, rgba(74, 224, 173, 0.16), transparent 65%);
  pointer-events: none;
}
.ph-dest-tutor::before {
  background: radial-gradient(circle, rgba(74, 224, 173, 0.2), transparent 65%);
}
.ph-dest-assist::before {
  background: radial-gradient(circle, rgba(239, 194, 122, 0.16), transparent 65%);
}
.ph-dest:hover {
  transform: translateY(-3px);
  border-color: rgba(74, 224, 173, 0.4);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
}
.ph-dest-eyebrow {
  position: relative;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ph-warm);
  letter-spacing: 0.02em;
}
.ph-dest-label {
  position: relative;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.ph-dest-text {
  position: relative;
  margin: 0;
  color: var(--ph-muted);
  line-height: 1.75;
  font-size: 0.97rem;
  flex: 1;
}
.ph-dest-go {
  position: relative;
  color: var(--ph-leaf-2);
  font-weight: 700;
  font-size: 0.92rem;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ph-caps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ph-caps-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.ph-cap {
  padding: 20px 18px;
  border-radius: 18px;
  border: 1px solid var(--ph-line);
  background: rgba(255, 255, 255, 0.028);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.ph-cap:hover {
  border-color: rgba(74, 224, 173, 0.28);
  background: rgba(31, 186, 134, 0.06);
}
.ph-cap strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.ph-cap span {
  display: block;
  color: var(--ph-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.ph-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.ph-steps-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ph-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px 18px;
  border-radius: 18px;
  border: 1px solid var(--ph-line);
  background: rgba(0, 0, 0, 0.18);
}
.ph-step-num {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #04231a;
  background: linear-gradient(135deg, var(--ph-leaf-2), var(--ph-leaf));
  box-shadow: 0 8px 18px rgba(31, 186, 134, 0.25);
}
.ph-step-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.ph-step-body strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.ph-step-body span {
  color: var(--ph-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

.ph-close-panel {
  padding: clamp(28px, 5vw, 40px);
  border-radius: calc(var(--ph-radius) + 4px);
  border: 1px solid rgba(74, 224, 173, 0.22);
  background:
    radial-gradient(700px 280px at 100% 0%, rgba(31, 186, 134, 0.18), transparent 55%),
    linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}
.ph-close .ph-section-desc { max-width: 32rem; }

.ph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.ph-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--ph-line);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  min-height: 128px;
}
.ph-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(74, 224, 173, 0.34);
  background: rgba(31, 186, 134, 0.08);
}
.ph-tile-name {
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}
.ph-tile-id {
  font-size: 0.75rem;
  color: var(--ph-faint);
  font-family: ui-monospace, Consolas, monospace;
  direction: ltr;
  text-align: left;
}
.ph-tile-desc {
  margin: 0;
  color: var(--ph-muted);
  font-size: 0.88rem;
  line-height: 1.65;
  flex: 1;
}
.ph-tile-meta {
  font-size: 0.78rem;
  color: var(--ph-leaf-2);
  font-weight: 700;
}

.ph-empty {
  padding: 28px 18px;
  border: 1px dashed var(--ph-line);
  border-radius: 16px;
  color: var(--ph-muted);
  text-align: center;
}

.ph-foot {
  max-width: var(--ph-max);
  margin: 0 auto;
  padding: 18px 22px calc(28px + env(safe-area-inset-bottom));
  color: var(--ph-faint);
  font-size: 0.85rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.ph-structure {
  border: 1px solid var(--ph-line);
  border-radius: var(--ph-radius);
  background: rgba(0, 0, 0, 0.22);
  overflow: hidden;
}
.ph-structure pre {
  margin: 0;
  padding: 20px 18px;
  overflow-x: auto;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--ph-mint);
  direction: ltr;
  text-align: left;
  white-space: pre;
}

.ph-doc-card {
  padding: 20px 18px;
  border-radius: 18px;
  border: 1px solid var(--ph-line);
  background: rgba(255, 255, 255, 0.03);
  line-height: 1.8;
  color: var(--ph-muted);
}
.ph-doc-card p { margin: 0 0 12px; color: var(--ph-sand); }
.ph-doc-card p:last-child { margin-bottom: 0; }
.ph-doc-list {
  margin: 0;
  padding: 0 1.1rem 0 0;
  color: var(--ph-muted);
}
.ph-doc-list li { margin: 0.35rem 0; line-height: 1.7; }

.ph-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ph-line);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.16);
}
.ph-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}
.ph-table th,
.ph-table td {
  padding: 12px 14px;
  text-align: right;
  border-bottom: 1px solid var(--ph-line);
  vertical-align: top;
  font-size: 0.92rem;
  line-height: 1.55;
}
.ph-table th {
  color: var(--ph-leaf-2);
  font-weight: 750;
  background: rgba(255, 255, 255, 0.03);
}
.ph-table tr:last-child td { border-bottom: 0; }
.ph-table a { color: var(--ph-sand); }
.ph-table code,
.ph-doc-card code,
.ph-section-desc code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.86em;
  direction: ltr;
  unicode-bidi: isolate;
  color: var(--ph-mint);
}

@media (max-width: 960px) {
  .ph-caps-4 { grid-template-columns: 1fr 1fr; }
  .ph-steps-row { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .ph-caps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .ph-top {
    flex-direction: column;
    align-items: stretch;
  }
  .ph-nav-cta,
  .ph-hero-cta {
    justify-content: stretch;
  }
  .ph-btn {
    flex: 1 1 auto;
    text-align: center;
  }
  .ph-split,
  .ph-caps,
  .ph-caps-4,
  .ph-proof {
    grid-template-columns: 1fr;
  }
  .ph-hero {
    min-height: auto;
    padding-top: 32px;
  }
  .ph-title { max-width: none; }
  .ph-section-head-center { text-align: right; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .ph-orb,
  .ph-top,
  .ph-hero,
  .ph-section,
  .ph-btn-live,
  .ph-live-dot,
  .ph-live-ring {
    animation: none !important;
  }
}
