/* Kredens Capital: shared styles for all inner pages.
   Mirrors the homepage mockup (kredens-redesign.html): same tokens, fixed blend-mode nav,
   full-bleed photo hero with grain + slow zoom, brass-glow dark sections, skyline contact block. */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=Outfit:wght@300;400;500;600&display=swap");

:root {
  --ink: #0c1210;
  --ink-soft: #1a2420;
  --fog-2: #f3f5f1;
  --mist: #9aa39a;
  --text-soft: #4a524c;
  --brass: #b8955a;
  --brass-light: #d4b87a;
  --cream: #f7f4ec;
  --line: rgba(12, 18, 16, 0.12);
  --line-light: rgba(247, 244, 236, 0.18);
  --display: "Fraunces", Georgia, serif;
  --sans: "Outfit", sans-serif;
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  --stage: 1100px;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--ink); background: var(--cream); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { width: min(var(--stage), 100%); margin: 0 auto; padding: 0 2.5rem; }
.narrow { max-width: 760px; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
h1 { font-size: clamp(2.8rem, 7vw, 5.2rem); line-height: 0.98; }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); margin-bottom: 0.85rem; }
h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); margin-bottom: 0.75rem; }
h4 { font-size: 1.15rem; margin-bottom: 0.4rem; }
p { font-weight: 300; }
.kicker { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass); margin-bottom: 0.85rem; font-weight: 400; }
.lede { font-weight: 300; font-size: 1.05rem; line-height: 1.6; color: var(--mist); max-width: 44ch; }
.muted { color: var(--text-soft); }

/* ---------- Page hero: full-bleed photo like the mockup's first slide ---------- */
.page-hero { position: relative; min-height: 78vh; min-height: 78svh; display: grid; align-items: center; color: var(--cream); background: #0a1210; overflow: hidden; padding: 7rem 0 5rem; }
.page-hero .bg { position: absolute; inset: 0; overflow: hidden; background-size: cover; background-position: center; filter: contrast(1.05) saturate(1.05); }
.page-hero .bg::before { content: ""; position: absolute; inset: 0; background: inherit; background-size: cover; background-position: center; animation: heroZoom 9s linear both; }
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; opacity: 0.05; pointer-events: none; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(8, 14, 12, 0.86) 0%, rgba(8, 14, 12, 0.62) 42%, rgba(8, 14, 12, 0.25) 100%), linear-gradient(to top, rgba(8, 14, 12, 0.6) 0%, transparent 45%); }
.page-hero:not(:has(.bg)) { min-height: 52vh; background: radial-gradient(ellipse 80% 60% at 70% 40%, rgba(184, 149, 90, 0.18), transparent 55%), linear-gradient(160deg, var(--ink) 0%, var(--ink-soft) 100%); }
.page-hero .wrap { position: relative; z-index: 2; width: 100%; max-width: none; padding: 0 clamp(1.5rem, 6vw, 5rem); }
.page-hero h1 { color: #fff; max-width: 16ch; margin-bottom: 1.4rem; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), 0 4px 36px rgba(0, 0, 0, 0.55); }
.page-hero .lede { color: #fff; font-size: 1.18rem; font-weight: 400; max-width: 46ch; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 2px 22px rgba(0, 0, 0, 0.55); }
.page-hero .kicker { color: #e2c78e; font-weight: 500; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6); }
.crumb { font-size: 0.82rem; letter-spacing: 0.04em; color: rgba(247, 244, 236, 0.88); margin-bottom: 1.6rem; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6); }
.crumb a:hover { color: var(--brass-light); }
.hero-lines { position: absolute; left: clamp(1.5rem, 6vw, 5rem); bottom: 1.75rem; z-index: 2; display: flex; gap: 0.45rem; }
.hero-lines span { width: 18px; height: 2px; background: rgba(247, 244, 236, 0.28); }
.hero-lines span:first-child { width: 32px; background: var(--brass-light); }

/* ---------- Sections (mockup slide backgrounds) ---------- */
.section { padding: 7rem 0; position: relative; }
.section.fog { background: var(--fog-2); }
.section.dark { color: var(--cream); background: radial-gradient(ellipse 80% 60% at 70% 40%, rgba(184, 149, 90, 0.18), transparent 55%), linear-gradient(160deg, var(--ink) 0%, var(--ink-soft) 100%); }
.section.dark .lede, .section.dark .muted { color: rgba(247, 244, 236, 0.65); }
.sec-head { margin-bottom: 2.5rem; }
.prose p + p { margin-top: 1.1rem; }
.prose p, .prose li { font-size: 1.02rem; line-height: 1.7; color: var(--text-soft); font-weight: 300; }
.section.dark .prose p, .section.dark .prose li { color: rgba(247, 244, 236, 0.75); }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 1rem 0; }
.prose li + li { margin-top: 0.4rem; }
.prose h2, .prose h3 { margin-top: 2.4rem; }
.prose a { border-bottom: 1px solid var(--brass); }

/* Split: text + image */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.split + .split { margin-top: 5rem; }
.split.flip > :first-child { order: 2; }
.split .img { aspect-ratio: 4 / 3; background-size: cover; background-position: center; background-color: var(--ink-soft); }

/* Numbered rows: the mockup's service grid (top rule, brass numbers, bottom rules) */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 4rem 1fr 1.4fr; gap: 2rem; padding: 1.75rem 0; border-bottom: 1px solid var(--line); }
.row .num { font-size: 0.75rem; letter-spacing: 0.16em; color: var(--brass); padding-top: 0.6rem; }
.row p { font-size: 0.98rem; line-height: 1.6; color: var(--text-soft); }
.section.dark .rows, .section.dark .row { border-color: var(--line-light); }
.section.dark .row p { color: rgba(247, 244, 236, 0.7); }

