/* =========================================================
   AZORI SPACES — v2.0
   Editorial suizo sobre papel. Refs: Pavillon de l'Arsenal,
   Formade, Mutations. Azul-gris + tinta navy + papel crema.
   ========================================================= */

:root {
  --blue:   #ABBDCB;   /* azul-gris de fondo (hero, bloques) */
  --blue-2: #B8C7D3;   /* variante clara */
  --paper:  #E5DDDB;   /* papel cálido */
  --paper-2:#EFE9E7;   /* papel más claro (tarjetas, panel de menú) */
  --ink:    #1B242E;   /* tinta navy, casi negro */
  --dark:   #1C2229;   /* bloque oscuro */
  --hair:   color-mix(in srgb, var(--ink) 28%, transparent);
  --hair-soft: color-mix(in srgb, var(--ink) 15%, transparent);
  --hair-light: color-mix(in srgb, var(--paper) 30%, transparent);

  --display: "Poppins", system-ui, sans-serif;
  --sans: "Poppins", system-ui, -apple-system, sans-serif;
  --mono: "Poppins", system-ui, sans-serif;

  --fs-body:  clamp(0.98rem, 0.92rem + 0.3vw, 1.1rem);
  --fs-mega:  clamp(3.6rem, 0.5rem + 13vw, 12rem);
  --fs-h2:    clamp(2rem, 1.2rem + 3.6vw, 4.4rem);
  --fs-h3:    clamp(1rem, 0.9rem + 0.5vw, 1.2rem);

  --maxw: 1320px;
  --pad-x: clamp(1.2rem, 4vw, 3.4rem);
  --gap: clamp(4rem, 9vw, 8.5rem);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 2rem; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, figure, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { list-style: none; padding: 0; }

/* Grano fino y parejo sobre todo el documento (papel sutil, sin arrugas) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 120px 120px;
  opacity: 0.85;
  mix-blend-mode: soft-light;
}
body > * { position: relative; z-index: 2; }

/* ---------- Intro / pantalla de bienvenida ---------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: #D9D4C7 url("assets/intro-paper.jpg") center / cover no-repeat;
  cursor: pointer;
  will-change: opacity;
}
/* El logo se dibuja de izquierda a derecha */
.intro__logo {
  width: clamp(180px, 26vw, 360px);
  height: auto;
  clip-path: inset(0 100% 0 0);
  animation: introDraw 1.7s cubic-bezier(0.76, 0, 0.24, 1) 0.35s forwards;
}
@keyframes introDraw {
  to { clip-path: inset(0 0 0 0); }
}
.intro--out {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.015);
  transition: opacity 0.85s ease, transform 0.85s ease, visibility 0s 0.85s;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .intro__logo { animation: none; clip-path: none; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  height: 100svh;
  background: var(--blue);
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 3.5vw, 3rem) var(--pad-x) 0;
  border-bottom: 1px solid var(--ink);
}

.hero__top { margin-top: clamp(1rem, 4vw, 3rem); }
.hero__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-mega);
  line-height: 0.86;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.hero__tag {
  font-size: clamp(0.85rem, 0.8rem + 0.3vw, 1.05rem);
  font-weight: 500;
  margin-top: 0.7rem;
  letter-spacing: 0.005em;
}

