/* Starter kit base: structure and accessibility only.
   The client's look lives in styles.css, built from direction.md. */

:root {
  /* Design tokens: replace from direction.md. Neutral values keep the kit readable before styling. */
  --bg: #ffffff;
  --text: #111111;
  --muted: #555555;
  --accent: #111111;
  --line: rgba(0, 0, 0, .15);
  --font-body: system-ui, sans-serif;
  --font-display: system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: fixed; left: var(--gutter); top: 12px; z-index: 200;
  background: var(--text); color: var(--bg); padding: 10px 16px;
  text-decoration: none; transform: translateY(-160%);
}
.skip:focus { transform: none; }

/* header and mobile menu */
.header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px var(--gutter);
}
.nav { display: flex; gap: 24px; }
.menu-btn { display: none; width: 44px; height: 44px; place-items: center; }
.menu-btn svg { width: 24px; height: 24px; }
@media (max-width: 760px) {
  .menu-btn { display: grid; }
  .nav { display: none; }
  .header.menu-open .nav {
    display: flex; flex-direction: column; gap: 16px;
    position: fixed; inset: 64px 0 0; z-index: 100;
    padding: 24px var(--gutter); background: var(--bg); font-size: 1.5rem;
  }
}

/* reveal on scroll */
.js [data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* image slot: deliberately loud so it is never mistaken for design */
.slot {
  display: grid; place-items: center; aspect-ratio: 3 / 2; padding: 16px;
  border: 2px dashed #d33; color: #a00; text-align: center;
  background: repeating-linear-gradient(45deg, #fff4f4 0 12px, #ffe9e9 12px 24px);
  font: 600 .85rem/1.3 ui-monospace, monospace; letter-spacing: .04em; text-transform: uppercase;
}
.slot[data-ratio="portrait"] { aspect-ratio: 4 / 5; }

/* contact form */
.form { display: grid; gap: 8px; max-width: 36rem; }
.form input, .form textarea {
  font: inherit; color: inherit; background: transparent;
  padding: 12px; border: 1px solid var(--line);
}
.form textarea { min-height: 8rem; resize: vertical; }
.form-status { min-height: 1.6em; }

/* lightbox */
dialog.lightbox {
  width: 100%; height: 100%; max-width: 100vw; max-height: 100vh;
  border: 0; padding: 0; background: #000; color: #fff;
}
dialog.lightbox:not([open]) { display: none; }
dialog.lightbox::backdrop { background: #000; }
dialog.lightbox figure { display: grid; place-items: center; gap: 12px; height: 100%; padding: 56px var(--gutter) 24px; }
dialog.lightbox img { max-height: calc(100svh - 120px); width: auto; object-fit: contain; }
dialog.lightbox .close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; }

/* background video pause control */
[data-loop-toggle] { width: 44px; height: 44px; display: grid; place-items: center; }

@media (prefers-reduced-motion: reduce) {
  /* html.motion only appears here with ?motion=1, the owner's preview switch */
  html:not(.motion) *, html:not(.motion) *::before, html:not(.motion) *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
