/* ============================================================
   Gwen Bibby Studios
   Palette: paper #FAF9F6 · ink #161514 · mid #8C8780
            hairline #E4E1DA · safelight red #C2402A
   Type:    Italiana (display) · Karla (body & captions)
   ============================================================ */

:root {
  --paper: #faf9f6;
  --ink: #161514;
  --mid: #8c8780;
  --hairline: #e4e1da;
  --safelight: #c2402a;
  --display: "Italiana", serif;
  --body: "Karla", sans-serif;
  --max: 1240px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

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

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; }

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mid);
}

.caption {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.wordmark { display: flex; align-items: baseline; gap: 10px; }
.wordmark .name { font-family: var(--display); font-size: 1.45rem; letter-spacing: 0.02em; }
.wordmark .studios {
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mid);
}

.site-nav { display: flex; gap: 32px; }
.site-nav a {
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.site-nav a:hover { border-color: var(--ink); }
.site-nav a.active { border-color: var(--safelight); color: var(--ink); }
.site-nav a.client-link { color: var(--safelight); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block; width: 22px; height: 1.5px; background: var(--ink); margin: 5px 0;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  height: min(86vh, 760px);
  min-height: 480px;
  overflow: hidden;
  background: var(--ink);
}

.hero-frame {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.hero-frame.on { opacity: 1; }

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 56px 0;
  background: linear-gradient(to top, rgba(15, 14, 13, 0.55), transparent 55%);
  color: var(--paper);
}

.hero-overlay h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); letter-spacing: 0.015em; }
.hero-overlay .eyebrow { color: rgba(250, 249, 246, 0.75); margin-bottom: 14px; }
.hero-overlay p { max-width: 46ch; margin-top: 16px; color: rgba(250, 249, 246, 0.85); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 13px 28px;
  border: 1px solid currentColor;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
  background: transparent;
  font-family: var(--body);
}
.btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-light:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-solid:hover { background: var(--safelight); border-color: var(--safelight); color: var(--paper); }
.hero .btn { margin-top: 28px; }

/* ---------- sections ---------- */

.section { padding: 96px 0; }
.section + .section { border-top: 1px solid var(--hairline); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.section-head a { font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; border-bottom: 1px solid var(--ink); padding-bottom: 3px; }
.section-head a:hover { color: var(--safelight); border-color: var(--safelight); }

/* ---------- contact-sheet grid (the signature) ---------- */

.sheet {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 28px;
}

.frame { position: relative; }

.frame .frame-img {
  border: 1px solid var(--ink);
  padding: 6px;            /* the white mat inside the frame line */
  background: var(--paper);
}

.frame .frame-img img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(0.92);
  transition: filter 0.3s ease, transform 0.3s ease;
}
.frame.landscape .frame-img img { aspect-ratio: 5 / 4; }

.frame:hover .frame-img img { filter: saturate(1); }

.frame-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}
.frame-caption .no { color: var(--ink); }
.frame:hover .frame-caption .no { color: var(--safelight); }

/* filter bar */
.filters { display: flex; gap: 8px 22px; flex-wrap: wrap; margin-bottom: 44px; }
.filters button {
  font-family: var(--body);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--mid);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
}
.filters button:hover { color: var(--ink); }
.filters button.active { color: var(--safelight); border-color: var(--safelight); }

.frame.hide { display: none; }

/* ---------- services strip ---------- */

.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.service { border-top: 1px solid var(--ink); padding-top: 18px; }
.service h3 { font-size: 1.35rem; margin: 4px 0 10px; }
.service p { font-size: 0.92rem; color: var(--mid); }

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

.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.about-grid .frame-img { border: 1px solid var(--ink); padding: 6px; }
.about-copy h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 10px 0 22px; }
.about-copy p + p { margin-top: 16px; }
.about-copy .btn { margin-top: 30px; }

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

.contact-band { background: var(--ink); color: var(--paper); }
.contact-band .eyebrow { color: rgba(250, 249, 246, 0.6); }
.contact-band h2 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 12px 0 18px; }
.contact-band p { color: rgba(250, 249, 246, 0.8); max-width: 52ch; }
.contact-band a.mail {
  font-family: var(--display);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  border-bottom: 1px solid var(--safelight);
  display: inline-block;
  margin-top: 24px;
}
.contact-band a.mail:hover { color: var(--safelight); }

.site-footer { border-top: 1px solid var(--hairline); padding: 28px 0; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- client area ---------- */

.client-shell { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 80px 24px; }
.client-card { width: 100%; max-width: 420px; border: 1px solid var(--ink); padding: 44px 40px; background: var(--paper); }
.client-card h1 { font-size: 2.1rem; margin: 8px 0 14px; }
.client-card p { font-size: 0.92rem; color: var(--mid); margin-bottom: 26px; }

.client-card label { display: block; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 8px; }
.client-card input[type="text"] {
  width: 100%;
  font-family: var(--body);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  padding: 12px 14px;
  border: 1px solid var(--ink);
  background: transparent;
  margin-bottom: 20px;
  text-transform: uppercase;
}
.client-card input:focus { outline: 2px solid var(--safelight); outline-offset: 1px; }
.client-card .btn { width: 100%; text-align: center; }

.form-error { color: var(--safelight); font-size: 0.86rem; margin-bottom: 18px; }

.gallery-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 64px 0 40px; }
.gallery-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.gallery-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.gallery-actions .signout { font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mid); }
.gallery-actions .signout:hover { color: var(--safelight); }

.dl-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
}
.dl-link:hover { color: var(--safelight); border-color: var(--safelight); }

/* ---------- reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-frame { transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 920px) {
  .sheet { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .sheet { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }

  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
    padding: 12px 24px 20px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--hairline); }
}

:focus-visible { outline: 2px solid var(--safelight); outline-offset: 2px; }
