/* ============================================================
   Parnera Hill Partners — styles
   ============================================================ */

:root {
  --bg: #050507;
  --bg-2: #0a0a0e;
  --ink: #ece9e2;
  --ink-2: rgba(236, 233, 226, 0.72);
  --ink-3: rgba(236, 233, 226, 0.46);
  --rule: rgba(236, 233, 226, 0.12);
  --rule-2: rgba(236, 233, 226, 0.22);
  --ember: #f0a957;
  --ice: #8fb8e8;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(240, 169, 87, 0.35); color: #fff; }

/* Layers */
#field {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
  transition: opacity 0.8s var(--ease);
}
.grain {
  position: fixed; inset: -50%; z-index: 3; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.6s steps(2) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-3%, 2%); }
  100% { transform: translate(2%, -3%); }
}
.cursor-glow {
  position: fixed; z-index: 1; pointer-events: none;
  width: 560px; height: 560px; left: 0; top: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 184, 232, 0.08), rgba(240, 169, 87, 0.03) 40%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0; transition: opacity 0.6s;
}
body.has-pointer .cursor-glow { opacity: 1; }
main { position: relative; z-index: 2; }

/* Type */
.mono {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
}
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ember);
  margin-bottom: 22px;
}
.display {
  font-family: var(--serif);
  font-size: clamp(38px, 5.2vw, 72px);
  line-height: 1.04; letter-spacing: -0.015em;
}
.display em { font-style: italic; color: var(--ink); position: relative; }
.display--xl { font-size: clamp(48px, 7.5vw, 112px); }
.lede { font-size: clamp(17px, 1.35vw, 20px); color: var(--ink-2); max-width: 640px; }
.display + .lede { margin-top: 24px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 15px 22px; border: 1px solid var(--rule-2); border-radius: 4px;
  color: var(--ink); background: rgba(255,255,255,0.02);
  transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease), color 0.3s;
  position: relative; overflow: hidden; white-space: nowrap;
}
.btn span { transition: transform 0.3s var(--ease); }
.btn:hover { border-color: rgba(236,233,226,0.5); background: rgba(255,255,255,0.05); }
.btn:hover span { transform: translateX(4px); }
.btn--primary { background: var(--ink); color: #0a0a0e; border-color: var(--ink); }
.btn--primary:hover { background: #fff; border-color: #fff; }
.btn--ghost { background: transparent; }
.btn--small { padding: 11px 16px; font-size: 11px; }

/* Nav */
.nav {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 10; width: min(calc(100% - 32px), 1100px);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 10px 14px 10px 18px; border-radius: 10px;
  background: rgba(16, 16, 20, 0.55);
  border: 1px solid rgba(236,233,226,0.08);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  transition: background 0.4s, border-color 0.4s, transform 0.5s var(--ease);
}
.nav.scrolled { background: rgba(10, 10, 14, 0.78); border-color: rgba(236,233,226,0.14); }
.nav__brand { display: inline-flex; align-items: center; gap: 10px; }
.nav__mark { width: 26px; height: 26px; color: var(--ink); }
.nav__word { font-family: var(--serif); font-size: 20px; letter-spacing: 0.005em; white-space: nowrap; }
.nav__word em { font-style: italic; color: var(--ink-2); }
.nav__links { display: flex; gap: 30px; justify-content: center; }
.nav__links a {
  font-size: 13px; font-weight: 400; color: var(--ink-2); position: relative;
  transition: color 0.3s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav__links a:hover, .nav__links a.active { color: var(--ink); }
.nav__links a:hover::after, .nav__links a.active::after { transform: scaleX(1); }
.nav .btn--small { justify-self: end; }
.nav__toggle {
  display: none; justify-self: end; width: 40px; height: 40px; background: none; border: 0;
  cursor: pointer; flex-direction: column; gap: 6px; align-items: center; justify-content: center;
}
.nav__toggle span { width: 20px; height: 1px; background: var(--ink); transition: transform 0.3s, opacity 0.3s; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.mobile-menu {
  position: fixed; inset: 0; z-index: 9; background: rgba(5,5,7,0.96);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 28px;
  opacity: 0; pointer-events: none; transition: opacity 0.4s;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a { font-family: var(--serif); font-size: 36px; }

/* Hero */
.hero {
  min-height: 100svh; position: relative;
  display: flex; flex-direction: column; justify-content: center;
  padding: 140px var(--gutter) 60px;
}
.hero__inner { max-width: 1100px; margin: 0 auto; text-align: center; position: relative; }
.hero__inner::before {
  content: ""; position: absolute; inset: -12% -10%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(5,5,7,0.78) 0%, rgba(5,5,7,0.5) 45%, transparent 72%);
}
.hero__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(44px, 7vw, 104px); line-height: 1.02; letter-spacing: -0.02em;
  margin: 0 auto 32px;
}
.hero__title em { font-style: italic; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero__title .line > span {
  display: block; transform: translateY(110%);
  animation: rise 1.3s var(--ease) forwards;
}
.hero__title .line:nth-child(2) > span { animation-delay: 0.12s; }
.hero__title .line:nth-child(3) > span { animation-delay: 0.24s; }
@keyframes rise { to { transform: translateY(0); } }
.hero__sub {
  font-size: clamp(16px, 1.4vw, 20px); color: var(--ink-2);
  max-width: 680px; margin: 0 auto 40px;
}
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__foot {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 28px;
  display: flex; justify-content: space-between; align-items: flex-end;
}
.hero__scroll { display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }
.hero__scroll-line { width: 1px; height: 44px; background: linear-gradient(to bottom, transparent, var(--ink-2)); animation: scrollpulse 2.2s ease-in-out infinite; }
@keyframes scrollpulse { 0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }
.hero .eyebrow { opacity: 0; animation: fadeup 1s var(--ease) 0.1s forwards; }
.hero .hero__sub, .hero .hero__cta { opacity: 0; animation: fadeup 1s var(--ease) 0.5s forwards; }
.hero .hero__cta { animation-delay: 0.65s; }
.hero .hero__foot { opacity: 0; animation: fadeup 1s var(--ease) 1s forwards; }
@keyframes fadeup { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

/* Story */
.story { position: relative; padding: 10vh 0 20vh; }
.story__panel {
  min-height: 90vh; display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 0 var(--gutter); max-width: 900px; margin: 0 auto;
  opacity: 0.18; transform: translateY(20px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.story__panel.is-active { opacity: 1; transform: translateY(0); }
.story__panel { position: relative; }
.story__panel::before {
  content: ""; position: absolute; left: -10%; right: -10%; top: 25%; bottom: 25%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(5,5,7,0.7) 0%, rgba(5,5,7,0.4) 50%, transparent 75%);
}
.story__panel .display { font-size: clamp(40px, 5.6vw, 84px); margin-bottom: 26px; }
.story__panel p { font-size: clamp(16px, 1.35vw, 20px); color: var(--ink-2); max-width: 620px; }

/* Sections */
.section { position: relative; padding: clamp(96px, 12vw, 180px) 0; background: var(--bg); }
.container { width: min(var(--container), calc(100% - 2 * var(--gutter))); margin: 0 auto; }
.section__head { max-width: 860px; margin-bottom: clamp(48px, 6vw, 88px); }
.section__head .lede { margin-top: 24px; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.practice-grid .reveal:nth-child(2), .sector-grid .reveal:nth-child(2), .signal-grid .reveal:nth-child(2), .steps .reveal:nth-child(2) { transition-delay: 0.1s; }
.practice-grid .reveal:nth-child(3), .sector-grid .reveal:nth-child(3), .signal-grid .reveal:nth-child(3), .steps .reveal:nth-child(3) { transition-delay: 0.2s; }
.practice-grid .reveal:nth-child(4), .sector-grid .reveal:nth-child(4), .signal-grid .reveal:nth-child(4), .steps .reveal:nth-child(4) { transition-delay: 0.3s; }

/* Practices */
.practices { border-top: 1px solid var(--rule); }
.practice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.practice {
  position: relative; background: var(--bg); padding: clamp(28px, 3.2vw, 48px);
  overflow: hidden; outline: none;
  --mx: 50%; --my: 50%;
}
.practice::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(500px circle at var(--mx) var(--my), rgba(143,184,232,0.09), transparent 45%);
  transition: opacity 0.5s;
}
.practice:hover::before, .practice:focus::before { opacity: 1; }
.practice::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, var(--ember), var(--ice), transparent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.7s var(--ease);
}
.practice:hover::after, .practice:focus::after { transform: scaleX(1); }
.practice__num { position: absolute; top: 28px; right: 28px; }
.practice__icon { width: 44px; height: 44px; color: var(--ink); margin-bottom: 36px; transition: transform 0.6s var(--ease); }
.practice:hover .practice__icon { transform: translateY(-4px); }
.practice h3 { font-family: var(--serif); font-size: clamp(28px, 2.4vw, 36px); line-height: 1.1; margin-bottom: 10px; }
.practice__tag { font-style: italic; font-family: var(--serif); font-size: 20px; color: var(--ember); margin-bottom: 18px; }
.practice > p:not(.practice__tag) { color: var(--ink-2); margin-bottom: 22px; max-width: 520px; }
.practice ul li {
  position: relative; padding: 10px 0 10px 22px; border-top: 1px solid var(--rule);
  font-size: 15px; color: var(--ink-2);
}
.practice ul li::before { content: ""; position: absolute; left: 0; top: 19px; width: 8px; height: 1px; background: var(--ice); }

/* Horizon */
.horizon {
  position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: var(--bg); text-align: center; padding: 120px var(--gutter);
}
.horizon::before {
  /* atmosphere: wide soft glow rising from the rim */
  content: ""; position: absolute; left: 50%; top: 72%; width: 160vw; height: 70vh;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at 50% 100%, rgba(240,169,87,0.42) 0%, rgba(200,120,70,0.18) 18%, rgba(90,120,190,0.16) 38%, rgba(30,50,110,0.08) 55%, transparent 72%);
  filter: blur(10px); pointer-events: none;
  animation: horizonBreath 9s ease-in-out infinite;
}
.horizon__glow {
  /* the planet: a dark disc whose top edge is the bright rim */
  position: absolute; left: 50%; top: 72%; width: 240vw; height: 240vw; max-width: 4000px; max-height: 4000px;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(ellipse at 50% 0%, #0b0a0c 0%, var(--bg) 18%);
  box-shadow:
    0 -1px 0 0 rgba(255,236,210,0.95),
    0 -3px 12px 0 rgba(255,200,140,0.9),
    0 -14px 50px 6px rgba(240,169,87,0.55),
    0 -40px 140px 30px rgba(240,169,87,0.22),
    0 -120px 320px 80px rgba(100,140,210,0.16);
  pointer-events: none;
}
@keyframes horizonBreath { 0%, 100% { opacity: 0.8; } 50% { opacity: 1; } }
.horizon__content { position: relative; z-index: 1; max-width: 1000px; padding-bottom: 18vh; }
.horizon__content .lede { margin: 30px auto 0; }

/* Approach */
.steps {
  counter-reset: step;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.step { padding: 40px 32px 48px 0; border-right: 1px solid var(--rule); margin-right: 32px; position: relative; }
.step:last-child { border-right: 0; margin-right: 0; }
.step__num { display: block; margin-bottom: 40px; color: var(--ember); }
.step h3 { font-family: var(--serif); font-size: 40px; margin-bottom: 14px; }
.step p { font-size: 15px; color: var(--ink-2); }
.step::before {
  content: ""; position: absolute; left: 0; top: 0; height: 1px; width: 100%;
  background: linear-gradient(90deg, var(--ice), transparent);
  transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease);
}
.step.in::before { transform: scaleX(1); }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: clamp(56px, 7vw, 96px); }
.principle { padding-top: 18px; border-top: 1px solid var(--rule-2); }
.principle p { font-family: var(--serif); font-size: clamp(22px, 1.8vw, 27px); line-height: 1.25; margin-top: 12px; }

/* Sectors */
.sectors { border-top: 1px solid var(--rule); }
.marquee { overflow: hidden; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 22px 0; margin-bottom: clamp(48px, 6vw, 88px); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; gap: 64px; width: max-content; animation: marquee 48s linear infinite; }
.marquee__track span { font-family: var(--serif); font-size: 30px; white-space: nowrap; color: var(--ink-2); position: relative; }
.marquee__track span::after { content: "·"; position: absolute; right: -40px; color: var(--ember); }
@keyframes marquee { to { transform: translateX(-50%); } }
.sector-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.sector { padding-top: 22px; border-top: 1px solid var(--rule-2); display: flex; flex-direction: column; gap: 14px; min-height: 240px; }
.sector h3 { font-family: var(--serif); font-size: 26px; line-height: 1.15; }
.sector p { font-size: 15px; color: var(--ink-2); flex: 1; }

/* Signals */
.signals { border-top: 1px solid var(--rule); background: var(--bg-2); }
.signal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.signal { background: var(--bg-2); padding: 36px 30px 30px; display: flex; flex-direction: column; gap: 18px; min-height: 320px; }
.signal__stat { font-family: var(--serif); font-size: clamp(44px, 4.4vw, 68px); line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.signal p { font-size: 15px; color: var(--ink-2); flex: 1; }
.signal__src { color: var(--ink-3); transition: color 0.3s; }
.signal__src:hover { color: var(--ember); }

/* Firm */
.firm { border-top: 1px solid var(--rule); }
.firm__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.firm__body p { font-size: clamp(17px, 1.3vw, 20px); color: var(--ink-2); margin-bottom: 22px; }
.firm__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.firm__facts div { border-top: 1px solid var(--rule-2); padding-top: 14px; }
.firm__facts p { font-size: 15px; margin: 8px 0 0; color: var(--ink); }

/* Contact */
.contact { border-top: 1px solid var(--rule); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact__email {
  display: inline-block; margin-top: 36px; font-family: var(--serif); font-size: clamp(26px, 2.6vw, 38px);
  border-bottom: 1px solid var(--rule-2); padding-bottom: 4px; transition: border-color 0.3s, color 0.3s;
}
.contact__email:hover { border-color: var(--ember); color: var(--ember); }
.form { display: flex; flex-direction: column; gap: 22px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form label { display: flex; flex-direction: column; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.form input, .form select, .form textarea {
  font-family: var(--sans); font-size: 16px; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--rule-2);
  padding: 10px 0; outline: none; border-radius: 0; resize: vertical;
  transition: border-color 0.3s;
}
.form select option { background: #111; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--ember); }
.form .btn { align-self: flex-start; margin-top: 8px; }
.form__note { margin-top: -8px; }

/* Footer */
.footer { position: relative; z-index: 2; border-top: 1px solid var(--rule); padding: 56px 0 40px; background: var(--bg); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; align-items: start; }
.footer__tag { margin-top: 18px; color: var(--ink-3); font-size: 14px; max-width: 320px; }
.footer__links { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--ink-2); }
.footer__links a:hover { color: var(--ink); }
.footer__meta { display: flex; flex-direction: column; gap: 10px; text-align: right; }

/* Responsive */
@media (max-width: 1024px) {
  .practice-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2) { border-right: 0; margin-right: 0; }
  .step:nth-child(3), .step:nth-child(4) { border-top: 1px solid var(--rule); }
  .sector-grid, .signal-grid { grid-template-columns: 1fr 1fr; }
  .principles { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 820px) {
  .nav { grid-template-columns: 1fr auto; padding: 10px 8px 10px 14px; }
  .nav__links, .nav .btn--small { display: none; }
  .nav__toggle { display: flex; }
  .firm__grid, .contact__grid, .footer__grid { grid-template-columns: 1fr; }
  .footer__meta { text-align: left; }
  .hero__foot .mono:first-child, .hero__foot .mono:last-child { display: none; }
  .hero__foot { justify-content: center; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; margin-right: 0; padding: 32px 0; border-top: 1px solid var(--rule); }
  .step:first-child { border-top: 0; }
  .sector-grid, .signal-grid, .firm__facts, .form__row { grid-template-columns: 1fr; }
  .signal { min-height: 0; }
  .sector { min-height: 0; }
  .marquee__track span { font-size: 22px; }
  .hero { padding-top: 120px; }
  .practice__num { top: 22px; right: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .hero__title .line > span { transform: none; }
  .reveal { opacity: 1; transform: none; }
  .story__panel { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
