/* ==========================================================================
   Domus María — one-page presentation demo
   Palette: logo amber orange, warm neutral, warm ink. Three hue families.
   base.css owns the reset, nav, buttons, reveals and marquee.
   This file owns the tokens and the layout of each section.
   ========================================================================== */

:root {
  /* Tokens taken from the client logo (amber orange on warm grey and white). */
  --surface: #fcf8f2;        /* warm paper */
  --surface-deep: #f1e9de;   /* warm neutral, logo house body */
  --brand: #f6932d;          /* logo amber orange */
  --brand-deep: #d9750e;     /* darker orange, hover */
  --brand-wash: #fbe9d4;     /* orange tint band */
  --ink: #241a12;            /* warm near-black */
  --ink-soft: #6e5d4e;
  --line: rgba(36, 26, 18, 0.12);
  --on-ink: #fcf8f2;
  --on-ink-soft: rgba(252, 248, 242, 0.74);

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-script: "Italianno", cursive;
}

figure { margin: 0; }

/* Studio plates: many client photos sit on white, so give them a clean frame. */
.story__media img,
.catalog__item figure,
.details__item figure {
  border: 1px solid var(--line);
  background: #fff;
}

/* Orange buttons carry ink text for contrast. */
.btn--brand { color: var(--ink); }
.nav__chip { color: var(--ink); }
.nav.is-scrolled .nav__chip { color: var(--brand-deep); }

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

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100dvh;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 112%;
  top: -6%;
  object-fit: cover;
  will-change: transform;
}
/* 90deg scrim sits UNDER the 180deg scrim: first background paints on top. */
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 12, 6, 0.76) 0%, rgba(20, 12, 6, 0.18) 80%),
    linear-gradient(180deg, rgba(20, 12, 6, 0.3) 0%, rgba(20, 12, 6, 0.62) 100%);
}
.hero__content {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 1.15rem;
  padding-block: clamp(3.2rem, 9vh, 7rem);
}
.hero__title {
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8.5vw, 6.2rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--on-ink);
  text-wrap: balance;
}
.hero__sub { max-width: 42ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.4rem; }

@keyframes heroIn {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to { opacity: 1; transform: none; }
}
.hero__content > * { animation: heroIn 0.9s var(--ease-out) backwards; }
.hero__content > *:nth-child(1) { animation-delay: 0.05s; }
.hero__content > *:nth-child(2) { animation-delay: 0.16s; }
.hero__content > *:nth-child(3) { animation-delay: 0.27s; }
.hero__content > *:nth-child(4) { animation-delay: 0.38s; }

/* ------------------------------------------------------------------- story */

.story__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.story__copy { display: grid; gap: 1rem; align-content: start; }
.story__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; }
.script-accent {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1;
  color: var(--brand);
  margin-top: 0.4rem;
}

.stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: clamp(2.4rem, 5vw, 4rem);
  padding-top: 1.7rem;
  border-top: 1px solid var(--line);
}
.stat { display: grid; gap: 0.3rem; }
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  line-height: 1;
  color: var(--brand-deep);
}
.stat__label { font-size: 0.85rem; color: var(--ink-soft); }

/* --------------------------------------------------------- personalizacion */

.personal__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.6rem, 4vw, 3rem);
}
.personal__item {
  display: grid;
  gap: 0.6rem;
  padding-top: 1.4rem;
  border-top: 2px solid var(--brand);
}
.personal__num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.9;
  color: var(--brand-deep);
}
.personal__name { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); }
.personal__note { color: var(--ink-soft); max-width: 34ch; }

/* ---------------------------------------------------------------- catalog */

.catalog__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 2.4rem);
}
.catalog__item { display: grid; gap: 0.7rem; align-content: start; }
.catalog__item figure { overflow: hidden; border-radius: 16px; }
.catalog__item img { width: 100%; object-fit: cover; }
.catalog__item--a { grid-column: 1 / span 5; }
.catalog__item--a img { aspect-ratio: 4 / 5; }
.catalog__item--b { grid-column: 7 / span 5; margin-top: clamp(2rem, 6vw, 5rem); }
.catalog__item--b img { aspect-ratio: 3 / 4; }
.catalog__item--c { grid-column: 2 / span 4; }
.catalog__item--c img { aspect-ratio: 1 / 1; }
.catalog__item--d { grid-column: 8 / span 5; margin-top: clamp(1rem, 3vw, 2.5rem); }
.catalog__item--d img { aspect-ratio: 4 / 3; }
.catalog__name { font-family: var(--font-display); font-size: 1.5rem; }
.catalog__note { color: var(--ink-soft); font-size: 0.95rem; max-width: 34ch; }

