@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;500;600&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Oswald:wght@300;400;500;600&display=swap");

:root {
  color-scheme: dark;
  --black: #070706;
  --coal: #0f0d0b;
  --charcoal: #17130f;
  --wall: #211a14;
  --wall-2: #2c251d;
  --paper: #b9aa8b;
  --paper-soft: #d7c8ae;
  --cream: #eadcc5;
  --muted: #aa9c87;
  --dim: #756a5c;
  --rust: #8f4e3f;
  --rust-soft: #b66f59;
  --amber: #c8a25e;
  --moss: #6f8370;
  --teal: #6aa79f;
  --red-dry: #612f2a;
  --steel: #4d524d;
  --line: rgba(234, 220, 197, 0.13);
  --line-strong: rgba(234, 220, 197, 0.24);
  --shadow: rgba(0, 0, 0, 0.48);
  --max: 1180px;
  --font-body: "Barlow", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-cond: "Oswald", "Barlow", system-ui, sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--black);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  background: var(--black);
  font-family: var(--font-body);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -4;
  background:
    radial-gradient(100% 68% at 50% -12%, rgba(187, 149, 92, 0.18), transparent 64%),
    radial-gradient(62% 44% at 8% 31%, rgba(106, 167, 159, 0.1), transparent 70%),
    radial-gradient(70% 52% at 96% 72%, rgba(143, 78, 63, 0.16), transparent 72%),
    linear-gradient(178deg, #17130f 0%, #100d0a 58%, #070706 100%);
}

body::after {
  z-index: -1;
  opacity: 0.7;
  background:
    repeating-linear-gradient(101deg, rgba(255, 255, 255, 0.012) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(7deg, rgba(0, 0, 0, 0.04) 0 1px, transparent 1px 5px),
    radial-gradient(58% 44% at 50% 0%, rgba(255, 225, 167, 0.08), transparent 68%),
    radial-gradient(120% 100% at 50% 50%, transparent 42%, rgba(0, 0, 0, 0.62) 100%);
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

::selection {
  color: #f7ecd8;
  background: var(--rust);
}

.site {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.site::before,
.site::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.site::before {
  z-index: -3;
  opacity: 0.76;
  background:
    radial-gradient(ellipse at 28% 42%, rgba(234, 220, 197, 0.045), transparent 22%),
    radial-gradient(ellipse at 76% 28%, rgba(106, 167, 159, 0.07), transparent 24%),
    radial-gradient(ellipse at 54% 76%, rgba(0, 0, 0, 0.24), transparent 32%),
    linear-gradient(105deg, transparent 0 38%, rgba(255, 232, 180, 0.026) 49%, transparent 63%);
}

.site::after {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.48), transparent 24%, transparent 76%, rgba(0, 0, 0, 0.54)),
    linear-gradient(180deg, transparent 0 68%, rgba(0, 0, 0, 0.46));
}

.shell {
  position: relative;
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

.topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid var(--line);
}

.brand,
.back-link,
.section-nav a,
.main-nav a {
  font-family: var(--font-cond);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #eadcc5;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  background: url("/src/assets/temporary-panch-mark.svg") center / contain no-repeat;
}

.back-link {
  color: #aa9b86;
  transition: color 0.2s ease, transform 0.2s ease;
}

.back-link:hover,
.back-link:focus-visible {
  color: #f0e1c8;
  transform: translateX(-4px);
}

.main-nav {
  display: inline-flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 28px);
}

.main-nav a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current="page"] {
  color: var(--amber);
  outline: none;
}

.mental-home .hero,
.subhero {
  --hero-cursor-x: 0px;
  --hero-cursor-y: 0px;
  --hero-cursor-opacity: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.mental-home .hero::before,
.subhero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  width: min(42rem, 76vw);
  aspect-ratio: 1;
  pointer-events: none;
  opacity: var(--hero-cursor-opacity);
  background:
    radial-gradient(circle, rgba(218, 188, 130, 0.16) 0%, rgba(218, 188, 130, 0.075) 32%, transparent 68%),
    radial-gradient(circle, rgba(168, 113, 66, 0.12) 0%, transparent 42%);
  filter: blur(2px);
  transform: translate3d(var(--hero-cursor-x), var(--hero-cursor-y), 0) translate3d(-50%, -50%, 0);
  transition: opacity 0.26s ease;
  will-change: transform, opacity;
}

.mental-home .hero > :not(.mental-cursor-dot),
.subhero > :not(.mental-cursor-dot) {
  position: relative;
  z-index: 1;
}

.mental-cursor-dot {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(239, 222, 195, 0.74);
  border-radius: 50%;
  background: rgba(211, 179, 123, 0.18);
  box-shadow:
    0 0 12px rgba(229, 194, 127, 0.42),
    0 0 32px rgba(168, 113, 66, 0.28);
  opacity: var(--hero-cursor-opacity);
  pointer-events: none;
  transform: translate3d(var(--hero-cursor-x), var(--hero-cursor-y), 0) translate3d(-50%, -50%, 0);
  transition: opacity 0.18s ease, box-shadow 0.24s ease;
  will-change: transform, opacity;
}

.subhero {
  padding: 74px 0 50px;
  border-bottom: 1px solid var(--line);
}

.subhero::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  z-index: 1;
  width: min(220px, 48vw);
  height: 1px;
  background: linear-gradient(90deg, var(--rust-soft), var(--teal), transparent);
}

.eyebrow,
.hero-kicker,
.section-code {
  color: var(--rust-soft);
  font-family: var(--font-cond);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}

.subhero h1 {
  max-width: 880px;
  margin: 16px 0 0;
  color: #eadcc5;
  font-family: var(--font-cond);
  font-size: clamp(3.2rem, 8vw, 5.4rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0.98;
  text-transform: uppercase;
  text-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}

.subhero p {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 1.32rem;
  line-height: 1.62;
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--line);
}

.section-nav a {
  color: var(--dim);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.section-nav a:hover,
.section-nav a:focus-visible,
.section-nav a[aria-current="page"] {
  color: var(--cream);
  border-color: var(--rust-soft);
}

.footer {
  padding: 34px 0 44px;
  display: flex;
  justify-content: space-between;
  gap: 22px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--font-cond);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}

.reveal-item {
  opacity: 1;
}

html.js .reveal-item {
  opacity: 0;
}

html.js .reveal-item.is-visible {
  opacity: 1;
}

@media (max-width: 760px) {
  .shell {
    width: min(calc(100% - 28px), var(--max));
  }

  .topbar {
    min-height: 68px;
  }

  .brand,
  .back-link,
  .section-nav a,
  .main-nav a {
    font-size: 0.76rem;
  }

  .main-nav {
    gap: 14px;
  }

  .subhero {
    padding: 54px 0 40px;
  }

  .subhero p {
    font-size: 1.16rem;
  }

  .section-nav {
    gap: 9px 14px;
  }

  .footer {
    flex-direction: column;
  }
}

@media (hover: none), (pointer: coarse) {
  .mental-home .hero::before,
  .subhero::before,
  .mental-cursor-dot {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  html.js .reveal-item {
    opacity: 1;
  }
}
