/* ============================================================
   No Mapa — Gallery Landing Page
   Root-level styles for the prototype catalog
   ============================================================ */

/* -- Reset & Base ------------------------------------------ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg:          #0a0a0a;
  --color-surface:     #111111;
  --color-border:      rgba(255, 255, 255, 0.08);
  --color-text:        #e8e2d9;
  --color-text-muted:  rgba(232, 226, 217, 0.45);
  --color-gold:        #c9a96e;
  --color-gold-light:  #dfc08e;
  --color-gold-dim:    rgba(201, 169, 110, 0.15);

  --font-serif:        'Playfair Display', Georgia, serif;
  --font-sans:         'Inter', system-ui, sans-serif;

  --spacing-xs:   0.5rem;
  --spacing-sm:   1rem;
  --spacing-md:   2rem;
  --spacing-lg:   4rem;
  --spacing-xl:   7rem;
  --spacing-2xl: 12rem;

  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out:   cubic-bezier(0.4, 0, 0.2, 1);

  --container-max: 1200px;
  --container-pad: 1.5rem;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* -- Container --------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

@media (min-width: 768px) {
  :root { --container-pad: 3rem; }
}

@media (min-width: 1200px) {
  :root { --container-pad: 4rem; }
}

/* -- Scroll-reveal animations ------------------------------ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease-out-expo),
    transform 0.9s var(--ease-out-expo);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 0.12s; }
.reveal--delay-2 { transition-delay: 0.24s; }
.reveal--delay-3 { transition-delay: 0.4s; }

/* -- Hero -------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--spacing-xl) var(--container-pad);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201, 169, 110, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(201, 169, 110, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--spacing-md);
}

.hero-heading {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--spacing-md);
}

.hero-heading em {
  font-style: italic;
  color: var(--color-gold-light);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--color-text-muted);
  font-weight: 300;
  letter-spacing: 0.01em;
  margin-bottom: var(--spacing-xl);
}

.hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.hero-scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--color-gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.7); transform-origin: top; }
  50%       { opacity: 1;   transform: scaleY(1);   transform-origin: top; }
}

/* -- Gallery intro ----------------------------------------- */

.gallery-intro {
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  border-top: 1px solid var(--color-border);
}

.gallery-intro-text {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-style: italic;
  color: var(--color-text-muted);
  line-height: 1.7;
  text-align: center;
}

.break-lg { display: none; }
@media (min-width: 900px) { .break-lg { display: inline; } }

/* -- Gallery ----------------------------------------------- */

.gallery {
  padding: var(--spacing-md) 0 var(--spacing-2xl);
}

.gallery .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .gallery .container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .gallery .container {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

/* -- Card -------------------------------------------------- */

.card {
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
  cursor: pointer;
}

/* Featured card spans full width */
@media (min-width: 768px) {
  .card--featured {
    grid-column: 1 / -1;
  }
}

.card-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 480px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .card-link {
    min-height: 540px;
  }
}

@media (min-width: 1100px) {
  .card--featured .card-link {
    min-height: 500px;
  }
}

/* Visual area (gradient placeholder) */
.card-visual {
  position: absolute;
  inset: 0;
  transition: transform 0.9s var(--ease-out-expo);
}

.card-link:hover .card-visual,
.card-link:focus-visible .card-visual {
  transform: scale(1.04);
}

/* Dark overlay — text legibility */
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  transition: opacity 0.5s var(--ease-in-out);
}

.card-link:hover .card-overlay,
.card-link:focus-visible .card-overlay {
  opacity: 0.75;
}

/* Gradients per segment */
.card-gradient--terracotta {
  background:
    radial-gradient(ellipse 100% 90% at 55% 35%, #c47a55 0%, #8b4a2a 45%, #3d1e0f 100%);
}

.card-gradient--rose {
  background:
    radial-gradient(ellipse 100% 90% at 40% 45%, #e8b5b5 0%, #a67080 45%, #4a2a32 100%);
}

.card-gradient--slate {
  background:
    radial-gradient(ellipse 100% 90% at 50% 35%, #7d8d9e 0%, #445566 45%, #1e2830 100%);
}

.card-gradient--violet {
  background:
    radial-gradient(ellipse 100% 90% at 50% 40%, #a88cc8 0%, #6b4a8a 45%, #2a1840 100%);
}

.card-gradient--ocean {
  background:
    radial-gradient(ellipse 100% 90% at 45% 35%, #5a9abf 0%, #2d5e7a 45%, #132838 100%);
}

/* Content inside card */
.card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  z-index: 1;
}

.card-segment {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 0.6rem;
  opacity: 0.85;
}

.card-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.card-line {
  font-size: 0.95rem;
  font-style: italic;
  color: rgba(232, 226, 217, 0.65);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold);
  border-bottom: 1px solid rgba(201, 169, 110, 0.3);
  padding-bottom: 2px;

  opacity: 0;
  transform: translateX(-8px);
  transition:
    opacity 0.4s var(--ease-out-expo),
    transform 0.4s var(--ease-out-expo),
    color 0.3s;
}

.card-link:hover .card-cta,
.card-link:focus-visible .card-cta {
  opacity: 1;
  transform: translateX(0);
}

.card-cta svg {
  transition: transform 0.3s var(--ease-out-expo);
}

.card-link:hover .card-cta svg {
  transform: translateX(4px);
}

/* Card focus visible */
.card-link:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: -2px;
}

/* -- Reveal delay for cards -------------------------------- */
.card:nth-child(1) { --reveal-delay: 0s; }
.card:nth-child(2) { --reveal-delay: 0.1s; }
.card:nth-child(3) { --reveal-delay: 0.2s; }
.card:nth-child(4) { --reveal-delay: 0.15s; }
.card:nth-child(5) { --reveal-delay: 0.25s; }
.card:nth-child(6) { --reveal-delay: 0.1s; }

.card.reveal {
  transition-delay: var(--reveal-delay, 0s);
}

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

.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-lg) 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: 0.04em;
}

.footer-by {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.footer-by a {
  color: var(--color-gold);
  transition: color 0.2s;
}

.footer-by a:hover {
  color: var(--color-gold-light);
}

.footer-tag {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-style: italic;
  color: rgba(232, 226, 217, 0.25);
  letter-spacing: 0.03em;
}

/* -- Scrollbar --------------------------------------------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: rgba(201, 169, 110, 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201, 169, 110, 0.4); }

/* -- Selection --------------------------------------------- */
::selection {
  background: rgba(201, 169, 110, 0.25);
  color: var(--color-text);
}
