:root {
  --amber: #e8a23a;
  --amber-soft: rgba(232, 162, 58, 0.45);
  --amber-dim: rgba(232, 162, 58, 0.12);
  --blue: #5ec8ff;
  --blue-soft: rgba(94, 200, 255, 0.4);
  --blue-dim: rgba(94, 200, 255, 0.12);
  --bone: #f2efe8;
  --bone-muted: rgba(242, 239, 232, 0.72);
  --bone-faint: rgba(242, 239, 232, 0.45);
  --ink: #05070b;
  --ink-lift: #0b1018;
  --line: rgba(255, 255, 255, 0.14);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(1.25rem, 4.5vw, 4rem);
  --chrome: 90rem;
  --frame: 58rem;
  --frame-wide: 68rem;
  --edge: max(var(--gutter), calc((100vw - var(--chrome)) / 2));
}

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

html {
  background: var(--ink);
  color: var(--bone);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  background: var(--ink);
  color: var(--bone);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover { color: var(--bone); }

img { max-width: 100%; display: block; }

/* - Nav - */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem var(--edge);
  pointer-events: none;
  font-family: var(--sans);
}

.site-nav a {
  pointer-events: auto;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-mark {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--bone);
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.55);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--bone);
}

.nav-links a[aria-current="page"] {
  color: rgba(242, 239, 232, 0.92);
}

/* - Inner page shell - */
.page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  padding: 6.5rem 0 0;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 70% 10%, rgba(255, 255, 255, 0.06), transparent 55%),
    radial-gradient(ellipse 45% 40% at 12% 70%, var(--amber-dim), transparent 60%),
    radial-gradient(ellipse 40% 35% at 88% 65%, var(--blue-dim), transparent 55%),
    var(--ink);
}

.page-bg.about-tint {
  background:
    radial-gradient(ellipse 60% 45% at 80% 15%, rgba(255, 255, 255, 0.07), transparent 50%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(232, 162, 58, 0.08), transparent 55%),
    var(--ink);
}

.moon-soft {
  position: fixed;
  width: min(28vw, 320px);
  height: min(28vw, 320px);
  top: 6%;
  right: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
  animation: breathe 8s ease-in-out infinite;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 1;
}

.orb-drift {
  display: none; /* cleanup: no functionless moons */
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 1;
  filter: blur(0.3px);
}

.orb-drift.warm {
  width: 7vw;
  height: 7vw;
  min-width: 56px;
  min-height: 56px;
  left: 2%;
  top: 18%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 220, 160, 0.45), var(--amber) 35%, transparent 72%);
  box-shadow: 0 0 36px rgba(232, 162, 58, 0.28);
  animation: driftA 12s ease-in-out infinite, pulse 5s ease-in-out infinite;
  opacity: 0.28;
}

.orb-drift.cool {
  width: 6vw;
  height: 6vw;
  min-width: 48px;
  min-height: 48px;
  right: 3%;
  top: 22%;
  background: radial-gradient(circle at 40% 30%, rgba(200, 240, 255, 0.5), var(--blue) 40%, transparent 72%);
  box-shadow: 0 0 32px rgba(94, 200, 255, 0.25);
  animation: driftB 14s ease-in-out infinite, pulse 5.5s ease-in-out infinite 0.5s;
  opacity: 0.26;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  z-index: 2;
  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");
}

.wrap {
  position: relative;
  z-index: 5;
  isolation: isolate;
  width: min(var(--frame), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding-bottom: 5rem;
}

.wrap.wide { width: min(var(--frame-wide), calc(100% - 2 * var(--gutter))); }

.kicker {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bone-faint);
  margin-bottom: 1rem;
}

h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.45);
}

.lede {
  margin-top: 1.25rem;
  max-width: 38rem;
  color: var(--bone-muted);
  font-size: 1.05rem;
}

.prose {
  margin-top: 2.5rem;
  max-width: 36rem;
}

.prose p {
  text-shadow: 0 1px 18px rgba(5, 7, 11, 0.85);
  margin-bottom: 1.15rem;
  color: var(--bone-muted);
}

.prose p:last-child { margin-bottom: 0; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 2rem;
}

.chip {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(242, 239, 232, 0.85);
}

/* - Work cards - */
.venture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2.75rem;
}

.venture {
  position: relative;
  padding: 1.75rem 1.6rem 1.5rem;
  border-radius: 1.15rem;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.venture:hover {
  transform: translateY(-2px);
}

.venture.warm {
  box-shadow: inset 0 0 60px rgba(232, 162, 58, 0.06);
}

.venture.warm:hover { border-color: rgba(232, 162, 58, 0.45); }

.venture.cool {
  box-shadow: inset 0 0 60px rgba(94, 200, 255, 0.06);
}

.venture.cool:hover { border-color: rgba(94, 200, 255, 0.45); }

.venture .glow {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  top: -30px;
  right: -20px;
  pointer-events: none;
  opacity: 0.55;
}

.venture.warm .glow {
  background: radial-gradient(circle, var(--amber-soft), transparent 70%);
}

.venture.cool .glow {
  background: radial-gradient(circle, var(--blue-soft), transparent 70%);
}

.venture h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.65rem;
  margin-bottom: 0.75rem;
}

