/* ------------------------------------------------------------------
   BirdFrame - watercolour field-journal on cream paper.
   Shared by index.html and privacy.html. Light theme only.
   ------------------------------------------------------------------ */

:root {
  --accent: #6f7b52;
  --accent-deep: #566041;
  --accent-soft: #e9ead4;
  --paper: #efe7d4;
  --ink: #3a352b;
  --ink-strong: #2c2920;
  --muted: #8a7f68;
  --faint: #9a907a;
  --hair: #d8cdb3;
  --card: #faf5e9;
  --card-border: #e3dac4;
  --field: #fbf7ec;
  --field-border: #d8cdb3;
  --serif: "EB Garamond", Georgia, serif;
  --hand: "Caveat", "Segoe Script", cursive;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --shadow-card: 0 14px 30px -20px rgba(60, 50, 30, .55);
  --shadow-frame: 0 34px 70px -34px rgba(54, 44, 22, .6);
  --wrap: 1120px;
}

/* ---------- reset-ish ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.62;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* height:auto is load-bearing - the images carry width/height attributes for
   layout stability, and without it CSS width:100% stretches them vertically. */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink-strong); }

h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.2; }
p { margin: 0 0 1em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- washes + grain ---------- */

.washes, .grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.washes {
  background:
    radial-gradient(60% 45% at 12% 8%, rgba(111, 123, 82, .20), transparent 70%),
    radial-gradient(50% 40% at 88% 14%, rgba(176, 106, 72, .14), transparent 72%),
    radial-gradient(55% 45% at 78% 68%, rgba(96, 122, 148, .13), transparent 70%),
    radial-gradient(60% 50% at 20% 88%, rgba(199, 160, 84, .15), transparent 72%);
}

.grain {
  opacity: .05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- layout ---------- */

.page { position: relative; z-index: 1; }

.wrap {
  width: min(100% - 40px, var(--wrap));
  margin-inline: auto;
}

section { padding: clamp(44px, 7vw, 78px) 0; }

/* ---------- masthead ---------- */

.masthead { padding: clamp(30px, 5vw, 54px) 0 clamp(10px, 2vw, 18px); }

.masthead-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

/* The wordmark is the painted badge itself - it carries the name and the
   "detection & artwork" line inside the artwork, so there is no text to set.
   Caveat still does the section headings; only the masthead lettering went. */
.brand { line-height: 0; }

.brand a {
  display: inline-block;
  border-radius: 50%;
  text-decoration: none;
}

.brand img {
  width: clamp(118px, 13vw, 154px);
  height: auto;
  transition: transform .25s ease;
}

.brand a:hover img { transform: translateY(-2px) rotate(-1.5deg); }

.brand a:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .brand img { transition: none; }
  .brand a:hover img { transform: none; }
}

.tagline {
  font-style: italic;
  color: var(--muted);
  font-size: clamp(17px, 2.1vw, 21px);
  margin: 8px 0 0;
  max-width: 42ch;
}

.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 5px 12px;
  margin-top: 14px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: lowercase;
  padding-bottom: 6px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.nav a:hover { color: var(--accent-deep); border-bottom-color: var(--accent); }

.nav .sep { color: var(--hair); }

/* ---------- dividers ---------- */

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 clamp(24px, 3.5vw, 38px);
}

.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hair);
}

.divider span {
  font-family: var(--hand);
  font-size: clamp(24px, 3vw, 30px);
  color: var(--accent-deep);
  white-space: nowrap;
}

/* ---------- hero ---------- */

.hero { padding-top: clamp(18px, 3vw, 30px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 54px);
  align-items: center;
}

/* framed artwork treatment */
.frame {
  background: linear-gradient(160deg, #f4ead4, #ece0c4);
  border: 1px solid #cdbf9f;
  border-radius: 6px;
  box-shadow: var(--shadow-frame);
  padding: clamp(14px, 2.2vw, 26px);
}

.frame .mat {
  border: 1px solid #d9cbaa;
  background: #fdfaf1;
  padding: clamp(8px, 1.4vw, 14px);
}

.frame img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid rgba(90, 76, 46, .18);
}

/* the hero poster is a button so it can be opened full size */
.zoom {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
  cursor: zoom-in;
}

.zoom img { transition: transform .35s ease, box-shadow .35s ease; }

.zoom:hover img,
.zoom:focus-visible img {
  transform: translateY(-3px);
  box-shadow: 0 20px 36px -20px rgba(54, 44, 22, .7);
}

.zoom:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 5px;
}

@media (prefers-reduced-motion: reduce) {
  .zoom img { transition: none; }
  .zoom:hover img, .zoom:focus-visible img { transform: none; }
}