/* Menú desplegable · full-bleed, panel que sube en hover sin mover el póster */
.menu {
  position: relative;
  margin-top: auto;
  margin-inline: calc(var(--pad-x) * -1);
}
.menu__bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(0.9rem, 2vw, 1.3rem) var(--pad-x);
  background: none;
  border: 0;
  border-top: 1px solid var(--ink);
  cursor: pointer;
  color: inherit;
  font-family: inherit;
}
.menu__hint { font-weight: 600; font-size: clamp(0.9rem, 0.85rem + 0.35vw, 1.15rem); }
.menu__label {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
}
.menu__label::after {
  content: "+";
  margin-left: 0.5rem;
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Panel de opciones: overlay sobre papel que sube desde la barra */
.menu__list {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  background-color: var(--paper-2);
  background-image: linear-gradient(rgba(239, 233, 231, 0.6), rgba(239, 233, 231, 0.6)), url("assets/paper-cotton.jpg");
  background-size: cover;
  background-blend-mode: normal, multiply;
  border-top: 1px solid var(--ink);
  box-shadow: 0 -24px 50px -30px rgba(27, 36, 46, 0.55);
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.menu__inner { overflow: hidden; min-height: 0; }

.menu:hover .menu__list,
.menu.is-open .menu__list { grid-template-rows: 1fr; }
.menu:hover .menu__label::after,
.menu.is-open .menu__label::after { transform: rotate(45deg); }

.menu__list a {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.8rem;
  padding: clamp(0.65rem, 1.5vw, 1rem) var(--pad-x);
  border-top: 1px solid var(--hair-soft);
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.05rem, 0.9rem + 1.3vw, 1.8rem);
  letter-spacing: 0.005em;
  text-transform: uppercase;
  text-decoration: none;
  transition: padding-right 0.3s ease, background 0.2s ease;
}
.menu__inner a:first-child { border-top: 0; }
.menu__list a:hover { padding-right: calc(var(--pad-x) + 0.5rem); background: var(--blue-2); }
.menu__idx {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  opacity: 0.45;
  margin-right: auto;
}

/* Franja de footer del hero · sobre papel */
.hero__foot {
  margin-inline: calc(var(--pad-x) * -1);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  justify-content: space-between;
  padding: clamp(0.75rem, 1.5vw, 1rem) var(--pad-x) clamp(0.9rem, 1.8vw, 1.2rem);
  background: var(--paper-2);
  border-top: 1px solid var(--ink);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
}
.hero__foot span:nth-child(2) { text-align: center; }
.hero__foot span:last-child { text-align: right; }

/* =========================================================
   SECCIONES
   ========================================================= */
.section {
  position: relative;
  padding: var(--gap) var(--pad-x);
  border-bottom: 1px solid var(--hair-soft);
}
.section--dark {
  background: var(--dark);
  color: var(--paper);
  border-color: transparent;
}
.section--portfolio, .section--about { background: var(--blue-2); }
.section--quotes { background: var(--blue); }

/* Texto vertical en el margen */
.section__spine {
  position: absolute;
  top: var(--gap);
  left: calc(var(--pad-x) * 0.34);
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.55;
}
.section__spine--light { color: var(--paper); }

.section__head {
  max-width: var(--maxw);
  margin: 0 auto clamp(2rem, 5vw, 3.5rem);
}
.section__head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.section__head p { max-width: 48ch; margin-top: 1.1rem; opacity: 0.85; }

/* ---------- About ---------- */
.section--about {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  max-width: var(--maxw);
  margin-inline: auto;
}
.paper-card {
  background-color: var(--paper-2);
  background-image: linear-gradient(rgba(239, 233, 231, 0.6), rgba(239, 233, 231, 0.6)), url("assets/paper-cotton.jpg");
  background-size: cover;
  background-blend-mode: normal, multiply;
  border: 1px solid var(--hair-soft);
  padding: clamp(1.6rem, 4vw, 3rem);
  box-shadow: 0 30px 60px -40px rgba(27, 36, 46, 0.5);
}
.paper-card__head {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.4rem);
}
.paper-card__head .rule { flex: 1; height: 1px; background: var(--ink); align-self: center; }
.paper-card__head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 1rem + 2.6vw, 3rem);
  line-height: 0.9;
  text-transform: uppercase;
  text-align: right;
}
.paper-card__head h2 em {
  font-weight: 400;
  font-style: italic;
  text-transform: none;
}
.prose { max-width: 52ch; }
.prose p { font-size: 0.92rem; line-height: 1.6; }
.prose p + p { margin-top: 0.9rem; }

.about__portrait { aspect-ratio: 4 / 5; overflow: hidden; }
.about__portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }

/* ---------- Approach: ledger con líneas punteadas ---------- */
.ledger { max-width: var(--maxw); margin-inline: auto; }
.ledger li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: clamp(0.9rem, 2vw, 1.4rem) 0;
  border-top: 1px solid var(--hair-light);
}
.ledger li:last-child { border-bottom: 1px solid var(--hair-light); }
.ledger__no { font-family: var(--mono); font-size: 0.72rem; opacity: 0.55; }
.ledger__name {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.05rem, 0.9rem + 1.1vw, 1.9rem);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
}
.ledger__dot { flex: 1; border-bottom: 1px dotted color-mix(in srgb, var(--paper) 45%, transparent); align-self: flex-end; margin-bottom: 0.35em; min-width: 1.5rem; }
.ledger__note {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
  white-space: nowrap;
}

/* ---------- Portfolio ---------- */
.section--portfolio { max-width: none; }
.section--portfolio > .section__head, .pf-group { max-width: var(--maxw); margin-inline: auto; }
.pf-group + .pf-group { margin-top: clamp(2.5rem, 5vw, 4rem); }
.group-label {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.8rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.group-label span {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--ink);
  border-radius: 100px;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: clamp(1rem, 2.5vw, 1.8rem);
}

/* Banner "Coming Soon" para Architecture Practice */
.wip-banner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.6rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--ink);
  background: rgba(199, 154, 91, 0.14);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.wip-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #C79A5B;
  box-shadow: 0 0 0 4px rgba(199, 154, 91, 0.25);
  animation: wipPulse 1.9s ease-in-out infinite;
}
@keyframes wipPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.tiles--wip { opacity: 0.55; }
@media (prefers-reduced-motion: reduce) {
  .wip-dot { animation: none; }
}
.tiles figure.shot {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--dark);
}
/* Sello / marca de agua sobre la foto (ej. In Contract) */
.tiles figure.shot .stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(0.85rem, 0.68rem + 0.9vw, 1.3rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper);
  padding: 0.5rem 1.1rem 0.5rem 1.3rem;
  border: 2px solid var(--paper);
  border-radius: 3px;
  background: color-mix(in srgb, var(--ink) 42%, transparent);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
  white-space: nowrap;
  pointer-events: none;
}
.tiles figure.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.tiles li:hover figure.shot img { transform: scale(1.04); }
.tiles figcaption {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tiles .addr {
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.tiles .meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--hair-soft);
}
.tiles .hood {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  opacity: 0.6;
}
.tiles .price {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(0.82rem, 0.74rem + 0.32vw, 0.98rem);
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}
.tiles .price small {
  font-size: 0.5em;
  font-weight: 500;
  letter-spacing: 0;
  opacity: 0.65;
}

