/* Corporación LAGUS · direction: the name as a monument · type Barlow Condensed / Barlow
   Palette: dealt proportions (near-black ground, white middle, one accent) with the brand's own colours
   (DISPLAN navy and gold, logo grey). */

:root {
  --bg: #0b1727;
  --surface: #14253c;
  --ink: #ffffff;
  --muted: #a6afb9;
  --accent: #c99736;
  --accent-ink: #0b1727;
  --field-1: #1c416f;  --field-1-ink: #ffffff;
  --field-2: #f5f7f9;  --field-2-ink: #1c2b3a;
  --field-2-muted: #5a6673;

  --tone-1: #0f2340;
  --tone-2: #1c416f;
  --tone-3: #2f5a8c;
  --tone-4: #4f7bab;
  --tone-5: #7fa3c9;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-text: "Barlow", system-ui, sans-serif;

  --step-head: clamp(2.5rem, 1.2rem + 5vw, 5.5rem);
  --step-display: clamp(4rem, 28vw, 30rem);
  --radius: 0px;
  --margin: clamp(1rem, 2.2vw, 2rem);
}

html { overflow-x: clip; }
body { background: var(--bg); color: var(--ink); overflow-x: clip; }
.hero-band, .foot-bottom { overflow-x: clip; }
main { position: relative; z-index: 1; background: var(--bg); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 0.9; }
.h-small { font-size: 2rem; line-height: 1; letter-spacing: -0.01em; }
.head { font-size: var(--step-head); line-height: 0.9; }
.lead { font-size: var(--step-lead); line-height: 1.35; max-width: 40ch; }
.button { font-weight: 500; min-height: 3.25rem; padding: 0 1.6rem; }
.button:hover { background: var(--ink); color: var(--bg); }
.link { text-decoration-color: transparent; }
a:hover { text-decoration-color: currentColor; }

