/* ============================================================
   Pathque — stylesheet
   Editorial, clinical, refined.
   ============================================================ */

:root {
  /* palette */
  --ivory:      #F6F2EA;
  --ivory-deep: #EDE6D4;
  --paper:      #FBF8F1;
  --ink:        #0B1A2B;
  --ink-2:      #1B2B40;
  --slate:      #4A5568;
  --slate-2:    #6B7280;
  --gold:       #C9B896;
  --gold-deep:  #A08A5B;
  --oxblood:    #7A1B20;
  --oxblood-dk: #5B1216;
  --rule:       rgba(11, 26, 43, 0.14);
  --rule-soft:  rgba(11, 26, 43, 0.08);

  /* type */
  --display: "Fraunces", "Times New Roman", Times, serif;
  --body:    "Newsreader", Georgia, "Times New Roman", serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* rhythm */
  --container: 1240px;
  --gutter:    clamp(1.5rem, 4.5vw, 3.25rem);
  --section:   clamp(4rem, 10vw, 8.5rem);
}

/* ------------------------------------------------------------
   reset
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, figure, blockquote, ul, ol, hr {
  margin: 0; padding: 0;
}
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

/* ------------------------------------------------------------
   body & paper
   ------------------------------------------------------------ */
body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "kern", "liga", "onum", "pnum";
  font-optical-sizing: auto;
  overflow-x: hidden;
}

/* paper grain — fixed, subtle, printed-not-plastered */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.043 0 0 0 0 0.102 0 0 0 0 0.168 0 0 0 0.75 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.045;
  mix-blend-mode: multiply;
}

/* top gradient wash — barely visible, sets the stage */
body::after {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60vh;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at 20% 0%, rgba(201, 184, 150, 0.18), transparent 60%);
}

main, header, footer { position: relative; z-index: 2; }

/* ------------------------------------------------------------
   typography scale
   ------------------------------------------------------------ */
.display,
h1.display {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 20;
  font-size: clamp(2.75rem, 7.8vw, 6.75rem);
  line-height: 0.98;
  letter-spacing: -0.022em;
  color: var(--ink);
}
.display em,
h1.display em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 40;
  color: var(--oxblood);
}

h2 {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: "opsz" 72, "SOFT" 10;
  font-size: clamp(1.875rem, 3.8vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.018em;
  color: var(--ink);
}
h2 em {
  font-style: italic;
  color: var(--oxblood);
}

h3 {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "opsz" 36;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.standfirst {
  font-family: var(--body);
  font-style: italic;
  font-size: clamp(1.125rem, 1.8vw, 1.5rem);
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 36ch;
}

.section-marker {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--oxblood);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2.25rem;
}
.section-marker::before {
  content: "";
  display: inline-block;
  width: 2.25rem;
  height: 1px;
  background: var(--oxblood);
}

.body-prose p {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 60ch;
}
.body-prose p + p { margin-top: 1.15em; }
.body-prose p a {
  color: var(--oxblood);
  border-bottom: 1px solid rgba(122, 27, 32, 0.35);
  padding-bottom: 1px;
  transition: border-color 240ms ease;
}
.body-prose p a:hover { border-bottom-color: var(--oxblood); }

.dropcap {
  float: left;
  font-family: var(--display);
  font-variation-settings: "opsz" 144, "wght" 500, "SOFT" 10;
  font-size: 4.6em;
  line-height: 0.82;
  padding: 0.1em 0.12em 0 0;
  color: var(--oxblood);
}

/* ------------------------------------------------------------
   site container
   ------------------------------------------------------------ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ------------------------------------------------------------
   header
   ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(246, 242, 234, 0.88);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  z-index: 10;
  border-bottom: 1px solid var(--rule-soft);
}
.site-header .container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 1.6rem;
  padding-bottom: 1.2rem;
}
.wordmark {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 0;
  font-size: 1.4rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
}
.wordmark .dot {
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  border-radius: 50%;
  background: var(--oxblood);
  margin-left: 0.25em;
  transform: translateY(-0.22em);
}

.site-nav {
  display: flex;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: baseline;
}
.site-nav a {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  padding-bottom: 4px;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--oxblood);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 360ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--oxblood); }

/* mobile nav: stay a single row, smaller gap */
@media (max-width: 640px) {
  .site-nav { gap: 1.15rem; }
  .site-nav a { font-size: 0.68rem; letter-spacing: 0.14em; }
}

/* ------------------------------------------------------------
   rules
   ------------------------------------------------------------ */
.rule {
  border: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--rule) 10%, var(--rule) 90%, transparent);
  margin: 0 var(--gutter);
}

.rule-thick {
  border: 0;
  height: 1px;
  background: var(--ink);
  opacity: 0.6;
}

/* ------------------------------------------------------------
   hero
   ------------------------------------------------------------ */
