:root{
  --basalt:#141619;
  --basalt-2:#1C1F23;
  --shale:#2A2E34;
  --sandstone:#E8E1D4;
  --sand-dim:#A8A192;
  --ochre:#C9A227;
  --clay:#B4744A;
  --ash:#8A8578;
  --mineral:#5E93A0;

  --measure:66ch;
  --gutter:clamp(1.25rem,5vw,4rem);
  --rule:1px solid rgba(232,225,212,.14);
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--basalt);
  color:var(--sandstone);
  font-family:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,serif;
  font-size:clamp(1rem,.96rem + .2vw,1.075rem);
  line-height:1.62;
  -webkit-font-smoothing:antialiased;
}

h1,h2,h3,.ui{
  font-family:"Helvetica Neue",Inter,"Segoe UI",Roboto,system-ui,sans-serif;
  font-stretch:condensed;
}
h1,h2,h3{
  font-weight:700;
  letter-spacing:-.02em;
  line-height:1.04;
  text-wrap:balance;
  margin:0;
}
p{margin:0 0 1em;max-width:var(--measure)}
a{color:inherit}
a:focus-visible,button:focus-visible{
  outline:2px solid var(--mineral);
  outline-offset:3px;
  border-radius:2px;
}

.wrap{max-width:74rem;margin-inline:auto;padding-inline:var(--gutter)}

/* ---------- eyebrow / labels ---------- */
.eyebrow{
  font-family:"Helvetica Neue",Inter,system-ui,sans-serif;
  font-size:.7rem;
  font-weight:700;
  letter-spacing:.22em;
  text-transform:uppercase;
  color:var(--ash);
  margin:0 0 1.5rem;
}

/* ---------- top bar ---------- */
.topbar{
  display:flex;align-items:center;justify-content:space-between;gap:1rem;
  padding-block:1.5rem;
  border-bottom:var(--rule);
}
.mark{
  display:flex;align-items:center;gap:.7rem;
  font-family:"Helvetica Neue",Inter,system-ui,sans-serif;
  font-weight:700;font-size:.95rem;
  letter-spacing:.12em;text-transform:uppercase;
}
.mark svg{display:block;flex:none}

.lang{display:flex;gap:0;border:var(--rule);border-radius:2px;overflow:hidden}
.lang button{
  appearance:none;border:0;background:transparent;
  color:var(--sand-dim);
  font-family:"Helvetica Neue",Inter,system-ui,sans-serif;
  font-size:.72rem;font-weight:700;letter-spacing:.14em;
  padding:.5rem .8rem;cursor:pointer;
  transition:background .18s,color .18s;
}
.lang button+button{border-left:var(--rule)}
.lang button[aria-pressed="true"]{background:var(--sandstone);color:var(--basalt)}
.lang button:hover:not([aria-pressed="true"]){color:var(--sandstone)}

/* ---------- hero ---------- */
.hero{padding-block:clamp(2.25rem,6vh,4rem) clamp(2.75rem,7vh,5rem)}
.hero h1{
  font-size:clamp(2.6rem,1.4rem + 5.6vw,6.1rem);
  max-width:16ch;
}
.hero h1 em{
  font-style:normal;
  display:block;
  color:var(--ash);
}
.hero .lede{
  margin-top:2rem;
  font-size:clamp(1.1rem,1.02rem + .42vw,1.35rem);
  color:var(--sand-dim);
  max-width:52ch;
}

/* ---------- stratigraphic column: the signature ---------- */
.strata{
  padding-block:clamp(3rem,7vh,5rem);
  border-top:var(--rule);
  display:grid;
  grid-template-columns:minmax(0,13rem) minmax(0,1fr);
  gap:clamp(2rem,5vw,4.5rem);
  align-items:start;
}
.column{
  position:sticky;top:2rem;
  display:flex;flex-direction:column;
  border:var(--rule);
  border-radius:2px;
  overflow:hidden;
}
.band{
  position:relative;
  padding:.85rem .9rem;
  font-family:"Helvetica Neue",Inter,system-ui,sans-serif;
  font-size:.66rem;font-weight:700;
  letter-spacing:.16em;text-transform:uppercase;
  color:var(--basalt);
  transition:flex-basis .5s cubic-bezier(.22,1,.36,1);
  flex:0 0 auto;
}
.band:nth-child(1){background:var(--ochre)}
.band:nth-child(2){background:var(--clay);color:var(--sandstone)}
.band:nth-child(3){background:var(--ash)}
.band:nth-child(4){background:var(--mineral);color:var(--basalt)}

/* Bed thickness tapers with depth — only meaningful in the vertical column. */
@media (min-width:56.01rem){
  .band:nth-child(1){height:5.5rem}
  .band:nth-child(2){height:4.75rem}
  .band:nth-child(3){height:4rem}
  .band:nth-child(4){height:3.25rem}
}
.band::after{
  content:attr(data-depth);
  position:absolute;right:.9rem;bottom:.7rem;
  font-size:.6rem;letter-spacing:.1em;opacity:.62;
}

.layers{display:flex;flex-direction:column}
.layer{
  padding-block:clamp(1.6rem,3.5vh,2.4rem);
  border-top:var(--rule);
}
.layer:first-child{border-top:0;padding-top:0}
.layer h3{
  font-size:clamp(1.3rem,1.15rem + .55vw,1.75rem);
  margin-bottom:.7rem;
  display:flex;align-items:baseline;gap:.75rem;
}
.layer h3 .dot{
  flex:none;width:.55rem;height:.55rem;border-radius:50%;
  position:relative;top:-.15em;
}
.layer:nth-child(1) h3 .dot{background:var(--ochre)}
.layer:nth-child(2) h3 .dot{background:var(--clay)}
.layer:nth-child(3) h3 .dot{background:var(--ash)}
.layer:nth-child(4) h3 .dot{background:var(--mineral)}
.layer p{color:var(--sand-dim);margin-bottom:0}

