/* =============================================================
   MARS×3D — main.css
   Reset · Theme tokens · Typography · Layout · Sections
   ============================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; }

/* ---------- Theme ---------- */
:root {
  --bg: #f0ebe2;
  --bg-2: #e8e2d6;
  --bg-3: #ddd5c5;
  --ink: #14110d;
  --ink-soft: #57514a;
  --ink-faint: #9a948a;
  --accent: #c0411f;
  --accent-soft: #e8c8b6;
  --line: rgba(20, 17, 13, 0.14);
  --line-strong: rgba(20, 17, 13, 0.4);

  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, Helvetica, sans-serif;

  --pad: clamp(1.25rem, 4vw, 3rem);
  --max: 1500px;

  --ease: cubic-bezier(0.65, 0.05, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
::selection { background: var(--ink); color: var(--bg); }

/* ---------- Typography primitives ---------- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
}
em, .italic { font-style: italic; font-family: var(--serif); }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow--inv { color: rgba(255,255,255,0.6); }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.9s var(--ease);
}
.loader.is-done { transform: translateY(-100%); }
.loader__inner {
  display: flex; align-items: baseline; gap: 1.25rem;
  font-family: var(--serif);
}
.loader__mark { font-size: clamp(2rem, 6vw, 4rem); }
.loader__count {
  font-size: clamp(2rem, 6vw, 4rem);
  font-variant-numeric: tabular-nums;
  min-width: 3ch; text-align: right;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 1.25rem var(--pad);
  color: var(--ink);
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(240, 235, 226, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--line);
}
.nav__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  max-width: var(--max);
  margin: 0 auto;
}
.nav__brand { display: flex; align-items: baseline; gap: 0.6rem; font-family: var(--serif); }
.nav__brand-mark { font-size: 1.5rem; line-height: 1; font-style: italic; }
.nav__brand-text { font-size: 0.95rem; letter-spacing: 0.05em; }
.nav__links { display: flex; gap: 2rem; justify-content: center; font-size: 13px; }
.nav__links a { position: relative; padding: 0.25rem 0; }
.nav__links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__cart {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 12px; letter-spacing: 0.05em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.nav__cart:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.nav__cart-count {
  font-variant-numeric: tabular-nums;
  font-family: var(--serif); font-style: italic;
  font-size: 14px;
}

@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__inner { grid-template-columns: auto auto; justify-content: space-between; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  padding: 8rem var(--pad) 4rem;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
  background:
    linear-gradient(rgba(240,235,226,0.30), rgba(240,235,226,0.55)),
    url('../assets/hero-bg.jpg') center 30% / cover no-repeat;
}
.hero__grid {
  display: grid; gap: 2.5rem;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}
.hero__meta {
  display: flex; justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}
.hero__title {
  font-size: clamp(3.5rem, 13vw, 13rem);
  letter-spacing: -0.04em;
  line-height: 0.9;
}
.hero__line { display: block; overflow: hidden; padding-bottom: 0.15em; margin-bottom: -0.15em; }
.hero__line--italic { font-style: italic; padding-left: 0.5em; color: var(--ink); }

.hero__line--rise {
  opacity: 0;
  transform: translateY(110%);
  animation: rise 1.1s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}
body:not(.is-loaded) .hero__line--rise { animation-play-state: paused; }

.hero__caption {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.hero__caption p {
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  max-width: 38ch;
  color: var(--ink-soft);
}
.hero__scroll {
  position: absolute; bottom: 2rem; right: var(--pad);
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft);
}
.hero__scroll-line {
  width: 60px; height: 1px; background: var(--ink-soft);
  position: relative; overflow: hidden;
}
.hero__scroll-line::after {
  content: ''; position: absolute; inset: 0; background: var(--bg);
  animation: scroll-line 2.4s var(--ease) infinite;
}
@keyframes scroll-line {
  0% { transform: translateX(-100%); }
  50%, 100% { transform: translateX(100%); }
}

@media (max-width: 720px) {
  .hero { padding-top: 7rem; }
  .hero__caption { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero__scroll { display: none; }
}

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  padding: 1.4rem 0;
  overflow: hidden;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-style: italic;
}
.marquee__track {
  display: flex; gap: 2.5rem;
  white-space: nowrap;
  animation: marquee 32s linear infinite;
  width: max-content;
}
.marquee__track span:nth-child(2n) { color: var(--accent); font-style: normal; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Studio ---------- */
.studio {
  padding: clamp(5rem, 12vw, 10rem) var(--pad);
  position: relative;
}
.studio::before {
  content: '';
  position: absolute; inset: 0;
  background: url('../assets/studio-bg.jpg') center / cover no-repeat;
  opacity: 0.5;
  pointer-events: none;
}
.studio__grid {
  display: grid; gap: 2.5rem;
  max-width: var(--max); margin: 0 auto;
}
.studio__heading {
  font-size: clamp(2rem, 5.5vw, 5rem);
  max-width: 18ch;
}
.studio__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-left: auto;
  max-width: 800px;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.studio__body p { color: var(--ink-soft); font-size: 0.95rem; }

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

/* ---------- Collection ---------- */
.collection { padding: 4rem var(--pad) 6rem; }
.collection__head {
  display: grid; gap: 2rem;
  max-width: var(--max);
  margin: 0 auto 4rem;
}
.collection__heading { font-size: clamp(2.25rem, 6vw, 5rem); }
.collection__filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- Process ---------- */
.process {
  padding: clamp(5rem, 12vw, 10rem) var(--pad);
  background:
    linear-gradient(rgba(14,11,8,0.68), rgba(14,11,8,0.68)),
    url('../assets/process-bg.jpg') center / cover no-repeat;
  background-color: var(--ink);
  color: var(--bg);
}
.process__grid {
  display: grid; gap: 2.5rem;
  max-width: var(--max); margin: 0 auto;
}
.process__heading {
  font-size: clamp(2.25rem, 6vw, 5rem);
  max-width: 14ch;
}
.process__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 3rem;
}
.process__list li { display: grid; gap: 1rem; align-content: start; }
.process__num {
  font-family: var(--serif); font-style: italic;
  font-size: 2.5rem; color: var(--accent-soft);
}
.process__list h3 { font-size: 1.5rem; }
.process__list p { color: rgba(240,235,226,0.7); font-size: 0.9rem; max-width: 32ch; }

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

/* ---------- Contact ---------- */
.contact { padding: clamp(5rem, 12vw, 10rem) var(--pad); }
.contact__grid {
  display: grid; gap: 2rem;
  max-width: var(--max); margin: 0 auto;
}
.contact__heading {
  font-size: clamp(2.5rem, 8vw, 7rem);
  letter-spacing: -0.03em;
}
.contact__heading span { display: block; }
.contact__body { color: var(--ink-soft); max-width: 50ch; }
.contact__social { display: flex; flex-direction: column; gap: 0.75rem; align-items: flex-start; }

.btn--social {
  display: inline-flex; align-items: center; gap: 0.65rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.btn--social:hover { transform: translateY(-2px); border-color: transparent; color: #fff; }
.btn--instagram:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.btn--whatsapp:hover  { background: #25d366; }
.btn--email:hover     { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--custom:hover    { background: var(--accent); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 4rem var(--pad) 2rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2rem;
  max-width: var(--max); margin: 0 auto;
}
.footer__brand p { color: var(--ink-soft); margin-top: 0.5rem; max-width: 18ch; }
.footer__mark { font-family: var(--serif); font-size: 2.25rem; font-style: italic; }
.footer__col { display: grid; gap: 0.5rem; align-content: start; }
.footer__col a { transition: color 0.2s var(--ease); }
.footer__col a:hover { color: var(--accent); }
.footer__col p { color: var(--ink-soft); font-size: 13px; }
.footer__label {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 0.5rem;
}
.footer__bottom {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--ink-soft);
  max-width: var(--max); margin-inline: auto;
}

@media (max-width: 720px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; gap: 0.5rem; }
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal--delay-1 { transition-delay: 0.08s; }
.reveal--delay-2 { transition-delay: 0.16s; }
.reveal--delay-3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .hero__line--rise { opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; }
}
