/* ==========================================================================
   Hic Hac — styles
   Source of truth for every value here: /brand.md
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand palette */
  --hh-eucalipto: #5F6D5A;   /* primary */
  --hh-roble:     #D2BE9F;   /* secondary */
  --hh-arcilla:   #B7856A;   /* accent: ≤5%, never text */
  /* Neutrals */
  --hh-nieve:     #F8F6F1;
  --hh-lino:      #EFEAE1;
  --hh-avena:     #E1D8C9;
  --hh-piedra:    #A39C90;
  --hh-grafito:   #45433E;
  --hh-carbon:    #2A2926;
  /* Observed helpers */
  --hh-rule:      #CFC6B7;

  /* Shape: app-icon tile radius (brand.md §4), for square isotipo frames */
  --hh-radius-tile: 22.2%;

  /* Type */
  --hh-font-sans:  "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hh-font-serif: "Cormorant", Georgia, "Times New Roman", serif;
  --hh-track-label: 0.2em;

  --fs-label: 0.78rem;
  --fs-body:  1.0625rem;
  --fs-lead:  clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  --fs-h3:    clamp(1.35rem, 1.1rem + 0.8vw, 1.75rem);
  --fs-h2:    clamp(2.1rem, 1.5rem + 2.4vw, 3.5rem);
  --fs-quote: clamp(1.9rem, 1.3rem + 2.6vw, 3.6rem);
  --fs-display: clamp(3.4rem, 2rem + 6vw, 7.5rem);

  /* Layout: 12-col grid, 24px gutter, margins 1/16 of width */
  --margin: max(1.25rem, 6.25vw);
  --gutter: 24px;
  --max: 1680px;
  --section: clamp(5rem, 4rem + 6vw, 10rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--hh-nieve);
  color: var(--hh-grafito);
  font-family: var(--hh-font-sans);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3 { color: var(--hh-carbon); font-weight: 400; line-height: 1.12; margin: 0; }
p { margin: 0; }
a { color: inherit; }

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

.skip-link {
  position: absolute; left: var(--margin); top: -100px;
  background: var(--hh-carbon); color: var(--hh-nieve);
  padding: .75rem 1rem; z-index: 100; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--margin);
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 3rem;
}
.section { padding-block: var(--section); }

/* ---------- Type helpers ---------- */
.label {
  font-size: var(--fs-label);
  letter-spacing: var(--hh-track-label);
  text-transform: uppercase;
  color: var(--hh-eucalipto);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--hh-grafito); }
.quote {
  font-family: var(--hh-font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: var(--fs-quote);
  line-height: 1.2;
}
h2 { font-size: var(--fs-h2); letter-spacing: -0.01em; }
h3 { font-size: var(--fs-h3); }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem;
  padding: 0 2rem;
  border: 1px solid var(--hh-eucalipto);
  background: var(--hh-eucalipto);
  color: var(--hh-nieve);
  font: inherit;
  font-size: var(--fs-label);
  letter-spacing: var(--hh-track-label);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { background: var(--hh-carbon); border-color: var(--hh-carbon); }
.btn--ghost { background: transparent; color: var(--hh-carbon); border-color: var(--hh-carbon); }
.btn--ghost:hover { background: var(--hh-carbon); color: var(--hh-nieve); }

.chip {
  display: inline-flex; align-items: center;
  padding: .45rem 1.1rem;
  border: 1px solid var(--hh-carbon);
  border-radius: 999px;
  font-size: .72rem;
  letter-spacing: var(--hh-track-label);
  text-transform: uppercase;
  color: var(--hh-carbon);
  line-height: 1.2;
  white-space: nowrap;
}
.chip--solid { background: var(--hh-eucalipto); border-color: var(--hh-eucalipto); color: var(--hh-nieve); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 246, 241, .94);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--hh-rule); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  min-height: 5.5rem;
}
.site-header .logo { display: block; }
.site-header .logo img { width: 200px; height: auto; } /* brand minimum: 200px */

