/* Bruma: salón en Naco. Palette sampled from the painted back wall (see PROJECT.md). */

:root {
  --paper: #E6E7DF;   /* lime-washed plaster, misty grey-green */
  --ink: #22302A;     /* darkest palm green */
  --palm: #5E7468;    /* eucalyptus fronds */
  --palm-ink: #4A5E53;/* palm, darkened for small text on paper (AA) */
  --sage: #A3B19B;
  --rose: #D2AA9E;    /* chair velvet */
  --ochre: #CDA765;   /* the arch, the tea */
  --card: #F3EEE4;    /* price card stock */
  --mist: #D8DCD1;
  --font-display: "Italiana", "Didot", "Bodoni 72", serif;
  --font-body: "Jost", "Futura", "Century Gothic", sans-serif;
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 300 1.0625rem/1.65 var(--font-body);
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
h1, h2, h3 { font-weight: 400; margin: 0; }
p { margin: 0 0 1em; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--ink); color: var(--paper); padding: .75rem 1rem; text-decoration: none;
}
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; position: relative; z-index: 2; }

/* Greenhouse ribbon */
.ribbon {
  margin: 0; background: var(--ink); color: var(--paper);
  font-size: .8125rem; letter-spacing: .02em; text-align: center;
}
.ribbon a { display: block; padding: .7rem var(--gutter); text-decoration: none; min-height: 44px; }
.ribbon a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ribbon a:focus-visible { outline-color: var(--paper); outline-offset: -4px; }

/* Header */
.top {
  position: absolute; z-index: 10; left: 0; right: 0;
  display: flex; align-items: center; gap: 1rem 2rem; flex-wrap: wrap;
  padding: 1rem var(--gutter);
}
.brand {
  font: 400 2rem/1 var(--font-display); letter-spacing: .04em; text-decoration: none;
  min-height: 44px; display: inline-flex; align-items: center;
}
.nav { display: flex; gap: .25rem 1.4rem; margin-left: auto; flex-wrap: wrap; }
.nav a {
  text-decoration: none; font-weight: 400; font-size: .98rem;
  min-height: 44px; display: inline-flex; align-items: center;
  background: linear-gradient(currentColor, currentColor) 0 78% / 0 1px no-repeat;
  transition: background-size .35s ease;
}
.nav a:hover { background-size: 100% 1px; }
.nav__book { padding-inline: 1rem; border: 1px solid var(--ink); border-radius: 999px; background: none !important; }
.nav__book:hover { background: var(--ink) !important; color: var(--paper); }
.langs { display: flex; }
.langs button {
  font: 400 .85rem var(--font-body); letter-spacing: .06em; color: var(--ink);
  background: none; border: 0; cursor: pointer; min-width: 44px; min-height: 44px; opacity: .62;
}
.langs button[aria-pressed="true"] { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }

/* Hero + mural */
.hero { position: relative; min-height: min(56rem, 100svh); display: grid; align-items: end; overflow: hidden; }
.mural {
  position: absolute; inset: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 99%);
  mask-image: linear-gradient(to bottom, #000 78%, transparent 99%);
}
.mural__layer {
  position: absolute; left: 0; width: 100%; max-width: none; top: -4%; height: 112%;
  will-change: transform;
}
.hero__text {
  position: relative; z-index: 3;
  width: min(100% - 2 * var(--gutter), 36rem);
  margin: 0 0 clamp(2.5rem, 8vh, 6rem) var(--gutter);
  padding-top: 7rem;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 9.5vw, 8.6rem); line-height: .92; letter-spacing: -.01em;
  margin: 0 0 1.5rem -.04em;
}
.hero__lede { font-size: clamp(1.08rem, 1.5vw, 1.25rem); max-width: 30rem; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.75rem; margin: 2rem 0 1.5rem; }
.hero__where { font-size: .92rem; color: var(--palm-ink); font-weight: 400; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .7rem 1.6rem;
  font: 500 1rem var(--font-body); letter-spacing: .01em;
  color: var(--paper); background: var(--ink);
  border: 0; border-radius: 999px; text-decoration: none; cursor: pointer;
  transition: background-color .25s ease, transform .25s ease;
}
.btn:hover { background: var(--palm-ink); }
.btn:active { transform: translateY(1px); }
.link {
  font-weight: 400; text-underline-offset: 5px; text-decoration-thickness: 1px;
  min-height: 44px; display: inline-flex; align-items: center;
}
.link:hover { text-decoration-thickness: 2px; }

/* Page strand (drawn by main.js) */
main { position: relative; }
.strand { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: visible; }
.strand path { fill: none; stroke-linecap: round; }
.pin { display: block; height: 0; }

/* La casa */
.casa { position: relative; padding: clamp(5rem, 12vw, 10rem) 0 clamp(5rem, 10vw, 8rem); }
.casa__grid { display: grid; gap: 2.5rem; }
.casa__title {
  font-family: var(--font-display); font-size: clamp(2.1rem, 4.6vw, 3.9rem); line-height: 1.08;
  max-width: 17ch;
}
.casa__body { max-width: 34rem; }
.casa__notes { display: grid; gap: 2rem; margin-top: 2.75rem; }
.note h3 { font: 500 1.08rem/1.3 var(--font-body); margin-bottom: .35rem; }
.note p { margin: 0; }
.note__art { width: 96px; height: 72px; display: block; margin-bottom: .75rem; }
.note--quiet { padding-left: 1.25rem; border-left: 1px solid var(--sage); }