/* ---------- Services ---------- */
.svc {
  max-width: var(--maxw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(1.6rem, 4vw, 3rem);
}
.svc h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-h3);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding-bottom: 0.8rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--hair-light);
}
.index-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.62rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--paper) 18%, transparent);
  font-size: 0.92rem;
}
.index-list li span { font-family: var(--mono); font-size: 0.66rem; opacity: 0.5; }

/* ---------- Quotes ---------- */
.quotes {
  max-width: var(--maxw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(1.2rem, 3vw, 2rem);
}
.quotes li {
  background-color: var(--paper-2);
  background-image: linear-gradient(rgba(239, 233, 231, 0.6), rgba(239, 233, 231, 0.6)), url("assets/paper-cotton.jpg");
  background-size: cover;
  background-blend-mode: normal, multiply;
  border: 1px solid color-mix(in srgb, var(--ink) 24%, transparent);
  padding: clamp(1.6rem, 3.2vw, 2.5rem);
  box-shadow: 0 26px 55px -40px rgba(27, 36, 46, 0.55);
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}
.quotes blockquote { font-size: clamp(0.95rem, 0.88rem + 0.4vw, 1.12rem); line-height: 1.55; }
.quotes blockquote p + p { margin-top: 0.8rem; }
.quotes cite {
  font-style: normal;
  margin-top: auto;
  padding-top: 1.2rem;
  border-top: 1px solid var(--hair-soft);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.quotes cite .who {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.1rem, 0.98rem + 0.6vw, 1.4rem);
  letter-spacing: 0.005em;
}
.quotes cite .role {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  opacity: 0.6;
}

.quotes-empty {
  max-width: var(--maxw);
  margin-inline: auto;
  border-top: 2px solid var(--ink);
  padding-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.quotes-empty p { max-width: 46ch; font-size: clamp(1rem, 0.9rem + 0.5vw, 1.2rem); }
.quotes-empty a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.2rem;
}

/* Honeypot anti-spam del formulario (oculto) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Contact ---------- */
.section--contact { max-width: var(--maxw); margin-inline: auto; }
.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(2rem, 5vw, 4rem);
}
.contact__list > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--hair-soft);
}
.contact__list dt { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.6; }
.contact__list dd { font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.contact__list a { text-decoration: none; }
.contact__list a:hover { text-decoration: underline; text-underline-offset: 3px; }

.form { display: flex; flex-direction: column; gap: 1rem; }
.form label {
  display: flex; flex-direction: column; gap: 0.4rem;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.form input, .form textarea {
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background-color: var(--paper-2);
  background-image: linear-gradient(rgba(239, 233, 231, 0.6), rgba(239, 233, 231, 0.6)), url("assets/paper-cotton.jpg");
  background-size: cover;
  background-blend-mode: normal, multiply; border: 1px solid var(--hair-soft); border-radius: 0;
  padding: 0.7rem 0.85rem; resize: vertical;
}
.form input:focus-visible, .form textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.form button {
  align-self: flex-start;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--ink); color: var(--paper); border: 0; cursor: pointer;
  padding: 0.85rem 2rem;
}
.form button:hover { background: var(--dark); }

/* ---------- Footer ---------- */
.foot {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(2.5rem, 6vw, 4rem) var(--pad-x);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.foot__logo {
  height: clamp(34px, 4vw, 46px);
  width: auto;
  opacity: 0.9;
}

/* ---------- Placeholders ---------- */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg, color-mix(in srgb, var(--ink) 12%, transparent) 0 10px, transparent 10px 20px),
    color-mix(in srgb, var(--ink) 82%, transparent);
  display: grid;
  place-items: center;
}
.about__portrait.ph { background:
    repeating-linear-gradient(135deg, color-mix(in srgb, var(--ink) 12%, transparent) 0 10px, transparent 10px 20px),
    var(--dark); }
.ph::after {
  content: attr(data-ph);
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--paper); opacity: 0.8;
}
.ph--wide { aspect-ratio: 4 / 3; }

/* ---------- Reveal ---------- */
.reveal-init { opacity: 0; transform: translateY(16px); }
.reveal-in { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .section--about { grid-template-columns: 1fr; }
  .about__portrait { order: -1; aspect-ratio: 3 / 2; }
  .section__spine { display: none; }
  /* En touch el hover no aplica: el menú abre con .is-open (JS) */
}

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