/* Cadwyn Capital — site styles
   Palette is taken from the logo: deep navy (#00072c) sweeping to steel blue (#004687). */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("/fonts/jost.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink-950: #00051c;
  --ink-900: #00072c;   /* logo — dark end */
  --ink-800: #00123b;
  --ink-700: #001c52;
  --blue-700: #004687;  /* logo — light end */
  --blue-600: #004c90;
  --blue-400: #3f86cf;
  --blue-300: #7fb2e8;
  --blue-200: #b7d3f2;
  --paper: #f3f6fa;
  --white: #ffffff;
  --text: #1b2539;
  --muted: #5a677f;
  --line: rgba(0, 7, 44, 0.12);
  --line-inv: rgba(255, 255, 255, 0.16);
  --grad: linear-gradient(100deg, #00072c 0%, #004687 100%);

  --max: 1240px;
  --gut: clamp(1.25rem, 4vw, 3rem);
  --header-h: 84px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);

  --font-display: "Jost", "Century Gothic", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1.1em; }
.container { width: 100%; max-width: calc(var(--max) + var(--gut) * 2); margin: 0 auto; padding: 0 var(--gut); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--white); color: var(--ink-900); padding: 0.6rem 1rem; border-radius: 4px;
  transition: top 0.2s;
}
.skip:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--blue-300); outline-offset: 3px; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  color: var(--white);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), height 0.4s var(--ease), backdrop-filter 0.4s;
}
.header.is-scrolled {
  --header-h: 68px;
  height: var(--header-h);
  background: rgba(0, 7, 44, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line-inv);
}
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 1.05rem; text-decoration: none; }
.brand img { width: 50px; height: auto; }
.brand__word { display: flex; flex-direction: column; line-height: 1; font-family: var(--font-display); }
.brand__word b { font-weight: 500; font-size: 1.44rem; letter-spacing: 0.3em; }
.brand__word span { font-weight: 400; font-size: 0.75rem; letter-spacing: 0.62em; margin-top: 0.52rem; opacity: 0.8; }

.nav { display: flex; gap: clamp(1.5rem, 3vw, 2.75rem); }
.nav a {
  position: relative; text-decoration: none;
  font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.5rem 0; opacity: 0.86; transition: opacity 0.3s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.1rem; height: 1px;
  background: var(--blue-300); transform: scaleX(0); transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.menu-btn { display: none; background: none; border: 0; color: inherit; width: 44px; height: 44px; cursor: pointer; padding: 0; position: relative; }
.menu-btn span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor; transition: transform 0.4s var(--ease), top 0.4s var(--ease), opacity 0.2s; }
.menu-btn span:nth-child(1) { top: 16px; }
.menu-btn span:nth-child(2) { top: 22px; }
.menu-btn span:nth-child(3) { top: 28px; }
.menu-open .menu-btn span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 0 0 auto 0; top: 0; padding: calc(var(--header-h) + 1rem) var(--gut) 2rem;
    flex-direction: column; gap: 0.25rem; background: var(--ink-950); z-index: -1;
    transform: translateY(-101%); transition: transform 0.6s var(--ease);
  }
  .nav a { font-size: 1.05rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line-inv); }
  .menu-open .nav { transform: translateY(0); }
  .menu-open .header { background: var(--ink-950); }
  .brand__word b { font-size: 1.25rem; }
}