/* Rizos */
.rizos { position: relative; background: var(--ink); color: var(--paper); padding: clamp(4.5rem, 10vw, 8rem) 0; }
.rizos__head { display: grid; gap: 1.5rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.rizos__head h2 { font-family: var(--font-display); font-size: clamp(2.6rem, 7vw, 6rem); line-height: .98; }
.rizos__head p { max-width: 36rem; color: #DCE0D6; }
.chart { display: grid; gap: 0; }
.chart__row { display: grid; gap: 1rem; padding: 2rem 0; border-top: 1px solid rgba(230, 231, 223, .22); }
.chart__fam { font: 400 1.05rem var(--font-body); color: var(--rose); letter-spacing: .02em; }
.chart__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; }
.curl { display: grid; align-content: start; grid-template-columns: 64px 1fr; grid-template-rows: auto auto 1fr; column-gap: 1.25rem; }
.curl__art { grid-row: 1 / span 3; width: 64px; height: 136px; color: var(--sage); overflow: visible; }
.curl__code { font: 400 2.6rem/1 var(--font-display); margin: 0 0 .25rem; color: var(--paper); }
.curl__name { font-weight: 500; margin: 0 0 .35rem; }
.curl__note { margin: 0; color: #CBD1C5; font-size: .98rem; max-width: 30ch; }
.rizos__consult { margin: 2.5rem 0 0; padding-top: 2rem; border-top: 1px solid rgba(230, 231, 223, .22); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; max-width: 52rem; }
.link--light { color: var(--ochre); }
.rizos :focus-visible { outline-color: var(--paper); }

/* Precios: the printed card */
.precios { position: relative; padding: clamp(5rem, 11vw, 9rem) 0; }
.precios__grid { display: grid; gap: 3rem; align-items: start; }
.precios__intro h2 { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1; margin-bottom: 1.5rem; }
.precios__intro p { max-width: 26rem; }

.card {
  position: relative;
  color: #2A2B26;
  background-color: var(--card);
  /* paper grain + faint fibres, generated with SVG turbulence */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35  0 0 0 0 .3  0 0 0 0 .22  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='.5'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .09' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .55  0 0 0 0 .5  0 0 0 0 .4  0 0 0 .22 -.06'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  padding: clamp(1.75rem, 4vw, 3.25rem) clamp(1.25rem, 4vw, 3.25rem) clamp(1.5rem, 3vw, 2.5rem);
  border-radius: 3px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .6) inset,
    0 1px 1px rgba(34, 48, 42, .12),
    0 4px 6px -2px rgba(34, 48, 42, .08),
    0 28px 40px -26px rgba(34, 48, 42, .45);
  transform: rotate(-1.2deg);
}
.card::before { /* the printed border */
  content: ""; position: absolute; inset: 10px; border: 1px solid rgba(94, 116, 104, .45); pointer-events: none; border-radius: 1px;
}
.card__head { text-align: center; margin-bottom: 1.75rem; }
.card__brand { font: 400 clamp(2.4rem, 5vw, 3.2rem)/1 var(--font-display); letter-spacing: .08em; margin: 0 0 .5rem; color: var(--ink); }
.card__sub { font-size: .85rem; letter-spacing: .03em; color: #4E5650; margin: 0; }
.card__cols { columns: 1; column-gap: 3rem; }
.card__group { break-inside: avoid; margin-bottom: 1.75rem; }
.card__group h3 { font: 400 1.55rem/1.2 var(--font-display); color: var(--palm-ink); margin-bottom: .5rem; }
.card dl { margin: 0; }
.card dl div { display: flex; align-items: baseline; gap: .5rem; padding: .22rem 0; font-size: .98rem; }
.card dt { flex: 0 1 auto; }
.card dl div::after { content: ""; order: 1; flex: 1 1 1.5rem; border-bottom: 1px dotted rgba(42, 43, 38, .45); transform: translateY(-.28em); }
.card dd { order: 2; margin: 0; font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; }
.card__foot { text-align: center; font-size: .82rem; color: #4E5650; margin: .5rem 0 0; }

/* Reservar */
.reservar { position: relative; padding: clamp(4rem, 9vw, 7rem) 0 clamp(5rem, 10vw, 8rem); }
.reservar__grid { display: grid; gap: 3.5rem; }
.reservar__form h2 { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1; margin-bottom: 1rem; }
.reservar__form > p { max-width: 30rem; }
form { margin-top: 2rem; max-width: 34rem; }
.field { display: grid; gap: .35rem; margin-bottom: 1.25rem; }
.field-row { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
label { font-weight: 500; font-size: .95rem; }
input, select, textarea {
  font: 300 1rem/1.4 var(--font-body); color: var(--ink);
  background: rgba(255, 255, 255, .35);
  border: 0; border-bottom: 1.5px solid var(--palm);
  border-radius: 0; padding: .7rem .2rem; min-height: 48px; width: 100%;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
textarea { resize: vertical; min-height: 6rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.form__error { color: #8A3B2E; font-weight: 400; }
.demo { font-size: .88rem; color: var(--palm-ink); margin-top: 1rem; font-weight: 400; }

.visit { align-self: start; }
.visit h3 { font: 400 1.7rem/1.2 var(--font-display); margin: 0 0 .6rem; }
.visit h3 + p { margin-top: 0; }
.visit p { max-width: 26rem; }
.hours { margin: 0 0 2rem; max-width: 22rem; }
.hours div { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid var(--mist); }
.hours dd { margin: 0; font-variant-numeric: tabular-nums; }
.visit__contact a { display: inline-flex; min-height: 44px; align-items: center; font-weight: 400; text-underline-offset: 4px; }

/* Footer */
.foot { background: var(--ink); color: var(--paper); padding: 3.5rem 0 2.5rem; position: relative; }
.foot__inner { display: grid; gap: .5rem; }
.foot__brand { font: 400 3.4rem/1 var(--font-display); margin: 0 0 .5rem; letter-spacing: .04em; }
.foot__line { color: #DCE0D6; max-width: 34rem; }
.foot__ribbon { font-size: .85rem; margin: 1rem 0 0; }
.foot__ribbon a { display: inline-flex; min-height: 44px; align-items: center; text-underline-offset: 4px; color: var(--ochre); }
.foot :focus-visible { outline-color: var(--paper); }

/* ---------- mobile-first breakpoints ---------- */
@media (max-width: 719px) {
  .top { gap: 0 1rem; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 0 1.1rem; }
  .nav__book { display: none !important; }
  .langs { margin-left: auto; }
  .hero { min-height: 0; align-items: start; }
  .mural { position: relative; inset: auto; height: 68svh; min-height: 26rem; margin-top: 0; overflow: hidden; }
  .hero { display: block; }
  .hero__text { padding-top: 0; margin-top: 2rem; margin-bottom: 3rem; }
  .mural__layer { left: -55%; width: 155%; }
  .hero__title { font-size: clamp(3.4rem, 17vw, 4.6rem); }
}
@media (min-width: 560px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 720px) {
  .hero__text { margin-left: var(--gutter); }
  .mural__layer { left: 12%; width: 88%; }
  .casa__notes { grid-template-columns: 1fr 1fr; }
  .chart__list { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .curl { grid-template-columns: 1fr; grid-template-rows: auto; }
  .curl__art { grid-row: auto; width: 68px; height: 146px; margin-bottom: 1.25rem; }
}
@media (min-width: 720px) and (max-width: 1199px) {
  .mural__layer { left: 44%; width: 56%; -webkit-mask-image: linear-gradient(to right, transparent, #000 22%); mask-image: linear-gradient(to right, transparent, #000 22%); }
  .hero__text { width: min(100% - 2 * var(--gutter), 27rem); }
  .hero__title { font-size: clamp(3.6rem, 8.4vw, 6rem); }
}
@media (min-width: 960px) {
  .casa__grid { grid-template-columns: 1.15fr 1fr; gap: 5rem; align-items: start; }
  .casa__body { padding-top: 7rem; }
  .rizos__head { grid-template-columns: 1.1fr 1fr; align-items: end; gap: 4rem; }
  .chart__row { grid-template-columns: 11rem 1fr; gap: 2rem; padding: 2.5rem 0; }
  .precios__grid { grid-template-columns: 1fr 1.9fr; gap: 4rem; }
  .precios__intro { position: sticky; top: 3rem; padding-top: 2rem; }
  .card__cols { columns: 2; }
  .reservar__grid { grid-template-columns: 1.3fr 1fr; gap: 6rem; }
  .visit { padding-top: 6.5rem; }
}

/* curl strands draw in once per row (main.js adds .can-draw and .drawn) */
.curl__art path { stroke-dasharray: var(--len, 900); stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .can-draw .chart__row:not(.drawn) .curl__art path { stroke-dashoffset: var(--len, 900); }
  .can-draw .curl__art path { transition: stroke-dashoffset 1.8s cubic-bezier(.5, .1, .25, 1); }
  .can-draw .curl:nth-child(2) .curl__art path { transition-delay: .18s; }
  .can-draw .curl:nth-child(3) .curl__art path { transition-delay: .36s; }
}

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

/* 404 */
.lost .top { position: static; }
.lost__main { display: grid; gap: 2rem; align-items: center; padding: 2rem var(--gutter) 5rem; max-width: var(--max); margin: 0 auto; min-height: 70svh; }
.lost__art { width: min(100%, 22rem); height: auto; }
.lost__text h1 { font-family: var(--font-display); font-size: clamp(2.6rem, 7vw, 5.5rem); line-height: 1; margin-bottom: 1rem; }
@media (min-width: 720px) { .lost__main { grid-template-columns: 1fr 1.3fr; } }
.lost .langs { margin-left: auto; }