/* ---------- top ---------- */
.top { position: absolute; inset: 0 0 auto 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding-block: 1.25rem; padding-right: calc(var(--margin) + 13.5rem); color: #fff; }
@media (max-width: 47.99em) { .top { padding-right: var(--margin); } }
@media (min-width: 48em) and (max-width: 63.99em) { .top { padding-right: calc(var(--margin) + 13.5rem); } }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: var(--step-lead); letter-spacing: 0; white-space: nowrap; }
@media (max-width: 47.99em) { .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }
.brand img { width: 2.6rem; height: auto; filter: brightness(0) invert(1); }
.links { display: none; gap: 1.6rem; font-size: var(--step-body); }
.links a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .22em; }
@media (min-width: 64em) { .links { display: flex; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; background: var(--surface); }
.hero-pictures { position: absolute; inset: 0; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; opacity: 0; }
.hero-img.is-first { opacity: 1; }
.hero-band { position: relative; z-index: 2; width: 100%; padding-top: 7rem; padding-bottom: 1rem; display: grid; grid-template-columns: 1fr; grid-template-rows: auto auto; align-items: end; }
.hero-line { grid-row: 1; grid-column: 1; }
.hero-action { position: absolute; top: 1.1rem; right: var(--margin); z-index: 6; }
.monument { grid-row: 2; }
.hero-band::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; top: 6rem; background: rgba(11, 23, 39, .58); z-index: -1; }
.hero-line { font-size: max(1.125rem, var(--step-body)); line-height: 1.4; max-width: 34ch; color: #fff; margin-bottom: 1.25rem; }
.monument { grid-column: 1 / -1; font-size: var(--step-display); line-height: .8; letter-spacing: -0.02em; text-transform: uppercase; color: #fff; white-space: nowrap; margin-bottom: -0.04em; width: 100%; text-align: left; }
@media (max-width: 47.99em) {
  .hero-band { grid-template-columns: 1fr; padding-top: 6rem; }
  .hero-line { max-width: 30ch; grid-column: 1; }
  .monument { grid-row: 2; }
  .hero-band::before { background: rgba(11, 23, 39, .62); }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(6rem, 12vw, 12rem); }

/* services · one-size name columns */
.services h2 { margin-bottom: clamp(3rem, 6vw, 6rem); }
.services-grid { display: grid; grid-template-columns: 1fr; row-gap: 2.5rem; }
.svc-group h3 { font-family: var(--font-text); font-weight: 500; font-size: var(--step-body); line-height: 1.3; letter-spacing: 0; margin-bottom: .9rem; }
.svc-list { display: grid; row-gap: .35rem; }
.svc-list li { color: var(--muted); font-size: var(--step-body); line-height: 1.35; cursor: default; transition: color var(--t-hover) ease; }
.svc-list li:hover, .svc-list li:focus-visible, .svc-list li.is-hot { color: var(--ink); outline: none; }
.svc-sum { margin-top: 1rem; color: var(--muted); max-width: 32ch; }
.svc-desc { display: none; }
@media (min-width: 48em) {
  .services-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 0; }
  .svc-group:nth-child(1) { grid-column: 1 / span 3; }
  .svc-group:nth-child(2) { grid-column: 4 / span 3; }
  .svc-group:nth-child(3) { grid-column: 7 / span 3; }
  .svc-desc { display: block; grid-column: 10 / span 3; align-self: start; position: sticky; top: 6rem; font-size: var(--step-body); line-height: 1.4; color: var(--ink); }
  .svc-desc p { max-width: 28ch; }
  .svc-list li { line-height: 1.3; }
  .svc-sum { display: none; }
}

/* work · big names, fixed preview */
.work h2 { margin-bottom: 3rem; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.work-list { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.work-row { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: .4rem; padding-block: .5rem; min-width: 0; }
.work-row > * { min-width: 0; }
.work-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.75rem, 8vw, 6.2rem); line-height: 1; letter-spacing: -0.02em; text-align: left; color: var(--muted); transition: color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.work-name:hover, .work-name:focus-visible { color: var(--ink); }
.work-row.is-active .work-name { color: var(--ink); }
.work-name:active { transform: translateX(4px); }
.work-meta { font-size: var(--step-small); color: var(--muted); }
.ficha { background: var(--field-1); color: var(--field-1-ink); padding: 1.25rem; display: grid; align-content: end; row-gap: .5rem; }
.ficha p { max-width: 36ch; }
.ficha-place { font-family: var(--font-display); font-weight: 700; font-size: var(--step-lead); line-height: 1; letter-spacing: -0.01em; }
.ficha-years { color: #cfd8e3; font-size: var(--step-small); }
.ficha-photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: .5rem; }
.ficha-inline { aspect-ratio: 16 / 10; order: -1; margin-bottom: .75rem; }
.ficha-inline .ficha-years { order: -1; }
.ficha-inline .ficha-place { order: -2; }
.ficha-inline.ficha-photo { aspect-ratio: auto; }
.work-frame { display: none; }
@media (min-width: 48em) {
  .work-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
  .work-list { grid-column: 1 / span 8; }
  .work-row { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 1.5rem; padding-block: .625rem; }
  .work-meta { text-align: right; max-width: 22ch; }
  .ficha-inline { display: none; }
  .work-frame { display: block; grid-column: 9 / span 4; position: sticky; top: 15vh; align-self: start; aspect-ratio: 4 / 5; }
  .work-frame .ficha { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 200ms ease, visibility 0s 200ms; padding: 1.5rem; }
  .work-frame .ficha.is-active { opacity: 1; visibility: visible; transition-delay: 0s; }
  .work-frame .ficha-photo img { aspect-ratio: 4 / 3; }
}

/* process · accordion of tinted panels + chooser */
.process { background: var(--field-2); color: var(--field-2-ink); }
.process .muted { color: var(--field-2-muted); }
.process-intro { display: grid; grid-template-columns: 1fr; row-gap: 2rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.process-copy { display: grid; row-gap: 1.5rem; }
.process .lead { max-width: 36ch; }
.chooser { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chooser legend { font-weight: 500; margin-bottom: .75rem; }
.chooser label { position: relative; display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem; background: #e3e8ee; color: var(--field-2-ink); cursor: pointer; font-size: var(--step-body); transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.chooser label:hover { background: #d3dbe4; }
.chooser label:active { transform: scale(.97); }
.chooser input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chooser label:has(input:checked) { background: var(--field-1); color: #fff; }
.chooser label:has(input:focus-visible) { outline: 2px solid var(--field-1); outline-offset: 3px; }
.chooser-text { max-width: 46ch; min-height: 3lh; }
.chooser-action { justify-self: start; }
@media (min-width: 48em) {
  .process-intro { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
  .process-intro h2 { grid-column: 1 / span 5; }
  .process-copy { grid-column: 7 / span 6; }
}

.acc { display: flex; flex-direction: column; }
.acc-panel { background: var(--tone); color: #fff; display: grid; grid-template-rows: auto 0fr; transition: grid-template-rows 450ms var(--ease-in-out); overflow: hidden; }
.acc-panel.is-open { grid-template-rows: auto 1fr; }
.acc-panel:nth-child(4), .acc-panel:nth-child(5) { color: var(--field-2-ink); }
.acc-panel:nth-child(4) .acc-body p, .acc-panel:nth-child(5) .acc-body p { color: var(--field-2-ink); }
.acc-head { width: 100%; text-align: left; min-height: 4rem; padding: 0 1.25rem; display: flex; align-items: center; color: inherit; }
.acc-name { font-family: var(--font-display); font-weight: 700; font-size: var(--step-lead); letter-spacing: -0.01em; }
.acc-body { min-height: 0; overflow: hidden; }
.acc-body > * { padding: 0 1.25rem 1.25rem; }
.acc-body p { max-width: 36ch; }
.acc-fig { padding: 0; }
.acc-fig img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.acc-fig figcaption { padding: .5rem 1.25rem 1.25rem; font-size: var(--step-small); }
@media (min-width: 48em) {
  .acc { flex-direction: row; height: 520px; }
  .acc-panel { flex: 0 0 0; flex-basis: 0; flex-grow: 1; display: block; transition: flex-grow 450ms var(--ease-in-out); position: relative; min-width: 0; }
  .acc-panel.is-open { flex-grow: 7; }
  .acc-head { position: absolute; inset: 0; min-height: 0; padding: 0; align-items: flex-end; z-index: 2; }
  .acc-panel:not(.is-open) .acc-name { writing-mode: vertical-rl; transform: rotate(180deg); padding: 1.25rem .9rem; white-space: nowrap; }
  .acc-panel.is-open .acc-head { pointer-events: none; }
  .acc-panel.is-open .acc-name { position: absolute; top: 1.5rem; left: 1.75rem; font-size: 2rem; line-height: .9; }
  .acc-body { position: absolute; inset: 0; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; opacity: 0; visibility: hidden; transition: opacity 300ms ease 150ms, visibility 0s 450ms; }
  .acc-panel.is-open .acc-body { opacity: 1; visibility: visible; transition-delay: 150ms, 0s; }
  .acc-body p { align-self: end; padding: 0 1.75rem 1.75rem; max-width: 34ch; }
  .acc-fig { grid-column: 2; height: 100%; display: grid; grid-template-rows: 1fr auto; padding: 0; }
  .acc-fig img { height: 100%; aspect-ratio: auto; }
  .acc-fig figcaption { padding: .5rem 1.25rem .9rem; }
  .acc-body:not(:has(.acc-fig)) p { grid-column: 1 / span 2; max-width: 40ch; }
}

/* about · side facts, wide paragraph */
.about-row { display: grid; grid-template-columns: 1fr; row-gap: 2rem; }
.about-row-2 { margin-top: clamp(4rem, 8vw, 7.5rem); }
.about-side h2 { margin-bottom: 1.5rem; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1rem; }
.facts dt { color: var(--muted); font-size: var(--step-small); }
.facts dd { font-size: var(--step-body); }
.about-par { font-size: var(--step-lead); line-height: 1.35; max-width: 60ch; }
.about-label { font-size: var(--step-small); color: var(--muted); }
.about-lists { display: grid; grid-template-columns: 1fr; gap: 2.5rem 4rem; }
.rec li { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--step-small); line-height: 1.35; padding-block: .3rem; }
.rec li span:last-child { color: var(--muted); text-align: right; white-space: nowrap; }
@media (min-width: 48em) {
  .about-row { grid-template-columns: 34% 1fr; column-gap: var(--gutter); }
  .facts { grid-template-columns: 1fr; width: 11rem; row-gap: 1.25rem; }
  .about-par { max-width: none; width: 90%; }
  .about-lists { grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: space-between; }
}

/* band · archive picture */
.band { position: relative; background: #d9c9a6; color: var(--field-2-ink); }
.band-fig img { width: 100%; height: auto; max-height: 100svh; object-fit: cover; object-position: 50% 30%; }
.band-text { padding-block: clamp(3rem, 6vw, 5rem); display: grid; row-gap: 1.25rem; }
.band .lead { max-width: 44ch; }
@media (min-width: 48em) {
  .band-text { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; }
  .band-text h2 { grid-column: 1 / span 5; }
  .band-text p { grid-column: 7 / span 6; }
}

/* contact · address in display rows */
.contact { padding-block: clamp(5rem, 10vw, 10rem) 0; }
.contact h2 { margin-bottom: 2rem; }
.rows { display: grid; }
.row { display: grid; align-items: end; min-height: 84px; font-family: var(--font-display); font-weight: 500; font-size: clamp(2.25rem, 8.6vw, 5.5rem); line-height: 1; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.row:nth-child(odd) { background: var(--surface); }
.row > * { display: block; padding-block: .6rem .55rem; text-decoration: none; }
.row a:hover { text-decoration: underline; text-underline-offset: .1em; text-decoration-thickness: .04em; }
.row-greet { background: var(--accent) !important; color: var(--accent-ink); }
.row-greet > span { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.round { display: inline-grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--accent-ink); color: var(--accent); transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.round:hover { background: #fff; }
.round:active { transform: scale(.94); }
@media (min-width: 48em) {
  .row { min-height: 150px; font-size: clamp(2.5rem, 6vw, 5.5rem); }
  .round { width: .9em; height: .9em; }
  .round svg { width: .42em; height: .42em; }
}

/* footer · columns above, wordmark below (inverted) */
.foot { position: relative; background: var(--field-2); color: var(--field-2-ink); display: grid; }
.foot .muted { color: var(--field-2-muted); }
.foot a { color: inherit; }
.foot-grid { display: grid; grid-template-rows: auto auto auto; row-gap: 3rem; padding-block: 2.5rem 1.25rem; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 2rem; align-items: start; }
@media (min-width: 48em) { .foot-top { grid-template-columns: minmax(0, 1fr) auto; column-gap: 1.5rem; } }
.foot-top .link-plain { white-space: nowrap; }
@media (min-width: 64em) { .foot-grid { grid-template-rows: auto 1fr auto; min-height: 100svh; } }
.foot-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; font-size: var(--step-small); line-height: 1.5; overflow-wrap: anywhere; }
.foot-cols p { margin: 0; }
.foot-marks { align-self: center; justify-self: start; }
.foot-marks img { width: min(420px, 70vw); height: auto; background: transparent; }
.foot-bottom { display: grid; row-gap: 1rem; }
.foot-word { font-family: var(--font-display); font-weight: 700; font-size: var(--step-display); line-height: .8; letter-spacing: -0.02em; white-space: nowrap; color: var(--field-1); width: 100%; }
.foot-bottom .small { max-width: 72ch; color: var(--field-2-muted); line-height: 1.5; }
@media (min-width: 64em) {
  .foot-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); font-size: var(--step-body); }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* signature: slow crossfade of three views of Huehuetenango, with a slow drift */
  .js .hero-img { animation: hero-fade 21s infinite ease-in-out; transform-origin: 50% 40%; }
  .js .hero-img:nth-child(1) { animation-delay: 0s; }
  .js .hero-img:nth-child(2) { animation-delay: 7s; }
  .js .hero-img:nth-child(3) { animation-delay: 14s; }
  .js .hero.is-paused .hero-img { animation-play-state: paused; }
  @keyframes hero-fade {
    0% { opacity: 0; transform: scale(1.06); }
    6% { opacity: 1; }
    33.3% { opacity: 1; transform: scale(1); }
    39.3% { opacity: 0; }
    100% { opacity: 0; transform: scale(1.06); }
  }
  .js .hero-img.is-first { opacity: 1; }
  .js [data-reveal] { transition-delay: calc(var(--i, 0) * 80ms); }
  .js .work-row[data-reveal] { transition-delay: calc(var(--i, 0) * 60ms); }
  .js .row[data-reveal] { transform: translateY(24px); }
  .js .svc-list li { transition: color var(--t-hover) ease, transform var(--t-ui) var(--ease-out); }
  .js .svc-list li:hover { transform: translateX(6px); }
  .button:hover { transform: translateY(-2px); }
  .link:hover { text-underline-offset: .3em; transition: text-underline-offset var(--t-ui) var(--ease-out), text-decoration-color var(--t-hover) ease; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-img:not(.is-first) { display: none; }
}