/* ---------- full-size poster ---------- */

.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(30, 23, 12, .82);
  backdrop-filter: blur(3px);
}

.lightbox-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
}

.lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(1800px, 92vw);
  max-height: 92vh;
  object-fit: contain;
  background: var(--card);
  border: 1px solid rgba(240, 231, 212, .28);
  border-radius: 3px;
  box-shadow: 0 44px 90px -40px rgba(0, 0, 0, .9);
  cursor: zoom-out;
}

.lightbox-close {
  position: fixed;
  top: max(16px, 2.4vh);
  right: max(16px, 2.4vw);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: 9px 19px;
  cursor: pointer;
}

.lightbox-close:hover { background: var(--accent-soft); }

.lightbox-close:focus-visible {
  outline: 2px solid var(--card);
  outline-offset: 3px;
}

.frame-caption {
  font-family: var(--hand);
  font-size: clamp(20px, 2.4vw, 25px);
  color: var(--muted);
  text-align: center;
  margin: 14px 0 0;
  line-height: 1.35;
}

.lede {
  font-size: clamp(18px, 2.1vw, 21px);
  color: var(--ink);
  margin: 0 0 .7em;
}

.lede .drop {
  font-family: var(--hand);
  font-size: 1.35em;
  color: var(--accent-deep);
}

.hero-note {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--faint);
  margin-top: 20px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fbf8ef;
  background: var(--accent);
  border: 1px solid var(--accent-deep);
  border-radius: 999px;
  padding: 12px 24px;
  box-shadow: var(--shadow-card);
  transition: background .2s ease, transform .2s ease;
}

.btn:hover {
  background: var(--accent-deep);
  color: #fbf8ef;
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
  color: var(--accent-deep);
  border-color: var(--hair);
  box-shadow: none;
}

.btn.ghost:hover { background: var(--accent-soft); color: var(--accent-deep); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
}

/* ---------- cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, .75);
  padding: 24px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 22px;
}

.step h3 {
  font-family: var(--hand);
  font-size: 30px;
  color: var(--ink-strong);
  margin: 14px 0 6px;
}

.step p { margin: 0; color: var(--ink); }

.step-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent-deep);
  font-family: var(--hand);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  padding-bottom: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.step .kicker {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 12px;
}

/* ---------- gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 22px;
}

.bird {
  padding: 12px 12px 16px;
  transition: transform .25s ease, box-shadow .25s ease;
}

.bird:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 38px -22px rgba(60, 50, 30, .6), inset 0 1px 0 rgba(255, 255, 255, .75);
}

.bird .thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 9px;
  border: 1px solid var(--card-border);
  background: var(--field);
}

.bird .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bird h3 {
  font-family: var(--hand);
  font-size: 27px;
  color: var(--ink-strong);
  margin: 12px 4px 2px;
  line-height: 1.15;
}

.bird .meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 4px;
}

.gallery-foot {
  font-style: italic;
  color: var(--muted);
  margin: 26px 0 0;
  text-align: center;
}

/* ---------- two ways to hang it ---------- */

.modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  align-items: start;
}

.mode h3 {
  font-family: var(--hand);
  font-size: 30px;
  color: var(--ink-strong);
  margin-bottom: 4px;
}

.mode .pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: 4px 11px;
  margin-bottom: 12px;
}

.mode-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.mode-strip img,
.mode-plate img {
  width: 100%;
  border-radius: 7px;
  border: 1px solid var(--card-border);
}

.mode-plate { margin-top: 14px; }

.mode .caption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--faint);
  margin: 10px 0 0;
}

/* ---------- installations ---------- */

.section-intro {
  font-style: italic;
  color: var(--muted);
  max-width: 62ch;
  margin: -6px 0 clamp(22px, 3vw, 32px);
}

.installs {
  display: grid;
  gap: clamp(20px, 3vw, 30px);
}

/* Photograph one side, the write-up the other, alternating down the page so the
   eye zig-zags rather than marching. */
.install {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(20px, 3vw, 34px);
  align-items: center;
  padding: clamp(18px, 2.4vw, 26px);
}

.install:nth-child(even) .shot { order: 2; }

.install .shot {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--field);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}

.install .shot img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.install-copy .pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 4px 11px;
  margin-bottom: 12px;
}

.install-copy h3 {
  font-family: var(--hand);
  font-size: clamp(28px, 3.2vw, 34px);
  color: var(--ink-strong);
  margin-bottom: 2px;
}

.install-copy .where {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
}

.install-copy p:last-of-type { margin-bottom: 0; }