/* ---------- Buttons ---------- */
.btn {
  --arrow: 0;
  display: inline-flex; align-items: center; gap: 0.9rem;
  padding: 0.95rem 1.6rem; text-decoration: none;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  border: 1px solid currentColor; border-radius: 2px;
  position: relative; overflow: hidden; isolation: isolate;
  transition: color 0.45s var(--ease), border-color 0.45s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--white); transform: translateX(-101%); transition: transform 0.55s var(--ease);
}
.btn svg { width: 18px; height: 10px; transition: transform 0.45s var(--ease); }
.btn:hover::before { transform: translateX(0); }
.btn:hover svg { transform: translateX(5px); }
.btn:hover { color: var(--ink-900); border-color: var(--white); }
.btn--solid { background: var(--blue-700); border-color: var(--blue-700); color: var(--white); }
.btn--solid::before { background: var(--white); }
.btn--dark { color: var(--ink-900); }
.btn--dark::before { background: var(--ink-900); }
.btn--dark:hover { color: var(--white); border-color: var(--ink-900); }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 1rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--blue-300);
}
.eyebrow::before { content: ""; width: 2.75rem; height: 1px; background: currentColor; transform-origin: left; }
.section--light .eyebrow, .section--white .eyebrow { color: var(--blue-700); }
h2.title { font-weight: 300; font-size: clamp(2rem, 3.6vw, 3.25rem); margin-top: 1.1rem; }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.7; font-weight: 300; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  color: var(--white); background: var(--ink-900);
}
.hero__media { position: absolute; inset: -8% 0; will-change: transform; transform: translate3d(0, var(--py, 0px), 0); }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 62% 55%;
  transform-origin: 70% 60%;
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: scale(1.04) translate3d(0, 0, 0); } to { transform: scale(1.14) translate3d(-1.5%, 1%, 0); } }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,5,28,0.82) 0%, rgba(0,5,28,0.5) 42%, rgba(0,5,28,0) 78%),
    linear-gradient(180deg, rgba(0,5,28,0.6) 0%, rgba(0,5,28,0) 26%, rgba(0,5,28,0) 62%, rgba(0,5,28,0.92) 100%);
}
.hero__inner {
  position: relative; z-index: 2;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: var(--header-h); padding-bottom: 11rem;
}
.hero h1 {
  font-weight: 300; font-size: clamp(2.6rem, 6.4vw, 5.6rem); letter-spacing: -0.025em;
  margin: 1.6rem 0 1.8rem; max-width: 14ch;
}
.hero h1 em { font-style: normal; font-weight: 300; color: var(--blue-300); }
.line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.line > span { display: block; transform: translateY(112%); animation: rise 1.2s var(--ease) forwards; animation-delay: calc(0.25s + var(--i, 0) * 0.14s); }
@keyframes rise { to { transform: translateY(0); } }
.hero__lead { max-width: 36rem; color: rgba(255,255,255,0.86); margin-bottom: 2.4rem; }

.fade-in { opacity: 0; transform: translateY(18px); animation: fadeup 1.1s var(--ease) forwards; animation-delay: var(--d, 0.2s); }
@keyframes fadeup { to { opacity: 1; transform: none; } }
.hero .eyebrow::before { animation: grow 1.2s var(--ease) 0.1s both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.facts {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 0;
  border-top: 1px solid var(--line-inv);
  background: rgba(0, 5, 28, 0.42);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.facts__grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.fact { padding: 1.6rem 1.5rem 1.7rem 0; }
.fact + .fact { padding-left: 1.75rem; border-left: 1px solid var(--line-inv); }
.fact dt { font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--blue-300); font-weight: 600; margin-bottom: 0.45rem; }
.fact dd { margin: 0; font-family: var(--font-display); font-size: clamp(1.05rem, 1.7vw, 1.4rem); font-weight: 300; line-height: 1.3; }
.scroll-cue {
  position: absolute; z-index: 3; right: var(--gut); bottom: 8.6rem; width: 1px; height: 64px; background: var(--line-inv); overflow: hidden;
}
.scroll-cue::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 40%; background: var(--white); animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { from { transform: translateY(-100%); } to { transform: translateY(260%); } }

@media (max-width: 760px) {
  .hero__inner { padding-bottom: 14rem; }
  .facts__grid { grid-template-columns: 1fr; }
  .fact, .fact + .fact { padding: 0.8rem 0; border-left: 0; }
  .fact + .fact { border-top: 1px solid var(--line-inv); }
  .fact dd { font-size: 1rem; }
  .scroll-cue { display: none; }
  .hero__media img { object-position: 74% 55%; }
  .hero::after { background: linear-gradient(180deg, rgba(0,5,28,0.7) 0%, rgba(0,5,28,0.62) 55%, rgba(0,5,28,0.92) 100%); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(5rem, 10vw, 9rem) 0; position: relative; }
.section--light { background: var(--paper); }
.section--dark { background: var(--ink-900); color: var(--white); }
.section-head { max-width: 46rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.section-head p { color: var(--muted); margin-top: 1.4rem; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
.pillar { position: relative; padding-top: 2rem; transition: transform 0.6s var(--ease); }
.pillar::before, .pillar::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; }
.pillar::before { background: var(--line); }
.pillar::after { background: var(--grad); height: 2px; transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease) calc(var(--d, 0s) + 0.2s); }
.pillar.is-in::after { transform: scaleX(1); }
.js .pillar.is-in:hover, .pillar:hover { transform: translateY(-6px); }
.pillar__num {
  font-family: var(--font-display); font-weight: 200; font-size: 4.25rem; line-height: 1; letter-spacing: -0.03em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 1.4rem;
}
.pillar h3 { font-size: 1.55rem; font-weight: 400; margin-bottom: 0.9rem; color: var(--ink-900); }
.pillar p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; gap: 3rem; } }

