/* Mik Fenn. One visual world: a stage at night, lit by neon; daylight for horses and home. */
:root {
  /* layout idea: dark stage up top with one live instrument band, then daylight sections */
  color-scheme: dark;
  --night: #0b0f1a;
  --panel: #141a2b;
  --line: #27304a;
  --text: #eef1f6;
  --muted: #9ca6bc;
  --coral: #ff6a4d;   /* neon sign red-orange */
  --teal: #3fd9c0;    /* neon sign green */
  --day: #f1f3ef;
  --day-ink: #171c2a;
  --day-muted: #56607a;
  --day-line: #d5d9d2;
  --display: "Bricolage Grotesque", "Arial Narrow", Arial, sans-serif;
  --body: "DM Sans", "Segoe UI", Arial, sans-serif;
  --mono: "JetBrains Mono", Consolas, "Courier New", monospace;
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
main { overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--coral); color: #1a0d08; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 12px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 26, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--coral), var(--teal)); transform-origin: 0 50%; transform: scaleX(0); }
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.eq i { width: 3px; height: 100%; background: var(--coral); border-radius: 2px; transform-origin: 50% 100%; animation: eq 1.1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -0.35s; background: #ff8a5c; }
.eq i:nth-child(3) { animation-delay: -0.7s; background: #8fd8a4; }
.eq i:nth-child(4) { animation-delay: -0.15s; background: var(--teal); }
@keyframes eq { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

.site-nav { display: flex; gap: 6px; }
.site-nav a {
  font-size: 14px; font-weight: 500; color: var(--muted);
  padding: 8px 14px; border-radius: 999px; transition: color .2s, background .2s;
}
.site-nav a:hover { color: var(--text); }
.site-nav a.active { color: var(--night); background: var(--text); }
.menu-toggle { display: none; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px; font-size: 14px; min-height: 44px; }

/* ---------- shared bits ---------- */
.label {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: 10px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 12px var(--coral); animation: pulse 2.4s ease-in-out infinite; flex: none; }
@keyframes pulse { 50% { opacity: 0.45; } }
.accent { color: var(--coral); }
h1 .accent { display: block; }
.hint-touch { display: none; }
@media (pointer: coarse) { .hint-mouse { display: none; } .hint-touch { display: inline; } }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: 15px;
  transition: transform .2s, background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--coral); color: #1d0c06; }
.btn-primary:hover { background: #ff8266; }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

/* ---------- hero ---------- */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) var(--gutter) clamp(40px, 6vw, 72px);
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 88px); align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 28px; }
h1 { font-size: clamp(44px, 6.4vw, 88px); line-height: 1.0; font-weight: 800; }
.lede { font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-media { position: relative; justify-self: end; width: min(100%, 420px); }
.hero-frame {
  position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 5;
  box-shadow: -18px 18px 60px rgba(255, 106, 77, 0.22), 18px -12px 60px rgba(63, 217, 192, 0.18);
  border: 1px solid var(--line);
}
.hero-frame img { width: 100%; height: 112%; object-fit: cover; object-position: center 22%; will-change: transform; }
.hero-tag {
  position: absolute; left: -14px; bottom: 26px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--night); border: 1px solid var(--teal); color: var(--teal);
  padding: 8px 14px; border-radius: 999px; box-shadow: 0 0 22px rgba(63, 217, 192, 0.3);
}

/* ---------- strings ---------- */
.strings { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #0e1322, #0b0f1a); }
.strings-head {
  max-width: var(--max); margin: 0 auto; padding: 22px var(--gutter) 0;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
}
.strings-hint { color: var(--text); font-size: 15px; margin-top: 6px; }
.strings-controls { display: flex; gap: 8px; }
.chip {
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: 13px; font-weight: 600; transition: border-color .2s, color .2s, background .2s;
}
.chip:hover { border-color: var(--teal); color: var(--teal); }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #05201b; }
#stringsCanvas { display: block; width: 100%; height: 230px; touch-action: pan-y; cursor: crosshair; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-bottom: 1px solid var(--line); padding: 18px 0; }
.marquee-track { display: flex; width: max-content; animation: slide 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span {
  font-family: var(--display); font-weight: 700; font-size: clamp(22px, 3vw, 34px); letter-spacing: -0.01em;
  padding: 0 28px; white-space: nowrap; color: var(--text); display: inline-flex; align-items: center; gap: 56px;
}
.marquee span::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); }
.marquee span:nth-child(even) { color: transparent; -webkit-text-stroke: 1px var(--muted); }
.marquee span:nth-child(even)::after { background: var(--teal); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 9vw, 120px) var(--gutter); }
.section-label {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 12px; margin-bottom: 28px;
}
.section-label span { color: var(--coral); }
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
h2 { font-size: clamp(32px, 4.2vw, 56px); line-height: 1.06; font-weight: 700; max-width: 16em; }
.big { font-size: clamp(20px, 2vw, 25px); line-height: 1.45; color: var(--text); font-weight: 500; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 88px); }
.about-copy { display: flex; flex-direction: column; gap: 18px; color: var(--muted); max-width: 36em; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: clamp(40px, 6vw, 72px) 0 0; }
.stat { border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: var(--panel); display: flex; flex-direction: column-reverse; gap: 6px; }
.stat dt { color: var(--muted); font-size: 14px; line-height: 1.4; }
.stat dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(40px, 5vw, 64px); line-height: 1; font-variant-numeric: tabular-nums; }
.stat:nth-child(2) dd { color: var(--coral); }