.hero {
  padding-top: clamp(4rem, 11vw, 10rem);
  padding-bottom: clamp(3rem, 8vw, 7rem);
  position: relative;
}
.hero .display {
  max-width: 17ch;
  margin-bottom: clamp(2rem, 3vw, 2.5rem);
}
.hero .standfirst { margin-top: 0.5rem; }
.hero-meta {
  position: absolute;
  right: var(--gutter);
  top: clamp(4rem, 11vw, 10rem);
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate-2);
}
@media (max-width: 900px) { .hero-meta { display: none; } }

/* ------------------------------------------------------------
   two-column prose section
   ------------------------------------------------------------ */
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.two-col h2 { padding-right: 0.5rem; }
@media (max-width: 820px) {
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
}

.prose-section {
  padding-top: var(--section);
  padding-bottom: var(--section);
}

/* inverted dark section */
.section-dark {
  background: var(--ink);
  color: var(--ivory);
  margin-top: clamp(3rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}
.section-dark::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 100%, rgba(122, 27, 32, 0.18), transparent 55%);
  pointer-events: none;
}
.section-dark .container { position: relative; z-index: 2; }
.section-dark h2 { color: var(--ivory); }
.section-dark h2 em { color: var(--gold); }
.section-dark .section-marker { color: var(--gold); }
.section-dark .section-marker::before { background: var(--gold); }
.section-dark .body-prose p { color: rgba(246, 242, 234, 0.85); }
.section-dark .body-prose p a {
  color: var(--gold);
  border-bottom-color: rgba(201, 184, 150, 0.45);
}
.section-dark .dropcap { color: var(--gold); }

/* ------------------------------------------------------------
   founder section
   ------------------------------------------------------------ */
.founder {
  padding-top: var(--section);
  padding-bottom: var(--section);
}
.founder-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (max-width: 820px) {
  .founder-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.portrait {
  position: relative;
}
.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.02) brightness(0.98);
  background: var(--ivory-deep);
}
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px var(--rule);
  pointer-events: none;
}
.portrait figcaption {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}

.founder-bio .body-prose p:first-child::first-line {
  font-variant: small-caps;
  letter-spacing: 0.04em;
}

.inline-link {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oxblood);
  border-bottom: 1px solid var(--oxblood);
  padding-bottom: 2px;
}

/* ------------------------------------------------------------
   contact CTA
   ------------------------------------------------------------ */
.contact-cta {
  padding: var(--section) 0;
  text-align: center;
  max-width: 46rem;
  margin: 0 auto;
}
.contact-cta h2 {
  font-variation-settings: "opsz" 144, "SOFT" 20;
  font-size: clamp(2.25rem, 4.6vw, 3.6rem);
  margin-bottom: 1.25rem;
}
.contact-cta p {
  font-size: 1.1rem;
  color: var(--slate);
  margin-bottom: 2.25rem;
  line-height: 1.55;
}
.email {
  display: inline-block;
  font-family: var(--display);
  font-style: italic;
  font-variation-settings: "opsz" 72, "SOFT" 30;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  color: var(--oxblood);
  border-bottom: 1px solid rgba(122, 27, 32, 0.4);
  padding-bottom: 4px;
  transition: border-color 240ms ease, transform 240ms ease;
}
.email:hover {
  border-bottom-color: var(--oxblood);
  transform: translateY(-1px);
}

/* ------------------------------------------------------------
   footer
   ------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--rule);
  padding-top: 3.25rem;
  padding-bottom: 3.25rem;
  margin-top: 2rem;
}
.site-footer .container {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
}
@media (max-width: 640px) {
  .site-footer .container { grid-template-columns: 1fr; text-align: left; gap: 1.25rem; }
}
.site-footer .small {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}
.site-footer .wordmark.small {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
  display: block;
}
.site-footer .foot-right { text-align: right; }
.site-footer .foot-right .small + .small { margin-top: 0.5rem; }
@media (max-width: 640px) {
  .site-footer .foot-right { text-align: left; }
}

/* ------------------------------------------------------------
   motion: staggered reveal on load
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(4px);
    animation: rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  }
  .reveal.d1 { animation-delay: 80ms; }
  .reveal.d2 { animation-delay: 200ms; }
  .reveal.d3 { animation-delay: 340ms; }
  .reveal.d4 { animation-delay: 500ms; }
  .reveal.d5 { animation-delay: 680ms; }

  @keyframes rise {
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
  }

  /* scroll-reveal hook — set by tiny JS */
  .in-view-init { opacity: 0; transform: translateY(16px); transition: opacity 900ms ease, transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1); }
  .in-view     { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------
   selection
   ------------------------------------------------------------ */
::selection {
  background: var(--oxblood);
  color: var(--ivory);
}
