/* ===========================================================
   Bruno Cafferata — Studio site
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&family=Caveat:wght@600;700&family=Permanent+Marker&display=swap');

:root {
  --cream: #f6f4f2;
  --white: #ffffff;
  --black: #000000;
  --text: #1a1a1a;
  --text-body: #2b2b2b;
  --muted: #a7a7a7;
  --muted-2: #8c8c8c;
  --orange: #ff7f00;
  --border: #e2dfda;
  --border-strong: #d8d5cf;

  --font: 'Quicksand', sans-serif;
  --font-script: 'Caveat', cursive;
  --font-brush: 'Permanent Marker', cursive;

  --container-pad: 50px;
  --header-h: 96px;
}

@media (max-width: 768px) {
  :root {
    --container-pad: 24px;
    --header-h: 73px;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

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

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

.container {
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

/* ===========================================================
   Header
   =========================================================== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  background: var(--white);
  position: relative;
  z-index: 100;
}

.logo {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--black);
  display: inline-block;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.logo:hover {
  opacity: 0.7;
}

.logo:active {
  transform: scale(0.97);
}

.main-nav {
  display: flex;
  gap: 34px;
}

.main-nav a {
  position: relative;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  padding-bottom: 3px;
  transition: color 0.2s ease;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1.5px;
  background: currentColor;
  transition: width 0.25s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--black);
}

.main-nav a:hover::after,
.main-nav a.is-active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 24px;
  padding: 0;
  position: relative;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.menu-toggle:hover {
  opacity: 0.7;
}

.menu-toggle:active {
  transform: scale(0.92);
}

.menu-toggle span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--black);
  transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease;
}

.menu-toggle span:nth-child(1) { top: 2px; }
.menu-toggle span:nth-child(2) { top: 14px; }

.menu-toggle.is-open span:nth-child(1) {
  top: 11px;
  transform: rotate(45deg);
}
.menu-toggle.is-open span:nth-child(2) {
  top: 11px;
  transform: rotate(-45deg);
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .menu-toggle { display: block; }
}

/* Transparent header over the hero image (home only) */

.site-header.home-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  animation: header-fade-in 0.7s ease 0.15s both;
}

.site-header.home-header .logo {
  color: var(--white);
}

.site-header.home-header .main-nav a {
  color: var(--white);
}

.site-header.home-header .main-nav a:hover,
.site-header.home-header .main-nav a.is-active {
  color: var(--white);
  opacity: 0.7;
}

.site-header.home-header .menu-toggle span {
  background: var(--white);
}

/* Mobile full-screen menu */

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 200;
  display: none;
  flex-direction: column;
  padding: 24px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.mobile-menu.is-open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-menu-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 49px;
}

.mobile-menu-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--black);
  padding: 0;
  line-height: 0;
  transition: opacity 0.2s ease, transform 0.3s ease;
}

.mobile-menu-close:hover {
  opacity: 0.6;
  transform: rotate(90deg);
}

.mobile-menu-close:active {
  transform: rotate(90deg) scale(0.9);
}

.mobile-menu-links {
  margin-top: 70px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.mobile-menu-links a {
  display: inline-block;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--black);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.35s ease, transform 0.35s ease, color 0.2s ease;
}

.mobile-menu.is-open .mobile-menu-links a {
  opacity: 1;
  transform: translateX(0);
}

.mobile-menu-links a:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu-links a:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu-links a:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu-links a:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu-links a:nth-child(5) { transition-delay: 0.25s; }

.mobile-menu-links a:hover,
.mobile-menu-links a:active {
  color: var(--orange);
}

.mobile-menu-footer .footer-insta {
  display: inline-block;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: underline;
  margin-bottom: 18px;
  transition: color 0.2s ease;
}

.mobile-menu-footer .footer-insta:hover {
  color: var(--orange);
}

.mobile-menu-footer p {
  font-size: 0.8rem;
  color: var(--text-body);
  margin: 0;
  line-height: 1.5;
}

/* ===========================================================
   Footer
   =========================================================== */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 28px;
}

.site-footer p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-body);
}

.site-footer .legal-line {
  display: none;
}

.site-footer .footer-insta {
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.site-footer .footer-insta:hover {
  color: var(--orange);
}

.site-footer.on-image p,
.site-footer.on-image .footer-insta {
  color: var(--white);
}

.site-footer.on-image .footer-insta:hover {
  color: var(--orange);
}

@media (max-width: 768px) {
  .site-footer {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 14px;
    padding-top: 24px;
    padding-bottom: 32px;
  }

  .site-footer .legal-line {
    display: block;
  }
}

/* ===========================================================
   Hero (home)
   =========================================================== */

.hero {
  background-image: url('../images/hero-mobile.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  animation: hero-fade-in 1s ease both;
}

@media (min-width: 769px) {
  .hero {
    background-image: url('../images/hero-desktop.jpg');
  }
}

.hero-footer {
  margin-top: auto;
}

@keyframes hero-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes header-fade-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .site-header.home-header {
    animation: none;
  }
}

/* ===========================================================
   Page header blocks (section intro on inner pages)
   =========================================================== */

.page-section {
  background: var(--cream);
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
}

.page-body {
  flex: 1;
}

/* About page */

.about-lede {
  padding-top: 64px;
  padding-bottom: 48px;
  font-size: 2.1rem;
  font-weight: 500;
  line-height: 1.3;
  max-width: 1000px;
  color: var(--text);
}

.about-lede strong { font-weight: 700; }

.about-content {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 50px;
  padding-bottom: 60px;
}

.about-photo img {
  width: 100%;
  height: auto;
}

.about-text p {
  margin: 0 0 20px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
}

.about-text p strong { font-weight: 700; color: var(--text); }

.about-links {
  display: flex;
  gap: 40px;
  margin-top: 28px;
}

.about-links a {
  font-size: 1rem;
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.about-links a:hover {
  color: var(--orange);
}

@media (max-width: 768px) {
  .about-lede {
    padding-top: 36px;
    padding-bottom: 32px;
    font-size: 1.5rem;
  }
  .about-content {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 40px;
  }
}

/* ===========================================================
   Projects grid
   =========================================================== */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-strong);
  font-size: 1.05rem;
}

