/* Page layout and look for the Belfry Capital one-page site.
   Layout and type follow the Cosmos reference: light surface, big tight sans headlines, pill buttons,
   rounded cards, floating tiles, large footer logo. Belfry forest green and brass stay as the brand colours.
   Component base styles come from bundle.css; everything here is loaded after it and overrides it. */

@font-face { font-family: "Geist"; src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --surface: #F6F4EE;
  --surface-raised: #FFFFFF;
  --surface-sunken: #EDEAE0;
  --ink: #0B1A15;
  --ink-muted: #5A655F;
  --rule: #DDD9CB;
  --rule-strong: #B9B39D;
  --nav-glass: rgba(255, 255, 255, 0.72);

  --font-display: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-text: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-label: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius-card: 28px;
  --radius-pill: 999px;
  --shadow-soft: 0 1px 0 rgba(255,255,255,.8) inset, 0 1px 2px rgba(11,26,21,.05), 0 12px 32px rgba(11,26,21,.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; font-size: 17px; line-height: 26px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }

.wrap {
  width: 100%;
  max-width: calc(1120px + 2 * var(--space-6));
  margin-inline: auto;
  padding-left: max(var(--space-6), env(safe-area-inset-left, 0px));
  padding-right: max(var(--space-6), env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: var(--space-4); top: -100px; z-index: 100; }
.skip:focus { top: var(--space-4); }

/* ---------- Type ---------- */
.display-xl { font-family: var(--font-display); font-weight: 500; font-size: 88px; line-height: 90px; letter-spacing: -0.045em; }
.display-lg { font-family: var(--font-display); font-weight: 500; font-size: 56px; line-height: 60px; letter-spacing: -0.04em; color: var(--ink); }
.caption { font-family: var(--font-text); font-size: 14px; line-height: 21px; }
.bf-lead { font-family: var(--font-text); font-size: 19px; line-height: 30px; color: var(--ink-muted); }
.bf-eyebrow {
  font-family: var(--font-label); font-size: 12px; line-height: 16px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--brass-text);
}
.center { text-align: center; justify-items: center; }

/* ---------- Buttons: pills, flat ---------- */
.bf-btn {
  font-family: var(--font-text); font-size: 15px; line-height: 20px; font-weight: 500;
  letter-spacing: 0; text-transform: none;
  min-height: 46px; padding: 12px 24px; border-radius: var(--radius-pill);
  border: 1px solid transparent; background-image: none; box-shadow: none;
  transition: transform .2s var(--bf-ease), background-color .2s, box-shadow .2s;
}
.bf-btn:hover { transform: translateY(-2px); }
.bf-btn:active { transform: translateY(0); box-shadow: none; }
.bf-btn--primary { background-color: var(--surface-brand); color: var(--ink-on-brand); box-shadow: 0 8px 20px rgba(7,65,51,.22); }
.bf-btn--primary:hover { background-color: #0A5642; }
.bf-btn--quiet { background-color: rgba(255,255,255,.7); color: var(--ink); border-color: var(--rule); box-shadow: none; }
.bf-btn--quiet:hover { background-color: #fff; }
.bf-btn--lg { min-height: 60px; padding: 16px 36px; font-size: 20px; line-height: 28px; letter-spacing: -0.01em; }

/* ---------- Header: floating glass pill ---------- */
.site-header {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 50;
  padding-top: var(--space-4); pointer-events: none;
}
.site-header .bf-nav {
  pointer-events: auto; min-height: 58px; padding: 8px 8px 8px 20px;
  background: var(--nav-glass); border: 1px solid rgba(11,26,21,.08);
  border-radius: var(--radius-pill); box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
}
.bf-nav img { height: 30px; }
.bf-nav .nav-home { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; color: var(--ink); border-radius: var(--radius-pill); }
.nav-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; line-height: 22px; letter-spacing: -0.02em; color: var(--ink); }
.bf-nav .nav-right { display: flex; align-items: center; gap: var(--space-6); }
.bf-nav ul { gap: var(--space-6); }
.bf-nav a.bf-link {
  font-family: var(--font-text); font-size: 15px; line-height: 20px; font-weight: 500;
  letter-spacing: 0; text-transform: none; color: var(--ink-muted); padding: 6px 0;
  background-image: none; transition: color .2s;
}
.bf-nav a.bf-link:hover, .bf-nav a.bf-link[aria-current] { color: var(--ink); }
.bf-nav .nav-home:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.nav-cta { min-height: 42px; padding: 10px 20px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: max(100svh, 640px); display: flex; align-items: center; justify-content: center;
  padding: 120px 0 72px; text-align: center;
  background: var(--surface);
}
.hero::before {
  /* faint engineering grid that fades out toward the edges */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(7,65,51,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7,65,51,.07) 1px, transparent 1px);
  background-size: 64px 64px; background-position: center top;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 45%, #000 0%, transparent 100%);
  mask-image: radial-gradient(70% 60% at 50% 45%, #000 0%, transparent 100%);
}
.hero::after {
  /* soft green and brass glow behind the headline */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 32% at 50% 42%, rgba(188,155,90,.16), transparent 70%),
    radial-gradient(52% 42% at 50% 46%, rgba(7,65,51,.09), transparent 72%);
}
.hero-grid { display: block; position: relative; z-index: 1; }
.hero-copy { display: grid; gap: var(--space-8); justify-items: center; margin-inline: auto; max-width: 980px; }
.hero h1 { color: var(--ink); max-width: 11.5em; }
.hero h1 em { font-style: normal; color: var(--surface-brand); }
.hero .bf-lead { max-width: 44ch; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }

/* ---------- Floating tiles ---------- */
.tiles { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.tile {
  position: absolute; left: var(--x); top: var(--y);
  --s: var(--s0, 70px);
  width: var(--s); height: var(--s); border-radius: calc(var(--s) * .26);
  display: grid; place-items: center; color: var(--fg, #fff);
  background: var(--bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -10px 18px rgba(0,0,0,.10), 0 14px 28px rgba(11,26,21,.16);
  translate: calc(var(--mx, 0) * var(--k, 10) * 1px) calc(var(--my, 0) * var(--k, 10) * 1px);
  transform: rotate(var(--r, 0deg));
  animation: tile-in 1s var(--bf-ease) both, drift var(--dur, 9s) ease-in-out var(--d, 0s) infinite;
  animation-delay: var(--in, 0ms), var(--d, 0s);
}
.tile svg { width: 46%; height: 46%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.t-forest { --bg: linear-gradient(145deg, #12755D, #074133); }
.t-brass  { --bg: linear-gradient(145deg, #E2C885, #BC9B5A); --fg: #3d2d0c; }
.t-mint   { --bg: linear-gradient(145deg, #DCEEE5, #A5CDBB); --fg: #0a3a2d; }
.t-sand   { --bg: linear-gradient(145deg, #F7EFD8, #DDCEA3); --fg: #5a431a; }
.t-ink    { --bg: linear-gradient(145deg, #2a3a34, #0B1A15); }
.t-glass  { --bg: linear-gradient(145deg, rgba(255,255,255,.95), rgba(235,240,236,.8)); --fg: #074133; }
@keyframes tile-in { from { opacity: 0; scale: .6; } to { opacity: 1; scale: 1; } }
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--r, 0deg)); }
  50% { transform: translate3d(0, -16px, 0) rotate(calc(var(--r, 0deg) + 4deg)); }
}

/* ---------- Sections ---------- */
.section { padding-block: 128px; position: relative; }
.section--white { background: var(--surface-raised); }
.stack { display: grid; gap: var(--space-6); justify-items: start; }
.reading { max-width: 660px; }

/* ---------- Mission ---------- */
.mission-head { display: grid; gap: var(--space-6); justify-items: center; text-align: center; }
.mission-body { display: grid; gap: var(--space-4); justify-items: center; }
.mission-body .bf-lead { max-width: 640px; }
.principles { margin-top: 96px; display: grid; gap: var(--space-8); justify-items: center; }
.principles ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); width: 100%; }
.principle-card { display: grid; gap: var(--space-4); justify-items: center; text-align: center; }
.principle-visual {
  width: 100%; aspect-ratio: 5 / 4; border-radius: var(--radius-card); position: relative; overflow: hidden;
  display: grid; place-items: center; color: #fff;
  background: var(--bg); box-shadow: var(--shadow-soft);
}
.principle-visual::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.22) 1px, transparent 1.4px); background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 75%); mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 75%);
}
.principle-visual svg { width: 34%; height: 34%; position: relative; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.principle-visual--a { --bg: linear-gradient(150deg, #12755D, #06382C); }
.principle-visual--b { --bg: linear-gradient(150deg, #E2C885, #B6934E); color: #3d2d0c; }
.principle-visual--c { --bg: linear-gradient(150deg, #2a3a34, #0B1A15); }
.principle-visual--b::before { background-image: radial-gradient(rgba(61,45,12,.22) 1px, transparent 1.4px); }
.principle { font-family: var(--font-display); font-size: 22px; line-height: 28px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); max-width: 14em; }
.founders {
  margin-top: 96px; position: relative; overflow: hidden; isolation: isolate;
  background: var(--surface-brand); color: var(--ink-on-brand);
  border-radius: var(--radius-card); padding: 88px var(--space-8); text-align: center;
  display: grid; gap: var(--space-6); justify-items: center;
}
.founders::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(40% 70% at 12% 0%, rgba(188,155,90,.28), transparent 70%),
    radial-gradient(50% 80% at 100% 100%, rgba(18,117,93,.55), transparent 70%);
}
.founders .display-lg { color: var(--ink-on-brand); }
.founders p.statement { font-family: var(--font-display); font-weight: 500; font-size: 30px; line-height: 38px; letter-spacing: -0.025em; max-width: 24em; text-wrap: balance; }

/* ---------- Contact ---------- */
.contact { overflow: hidden; isolation: isolate; text-align: center; }
.contact-inner { position: relative; z-index: 1; display: grid; gap: var(--space-8); justify-items: center; }
.contact .bf-lead { max-width: 34em; }
.contact-actions { display: grid; gap: var(--space-4); justify-items: center; }
.contact-place { font-family: var(--font-label); font-size: 13px; line-height: 18px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.bf-btn--lg { overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); color: var(--ink); padding-block: var(--space-24) var(--space-12); overflow: hidden; }
.footer-top { display: grid; justify-items: center; gap: var(--space-8); padding-bottom: var(--space-12); }
.footer-top img { width: 220px; height: auto; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3) var(--space-8); list-style: none; margin: 0; padding: 0; }
.footer-links a { font-size: 14px; line-height: 20px; color: var(--ink-muted); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--ink); }
.footer-links a:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.footer-legal { display: grid; gap: var(--space-2); color: var(--ink-muted); max-width: 760px; margin-inline: auto; text-align: center; padding-bottom: var(--space-4); }

/* ---------- Narrow screens ---------- */
@media (max-width: 960px) {
  .display-xl { font-size: 68px; line-height: 70px; }
  .display-lg { font-size: 46px; line-height: 50px; }
  .principles ol { grid-template-columns: minmax(0, 1fr); max-width: 440px; margin-inline: auto; }
  .tile.hide-md { display: none; }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 80px; }
  body { font-size: 16px; }
  .wrap { padding-left: max(var(--space-4), env(safe-area-inset-left, 0px)); padding-right: max(var(--space-4), env(safe-area-inset-right, 0px)); }
  .site-header { padding-top: var(--space-3); }
  .site-header .bf-nav { padding: 6px 6px 6px 16px; }
  .bf-nav ul { display: none; }
  .hero { padding: 112px 0 56px; }
  .display-xl { font-size: 46px; line-height: 48px; }
  .display-lg { font-size: 38px; line-height: 42px; }
  .bf-lead { font-size: 17px; line-height: 27px; }
  .section { padding-block: 80px; }
  .principles, .founders { margin-top: 64px; }
  .founders { padding: 56px var(--space-6); }
  .founders p.statement { font-size: 22px; line-height: 30px; }
  .tile { --s: calc(var(--s0) * .66); }
  .tile.hide-sm { display: none; }
  .footer-top img { width: 170px; }
  .bf-btn--lg { font-size: 17px; padding: 14px 24px; width: 100%; max-width: 100%; }
}

@media (max-width: 480px) {
  .nav-name { font-size: 15px; }
  .bf-nav img { height: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile { animation: none; translate: none; }
  .bf-btn, .bf-nav a.bf-link, .footer-links a { transition: none; }
}
