/* =========================================================
   KIERAN MAKES — Shared design system
   ========================================================= */
:root {
  --accent: #e9c46a;
  --accent-2: #f4a261;
  --accent-soft: rgba(233, 196, 106, 0.12);
  --accent-glow: rgba(233, 196, 106, 0.35);

  /* Dark theme (default) */
  --bg: #0f1115;
  --bg-elev: #161a20;
  --bg-elev-2: #1d222a;
  --bg-grad: radial-gradient(1200px 600px at 80% -10%, rgba(244, 162, 97, 0.10), transparent 60%),
             radial-gradient(900px 500px at 0% 30%, rgba(233, 196, 106, 0.07), transparent 60%),
             linear-gradient(180deg, #0f1115 0%, #11141a 100%);
  --text: #ece9e2;
  --text-dim: #a8a399;
  --text-faint: #6e6a62;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --card: rgba(255, 255, 255, 0.03);
  --card-hover: rgba(255, 255, 255, 0.05);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.6), 0 10px 30px -10px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --noise-opacity: 0.035;
  --logo-stroke: #ece9e2;
}

[data-theme="light"] {
  --bg: #f7f3ec;
  --bg-elev: #fffdf8;
  --bg-elev-2: #f1ece1;
  --bg-grad: radial-gradient(1200px 600px at 80% -10%, rgba(244, 162, 97, 0.18), transparent 60%),
             radial-gradient(900px 500px at 0% 30%, rgba(233, 196, 106, 0.18), transparent 60%),
             linear-gradient(180deg, #f7f3ec 0%, #efe9dc 100%);
  --text: #1e1b16;
  --text-dim: #5b574e;
  --text-faint: #908a7d;
  --border: rgba(30, 27, 22, 0.10);
  --border-strong: rgba(30, 27, 22, 0.18);
  --card: rgba(255, 255, 255, 0.55);
  --card-hover: rgba(255, 255, 255, 0.75);
  --accent-soft: rgba(186, 142, 38, 0.14);
  --accent-glow: rgba(186, 142, 38, 0.30);
  --accent: #b88a2a;
  --accent-2: #c97a3c;
  --shadow-lg: 0 30px 60px -25px rgba(80, 60, 30, 0.25), 0 10px 30px -10px rgba(80, 60, 30, 0.15);
  --shadow-md: 0 10px 30px -10px rgba(80, 60, 30, 0.20);
  --noise-opacity: 0.05;
  --logo-stroke: #1e1b16;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--bg);
  background-image: var(--bg-grad);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: var(--noise-opacity);
  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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}
h1 { font-size: clamp(2.5rem, 6vw + 0.5rem, 5.5rem); font-variation-settings: "opsz" 144; }
h2 { font-size: clamp(2rem, 3.5vw + 0.5rem, 3.5rem); }
h3 { font-size: clamp(1.25rem, 1.2vw + 0.8rem, 1.6rem); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }

.container { width: min(1240px, 92%); margin: 0 auto; }
section { padding: clamp(4rem, 8vw, 7rem) 0; position: relative; z-index: 2; }
.section-head { margin-bottom: clamp(2rem, 4vw, 3.5rem); max-width: 720px; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.section-eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--accent);
}
.section-sub { color: var(--text-dim); font-size: 1.05rem; margin-top: 0.9rem; max-width: 60ch; }

/* =========================================================
   LOGO MARK
   ========================================================= */
.logo {
  display: inline-flex; align-items: center;
  gap: 0.75rem;
  color: var(--text);
}
.logo-mark {
  width: 38px; height: 38px;
  flex-shrink: 0;
  display: block;
}
.logo-mark .frame {
  fill: none;
  stroke: var(--logo-stroke);
  stroke-width: 2.4;
}
.logo-mark .km {
  fill: none;
  stroke: var(--logo-stroke);
  stroke-width: 3.2;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.logo-text {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
}

/* Big logo used in footer */
.logo-big .logo-mark { width: 56px; height: 56px; }
.logo-big .logo-text { font-size: 1.1rem; letter-spacing: 0.28em; }

/* =========================================================
   UPDATED LOGO IMAGE
   Uses photos/logo.png.
   The logo image is black by default, so dark mode inverts it.
   ========================================================= */
.logo-img {
  object-fit: contain;
  object-position: center;
  filter: none;
}

[data-theme="dark"] .logo-img {
  filter: invert(1) brightness(1.15);
}

[data-theme="light"] .logo-img {
  filter: none;
}

/* =========================================================
   NAVBAR
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: backdrop-filter 0.3s, background 0.3s, padding 0.3s;
}
.nav.scrolled {
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
}
.nav-links {
  display: flex; gap: 2rem; list-style: none;
  font-size: 0.93rem;
  font-weight: 500;
}
.nav-links a {
  position: relative; color: var(--text-dim);
  transition: color 0.25s;
  padding: 0.3rem 0;
}
.nav-links a::after {
  content: ""; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-tools { display: flex; gap: 0.75rem; align-items: center; }

.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: grid; place-items: center;
  transition: all 0.3s;
  color: var(--text-dim);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); transform: rotate(20deg); }
.theme-toggle svg { width: 18px; height: 18px; }
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1611;
  box-shadow: 0 10px 30px -10px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -8px var(--accent-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.btn svg { width: 16px; height: 16px; }

.menu-btn {
  display: none; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid var(--border-strong);
  place-items: center;
}
.menu-btn svg { width: 20px; height: 20px; }

@media (max-width: 920px) {
  .nav-links { display: none; }
  .nav-cta-desktop { display: none; }
  .menu-btn { display: grid; }
}

.mobile-menu {
  position: fixed; inset: 0;
  background: var(--bg);
  background-image: var(--bg-grad);
  z-index: 99;
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 2rem;
  padding: 2rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  color: var(--text);
  transition: color 0.3s;
}
.mobile-menu a:hover { color: var(--accent); }

/* =========================================================
   PAGE HEADER
   ========================================================= */
.page-header {
  padding-top: clamp(8rem, 14vh, 11rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}
.page-header-orbs {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
}
.page-header-orbs .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}
.page-header-orbs .orb-1 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -100px; right: -50px;
}
.page-header-orbs .orb-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
  bottom: -50px; left: 10%;
  opacity: 0.25;
}

.page-header-inner { position: relative; z-index: 2; }
.crumbs {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 1.5rem;
}
.crumbs a { color: var(--text-dim); transition: color 0.2s; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { opacity: 0.5; }
.page-header h1 {
  font-size: clamp(2.5rem, 4vw + 1rem, 4rem);
  margin-bottom: 1rem;
}
.page-header h1 .accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
  font-weight: 500;
}
.page-header p {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 56ch;
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  position: relative;
  z-index: 2;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}
.footer-brand p {
  color: var(--text-dim);
  margin-top: 1rem;
  max-width: 36ch;
  font-size: 0.95rem;
}
.footer-col h5 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  margin-bottom: 1rem;
  font-weight: 500;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col a {
  color: var(--text-dim);
  font-size: 0.95rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* =========================================================
   SCROLL REVEAL
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}