/* ---------------------------------------------------
   The Boop Studio — base styles
   Warm cream canvas, ink typography, photo-driven color.
--------------------------------------------------- */

@font-face {
  font-family: 'Pumped Up Kicks';
  src: url('../fonts/PumpedUpKicks-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #e6e3db;
  --bg-rgb: 230, 227, 219;
  --bg-raise: #eeece5;
  --ink: #18140f;
  --ink-70: rgba(24, 20, 15, 0.7);
  --ink-45: rgba(24, 20, 15, 0.45);
  --ink-20: rgba(24, 20, 15, 0.14);
  --font-display: 'Pumped Up Kicks', 'Bricolage Grotesque', system-ui, sans-serif;
  --font-ui: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --header-h: 76px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body.menu-open,
body.lightbox-open {
  overflow: hidden;
}

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

picture {
  display: block;
  width: 100%;
  height: 100%;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

/* ---------- Nav word list (shared: home + menu overlay) ---------- */

.nav-list a,
.nav-list button {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 0.94;
  white-space: nowrap;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: left center;
}

.nav-list li:nth-child(even) a,
.nav-list li:nth-child(even) button {
  transform-origin: right center;
}

.nav-list a:hover,
.nav-list a:focus-visible,
.nav-list button:hover,
.nav-list button:focus-visible {
  transform: scale(1.05) rotate(-1.4deg);
}

.nav-list li:nth-child(even) a:hover,
.nav-list li:nth-child(even) button:hover {
  transform: scale(1.05) rotate(1.4deg);
}

.nav-list .current {
  color: var(--ink-45);
}

.nav-list .current:hover {
  transform: none;
}

/* ---------- Homepage ---------- */

.home {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

.home-nav {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 4vw, 3rem);
  min-height: 100svh;
}

.home-mark {
  height: 34px;
  width: auto;
}

.home .nav-list {
  margin: auto 0;
  container-type: inline-size;
}

.home .nav-list a {
  font-size: clamp(1.6rem, 9.5cqw, 6.4rem);
}

.home-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.home-tagline {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink-70);
  max-width: 22ch;
  line-height: 1.4;
}

.socials {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: 0.8rem;
  color: var(--ink-70);
}

.icon-link {
  display: flex;
  color: inherit;
  transition: color 0.2s ease;
}

.icon-link:hover {
  color: var(--ink);
}

.icon-link svg {
  display: block;
  width: 19px;
  height: 19px;
}

.home-image {
  position: relative;
  height: 100svh;
  overflow: hidden;
}

.home-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 860px) {
  .home {
    grid-template-columns: 1fr;
    position: relative;
  }
  .home-image {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
  }
  .home-image img {
    opacity: 0.3;
  }
  .home-nav {
    position: relative;
    z-index: 1;
  }
  .home .nav-list a {
    font-size: clamp(1.4rem, 9.5cqw, 4rem);
  }
}

/* ---------- Site header (interior pages) ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(1rem, 4vw, 3rem);
  background: var(--bg);
}

.page-title {
  justify-self: start;
}

.header-mark {
  justify-self: center;
}

.menu-toggle {
  justify-self: end;
}

.page-title {
  font-family: var(--font-ui);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  letter-spacing: -0.01em;
}

.header-mark {
  height: 30px;
  width: auto;
}

.menu-toggle {
  font-family: var(--font-ui);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

/* ---------- Menu overlay ---------- */

body.menu-open .site-header [data-menu-open] {
  visibility: hidden;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(var(--bg-rgb), 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1rem, 4vw, 3rem);
}

.menu-overlay.open {
  display: flex;
}

.menu-top {
  display: flex;
  justify-content: flex-end;
}

.menu-overlay .nav-list {
  margin: auto 0;
  container-type: inline-size;
}

.menu-overlay .nav-list a,
.menu-overlay .nav-list button {
  font-size: clamp(1.6rem, 9cqw, 5.6rem);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 4rem clamp(1rem, 4vw, 3rem) 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  text-align: center;
  border-top: 1px solid var(--ink-20);
  margin-top: 3rem;
}

.footer-cta {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.footer-cta:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-meta {
  font-size: 0.78rem;
  color: var(--ink-45);
}

a.footer-meta:hover {
  color: var(--ink);
}

.footer-dot {
  color: var(--ink-45);
  font-size: 0.78rem;
}

/* ---------- Portfolio grid ---------- */

.grid {
  column-count: 3;
  column-gap: clamp(0.75rem, 1.6vw, 1.5rem);
  padding: 1.5rem clamp(1rem, 4vw, 3rem) 2rem;
}

.grid-item {
  display: block;
  width: 100%;
  margin-bottom: clamp(0.75rem, 1.6vw, 1.5rem);
  break-inside: avoid;
  border: 0;
  padding: 0;
  background: none;
  cursor: default;
}

.grid-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

@media (min-width: 861px) {
  .grid-item {
    cursor: zoom-in;
  }
}

.grid-intro {
  padding: 2.5rem clamp(1rem, 4vw, 3rem) 0.5rem;
  max-width: 46ch;
}

.grid-intro p {
  color: var(--ink-70);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .grid {
    column-count: 2;
  }
}

/* ---------- Lightbox (desktop only) ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 9, 7, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 8vw, 5rem);
}

.lightbox.open {
  display: flex;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
  transform: scale(1.1);
}

.lightbox-close svg,
.lightbox-prev svg,
.lightbox-next svg {
  width: 26px;
  height: 26px;
}

.lightbox-close {
  top: clamp(1rem, 4vw, 2rem);
  right: clamp(1rem, 4vw, 2rem);
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev:hover,
.lightbox-next:hover {
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: clamp(0.5rem, 3vw, 2rem);
}

.lightbox-next {
  right: clamp(0.5rem, 3vw, 2rem);
}

.lightbox-count {
  position: fixed;
  bottom: clamp(1rem, 4vw, 2rem);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

@media (max-width: 860px) {
  .lightbox {
    display: none !important;
  }
}

@media (max-width: 560px) {
  .grid {
    column-count: 1;
  }
}

/* ---------- About page ---------- */

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.about-copy {
  padding: 3rem clamp(1.25rem, 4vw, 4rem) 5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-width: 56ch;
}

.about-copy h1 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 0.02em;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 0.98;
  margin: 0 0 0.5rem;
}

.about-copy p {
  line-height: 1.6;
  color: var(--ink-70);
  margin: 0;
}

.about-copy .lede {
  color: var(--ink);
  font-size: 1.05rem;
}

.about-copy strong {
  display: inline-block;
  color: var(--ink);
  font-weight: 600;
  margin-top: 0.6rem;
}

.about-image {
  position: sticky;
  top: var(--header-h);
  height: calc(100svh - var(--header-h));
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 860px) {
  .about {
    grid-template-columns: 1fr;
  }
  .about-image {
    order: -1;
    position: relative;
    top: 0;
    height: 60vh;
  }
}

/* ---------- Book page ---------- */

.book {
  padding: 2rem clamp(1.25rem, 4vw, 4rem) 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.book-intro h1 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 0.02em;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 0.98;
  margin: 0 0 1rem;
}

.book-intro p {
  color: var(--ink-70);
  line-height: 1.6;
  max-width: 42ch;
}

.book-steps {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.book-step {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
}

.book-step span {
  font-family: var(--font-ui);
  font-weight: 800;
  color: var(--ink-45);
}

.book-step p {
  margin: 0;
  color: var(--ink-70);
  line-height: 1.5;
}

.book-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-45);
}