/* Cards: the mockup's insight cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.card { display: flex; flex-direction: column; gap: 0.65rem; padding: 1.35rem 1.4rem 1.25rem; background: #fff; border: 1px solid var(--line); transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s; }
.card:hover { border-color: rgba(184, 149, 90, 0.55); transform: translateY(-3px); box-shadow: 0 16px 40px -28px rgba(12, 18, 16, 0.35); }
.card h3 { font-size: clamp(1.05rem, 1.8vw, 1.35rem); line-height: 1.25; letter-spacing: -0.015em; margin: 0; }
.card .tag { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass); }
.card p { font-size: 0.9rem; line-height: 1.55; color: var(--text-soft); }
.card .more { margin-top: auto; font-size: 0.8rem; font-weight: 500; transition: color 0.25s; }
.card:hover .more { color: var(--brass); }
.section.dark .card { background: rgba(247, 244, 236, 0.04); border-color: var(--line-light); }
.section.dark .card p { color: rgba(247, 244, 236, 0.7); }

/* Quote: the mockup's philosophy slide */
.quote { font-family: var(--display); font-size: clamp(1.5rem, 3.2vw, 2.4rem); font-weight: 500; line-height: 1.35; letter-spacing: -0.015em; max-width: 30ch; }
.quote-by { display: block; margin-top: 2rem; font-size: 0.9rem; letter-spacing: 0.06em; color: var(--brass-light); font-style: normal; }

/* Buttons: btn-fill / btn-ghost from the mockup */
.btns { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }
.btn { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.95rem 1.6rem; font-size: 0.88rem; letter-spacing: 0.04em; font-weight: 500; border: 1px solid transparent; transition: background 0.3s, transform 0.3s, border-color 0.3s, color 0.3s; }
.btn-light { background: var(--cream); color: var(--ink); }
.btn-light:hover { background: var(--brass-light); transform: translateY(-2px); }
.btn-dark { background: var(--ink); color: var(--cream); }
.btn-dark:hover { background: var(--brass); transform: translateY(-2px); }
.btn-line { border-color: var(--line); font-weight: 400; }
.btn-line:hover { border-color: var(--brass); color: var(--brass); }
.section.dark .btn-line, .page-hero .btn-line { border-color: var(--line-light); color: var(--cream); }
.section.dark .btn-line:hover, .page-hero .btn-line:hover { background: rgba(247, 244, 236, 0.08); border-color: rgba(247, 244, 236, 0.4); color: var(--cream); }

