/* ==========================================================================
   Greg Dallas — site styles
   Palette pulled from the photography: near-black, warm paper, muted teal.
   ========================================================================== */

:root {
  --ink:        #0d0e10;
  --ink-soft:   #16181b;
  --ink-line:   #262a2f;
  --paper:      #f4f1ea;
  --paper-dim:  #a8a49b;
  --paper-faint:#6f6c66;
  --accent:     #7fb3c0;
  --accent-deep:#3f7d8c;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --page:   min(1180px, 100% - 3rem);
  --narrow: min(680px, 100% - 3rem);
  --header-h: 76px;
}

@media (max-width: 640px) {
  :root { --page: calc(100% - 2.25rem); --narrow: calc(100% - 2.25rem); --header-h: 64px; }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap   { width: var(--page);   margin-inline: auto; }
.narrow { width: var(--narrow); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--ink);
  padding: .7rem 1.1rem; font-weight: 600; border-radius: 0 0 4px 0;
}
.skip:focus { left: 0; }

/* ---------- header / nav ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--ink) 86%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--ink-line);
}

.site-header > .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.015em;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 1.9rem; }

.nav a {
  text-decoration: none;
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper-dim);
  padding: .35rem 0;
  position: relative;
  transition: color .18s ease;
}
.nav a:hover { color: var(--paper); }
.nav a[aria-current="page"] { color: var(--paper); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--accent);
}

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  color: var(--paper); padding: .5rem; margin-right: -.5rem;
}
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink-soft);
    border-bottom: 1px solid var(--ink-line);
    padding: .5rem 0 1rem;
    transform: translateY(-8px);
    opacity: 0; visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav[data-open="true"] { opacity: 1; visibility: visible; transform: none; }
  .nav a {
    padding: .95rem 0;
    width: var(--page); margin-inline: auto;
    border-bottom: 1px solid var(--ink-line);
    font-size: .95rem; letter-spacing: .06em;
  }
  .nav a:last-child { border-bottom: 0; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav a[aria-current="page"] { color: var(--accent); }
}

/* ---------- type ---------- */

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; margin: 0; }

.page-head { padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(2rem, 4vw, 3rem); }
.page-head h1 { font-size: clamp(2.5rem, 7vw, 4rem); }
.eyebrow {
  font-family: var(--sans);
  font-size: .74rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 1.1rem;
}
.lede { font-size: 1.2rem; color: var(--paper-dim); margin: 1.4rem 0 0; max-width: 46ch; }

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

/* ---------- home ---------- */

.hero { position: relative; min-height: calc(100svh - var(--header-h)); display: grid; }
.hero-media { grid-area: 1/1; position: relative; overflow: hidden; }
/* Absolute so the photo's intrinsic ratio doesn't stretch the hero past the
   viewport — the row height comes from min-height alone. */
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--ink) 55%, transparent) 0%,
    color-mix(in srgb, var(--ink) 25%, transparent) 38%,
    color-mix(in srgb, var(--ink) 88%, transparent) 100%);
}
.hero-body {
  grid-area: 1/1; position: relative; z-index: 1;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: clamp(3rem, 8vw, 6rem);
}
.hero-body h1 {
  font-size: clamp(3rem, 11vw, 7rem);
  text-shadow: 0 2px 30px rgba(0,0,0,.5);
}
.hero-tag {
  font-size: .8rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--paper); opacity: .85; margin: 1.1rem 0 0;
}
@media (max-width: 480px) {
  .hero-tag { font-size: .72rem; letter-spacing: .16em; }
}

.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }

.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500;
  text-decoration: none;
  padding: .85rem 1.5rem;
  border: 1px solid color-mix(in srgb, var(--paper) 30%, transparent);
  border-radius: 2px;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-solid { background: var(--accent); border-color: var(--accent); color: var(--ink); font-weight: 600; }
.btn-solid:hover { background: var(--paper); border-color: var(--paper); }

.split {
  display: grid; gap: clamp(2rem, 6vw, 4.5rem);
  grid-template-columns: 1fr 1fr; align-items: center;
  padding: clamp(4rem, 11vw, 8rem) 0;
}
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.split img { border-radius: 3px; }
.split h2 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); margin-bottom: 1.4rem; }
.split p { color: var(--paper-dim); }

/* ---------- video grid ---------- */

.video-grid { display: grid; gap: clamp(1.5rem, 4vw, 2.75rem); grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
@media (max-width: 560px) { .video-grid { grid-template-columns: 1fr; } }

.video figcaption {
  font-family: var(--serif); font-size: 1.15rem; margin-top: .9rem; line-height: 1.35;
}
.video-credit {
  display: block; margin-top: .3rem;
  font-family: var(--sans); font-size: .74rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--paper-faint);
}