/* ---------------------------------------------------------------- encargo */

.encargo { background: var(--brand-deep); color: var(--on-ink); }
.encargo__grid { display: grid; gap: clamp(2.6rem, 6vw, 4.5rem); }
.encargo__lead { display: grid; gap: 1rem; justify-items: start; max-width: 46ch; }
.encargo .link-underline { margin-top: 0.6rem; }
.encargo__strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.8rem, 2vw, 1.5rem);
}
.encargo__strip img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; }
.encargo__strip li:nth-child(2) { transform: translateY(clamp(1rem, 3vw, 2.6rem)); }

/* ---------------------------------------------------------------- details */

.details__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}
.details__item { display: grid; gap: 0.7rem; align-content: start; }
.details__item figure { overflow: hidden; border-radius: 16px; }
.details__item img { width: 100%; object-fit: cover; }
.details__item--tall:nth-child(1) { grid-column: 1 / span 4; }
.details__item--tall:nth-child(1) img { aspect-ratio: 3 / 4; }
.details__item--wide:nth-child(2) { grid-column: 6 / span 6; margin-top: clamp(1.5rem, 4vw, 3rem); }
.details__item--wide:nth-child(2) img { aspect-ratio: 5 / 4; }
.details__item--wide:nth-child(3) { grid-column: 2 / span 5; }
.details__item--wide:nth-child(3) img { aspect-ratio: 4 / 3; }
.details__item--tall:nth-child(4) { grid-column: 8 / span 4; margin-top: clamp(2rem, 6vw, 5rem); }
.details__item--tall:nth-child(4) img { aspect-ratio: 3 / 4; }
.details__name { font-family: var(--font-display); font-size: 1.35rem; }

/* ------------------------------------------------------- marquee and footer */

.marquee-band { padding-block: clamp(2.8rem, 5vw, 4.4rem); }
.marquee__track li {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.2vw, 2.5rem);
  font-style: italic;
  line-height: 1.2;
  color: var(--on-ink);
  white-space: nowrap;
}
.marquee__track li:nth-child(even) { color: var(--brand); }

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

.contact__grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.contact__brand {
  display: grid;
  justify-items: center;
  gap: 1.1rem;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
}
.contact__logo { width: min(240px, 62%); height: auto; }
.contact__tagline { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink-soft); text-align: center; }
.contact__info { display: grid; gap: 1rem; }
.contact__list { display: grid; gap: 0.9rem; margin-top: 0.6rem; }
.contact__list li { display: grid; gap: 0.15rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); }
.contact__label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.contact__value { font-size: 0.98rem; color: var(--ink); }

.footer { padding-block: clamp(3rem, 6vw, 5rem); }
.footer__grid { display: grid; gap: 1.6rem; }
.footer__lockup { display: flex; align-items: center; gap: 1rem; }
.footer__mark { width: auto; height: 52px; }
.footer__wordmark {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: -0.01em;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.8rem; }
.footer__legal { font-size: 0.82rem; color: var(--on-ink-soft); }

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

@media (max-width: 900px) {
  .story__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
  .personal__list { grid-template-columns: 1fr; }
  .catalog__item--a,
  .catalog__item--b,
  .catalog__item--c,
  .catalog__item--d,
  .details__item--tall:nth-child(1),
  .details__item--wide:nth-child(2),
  .details__item--wide:nth-child(3),
  .details__item--tall:nth-child(4) {
    grid-column: span 12;
    margin-top: 0;
  }
  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .catalog__item--a img,
  .catalog__item--b img,
  .catalog__item--c img,
  .catalog__item--d img,
  .details__item--tall:nth-child(1) img,
  .details__item--wide:nth-child(2) img,
  .details__item--wide:nth-child(3) img,
  .details__item--tall:nth-child(4) img { aspect-ratio: 4 / 3; }
  .encargo__strip,
  .details__grid {
    grid-template-columns: repeat(3, 78vw);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.6rem;
    -webkit-overflow-scrolling: touch;
  }
  .details__grid { gap: 1rem; }
  .encargo__strip li,
  .details__grid > li { scroll-snap-align: start; }
  .encargo__strip li:nth-child(2),
  .details__item--wide:nth-child(2),
  .details__item--tall:nth-child(4) { transform: none; margin-top: 0; }
}

@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; gap: 1.1rem; }
}

/* ----------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  .hero__content > * { animation: none; }
}
