/* kaganinvestments.com — private-investment-house one-pager
   ink navy · warm ivory · brass — Fraunces display / Instrument Sans body */

/* ---------- fonts ---------- */

@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces.woff2') format('woff2');
  font-weight: 340 640;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces-italic.woff2') format('woff2');
  font-weight: 340 640;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('fonts/instrument-sans.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */

:root {
  --ink:          #0d1826;
  --ink-soft:     #16243a;
  --paper:        #f6f1e7;
  --paper-deep:   #ede5d3;
  --text:         #202b3a;
  --text-dim:     #5a6577;
  --text-inv:     #e9e4d8;
  --display-inv:  #f2ecdf;
  --brass:        #a8863d;
  --brass-soft:   #c9a961;
  --brass-deep:   #7d6425;
  --hairline:     rgba(13, 24, 38, .18);
  --hairline-inv: rgba(233, 228, 216, .22);

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Instrument Sans', -apple-system, 'Helvetica Neue', Arial, sans-serif;

  --shell: 1120px;
  color-scheme: light;
}

/* ---------- base ---------- */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  font-optical-sizing: auto;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 430;
  line-height: 1.08;
  letter-spacing: -0.005em;
}

a { color: inherit; }

::selection { background: var(--brass-soft); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--brass-soft);
  outline-offset: 3px;
}

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.skip {
  position: absolute;
  left: 1rem; top: -3.5rem;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: .85rem;
  text-decoration: none;
  border: 1px solid var(--brass);
  transition: top .2s ease;
}
.skip:focus { top: 1rem; }

.u-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- masthead ---------- */

.masthead {
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: 10;
}

.masthead__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding-block: 1.4rem;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--display-inv);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span { color: var(--brass-soft); }

.nav {
  display: flex;
  align-items: baseline;
  gap: clamp(.9rem, 2vw, 1.5rem);
  margin-left: auto;
}

.nav a {
  font-size: .86rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: rgba(233, 228, 216, .85);
  text-decoration: none;
}
.nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--brass-soft);
  text-underline-offset: 6px;
}

.nav__ext {
  padding-left: clamp(.9rem, 2vw, 1.5rem);
  border-left: 1px solid var(--hairline-inv);
  color: var(--brass-soft) !important;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .nav a { display: none; }
  .nav a[href="#contact"], .nav a.nav__ext { display: inline; }
}

@media (max-width: 480px) {
  .wordmark { font-size: .82rem; letter-spacing: .14em; }
  .nav { gap: .8rem; }
  .nav__ext { padding-left: .8rem; }
  .cert { padding-inline: 1.4rem; }
  .cert__row { grid-template-columns: 1fr; gap: .15rem; }
  .cert__row dd { text-align: left; }
}

/* ---------- kicker ---------- */

.kicker {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--brass-deep);
}
.kicker::before {
  content: '';
  display: inline-block;
  width: 26px;
  height: 1px;
  background: var(--brass);
  vertical-align: middle;
  margin-right: .65em;
}
.kicker--ink { color: var(--brass-soft); }
.kicker--ink::before { background: var(--brass-soft); }

/* ---------- hero ---------- */

.hero {
  background: var(--ink);
  color: var(--text-inv);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  padding-top: clamp(7.5rem, 16vh, 10rem);
  padding-bottom: clamp(4.5rem, 9vw, 7rem);
}

.hero__copy h1 {
  margin-top: 1.4rem;
  font-size: clamp(2.7rem, 6.2vw, 4.35rem);
  font-weight: 420;
  line-height: 1.04;
  color: var(--display-inv);
}
.hero__copy h1 em {
  font-style: italic;
  font-weight: 440;
  color: var(--brass-soft);
}

.hero__sub {
  margin-top: 1.6rem;
  max-width: 54ch;
  font-size: 1.08rem;
  color: rgba(233, 228, 216, .82);
}