.video-frame {
  position: relative; aspect-ratio: 16/9;
  background: var(--ink-soft); border: 1px solid var(--ink-line);
  border-radius: 3px; overflow: hidden;
  width: 100%; padding: 0; cursor: pointer; display: block;
}
.video-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .3s ease; }
.video-frame:hover img { transform: scale(1.04); opacity: .75; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.play {
  position: absolute; inset: 0; margin: auto;
  width: 66px; height: 66px; border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--paper) 45%, transparent);
  display: grid; place-items: center;
  transition: background .18s ease, transform .18s ease;
  pointer-events: none;
}
.video-frame:hover .play { background: var(--accent); transform: scale(1.07); }
.play svg { width: 22px; height: 22px; margin-left: 3px; fill: var(--paper); }
.video-frame:hover .play svg { fill: var(--ink); }

/* ---------- events ---------- */

.event-group + .event-group { margin-top: clamp(3rem, 7vw, 5rem); }
.event-group > h2 {
  font-family: var(--sans); font-size: .76rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--paper-faint); padding-bottom: 1rem; border-bottom: 1px solid var(--ink-line);
}

.event {
  display: grid; grid-template-columns: 175px 1fr auto; gap: 1.5rem; align-items: baseline;
  padding: 1.6rem 0; border-bottom: 1px solid var(--ink-line);
}
@media (max-width: 700px) {
  .event { grid-template-columns: 1fr; gap: .4rem; }
}

.event-date { display: flex; flex-direction: column; gap: .15rem; }
.event-day  { font-family: var(--serif); font-size: 1.05rem; color: var(--accent); white-space: nowrap; }
.event-time { font-size: .82rem; color: var(--paper-faint); white-space: nowrap; }
.event-title { font-family: var(--serif); font-size: 1.35rem; margin: 0 0 .2rem; }
.event-meta { color: var(--paper-dim); font-size: .95rem; }
.event-link { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; color: var(--accent); text-decoration: none; }
.event-link:hover { color: var(--paper); }
.event.is-past { opacity: .5; }

.empty-state {
  border: 1px dashed var(--ink-line); border-radius: 3px;
  padding: clamp(2.5rem, 7vw, 4rem) 1.5rem; text-align: center; color: var(--paper-dim);
}
.empty-state p { margin: 0 0 1.5rem; }

/* ---------- form ---------- */

.form { display: grid; gap: 1.35rem; }
.field { display: grid; gap: .5rem; }
.field label { font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--paper-dim); }
.field .req { color: var(--accent); }

.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--paper);
  background: var(--ink-soft);
  border: 1px solid var(--ink-line); border-radius: 3px;
  padding: .85rem 1rem; width: 100%;
  transition: border-color .18s ease, background .18s ease;
}
.field textarea { resize: vertical; min-height: 160px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); background: var(--ink); outline: none;
}
.field input::placeholder, .field textarea::placeholder { color: var(--paper-faint); }

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23a8a49b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 12px;
  padding-right: 2.75rem;
}
.field select option { background: var(--ink-soft); color: var(--paper); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { font-size: .95rem; padding: .9rem 1.1rem; border-radius: 3px; display: none; }
.form-status[data-state="ok"]   { display: block; background: color-mix(in srgb, var(--accent-deep) 22%, transparent); border: 1px solid var(--accent-deep); color: var(--paper); }
.form-status[data-state="err"]  { display: block; background: rgba(150,60,60,.18); border: 1px solid #8c4444; color: #f0d3d3; }
.form-status[data-state="busy"] { display: block; color: var(--paper-dim); }

button[type="submit"] {
  font: inherit; cursor: pointer;
  justify-self: start;
  background: var(--accent); color: var(--ink);
  border: 1px solid var(--accent); border-radius: 2px;
  font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
  padding: .95rem 2rem;
  transition: background .18s ease, border-color .18s ease;
}
button[type="submit"]:hover:not(:disabled) { background: var(--paper); border-color: var(--paper); }
button[type="submit"]:disabled { opacity: .55; cursor: progress; }

.contact-direct {
  margin-top: clamp(3rem, 7vw, 4.5rem); padding-top: 2.5rem; border-top: 1px solid var(--ink-line);
  display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.contact-direct h3 { font-family: var(--sans); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--paper-faint); margin-bottom: .55rem; }
.contact-direct a { color: var(--accent); text-decoration: none; }
.contact-direct a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- about ---------- */

.about-grid {
  display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 4.5rem); align-items: start;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.about-photo img { border-radius: 3px; }
.about-photo figcaption { font-size: .8rem; color: var(--paper-faint); margin-top: .8rem; font-style: italic; }
@media (min-width: 861px) { .about-photo { position: sticky; top: calc(var(--header-h) + 2rem); } }

/* ---------- footer ---------- */

.site-footer {
  margin-top: clamp(4rem, 11vw, 8rem);
  border-top: 1px solid var(--ink-line);
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
}
.site-footer > .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; justify-content: space-between; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.6rem; }
.footer-links a { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--paper-dim); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.copyright { font-size: .82rem; color: var(--paper-faint); }

.section { padding: clamp(1rem, 3vw, 2rem) 0 clamp(3rem, 8vw, 5rem); }
