@import "tailwindcss";

/* Design system: material-based, no gradients/shadows/glow */
:root {
  --navy-foundation: #0B1220;
  --navy-elevated: #111C30;
  --navy-architectural: #162540;
  --gold-material: #C6A24A;
  --gold-hover: #D4AF57;
  --gold-subtle: rgba(198, 162, 74, 0.35);
  --stone-text: #E8ECF4;
  --muted-text: #8893AD;
  --muted-caption: #5F6B86;
  --node-base: #1C2E4A;
  --node-active: #243A5C;
  --line-default: rgba(198, 162, 74, 0.25);
  --line-active: #C6A24A;
}

@theme inline {
  --color-navy-foundation: var(--navy-foundation);
  --color-navy-elevated: var(--navy-elevated);
  --color-navy-architectural: var(--navy-architectural);
  --color-gold-material: var(--gold-material);
  --color-gold-hover: var(--gold-hover);
  --color-stone-text: var(--stone-text);
  --color-muted-text: var(--muted-text);
  --color-muted-caption: var(--muted-caption);
  --font-heading: var(--font-sora);
  --font-sans: var(--font-inter);
}

body {
  background: var(--navy-foundation);
  color: var(--stone-text);
  font-family: var(--font-inter), system-ui, sans-serif;
}

/* Anchor targets sit below sticky nav when scrolled to */
section[id] {
  scroll-margin-top: 5rem;
}

/* Slab spacing: 120–160px between sections */
.slab {
  padding-top: 7.5rem;
  padding-bottom: 7.5rem;
}

@media (min-width: 768px) {
  .slab {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }
}

/* Layer label: small caps, gold */
.layer-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-material);
}

/* Structural divider: 1px gold */
.gold-rule {
  border-color: var(--gold-subtle);
}

/* Motion: 400–700ms, cubic-bezier(0.2, 0.6, 0.2, 1), 8px max shift */
@media (prefers-reduced-motion: no-preference) {
  .hero-reveal {
    animation: heroReveal 0.6s cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
  }
  .hero-reveal-1 { animation-delay: 0.05s; opacity: 0; }
  .hero-reveal-2 { animation-delay: 0.12s; opacity: 0; }
  .hero-reveal-3 { animation-delay: 0.22s; opacity: 0; }
  .hero-reveal-4 { animation-delay: 0.32s; opacity: 0; }
  .hero-reveal-5 { animation-delay: 0.42s; opacity: 0; }
}

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-sticky {
  position: sticky;
  top: 0;
}

/* Scrolly: story (40%) | sticky viz (60%) */
.scrolly__viz {
  position: relative;
}
@media (min-width: 768px) {
  .scrolly__viz {
    position: sticky;
    top: 7rem;
    align-self: start;
  }
}

/* Operating Model: detail panel cross-fade */
@keyframes detailIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate-detail-in {
  animation: detailIn 0.28s cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
}

/* Systems Philosophy: line draw + progressive disclosure */
.philosophy .principles {
  display: grid;
  gap: 1.75rem;
}

.philosophy .principle {
  cursor: default;
  outline: none;
}

.philosophy .principle__line {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.2, 0.6, 0.2, 1), opacity 0.45s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.philosophy .principle__title {
  transition: opacity 0.3s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.philosophy .principle__desc {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.35s cubic-bezier(0.2, 0.6, 0.2, 1), max-height 0.45s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.philosophy .principle:hover .principle__line,
.philosophy .principle:focus-within .principle__line,
.philosophy .principle.is-expanded .principle__line {
  transform: scaleX(1);
  opacity: 0.7;
}

.philosophy .principle:hover .principle__desc,
.philosophy .principle:focus-within .principle__desc,
.philosophy .principle.is-expanded .principle__desc {
  opacity: 1;
  max-height: 200px;
}

.philosophy .principle:hover .principle__title,
.philosophy .principle:focus-within .principle__title,
.philosophy .principle.is-expanded .principle__title {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .philosophy .principle__line,
  .philosophy .principle__desc,
  .philosophy .principle__title {
    transition-duration: 0.01ms;
  }
}

/* Layer rule: gold line draws in when section enters viewport */
.layer__rule {
  height: 1px;
  background: rgba(198, 162, 74, 0.55);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.layer.is-visible .layer__rule {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  .layer__rule {
    transition-duration: 0.01ms;
  }
  .layer .layer__rule {
    transform: scaleX(1);
  }
}

/* Diagram spotlight: navy-on-navy depth behind active node */
.diagram-spotlight {
  position: relative;
  overflow: hidden;
}

.diagram-spotlight::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 520px;
  height: 520px;
  left: var(--spot-x, 50%);
  top: var(--spot-y, 50%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(28, 46, 72, 0.5) 0%,
    rgba(22, 37, 64, 0.25) 40%,
    rgba(11, 18, 32, 0) 70%
  );
  opacity: var(--spot-opacity, 0);
  transition: opacity 0.4s cubic-bezier(0.2, 0.6, 0.2, 1),
    left 0.5s cubic-bezier(0.2, 0.6, 0.2, 1),
    top 0.5s cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* Contact: right panel – subtle grid behind content, divider on desktop only */
.contact-side {
  position: relative;
}

@media (min-width: 1024px) {
  .contact-side {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding-left: 48px;
  }
}

.contact-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: 0.6;
}

/* Layer02: execution grid */
.layer02-block {
  padding: 4px 0;
  transition: padding-left 0.3s ease;
}

.layer02-block:hover {
  padding-left: 8px;
}

.layer02-block-marker {
  width: 20px;
  height: 2px;
  background: rgba(201, 162, 39, 0.5);
  margin-bottom: 12px;
}

.layer02-block-title {
  font-weight: 500;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
}

.layer02-block-intro {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.5;
  margin-bottom: 12px;
}

.layer02-block-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}

.layer02-block-bullets li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 4px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.45;
}

.layer02-block-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: rgba(201, 162, 39, 0.5);
}

.layer02-plan {
  margin-bottom: 12px;
}

.layer02-plan:last-child {
  margin-bottom: 0;
}

.layer02-plan-name {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 4px;
}

.layer02-plan-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}

.layer02-plan-bullets li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 2px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
}

.layer02-plan-bullets li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.4);
}

.layer02-block-closing {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
  margin-top: 10px;
}