/* ---------- contact ---------- */
.contact{
  padding-block:clamp(3.5rem,8vh,6rem);
  border-top:var(--rule);
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,17rem),1fr));
  gap:clamp(1.75rem,4vw,3.5rem);
}
.contact h2{font-size:clamp(1.9rem,1.5rem + 1.8vw,3rem);max-width:14ch}
.field{margin-bottom:1.6rem}
.field .k{
  font-family:"Helvetica Neue",Inter,system-ui,sans-serif;
  font-size:.66rem;font-weight:700;letter-spacing:.18em;
  text-transform:uppercase;color:var(--ash);
  display:block;margin-bottom:.35rem;
}
.field .v{font-size:1.05rem}
.field .v.wa{display:block;margin-top:.3rem}
.field a{text-decoration:none;border-bottom:1px solid rgba(232,225,212,.28);padding-bottom:1px;transition:border-color .18s,color .18s}
.field a:hover{color:var(--mineral);border-bottom-color:var(--mineral)}
address{font-style:normal}

/* ---------- legal ---------- */
.legal{
  padding-block:clamp(3rem,6vh,4.5rem);
  border-top:var(--rule);
  background:var(--basalt-2);
}
.legal h2{
  font-size:1.35rem;
  margin-bottom:1.75rem;
}
.legal h3{
  font-size:.78rem;font-weight:700;letter-spacing:.16em;text-transform:uppercase;
  color:var(--ochre);
  margin:2rem 0 .7rem;
}
.legal p,.legal li{
  font-size:.9rem;line-height:1.68;color:var(--sand-dim);
  max-width:74ch;
}
.legal ul{padding-left:1.1rem;margin:0 0 1em}
.legal li{margin-bottom:.35rem}
.legal .cols{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,20rem),1fr));
  gap:0 clamp(2rem,5vw,4rem);
}

.site-foot{
  border-top:var(--rule);
  font-family:"Helvetica Neue",Inter,system-ui,sans-serif;
  font-size:.72rem;letter-spacing:.06em;
  color:var(--ash);
}
.foot-inner{
  padding-block:2rem;
  display:flex;flex-wrap:wrap;gap:.6rem 1.5rem;justify-content:space-between;align-items:center;
}
.foot-links{display:flex;gap:1.25rem}
.foot-links a{text-decoration:none;border-bottom:1px solid transparent;padding-bottom:1px}
.foot-links a:hover{color:var(--sandstone);border-bottom-color:var(--sandstone)}

/* ---------- language switching ----------
   :where() keeps these at zero specificity for the *element*, while the
   html[lang] prefix gives the winning rule enough weight to beat component
   rules like `.field .k{display:block}`. Order: hide all, then show one. */
html:not([lang="es"]) :where([data-lang="es"]),
html:not([lang="ca"]) :where([data-lang="ca"]),
html:not([lang="en"]) :where([data-lang="en"]){display:none!important}

/* ---------- motion ---------- */
/* Motion is enhancement only: every element is fully visible by default, and
   JS adds .in when it scrolls into view. Nothing depends on an animation
   having run, so no element can get stranded mid-keyframe. */
@media (prefers-reduced-motion:no-preference){
  /* .js is set by the inline script below; without JS nothing is ever hidden. */
  .js .reveal{opacity:0;transform:translateY(14px);transition:opacity .7s ease,transform .7s cubic-bezier(.22,1,.36,1)}
  .js .reveal.in{opacity:1;transform:none}

  .js .column .band{transform:scaleY(0);transform-origin:top;opacity:0;
    transition:transform .6s cubic-bezier(.22,1,.36,1),opacity .5s ease}
  .js .column.in .band{transform:none;opacity:1}
  .js .column.in .band:nth-child(2){transition-delay:.08s}
  .js .column.in .band:nth-child(3){transition-delay:.16s}
  .js .column.in .band:nth-child(4){transition-delay:.24s}

  /* Horizontal bar: bands are flex:1 1 0, so scaling fights the flex sizing. */
  @media (max-width:56rem){
    .js .column .band,
    .js .column.in .band{transform:none}
  }
}

@media (max-width:56rem){
  .strata{grid-template-columns:1fr}
  .column{position:static;flex-direction:row}
  .band{flex:1 1 0;height:4.5rem;font-size:.58rem;padding:.7rem .55rem;transform-origin:left}
  .band::after{display:none}
}

/* ---------- document pages (legal, privacy) ---------- */
.doc{padding-block:clamp(2.5rem,7vh,4.5rem) clamp(3rem,8vh,5rem);max-width:70ch}
.doc h1{font-size:clamp(2rem,1.5rem + 2.2vw,3.2rem);margin-bottom:2.5rem}
.doc h2{
  font-size:.78rem;font-weight:700;letter-spacing:.16em;text-transform:uppercase;
  color:var(--ochre);
  margin:2.5rem 0 .8rem;
}
.doc p,.doc li{font-size:.95rem;line-height:1.7;color:var(--sand-dim)}
.doc ul{padding-left:1.1rem;margin:0 0 1em}
.doc li{margin-bottom:.4rem}
.doc a{color:var(--sandstone);text-decoration:none;border-bottom:1px solid rgba(232,225,212,.28)}
.doc a:hover{color:var(--mineral);border-bottom-color:var(--mineral)}
a.mark{text-decoration:none;color:inherit}