.site-nav { display: flex; align-items: center; gap: 2.5rem; }
.site-nav a:not(.btn) {
  font-size: var(--fs-label);
  letter-spacing: var(--hh-track-label);
  text-transform: uppercase;
  color: var(--hh-carbon);
  text-decoration: none;
  padding-block: .4rem;
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.site-nav a:not(.btn):hover { border-bottom-color: var(--hh-arcilla); }
.site-nav .btn { min-height: 2.75rem; padding-inline: 1.4rem; }

@media (max-width: 860px) {
  .site-nav a:not(.btn) { display: none; }
}
@media (max-width: 480px) {
  .site-header .wrap { min-height: 4.5rem; }
  .hide-sm { display: none; }
  .site-nav .btn { padding-inline: 1rem; letter-spacing: .14em; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3.5rem, 2rem + 6vw, 8rem) var(--section); }
.hero__text { grid-column: 1 / span 7; align-self: center; }
.hero__title {
  font-family: var(--hh-font-serif);
  font-weight: 300;
  font-size: var(--fs-display);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--hh-eucalipto);
  margin-bottom: 2.5rem;
}
.hero__text .lead { max-width: 34ch; margin-bottom: 3rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.hero__note { font-size: .95rem; color: var(--hh-grafito); }

.hero__art {
  grid-column: 9 / span 4;
  background: var(--hh-lino);
  aspect-ratio: 4 / 5;
  display: flex; align-items: flex-end; justify-content: center;
  gap: 8%;
  padding: 0 14% 0;
  position: relative;
}
.hero__art .arch {
  width: 46%; height: 62%;
  background: var(--hh-eucalipto);
  border-radius: 999px 999px 0 0;
}
.hero__art .plane {
  width: 34%; height: 42%;
  background: var(--hh-roble);
}
.hero__art .chip { position: absolute; top: 9%; left: 10%; background: var(--hh-nieve); }

@media (max-width: 960px) {
  .hero__text { grid-column: 1 / -1; }
  .hero__art { grid-column: 1 / -1; aspect-ratio: 16 / 10; padding-inline: 24%; }
}

/* ---------- Statement band ---------- */
.statement {
  background-color: var(--hh-eucalipto);
  color: var(--hh-nieve);
  position: relative;
  overflow: hidden;
}
/* Shelving pattern: columns + shelves of the isotipo, repeated */
.statement::before {
  content: "";
  position: absolute; inset: 0 0 0 auto;
  width: min(32%, 460px);
  background-image:
    linear-gradient(to right, rgba(248,246,241,.12) 0 6px, transparent 6px),
    linear-gradient(to bottom, rgba(248,246,241,.12) 0 6px, transparent 6px);
  background-size: 54px 100%, 100% 96px;
  pointer-events: none;
}
.statement .wrap { position: relative; }
.statement .label { color: var(--hh-nieve); opacity: .85; }
.statement .quote { color: var(--hh-nieve); grid-column: 1 / span 8; }
@media (max-width: 860px) {
  .statement .quote { grid-column: 1 / -1; }
  .statement::before { width: 22%; opacity: .7; }
}
@media (max-width: 600px) { .statement::before { display: none; } }

/* ---------- Section heads ---------- */
.section-head { grid-column: 1 / span 5; }
.section-head h2 { margin-bottom: 1.5rem; }
.section-head p { max-width: 38ch; }
@media (max-width: 960px) { .section-head { grid-column: 1 / -1; } }

/* ---------- How it works ---------- */
.steps {
  grid-column: 1 / -1;
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gutter);
  counter-reset: step;
}
.step {
  border-top: 1px solid var(--hh-rule);
  padding-top: 2rem;
}
.step__icon { width: 44px; height: 44px; color: var(--hh-carbon); margin-bottom: 2rem; }
.step__num {
  font-size: var(--fs-label); letter-spacing: var(--hh-track-label);
  color: var(--hh-eucalipto); display: block; margin-bottom: .6rem;
}
.step h3 { margin-bottom: 1rem; }
.step p { max-width: 30ch; }
@media (max-width: 1100px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 3.5rem; } }
@media (max-width: 600px)  { .steps { grid-template-columns: 1fr; } }