/* ---------- Responsive (mockup breakpoints) ---------- */
@media (max-width: 900px) {
  .wrap { padding: 0 1.25rem; }
  .page-hero { min-height: 70svh; padding: 6rem 0 4rem; }
  .page-hero .wrap { padding: 0 1.25rem; }
  .hero-lines { left: 1.25rem; }
  .section { padding: 4.5rem 0; }
  .split, .row { grid-template-columns: 1fr; gap: 1.5rem; }
  .split.flip > :first-child { order: 0; }
  .row { gap: 0.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Slides: every hero/section is one full-screen slide ---------- */
.slide.page-hero, .slide.section { display: flex; flex-direction: column; min-height: 0; }
.slide.page-hero { padding: 5rem 0 0; }
.slide.section { padding: 6.5rem 0 4.5rem; }
.slide > .wrap { margin-top: auto; margin-bottom: auto; }
.deck-on .slide > .wrap { opacity: 0; transform: translateY(40px); transition: opacity 0.7s var(--ease) 0.25s, transform 0.7s var(--ease) 0.25s; }
.deck-on .slide.is-active > .wrap { opacity: 1; transform: none; }
.slide > .site-foot { margin-top: 3rem; }
.slide.page-hero > .site-foot, .slide.section:not(:has(> .wrap)) > .site-foot { margin-top: auto; }

/* Section sub-navigation, pinned to the bottom of the hero slide */
.subnav { position: relative; z-index: 2; margin-top: auto; background: rgba(12, 18, 16, 0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--line-light); }
.subnav .wrap { display: flex; gap: 2.25rem; overflow-x: auto; font-size: 0.9rem; letter-spacing: 0.03em; margin: 0 auto; padding: 0 clamp(1.5rem, 6vw, 5rem); max-width: none; }
.subnav a { padding: 1.05rem 0; white-space: nowrap; color: rgba(247, 244, 236, 0.8); border-bottom: 2px solid transparent; transition: color 0.25s, border-color 0.25s; }
.subnav a:hover { color: #fff; }
.subnav a[aria-current="page"] { color: #fff; border-color: var(--brass-light); }
.page-hero:has(.subnav) .hero-lines { bottom: 4.4rem; }

/* Contact page: the whole page is the contact footer */
.contact-page { background: radial-gradient(ellipse 80% 60% at 70% 30%, rgba(184, 149, 90, 0.18), transparent 55%), linear-gradient(160deg, var(--ink), var(--ink-soft)); color: var(--cream); }
.contact-page .grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3.5rem; align-items: stretch; }
.contact-page h1 { font-size: clamp(2.2rem, 4.8vw, 3.8rem); color: #fff; margin-bottom: 1.2rem; }
.contact-page .intro { color: rgba(247, 244, 236, 0.8); font-size: 1.05rem; max-width: 42ch; margin-bottom: 2rem; }
.contact-list { display: grid; gap: 1.3rem; }
.contact-list h4 { font-family: var(--sans); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass-light); margin-bottom: 0.2rem; }
.contact-list a, .contact-list p { font-family: var(--display); font-size: 1.3rem; font-weight: 500; color: #fff; }
.contact-list a:hover { color: var(--brass-light); }
.contact-page .map { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; background: var(--ink-soft); filter: grayscale(0.35) contrast(1.05); }
@media (max-width: 900px) {
  .contact-page .grid { grid-template-columns: 1fr; gap: 2rem; }
  .contact-page .map { min-height: 280px; }
  .slide.section { padding: 5.5rem 0 3.5rem; }
}

/* Keep hero slides within one screen; lift the scroll hint above section tabs */
.page-hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.5rem); }
body:has(.subnav) .hint { bottom: 4.4rem; }

/* Section tabs: never wider than the screen; scroll sideways on phones */
.subnav { width: 100%; min-width: 0; max-width: 100vw; }
.subnav .wrap { width: 100%; min-width: 0; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.subnav .wrap::-webkit-scrollbar { display: none; }
@media (max-width: 600px) { .subnav .wrap { gap: 1.5rem; font-size: 0.85rem; } }
.page-hero .wrap, .contact-page .wrap { padding-left: max(clamp(1.5rem, 6vw, 5rem), env(safe-area-inset-left)); padding-right: max(clamp(1.5rem, 6vw, 5rem), env(safe-area-inset-right)); }