.field input,
.field textarea {
  font: inherit;
  font-size: 1rem;
  padding: 0.7rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink-20);
  color: var(--ink);
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

.book-submit {
  margin-top: 0.5rem;
  align-self: flex-start;
  font-family: var(--font-ui);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.1rem;
  padding: 0.9rem 1.8rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 100px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.book-submit:hover {
  transform: scale(1.04) rotate(-1deg);
}

.book-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-status {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-45);
  min-height: 1.2em;
}

.form-status.success {
  color: #2f6b3f;
}

.form-status.error {
  color: #a3372f;
}

.book-direct {
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: var(--ink-45);
}

.book-direct + .book-direct {
  margin-top: 0.4rem;
}

.book-direct a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 780px) {
  .book {
    grid-template-columns: 1fr;
  }
}

/* ---------- 404 page ---------- */

.error-page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem clamp(1.25rem, 4vw, 4rem);
  gap: 1rem;
}

.error-page .home-mark {
  margin-bottom: 0.5rem;
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 14vw, 9rem);
  line-height: 0.9;
  color: var(--ink-20);
  margin: 0;
}

.error-page h1 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 0.02em;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.25;
  margin: 0;
}

.error-page p:not(.error-code) {
  color: var(--ink-70);
  line-height: 1.6;
  max-width: 42ch;
  margin: 0;
}

.error-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