/* work cards */
.work h2 { margin-bottom: clamp(32px, 4vw, 52px); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--panel);
  padding: 30px 28px; display: flex; flex-direction: column; gap: 14px;
  transition: transform .25s, border-color .25s;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 106, 77, 0.2), transparent 65%);
}
.card:hover { transform: translateY(-6px); border-color: #3a4568; }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }
.card svg { width: 44px; height: 44px; fill: none; stroke: var(--teal); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 26px; font-weight: 700; }
.card p { color: var(--muted); font-size: 16px; }
.card a { margin-top: auto; color: var(--coral); font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; align-self: flex-start; }
.card a:hover { text-decoration: underline; text-underline-offset: 4px; }
.tags { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; color: var(--muted); }

/* galleries */
.split-head { display: flex; justify-content: space-between; align-items: flex-end; gap: clamp(24px, 5vw, 72px); margin-bottom: clamp(28px, 4vw, 48px); }
.split-head p { color: var(--muted); max-width: 24em; }
.gallery { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; align-items: start; }
.gallery-even { grid-template-columns: 1fr 1fr; }
.shot { margin: 0; }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: #0f1423; border-radius: 16px; overflow: hidden; cursor: zoom-in; }
.zoom img { width: 100%; transition: transform .6s cubic-bezier(.2, .7, .2, 1), filter .4s; }
.zoom:hover img, .zoom:focus-visible img { transform: scale(1.045); }
.shot-wide img { aspect-ratio: 16 / 10; object-fit: cover; object-position: center top; }
.shot-band img { aspect-ratio: 500 / 292; object-fit: cover; }
.gallery-even img { aspect-ratio: 1 / 1; object-fit: cover; }
.shot figcaption {
  display: flex; justify-content: space-between; padding-top: 12px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}

/* daylight sections */
.light { --text: var(--day-ink); --muted: var(--day-muted); --line: var(--day-line); color: var(--day-ink); position: relative; }
.light::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); background: var(--day); z-index: -1; }
.light .zoom { background: #dfe3dc; }
.light :focus-visible { outline-color: #0f7e6c; }
.light .section-label span { color: #d8442a; }

.family { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 7vw, 96px); align-items: center; }
.light + .light { padding-top: 0; }
.family-photos { position: relative; padding: 0 12% 12% 0; }
.family-photos .couple img { aspect-ratio: 5 / 5.2; object-fit: cover; object-position: center 30%; }
.family-photos .portrait { position: absolute; right: 0; bottom: 0; width: 40%; border: 6px solid var(--day); border-radius: 16px; box-shadow: 0 18px 40px rgba(23, 28, 42, 0.22); }
.family-photos .portrait img { aspect-ratio: 4 / 5; object-fit: cover; object-position: center 25%; }
.family-copy { display: flex; flex-direction: column; gap: 18px; }
.family-copy .section-label { margin-bottom: 6px; }
.family-copy p { color: var(--day-muted); max-width: 30em; }
.family-copy .big { color: var(--day-ink); }
.signature { font-family: var(--display); font-weight: 700; font-size: 28px; color: #d8442a !important; letter-spacing: -0.02em; }

/* footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px var(--gutter); display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  color: var(--muted); font-size: 14px;
}
.footer-name { font-family: var(--display); font-weight: 800; font-size: 28px; color: var(--text); letter-spacing: -0.02em; }
.footer-right { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.footer-right a { color: var(--text); font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }
.footer-right a:hover { color: var(--coral); }

/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(94vw, 1100px); max-height: 94vh; color: #eef1f6; }
.lightbox::backdrop { background: rgba(6, 8, 14, 0.9); backdrop-filter: blur(6px); }
.lightbox img { max-height: 80vh; width: auto; max-width: 100%; margin: 0 auto; border-radius: 12px; }
.lightbox p { text-align: center; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 14px; }
.lightbox-close { display: block; margin: 0 0 12px auto; background: transparent; border: 1px solid #47506b; color: #eef1f6; border-radius: 999px; padding: 7px 16px; font-size: 13px; }
.lightbox-close:hover { border-color: var(--coral); color: var(--coral); }

/* scroll reveal: only below-the-fold elements get the pre-state, set by script */
.reveal.pre { opacity: 0.12; transform: translateY(28px); }
.reveal { transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.cards .reveal:nth-child(2), .stats .reveal:nth-child(2), .gallery .reveal:nth-child(2) { transition-delay: .12s; }
.cards .reveal:nth-child(3), .stats .reveal:nth-child(3) { transition-delay: .24s; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-media { justify-self: start; width: min(100%, 380px); margin-left: 14px; }
  .about-grid, .family { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .split-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .menu-toggle { display: inline-block; }
  .site-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 2px;
    background: var(--night); border-bottom: 1px solid var(--line); padding: 12px var(--gutter) 18px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 14px; font-size: 16px; }
  .chip { min-height: 44px; padding: 10px 18px; }
  .lightbox-close { min-height: 44px; }
  .stats { grid-template-columns: 1fr; }
  .gallery, .gallery-even { grid-template-columns: 1fr; }
  #stringsCanvas { height: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .eq i, .dot, .marquee-track { animation: none; }
  .reveal, .reveal.pre { opacity: 1; transform: none; transition: none; }
  .zoom img, .card, .btn { transition: none; }
}

@media (max-width: 360px) { h1 { font-size: 38px; } }