/* Band */
.band { overflow: hidden; background: var(--grad); background-color: var(--ink-900); }
.band::before {
  content: ""; position: absolute; inset: 0; opacity: 0.35;
  background: radial-gradient(60rem 30rem at 85% 0%, rgba(63,134,207,0.55), transparent 65%);
}
.band__mark {
  position: absolute; right: -6%; top: 50%; width: min(52vw, 640px); opacity: 0.07;
  transform: translateY(-50%); animation: float 18s ease-in-out infinite alternate; pointer-events: none;
}
@keyframes float { from { transform: translate(0, -50%) rotate(-3deg); } to { transform: translate(-3%, -46%) rotate(2deg); } }
.band .container { position: relative; z-index: 1; }
.band h2 { font-weight: 300; font-size: clamp(2rem, 4.4vw, 3.9rem); max-width: 20ch; margin: 1.2rem 0 2.6rem; }
.band h2 em { font-style: normal; color: var(--blue-300); }

/* ---------- Interior page hero ---------- */
.page-hero {
  position: relative; overflow: hidden; color: var(--white); background: var(--ink-900);
  padding: calc(var(--header-h) + clamp(4.5rem, 10vw, 8rem)) 0 clamp(3.5rem, 7vw, 6rem);
}
.page-hero__media { position: absolute; inset: -10% 0; transform: translate3d(0, var(--py, 0px), 0); }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; animation: drift 30s ease-in-out infinite alternate; }
.page-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,7,44,0.94) 0%, rgba(0,7,44,0.7) 55%, rgba(0,18,59,0.45) 100%),
    linear-gradient(180deg, rgba(0,5,28,0.5), rgba(0,5,28,0) 40%, rgba(0,5,28,0.6));
}
.page-hero--plain .page-hero__media { display: none; }
.page-hero--plain { background: var(--grad); }
.page-hero--plain::after { background: radial-gradient(50rem 24rem at 90% 0%, rgba(63,134,207,0.35), transparent 65%); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { font-weight: 300; font-size: clamp(2.4rem, 5.4vw, 4.6rem); letter-spacing: -0.025em; margin: 1.3rem 0 0; }
.page-hero .lead { max-width: 38rem; margin: 1.6rem 0 0; color: rgba(255,255,255,0.86); }

/* ---------- Philosophy ---------- */
.principles { border-top: 1px solid var(--line); }
.principle { display: grid; grid-template-columns: minmax(6rem, 18%) 1fr; gap: clamp(1.5rem, 5vw, 5rem); padding: clamp(2.5rem, 5vw, 4.5rem) 0; border-bottom: 1px solid var(--line); position: relative; }
.principle::before { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform 1.3s var(--ease) 0.15s; }
.principle.is-in::before { transform: scaleX(1); }
.principle__num {
  font-family: var(--font-display); font-weight: 200; font-size: clamp(3.5rem, 8vw, 7rem); line-height: 0.9; letter-spacing: -0.04em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.principle h3 { font-size: clamp(1.6rem, 2.6vw, 2.25rem); font-weight: 400; color: var(--ink-900); margin-bottom: 1rem; }
.principle p { color: var(--muted); max-width: 40rem; margin: 0; font-size: 1.125rem; }
@media (max-width: 640px) { .principle { grid-template-columns: 1fr; gap: 0.75rem; } }

/* ---------- Contact ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.25rem, 2.5vw, 2rem); }
.card {
  position: relative; display: block; text-decoration: none; overflow: hidden; isolation: isolate;
  padding: clamp(2rem, 4vw, 3.25rem); border: 1px solid var(--line); background: var(--white);
  transition: color 0.5s var(--ease), border-color 0.5s var(--ease), transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--grad); transform: translateX(-101%); transition: transform 0.7s var(--ease); }
.card:hover { color: var(--white); border-color: transparent; transform: translateY(-4px); box-shadow: 0 24px 48px -24px rgba(0,7,44,0.5); }
.card:hover::before { transform: translateX(0); }
.card__label { font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase; font-weight: 600; color: var(--blue-700); transition: color 0.5s; }
.card:hover .card__label { color: var(--blue-200); }
.card__mail { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2.2rem; font-family: var(--font-display); font-size: clamp(1.15rem, 2vw, 1.6rem); font-weight: 300; word-break: break-word; }
.card__mail svg { flex: none; width: 26px; height: 14px; transition: transform 0.5s var(--ease); }
.card:hover .card__mail svg { transform: translateX(8px); }
.office { margin-top: clamp(3rem, 6vw, 5rem); padding-top: 2rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.office h3 { font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase; font-weight: 600; font-family: var(--font-body); color: var(--blue-700); margin-bottom: 0.8rem; }
.office p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .cards, .office { grid-template-columns: 1fr; } }

/* ---------- Legal prose ---------- */
.prose { max-width: 50rem; margin: 0 auto; }
.prose h2 { font-size: 1.45rem; font-weight: 500; color: var(--ink-900); margin: 2.6em 0 0.7em; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose p, .prose li { color: #2b3650; }
.prose ul { padding-left: 1.3rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose strong { color: var(--ink-900); font-weight: 600; }
.prose a { color: var(--blue-700); }

/* ---------- Footer ---------- */
.footer { background: var(--ink-950); color: rgba(255,255,255,0.72); font-size: 0.9rem; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 3rem; padding: clamp(3.5rem, 6vw, 5.5rem) 0 3rem; }
.footer .brand { color: var(--white); margin-bottom: 1.4rem; }
.footer__about { max-width: 24rem; margin: 0; }
.footer h4 { font-family: var(--font-body); font-size: 0.7rem; letter-spacing: 0.26em; text-transform: uppercase; font-weight: 600; color: var(--blue-300); margin-bottom: 1.2rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; }
.footer ul a { text-decoration: none; position: relative; transition: color 0.3s; }
.footer ul a:hover { color: var(--white); }
.footer__legal { border-top: 1px solid var(--line-inv); padding: 1.75rem 0 2.5rem; font-size: 0.78rem; line-height: 1.7; color: rgba(255,255,255,0.5); }
.footer__legal p { margin: 0; max-width: 62rem; }
@media (max-width: 760px) { .footer__top { grid-template-columns: 1fr; gap: 2.25rem; } }

/* ---------- Scroll reveals ---------- */
.js [data-reveal] { opacity: 0; transition: opacity 1s var(--ease) var(--d, 0s), transform 1.1s var(--ease) var(--d, 0s); }
.js [data-reveal="up"] { transform: translateY(36px); }
.js [data-reveal="left"] { transform: translateX(-56px); }
.js [data-reveal="right"] { transform: translateX(56px); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
  .line > span, .fade-in { transform: none; opacity: 1; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