/* the endorsement, sitting under its installation */
.endorse {
  position: relative;
  margin: 20px 0 0;
  padding: 4px 0 0 26px;
  border-top: 1px solid var(--hair);
}

.endorse::before {
  content: "\201C";
  position: absolute;
  top: 6px;
  left: -4px;
  font-family: var(--serif);
  font-size: 56px;
  line-height: 1;
  color: var(--accent);
  opacity: .45;
}

.endorse blockquote {
  margin: 0;
  font-family: var(--hand);
  font-size: clamp(21px, 2.3vw, 24px);
  line-height: 1.4;
  color: var(--ink-strong);
}

.endorse figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 12px;
}

/* the site that isn't built yet - quieter, and no photograph to show */
.install.pending { background: linear-gradient(170deg, #f8f2e4, #f5eee0); }

.install.pending .shot {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  aspect-ratio: 3 / 2;
  border-style: dashed;
  background: transparent;
  box-shadow: none;
  color: var(--hair);
}

.install.pending .shot-note {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}

.install.pending .pending-cta {
  margin-top: 16px;
  font-style: italic;
  color: var(--muted);
}

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(26px, 4vw, 48px);
  align-items: start;
}

.contact-copy h2 {
  font-family: var(--hand);
  font-size: clamp(30px, 4vw, 40px);
  color: var(--ink-strong);
  margin-bottom: 10px;
}

.contact-copy .small {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--faint);
  text-transform: uppercase;
}

form .field { margin-bottom: 16px; }

form label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

form input[type="text"],
form input[type="email"],
form textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--field-border);
  border-radius: 10px;
  padding: 11px 13px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

form textarea { min-height: 132px; resize: vertical; }

form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(111, 123, 82, .16);
}

form button {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fbf8ef;
  background: var(--accent);
  border: 1px solid var(--accent-deep);
  border-radius: 999px;
  padding: 12px 26px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: background .2s ease, transform .2s ease;
}

form button:hover:not(:disabled) { background: var(--accent-deep); transform: translateY(-1px); }
form button:disabled { opacity: .6; cursor: progress; }

/* honeypot - visually hidden, still focusable-by-bots */
.hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.form-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--faint);
  margin: 12px 0 0;
  line-height: 1.6;
}

.form-error {
  color: #8a4a32;
  font-style: italic;
  margin: 12px 0 0;
}

.thanks h3 {
  font-family: var(--hand);
  font-size: 32px;
  color: var(--ink-strong);
  margin-bottom: 8px;
}

.thanks p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--hair);
  margin-top: 20px;
  padding: 26px 0 40px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--faint);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  justify-content: space-between;
}

.footer a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--hair); }
.footer a:hover { color: var(--accent-deep); }

.footer .dot { color: var(--hair); }

/* ---------- privacy / prose page ---------- */

.prose {
  max-width: 68ch;
  margin-inline: auto;
}

.prose h1 {
  font-family: var(--hand);
  font-size: clamp(38px, 5.5vw, 54px);
  color: var(--ink-strong);
  margin-bottom: 6px;
}

.prose h2 {
  font-family: var(--hand);
  font-size: clamp(26px, 3.2vw, 32px);
  color: var(--accent-deep);
  margin: 34px 0 8px;
}

.prose .stamp {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 26px;
}

.prose ul { margin: 0 0 1em; padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

.prose .back {
  display: inline-block;
  margin-top: 34px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: lowercase;
}

/* ---------- rise-in animation ---------- */

/* Content is visible by default - the keyframes alone supply the fade-in when
   `.in` is added, so slow or absent JS can never leave a section blank. */
.rise.in {
  animation: rise-in .7s cubic-bezier(.22, .7, .3, 1) both;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  /* stacked: the photograph leads every time, alternation has nothing left to do */
  .install { grid-template-columns: 1fr; }
  .install:nth-child(even) .shot { order: 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { width: min(100% - 28px, var(--wrap)); }
  .masthead-top { flex-direction: column; align-items: flex-start; gap: 14px; }
  /* the nav wraps at this width; separators would dangle at the line ends */
  .nav { padding-bottom: 0; gap: 8px 16px; }
  .nav .sep { display: none; }
  .footer { flex-direction: column; align-items: flex-start; }
  .card { padding: 20px; }
  .mode-strip { grid-template-columns: repeat(3, 1fr); gap: 6px; }
}

@media (max-width: 380px) {
  .wrap { width: min(100% - 20px, var(--wrap)); }
  .gallery-grid,
  .steps,
  .modes { grid-template-columns: 1fr; }
}