.hero__cta {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: .82rem 1.5rem;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.2;
  text-decoration: none;
  color: var(--display-inv);
  border: 1px solid rgba(201, 169, 97, .65);
  background: transparent;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover {
  border-color: var(--brass-soft);
  background: rgba(201, 169, 97, .1);
}

.btn--solid {
  background: var(--brass-soft);
  border-color: var(--brass-soft);
  color: var(--ink);
  font-weight: 600;
}
.btn--solid:hover {
  background: #d8bc7d;
  border-color: #d8bc7d;
}

.btn--lg {
  padding: 1rem 1.9rem;
  font-size: 1.02rem;
}

/* ---------- certificate (signature element) ---------- */

.cert {
  position: relative;
  background: var(--ink-soft);
  border: 1px solid rgba(201, 169, 97, .55);
  padding: 2.1rem 1.9rem 1.7rem;
  max-width: 430px;
  width: 100%;
  justify-self: end;
}

.cert__frame {
  position: absolute;
  inset: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  pointer-events: none;
}
.cert__frame rect {
  fill: none;
  stroke: rgba(201, 169, 97, .45);
  stroke-width: 1;
  stroke-dasharray: 4;
  stroke-dashoffset: 0;
}

.cert__rosette {
  position: absolute;
  width: 24px;
  height: 24px;
  background: var(--ink-soft);
  border-radius: 50%;
}
.cert__rosette--tl { top: -12px; left: -12px; }
.cert__rosette--tr { top: -12px; right: -12px; }
.cert__rosette--bl { bottom: -12px; left: -12px; }
.cert__rosette--br { bottom: -12px; right: -12px; }

.cert__top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: rgba(233, 228, 216, .6);
}

.cert__name {
  margin-top: 1.5rem;
  font-family: var(--serif);
  font-weight: 480;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: .26em;
  text-align: center;
  color: var(--display-inv);
}

.cert__terms {
  margin-top: 1.6rem;
  border-top: 1px solid var(--hairline-inv);
}

.cert__row {
  display: grid;
  grid-template-columns: 6em 1fr;
  gap: 1rem;
  align-items: baseline;
  padding-block: .85rem;
  border-bottom: 1px solid var(--hairline-inv);
}
.cert__row dt {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--brass-soft);
}
.cert__row dd {
  font-size: .92rem;
  color: rgba(233, 228, 216, .88);
  text-align: right;
}

.cert__foot {
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.cert__sig { display: inline-flex; flex-direction: column; }

.cert__script {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 470;
  white-space: nowrap;
  font-size: 1.35rem;
  line-height: 1.1;
  color: var(--display-inv);
  padding-bottom: .45rem;
  border-bottom: 1px solid rgba(201, 169, 97, .5);
}

.cert__sigcap {
  margin-top: .4rem;
  font-size: .6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: rgba(233, 228, 216, .6);
}

.cert__motto {
  font-size: .62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .2em;
  text-align: right;
  color: var(--brass-soft);
}

/* ---------- sections ---------- */

.section {
  padding-block: clamp(4.5rem, 10vw, 8rem);
  scroll-margin-top: 2rem;
}

.section + .section { border-top: 1px solid var(--hairline); }

.section__head { max-width: 46rem; }

.section__head h2 {
  margin-top: 1.3rem;
  font-size: clamp(1.95rem, 3.8vw, 2.9rem);
  font-weight: 425;
  color: var(--ink);
}

.section--band { background: var(--paper-deep); }

.section.section--ink {
  background: var(--ink);
  color: var(--text-inv);
  border-top: none;
}
.section--ink .section__head h2 { color: var(--display-inv); }

/* ---------- thesis pillars ---------- */

.pillars {
  margin-top: 3.2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.pillar { padding-right: 2.2rem; }

.pillar + .pillar {
  border-left: 1px solid var(--hairline);
  padding-left: 2.2rem;
}

.pillar h3 {
  font-size: 1.24rem;
  font-weight: 520;
  color: var(--ink);
}

.pillar p {
  margin-top: .9rem;
  font-size: .97rem;
  line-height: 1.68;
}

@media (max-width: 860px) {
  .pillars { grid-template-columns: 1fr; }
  .pillar { padding-right: 0; }
  .pillar + .pillar {
    border-left: none;
    border-top: 1px solid var(--hairline);
    padding-left: 0;
    margin-top: 1.8rem;
    padding-top: 1.8rem;
  }
}

/* ---------- process ledger ---------- */

.ledger {
  margin-top: 3.2rem;
  list-style: none;
}

.ledger__row {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1rem;
  padding-block: 1.7rem;
  border-top: 1px solid var(--hairline);
}
.ledger__row:last-child { border-bottom: 1px solid var(--hairline); }

.ledger__no {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1;
  color: var(--brass);
  padding-top: .2rem;
}

.ledger__body h3 {
  font-size: 1.2rem;
  font-weight: 520;
  color: var(--ink);
}

.ledger__body p {
  margin-top: .55rem;
  max-width: 62ch;
  font-size: .98rem;
}

@media (max-width: 640px) {
  .ledger__row { grid-template-columns: 3rem 1fr; }
}

/* ---------- criteria ---------- */

.bar {
  margin-top: 3rem;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: clamp(2rem, 5vw, 4rem);
}

.bar li {
  padding-block: 1.3rem;
  padding-left: 1.9rem;
  position: relative;
  border-top: 1px solid var(--hairline);
  font-size: 1.02rem;
}
.bar li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2.15rem;
  width: 1.05rem;
  height: 1px;
  background: var(--brass);
}

.bar__close {
  margin-top: 3rem;
  max-width: 34em;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.55rem);
  font-weight: 410;
  line-height: 1.4;
  color: var(--ink);
}
.bar__close em {
  font-style: italic;
  color: var(--brass-deep);
}