.breadcrumb a,
.breadcrumb span {
  color: var(--muted);
  font-weight: 600;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--black);
}

.breadcrumb a.is-active {
  color: var(--black);
  font-weight: 700;
}

.breadcrumb .sep {
  color: var(--muted);
  font-weight: 600;
}

.series-intro {
  padding-top: 24px;
  padding-bottom: 32px;
  max-width: 900px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 60px;
}

.project-card {
  display: block;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card:active {
  transform: translateY(-2px);
}

.project-card .thumb {
  width: 100%;
  aspect-ratio: 420 / 530;
  overflow: hidden;
  background: var(--border);
}

.project-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .thumb img {
  transform: scale(1.03);
}

.project-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-top: 14px;
}

.project-meta .title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  transition: color 0.2s ease;
}

.project-card:hover .project-meta .title {
  color: var(--orange);
}

.project-meta .specs {
  font-size: 0.875rem;
  color: var(--muted-2);
  margin-top: 2px;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-body);
  white-space: nowrap;
}

.status .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
  display: inline-block;
}

.status.available .dot {
  background: var(--white);
  border: 1px solid var(--muted);
}

@media (max-width: 768px) {
  .breadcrumb {
    padding-top: 28px;
    padding-bottom: 20px;
    font-size: 1.3rem;
    gap: 10px;
  }
  .series-intro {
    padding-top: 20px;
    padding-bottom: 24px;
    font-size: 1.05rem;
  }
  .project-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-bottom: 40px;
  }
}

/* ===========================================================
   Project detail
   =========================================================== */

.detail-layout {
  display: grid;
  grid-template-columns: 640px 1fr;
  gap: 90px;
  padding-top: 40px;
  padding-bottom: 60px;
}

.detail-image img {
  width: 100%;
  height: auto;
}

.all-works-link {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: underline;
  margin-bottom: 24px;
  transition: color 0.2s ease;
}

.all-works-link:hover {
  color: var(--orange);
}

.detail-thumbs {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

.detail-thumbs img {
  width: 81px;
  height: 81px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.detail-thumbs img:hover {
  transform: scale(1.06);
  opacity: 0.85;
}

.detail-thumbs img:active {
  transform: scale(0.97);
}

.detail-info h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 18px;
  color: var(--text);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--border-strong);
  font-size: 1rem;
}

.spec-row:last-of-type {
  border-bottom: 1px solid var(--border-strong);
}

.spec-row .label {
  color: var(--text-body);
}

.spec-row .value {
  color: var(--text-body);
  text-align: right;
}

.spec-row .value.status-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spec-row .value.status-inline .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
  display: inline-block;
}

.detail-description {
  margin-top: 24px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
}

.detail-cta {
  display: inline-block;
  margin-top: 26px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.detail-cta:hover {
  color: var(--orange);
}

@media (max-width: 768px) {
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 0;
  }
  .detail-image {
    margin-left: calc(-1 * var(--container-pad));
    margin-right: calc(-1 * var(--container-pad));
    width: calc(100% + (var(--container-pad) * 2));
  }
  .detail-info {
    padding-top: 28px;
  }
  .all-works-link { margin-bottom: 16px; }

  .detail-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  .detail-thumbs img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

/* ===========================================================
   Exhibitions
   =========================================================== */

.exhibitions-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  padding-top: 56px;
  padding-bottom: 60px;
}

.exh-block + .exh-block { margin-top: 40px; }

.exh-block h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--text);
}

.exh-entry {
  margin-bottom: 20px;
}

.exh-entry .year {
  font-size: 1rem;
  color: var(--text-body);
  margin-bottom: 2px;
}

.exh-entry p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-body);
}

.press-entry {
  margin-bottom: 20px;
}

.press-entry p {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--text-body);
  line-height: 1.4;
}

.press-entry a {
  font-size: 1rem;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s ease;
}

.press-entry a:hover {
  color: var(--orange);
}

.exhibitions-links {
  display: flex;
  gap: 40px;
  margin-top: 10px;
}

.exhibitions-links a {
  font-size: 1rem;
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.exhibitions-links a:hover {
  color: var(--orange);
}

@media (max-width: 768px) {
  .exhibitions-layout {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 32px;
    padding-bottom: 20px;
  }
  .exh-col-right { margin-top: 8px; }
}

/* ===========================================================
   Contact
   =========================================================== */

.contact-layout {
  padding-top: 90px;
  padding-bottom: 90px;
  max-width: 820px;
}

.contact-lede {
  font-size: 2.1rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text);
  margin: 0 0 56px;
}

.contact-lede strong { font-weight: 700; }

.contact-card p {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: var(--text-body);
}

.contact-card strong { font-weight: 700; }

.contact-card a.phone {
  font-weight: 700;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.contact-card a.phone:hover {
  color: var(--orange);
}

.contact-insta {
  display: inline-block;
  margin-top: 24px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.contact-insta:hover {
  color: var(--orange);
}

@media (max-width: 768px) {
  .contact-layout {
    padding-top: 48px;
    padding-bottom: 60px;
  }
  .contact-lede {
    font-size: 1.6rem;
    margin-bottom: 40px;
  }
}
