/* ============================================================
   Chelsea Macy — event photography, Gresham OR
   Composition: black + white + one colour per section,
   stacked headline, receipt/listing layout, drag band,
   patterned SVG background, gentle fade+rise on scroll.
   ============================================================ */

:root {
  --ink:        #0a0a0a;
  --paper:      #f5f2ea;
  --red:        #e10600;
  --blue:       #003c8a;
  --acid:       #f4ff33;

  --bg:         var(--paper);
  --fg:         var(--ink);
  --rule:       rgba(10, 10, 10, 0.35);
  --muted:      rgba(10, 10, 10, 0.62);
  --field-bg:   rgba(10, 10, 10, 0.04);
  --pattern:    rgba(10, 10, 10, 0.10);

  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --disp: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;

  --pad: clamp(1.25rem, 5vw, 4rem);
  --col: 62ch;
}

html[data-theme="dark"] {
  --bg:         #0a0a0a;
  --fg:         #f2efe6;
  --rule:       rgba(242, 239, 230, 0.38);
  --muted:      rgba(242, 239, 230, 0.66);
  --field-bg:   rgba(242, 239, 230, 0.07);
  --pattern:    rgba(242, 239, 230, 0.11);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  transition: background-color 220ms ease, color 220ms ease;
}

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

a { color: inherit; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* ---------- patterned SVG background (dot matrix) ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'><circle cx='1.5' cy='1.5' r='1.1' fill='%230a0a0a' fill-opacity='0.16'/><path d='M11 0v22M0 11h22' stroke='%230a0a0a' stroke-opacity='0.05' stroke-width='1'/></svg>");
  background-size: 22px 22px;
  opacity: 1;
}
html[data-theme="dark"] body::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'><circle cx='1.5' cy='1.5' r='1.1' fill='%23f2efe6' fill-opacity='0.18'/><path d='M11 0v22M0 11h22' stroke='%23f2efe6' stroke-opacity='0.06' stroke-width='1'/></svg>");
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem var(--pad);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px dotted var(--rule);
}

.mark {
  font-family: var(--disp);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
  text-decoration: none;
  margin-right: auto;
}