@media (max-width: 760px) {
  .bar { grid-template-columns: 1fr; }
}

/* ---------- about ---------- */

.about__body {
  margin-top: 2.6rem;
  max-width: 62ch;
}

.about__body p { font-size: 1.05rem; }
.about__body p + p { margin-top: 1.2rem; }

.about__body a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--brass);
  text-underline-offset: 3px;
}
.about__body a:hover { color: var(--brass-deep); }

/* ---------- contact ---------- */

.contact .section__head h2 { max-width: 21ch; }

.contact__body { margin-top: 2.8rem; }

.contact__list {
  list-style: none;
  max-width: 520px;
}

.contact__list li {
  padding-block: .95rem;
  border-top: 1px solid var(--hairline-inv);
  font-size: 1rem;
  color: rgba(233, 228, 216, .88);
  padding-left: 1.9rem;
  position: relative;
}
.contact__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.8rem;
  width: 1.05rem;
  height: 1px;
  background: var(--brass-soft);
}
.contact__list li:last-child { border-bottom: 1px solid var(--hairline-inv); }

.contact__body .btn { margin-top: 2.6rem; }

/* ---------- footer ---------- */

.footer {
  background: var(--ink);
  color: var(--text-inv);
  border-top: 1px solid var(--hairline-inv);
  padding-block: 3.2rem 3.8rem;
}

.footer__line {
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--display-inv);
}

.footer__links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
}
.footer__links a {
  font-size: .9rem;
  color: rgba(233, 228, 216, .8);
  text-decoration: underline;
  text-decoration-color: rgba(201, 169, 97, .5);
  text-underline-offset: 4px;
}
.footer__links a:hover { color: var(--brass-soft); }

.footer__legal {
  margin-top: 1.7rem;
  max-width: 62ch;
  font-size: .79rem;
  line-height: 1.6;
  color: rgba(233, 228, 216, .64);
}

.footer__copy {
  margin-top: .4rem;
  font-size: .79rem;
  color: rgba(233, 228, 216, .64);
}

/* ---------- 404 ---------- */

.notfound {
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--text-inv);
  padding: 2rem;
}

.notfound__panel {
  position: relative;
  max-width: 460px;
  width: 100%;
  background: var(--ink-soft);
  border: 1px solid rgba(201, 169, 97, .55);
  padding: 2.6rem 2.3rem;
  text-align: center;
}

.notfound__no {
  font-size: .62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: rgba(233, 228, 216, .6);
}

.notfound__panel h1 {
  margin-top: 1.4rem;
  font-size: clamp(2rem, 6vw, 2.7rem);
  font-weight: 425;
  color: var(--display-inv);
}

.notfound__panel p {
  margin-top: 1rem;
  color: rgba(233, 228, 216, .82);
}

.notfound__panel .btn { margin-top: 2rem; }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero__copy > * {
    animation: rise .75s cubic-bezier(.2, .7, .2, 1) both;
  }
  .hero__copy > *:nth-child(2) { animation-delay: .08s; }
  .hero__copy > *:nth-child(3) { animation-delay: .16s; }
  .hero__copy > *:nth-child(4) { animation-delay: .24s; }

  .cert { animation: rise .9s .3s cubic-bezier(.2, .7, .2, 1) both; }

  .cert__frame rect {
    stroke-dashoffset: 4;
    animation: draw 1.7s .55s ease-in-out forwards;
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

/* scroll reveals — active only when JS adds .rvl and motion is allowed */
html.rvl [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity .7s ease,
    transform .7s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--d, 0) * 80ms);
}
html.rvl [data-reveal].in {
  opacity: 1;
  transform: none;
}

/* ---------- responsive hero ---------- */

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    padding-top: clamp(6.5rem, 14vh, 8rem);
  }
  .cert { justify-self: start; }
}