/* ---------- Spaces ---------- */
.spaces { background: var(--hh-lino); }
.spaces__list {
  grid-column: 7 / span 6;
  list-style: none; margin: 0; padding: 0;
}
.spaces__list li {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--hh-rule);
}
.spaces__list li:first-child { border-top: 1px solid var(--hh-rule); }
.spaces__list .chip { justify-self: start; }
.spaces__list p { color: var(--hh-grafito); }
@media (max-width: 960px) { .spaces__list { grid-column: 1 / -1; } }
@media (max-width: 520px) { .spaces__list li { grid-template-columns: 1fr; gap: .9rem; } }

/* ---------- Month six ---------- */
.month-six__text { grid-column: 1 / span 6; align-self: center; }
.month-six__text h2 { margin: 1.75rem 0 1.75rem; }
.month-six__text p { max-width: 40ch; }
.month-six__art {
  grid-column: 8 / span 5;
  aspect-ratio: 1;
  border: 1px solid var(--hh-rule);
  border-radius: var(--hh-radius-tile);
  display: grid; place-items: center;
}
.month-six__art img { width: 42%; height: auto; }
@media (max-width: 960px) {
  .month-six__text { grid-column: 1 / -1; }
  .month-six__art { grid-column: 1 / -1; width: min(100%, 420px); }
}

/* ---------- Principles ---------- */
.principles { border-top: 1px solid var(--hh-rule); }
.principle { grid-column: span 4; }
.principle h3 { margin-bottom: 1rem; }
.principle p { max-width: 32ch; }
@media (max-width: 860px) { .principle { grid-column: 1 / -1; } }

/* ---------- Reassurance quotes ---------- */
.reassure { background: var(--hh-roble); }
.reassure .quote { color: var(--hh-carbon); grid-column: 1 / span 9; }
.reassure .label { color: var(--hh-carbon); }
@media (max-width: 860px) { .reassure .quote { grid-column: 1 / -1; } }

/* ---------- Booking ---------- */
.book__intro { grid-column: 1 / span 5; }
.book__intro h2 { margin-bottom: 1.5rem; }
.book__intro p { max-width: 36ch; }
.book__contact {
  grid-column: 7 / span 6;
  align-self: end;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem;
  padding: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  background: var(--hh-lino);
}
.book__contact a:not(.btn) { color: var(--hh-carbon); text-underline-offset: 4px; }
@media (max-width: 960px) {
  .book__intro, .book__contact { grid-column: 1 / -1; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--hh-eucalipto);
  color: var(--hh-nieve);
  padding-block: clamp(4rem, 3rem + 4vw, 7rem) 2.5rem;
}
.site-footer .logo img { width: 220px; height: auto; }
.site-footer .tagline {
  font-family: var(--hh-font-serif); font-style: italic; font-weight: 300;
  font-size: 1.6rem; margin-top: 1.5rem;
}
.footer-main { grid-column: 1 / span 6; }
.footer-meta { grid-column: 8 / span 5; align-self: end; }
.footer-meta p { opacity: .9; }
.footer-meta a { color: var(--hh-nieve); text-underline-offset: 4px; }
.footer-social { margin-top: 1rem; font-size: var(--fs-label); letter-spacing: var(--hh-track-label); text-transform: uppercase; }
.footer-base {
  margin-top: 5rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(248, 246, 241, .3);
  font-size: .85rem; letter-spacing: .06em; opacity: .85;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
@media (max-width: 860px) { .footer-main, .footer-meta { grid-column: 1 / -1; } }

/* ---------- Simple pages (thanks / 404) ---------- */
.simple {
  min-height: 100vh;
  display: grid; place-items: center;
  text-align: center;
  padding: 3rem var(--margin);
  background: var(--hh-lino);
}
.simple__inner { max-width: 36rem; }
.simple img { width: 72px; margin: 0 auto 3rem; }
.simple h1 { font-size: var(--fs-h2); margin-bottom: 1.5rem; }
.simple .quote { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem); color: var(--hh-carbon); margin-bottom: 2rem; }
.simple p { margin-bottom: 2.5rem; }

/* ---------- Motion: gentle reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform .9s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