.venture.warm h2 { color: #f0c57a; }
.venture.cool h2 { color: #9fdcff; }

.venture p {
  color: var(--bone-muted);
  font-size: 0.95rem;
  margin-bottom: 1.35rem;
  max-width: 28rem;
}

.venture .link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.15rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.venture.warm .link:hover { border-color: var(--amber); color: #f0c57a; }
.venture.cool .link:hover { border-color: var(--blue); color: #9fdcff; }

/* - Contact - */
.contact-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  margin-top: 2.5rem;
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.75rem;
  border-radius: 1.15rem;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.field label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-faint);
  margin-bottom: 0.45rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid var(--line);
  background: rgba(5, 7, 11, 0.65);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(242, 239, 232, 0.28);
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(242, 239, 232, 0.35);
  box-shadow: 0 0 0 3px rgba(242, 239, 232, 0.06);
}

.submit-btn {
  align-self: flex-start;
  margin-top: 0.35rem;
  padding: 0.85rem 1.4rem;
  border: 1px solid rgba(242, 239, 232, 0.35);
  border-radius: 999px;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  opacity: 0.92;
}

.submit-btn:disabled {
  cursor: wait;
  opacity: 0.75;
}

.submit-btn.is-success {
  background: transparent;
  color: var(--bone);
  border-color: rgba(94, 200, 255, 0.45);
}

.submit-btn.is-error {
  background: transparent;
  color: #f0c57a;
  border-color: rgba(232, 162, 58, 0.5);
}

.form-status {
  min-height: 1.25rem;
  font-size: 0.85rem;
  color: var(--bone-faint);
}

.form-status.ok { color: #9fdcff; }
.form-status.err { color: #f0c57a; }

.aside-links {
  padding: 0.5rem 0;
}

.aside-links h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.aside-links p {
  color: var(--bone-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.direct-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.direct-list a {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease;
}

.direct-list .tag {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

.direct-list .val {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--bone);
}

.direct-list a:hover .val { color: #f0c57a; }

/* - Footer - */
.site-footer {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 2rem var(--edge) 2.5rem;
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-faint);
  text-align: center;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
}

.footer-socials a {
  color: inherit;
  transition: color 0.2s ease;
}

.footer-socials a:hover {
  color: var(--bone);
}

.footer-mark {
  margin: 0;
}

.site-footer.overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}

/* - Hero page overrides - */
body.hero-page {
  overflow: hidden;
  height: 100%;
}

body.hero-page .site-nav {
  background: linear-gradient(to bottom, rgba(5, 7, 11, 0.55), transparent);
}

/* - Motion - */
@keyframes breathe {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.06); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.08); }
}

@keyframes driftA {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(1.4vw, -1vh); }
}

@keyframes driftB {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-1.2vw, 1.2vh); }
}

@media (min-width: 1400px) {
  :root {
    --frame: 66rem;
    --frame-wide: 80rem;
  }

  .page {
    padding: 7.25rem 0 0;
  }

  h1 {
    font-size: clamp(2.15rem, 2.3vw, 3.45rem);
  }

  .moon-soft {
    width: min(22vw, 440px);
    height: min(22vw, 440px);
  }
}

@media (min-width: 1900px) {
  :root {
    --frame: 70rem;
    --frame-wide: 84rem;
  }

  .page {
    padding: 8rem 0 0;
  }

  .wrap,
  .wrap.wide {
    padding-bottom: 6rem;
  }

  .lede {
    font-size: 1.1rem;
    max-width: 42rem;
  }

  .prose {
    max-width: 40rem;
  }
}

@media (max-width: 900px) {
  .venture-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-nav {
    padding: 0.85rem 4vw;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    row-gap: 0.45rem;
    background: linear-gradient(to bottom, rgba(5, 7, 11, 0.82), rgba(5, 7, 11, 0.35) 70%, transparent);
  }

  .nav-mark {
    font-size: 0.95rem;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    font-size: 0.58rem;
    letter-spacing: 0.16em;
  }

  .page {
    padding: 5.5rem 0 0;
  }

  .wrap,
  .wrap.wide {
    width: min(100%, 92vw);
    padding-bottom: 3.5rem;
  }

  h1 {
    font-size: clamp(1.7rem, 8vw, 2.35rem);
    line-height: 1.18;
  }

  .lede {
    font-size: 0.98rem;
    margin-top: 1rem;
  }

  .prose {
    margin-top: 1.75rem;
  }

  .prose p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .chips {
    margin-top: 1.5rem;
    gap: 0.45rem;
  }

  .chip {
    font-size: 0.6rem;
    padding: 0.35rem 0.65rem;
  }

  .venture {
    padding: 1.35rem 1.25rem 1.5rem;
  }

  .contact-form,
  .aside-links {
    width: 100%;
  }

  .site-footer {
    padding: 1.5rem 4vw 2rem;
  }
}

@media (max-width: 420px) {
  .nav-links {
    gap: 0.5rem 0.85rem;
    font-size: 0.55rem;
    letter-spacing: 0.12em;
  }

  h1 {
    font-size: 1.55rem;
  }
}

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