/* ==========================================================
   LO SPAZIO — DESIGN TOKENS
   Change colors, fonts, and spacing here and they update
   everywhere on the site.
========================================================== */
:root {
  --ink:        #3E4130;   /* dark olive — logo line color, headings */
  --ink-soft:   #5B5F49;   /* lighter olive — body text */
  --sage:       #B7C09B;   /* sage green — logo fill, accents */
  --sage-soft:  #E7EADA;   /* pale sage — section backgrounds */
  --paper:      #FBF9F3;   /* warm off-white — main background */
  --paper-deep: #F1EEE2;   /* deeper cream — alternating sections */
  --white:      #FFFFFF;

  --font-display: 'Fraunces', serif;
  --font-body: 'Work Sans', sans-serif;

  --max-width: 1180px;
  --gutter: clamp(24px, 5vw, 72px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
  font-weight: 500;
}

p { margin: 0 0 1em; }

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

button { font-family: var(--font-body); cursor: pointer; }

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

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 2rem;
}

/* ==========================================================
   NAV
========================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
  background: rgba(251, 249, 243, 0.88);
  backdrop-filter: blur(8px);
}

.nav__logo { height: 46px; width: auto; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  font-size: 0.95rem;
}

.nav__links a { padding: 6px 0; border-bottom: 1px solid transparent; }
.nav__links a:hover { border-bottom-color: var(--ink); }

.nav__cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: 10px 20px !important;
  border-radius: 999px;
}
.nav__cta:hover { border-bottom-color: transparent !important; opacity: 0.85; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); }

/* ==========================================================
   HERO
========================================================== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
  overflow: hidden;
}

.hero__arch {
  position: absolute;
  right: -8%;
  top: 0;
  bottom: 0;
  width: 55%;
  pointer-events: none;
}
.hero__arch svg { width: 100%; height: 100%; }
.hero__arch path {
  fill: none;
  stroke: var(--sage);
  stroke-width: 2;
  opacity: 0.55;
}

.hero__content {
  max-width: 620px;
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.9s ease-out 0.15s forwards;
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.hero__kicker {
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}

.hero__headline {
  font-size: clamp(3rem, 7vw, 5.4rem);
  line-height: 1.02;
  margin-bottom: 1.5rem;
}

.hero__sub {
  font-size: 1.15rem;
  max-width: 46ch;
  margin-bottom: 2.2rem;
}

.button {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
}
.button--primary {
  background: var(--ink);
  color: var(--paper);
}
.button--primary:hover { opacity: 0.85; }

/* ==========================================================
   THE STUDIO
========================================================== */
.studio {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding: 7rem var(--gutter);
  background: var(--paper-deep);
}

.studio__image {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 220px 220px 0 0;
  background: var(--sage-soft);
}
.studio__image img { width: 100%; height: 100%; object-fit: cover; }
.studio__image--empty { display: flex; align-items: center; justify-content: center; }
.studio__image--empty::after {
  content: "Add a studio photo → images/studio-placeholder.jpg";
  padding: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.studio__text h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 1.4rem;
  max-width: 16ch;
}
.studio__text p { max-width: 52ch; }

.studio__list {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.studio__list li { padding-left: 1.4rem; position: relative; }
.studio__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 1px;
  background: var(--ink);
}

/* ==========================================================
   THE WORK — filters + post carousels
========================================================== */
.work { padding: 7rem var(--gutter) 5rem; }

.work__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.6rem;
}
.work__filters button {
  background: none;
  border: 1px solid var(--sage);
  color: var(--ink-soft);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
}
.work__filters button.is-active,
.work__filters button:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.4rem, 3vw, 2.4rem);
}

.post.is-hidden { display: none; }

/* --- Carousel --- */
.post__carousel {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--sage-soft);
}

.post__track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}
.post__track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post__carousel--empty .post__track { display: flex; align-items: center; justify-content: center; }
.post__carousel--empty .post__track::after {
  content: "Add photos for this post";
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.post__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(251, 249, 243, 0.85);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.3rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.post__carousel:hover .post__arrow { opacity: 1; }
.post__arrow--prev { left: 12px; }
.post__arrow--next { right: 12px; }

/* Hide arrows/dots entirely when there's only one image */
.post__carousel[data-count="1"] .post__arrow,
.post__carousel[data-count="1"] .post__dots { display: none; }

.post__dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.post__dots button {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(251, 249, 243, 0.6);
  padding: 0;
}
.post__dots button.is-active { background: var(--paper); }

/* --- Caption --- */
.post__caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 0.9rem;
  border-top: 1px solid var(--sage);
  margin-top: 0.9rem;
}
.post__caption h3 { font-size: 1.15rem; }
.post__tag { margin: 0; font-size: 0.85rem; color: var(--sage); white-space: nowrap; margin-left: 1rem; }
.post__desc { grid-column: 1 / -1; font-size: 0.92rem; margin: 0.5rem 0 0; }
.post__caption { flex-wrap: wrap; }

/* ==========================================================
   THE MATERIALS
========================================================== */
.materials {
  padding: 6rem var(--gutter);
  background: var(--paper-deep);
}
.materials__intro { max-width: 56ch; font-size: 1.05rem; margin-bottom: 3rem; }

.materials__groups {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
}
.materials__group h3 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--sage);
}
.materials__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.6rem;
}

.brand-logo img {
  height: 42px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.72;
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.brand-logo:hover img { filter: none; opacity: 1; }

/* Fallback shown automatically if a logo file is missing */
.brand-logo--empty img { display: none; }
.brand-logo--empty::after {
  content: attr(data-name);
  display: inline-block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  border: 1px dashed var(--sage);
  padding: 8px 16px;
  border-radius: 999px;
}

/* ==========================================================
   SAY HELLO
========================================================== */
.hello {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  padding: 7rem var(--gutter);
  background: var(--sage-soft);
}
.hello__intro p { max-width: 46ch; margin-bottom: 2rem; }
.hello__direct { display: flex; flex-direction: column; gap: 1rem; }

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.05rem;
  width: fit-content;
  border-bottom: 1px solid transparent;
}
.contact-link:hover { border-bottom-color: var(--ink); }
.contact-link__icon { width: 22px; height: 22px; flex-shrink: 0; }
.contact-link__icon svg { width: 100%; height: 100%; fill: var(--ink); }

.hello__form iframe { width: 100%; height: 620px; border: none; background: var(--white); }

/* ==========================================================
   FOOTER
========================================================== */
.footer { text-align: center; padding: 4rem var(--gutter) 3rem; color: var(--ink-soft); }
.footer__logo { height: 40px; margin: 0 auto 1rem; }
.footer__year { font-size: 0.85rem; opacity: 0.7; margin-top: 0.4rem; }

/* ==========================================================
   RESPONSIVE
========================================================== */
@media (max-width: 900px) {
  .nav__links {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--paper);
    flex-direction: column;
    justify-content: center;
    gap: 2.4rem;
    font-size: 1.3rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .nav__links.is-open { transform: translateX(0); }
  .nav__toggle { display: flex; }

  .studio, .hello { grid-template-columns: 1fr; }
  .work__grid { grid-template-columns: 1fr; }
  .materials__groups { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .hello__form iframe { height: 500px; }
  .post__arrow { opacity: 1; } /* no hover on touch devices */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__content { animation: none; opacity: 1; transform: none; }
  .post__track { transition: none; }
}