.topnav {
  display: flex;
  gap: 0.35rem 1.1rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.topnav a {
  text-decoration: none;
  padding: 0.55rem 0.15rem;
  border-bottom: 1px solid transparent;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.topnav a:hover { border-bottom-color: currentColor; }

.theme-toggle {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  background: transparent;
  color: inherit;
  border: 1px solid var(--rule);
  padding: 0.6rem 0.7rem;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
}
.theme-toggle:hover { background: var(--fg); color: var(--bg); }

/* ---------- section shell ---------- */
.sec {
  position: relative;
  z-index: 1;
  padding: clamp(3.5rem, 9vw, 7rem) 0;
  border-bottom: 1px dotted var(--rule);
}

.wrap {
  max-width: var(--col);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.sec--ink  { background: var(--ink);   color: var(--paper); --rule: rgba(245,242,234,0.34); --muted: rgba(245,242,234,0.68); --field-bg: rgba(245,242,234,0.08); }
.sec--red  { background: var(--red);   color: #fff;         --rule: rgba(255,255,255,0.42); --muted: rgba(255,255,255,0.78); --field-bg: rgba(255,255,255,0.12); }
.sec--blue { background: var(--blue);  color: #fff;         --rule: rgba(255,255,255,0.42); --muted: rgba(255,255,255,0.78); --field-bg: rgba(255,255,255,0.12); }
.sec--acid { background: var(--acid);  color: var(--ink);   --rule: rgba(10,10,10,0.4);     --muted: rgba(10,10,10,0.7);     --field-bg: rgba(10,10,10,0.06); }

/* the patterned tile reads through the light sections only */
.sec--ink, .sec--red, .sec--blue { background-image: none; }

/* ---------- type ---------- */
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.4rem;
}

h1, h2, h3 { font-family: var(--disp); margin: 0; line-height: 0.98; }

/* stacked headline breaking the baseline */
.stack {
  font-size: clamp(2.6rem, 11vw, 5.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0 0 1.6rem;
}
.stack span { display: block; }
.stack span:nth-child(1) { margin-left: 0; }
.stack span:nth-child(2) { margin-left: 0.9em; }
.stack span:nth-child(3) { margin-left: -0.12em; color: var(--red); }
.sec--red .stack span:nth-child(3) { color: var(--acid); }

.sec-title {
  font-size: clamp(1.7rem, 5.2vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}

.lede {
  font-size: 1.02rem;
  max-width: 52ch;
  margin: 0 0 2rem;
  color: var(--muted);
}

.sec-intro {
  max-width: 54ch;
  margin: 0 0 2.4rem;
  color: var(--muted);
}

p { margin: 0 0 1rem; }

/* ---------- buttons ---------- */
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 3rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}
.btn:hover { background: currentColor; }
.btn:hover > * { color: var(--bg); }
.btn--ghost { opacity: 0.75; }
.btn--dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--dark:hover { background: transparent; color: var(--ink); }

/* ---------- receipt / listing ---------- */
.receipt {
  margin: 0;
  padding: 0;
  border-top: 1px dotted var(--rule);
  font-size: 0.82rem;
}
.receipt > div {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px dotted var(--rule);
}
.receipt dt {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  color: var(--muted);
  flex: 0 0 auto;
}
.receipt dd { margin: 0; text-align: right; }
.receipt a { text-decoration: none; border-bottom: 1px dotted currentColor; }

/* ---------- drag band ---------- */
.band {
  position: relative;
  z-index: 1;
  overflow: hidden;
  cursor: grab;
  padding: 0.5rem 0 1.25rem;
  margin-top: 0.5rem;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.band.is-dragging { cursor: grabbing; }
.band:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }

.band-track {
  display: flex;
  gap: 1rem;
  padding-inline: var(--pad);
  width: max-content;
  will-change: transform;
}

.card {
  margin: 0;
  width: clamp(200px, 62vw, 300px);
  flex: 0 0 auto;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid var(--rule);
}
.card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  pointer-events: none;
  filter: grayscale(1) contrast(1.05);
  transition: filter 300ms ease;
}
.card:hover img { filter: grayscale(0) contrast(1); }

.card figcaption {
  padding: 0.7rem 0.8rem 0.85rem;
  font-size: 0.72rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.cap-title { font-family: var(--disp); font-weight: 600; font-size: 0.9rem; }
.cap-meta { color: var(--muted); letter-spacing: 0.06em; text-align: right; }

.band-hint {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

/* ---------- services list ---------- */
.list { list-style: none; margin: 0; padding: 0; border-top: 1px dotted var(--rule); }
.list > li { padding: 1.6rem 0; border-bottom: 1px dotted var(--rule); }
.list h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.6rem; letter-spacing: -0.01em; }
.list p { max-width: 56ch; color: var(--muted); }
.list p:last-child { margin-bottom: 0; }
.meta {
  font-size: 0.7rem !important;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: right;
  color: inherit !important;
  opacity: 0.85;
}

.note {
  margin-top: 2rem;
  padding: 1rem 1.1rem;
  border: 1px dotted var(--rule);
  font-size: 0.85rem;
  max-width: 56ch;
}

/* ---------- process steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps > li {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0.2rem 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px dotted var(--rule);
}
.steps > li:first-child { border-top: 1px dotted var(--rule); }
.step-n {
  font-family: var(--disp);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  grid-row: span 2;
}
.steps h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.4rem; }
.steps p { margin: 0; color: var(--muted); max-width: 52ch; font-size: 0.9rem; }

/* ---------- about ---------- */
.about-grid { display: grid; gap: 2.5rem; }
@media (min-width: 780px) {
  .about-grid { grid-template-columns: 1.35fr 1fr; gap: 3rem; align-items: start; }
}
.about-body p { max-width: 54ch; color: var(--muted); }

/* ---------- form ---------- */
.form {
  display: grid;
  gap: 1.1rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 700px) {
  .form { grid-template-columns: 1fr 1fr; }
  .field--wide { grid-column: 1 / -1; }
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.opt { text-transform: none; letter-spacing: 0; opacity: 1; color: inherit; }
.field input,
.field textarea {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: inherit;
  background: var(--field-bg);
  border: 1px solid var(--rule);
  padding: 0.8rem 0.85rem;
  min-height: 48px;
  width: 100%;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); }
.field input:focus,
.field textarea:focus { outline: 2px solid currentColor; outline-offset: 1px; }

.form-foot { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 1rem; }
.form-status { margin: 0; font-size: 0.82rem; }

/* ---------- footer ---------- */
.site-foot {
  position: relative;
  z-index: 1;
  padding: 2rem 0 3.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.foot-inner { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
.site-foot p { margin: 0; }
.attribution a { color: inherit; }
.attribution { opacity: 0.85; }

/* ---------- motion: gentle fade + rise on scroll enter ---------- */
@keyframes fadeRise {
  from { opacity: 0; translate: 0 14px; }
  to   { opacity: 1; translate: 0 0; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .sec > .wrap,
    .sec > .band,
    .sec > .band-hint {
      animation: fadeRise 420ms cubic-bezier(.2,.7,.1,1) both;
      animation-timeline: view();
      animation-range: entry 0% cover 26%;
    }
  }
}

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

/* ---------- small screens ---------- */
@media (max-width: 560px) {
  .topnav { font-size: 0.7rem; gap: 0.2rem 0.85rem; }
  .stack span:nth-child(2) { margin-left: 0.5em; }
  .receipt > div { flex-direction: column; gap: 0.15rem; }
  .receipt dd { text-align: left; }
}
