/* ================= PAGE TRANSITION ================= */
#app { position: relative; z-index: 1; background: var(--black); }
[hidden] { display: none !important; }
/* forms: a trap field bots fill and people never see, and the sending / sent / error line */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { min-height: 1.4em; margin-top: 12px; font-size: 16px; line-height: 1.4; }
.form-status:empty { margin-top: 0; }
.form-status.ok::before { content: '✓ '; font-weight: 900; }
.form-status.err { color: #B3261E; }
.form-status a { text-decoration: underline; text-underline-offset: 3px; }
form.sending button[type="submit"] { opacity: 0.55; pointer-events: none; }
.pt { position: fixed; inset: 0; z-index: 200; pointer-events: none; display: none; }
.pt.on { display: block; }
.pt.leave { pointer-events: auto; }
.pt.enter { z-index: 0; }
.pt-a, .pt-b { position: absolute; inset: 0; display: grid; place-items: center; }
.pt-a { background: #D4D4D2; }
.pt-b { background: var(--black); color: var(--white); }
.pt.enter .pt-a { display: none; }
.pt-label { display: block; overflow: hidden; font-size: clamp(64px, 14vw, 260px); line-height: 0.9; padding: 0.06em 0.04em 0; }
.pt-label .ch { display: inline-block; }
html.pt-enter body { background: var(--black); }
html.pt-enter #app { clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%); }
/* first visit: the W peeks in, then drags a yellow curtain across and the page appears behind it */
html.intro body { background: var(--black); }
html.intro #app { visibility: hidden; }
.intro { position: fixed; inset: 0; z-index: 300; cursor: pointer; }
.intro-black, .intro-curtain { position: absolute; inset: 0; }
.intro-black { background: var(--black); }
.intro-curtain { background: var(--accent); clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); }
.intro-w { position: absolute; left: 50%; top: 50%; width: clamp(150px, 24vw, 340px); }
.intro-mask { overflow: hidden; padding: 6% 3% 2%; }
.intro-mask img { display: block; width: 100%; height: auto; }
.intro-bar { height: clamp(6px, 0.8vw, 12px); margin: 6% 3% 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* the current page in the menu is set in italic, as in the reference */
.nav-links a[aria-current="page"], .sheet a[aria-current="page"] { font-style: italic; }

/* ================= SUBPAGE HERO ================= */
.page-hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--nav-h) + 48px) var(--m) 32px; overflow: clip; }
.ph-title { font-size: clamp(60px, 11.6vw, 220px); text-align: center; }
.ph-row { display: block; overflow: hidden; padding: 0.04em 0 0.02em; margin: -0.04em 0; white-space: nowrap; }
.ph-row > span { display: inline-flex; align-items: center; gap: 0.08em; }
.tile { display: inline-block; width: 1.5em; height: 0.82em; overflow: hidden; flex: none; clip-path: polygon(18% 0, 100% 0, 82% 100%, 0 100%); background: #333; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; }
.ph-foot { margin-top: 48px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.ph-lead { font-size: var(--s-lead); line-height: 1.35; max-width: 48ch; }
.crumbs { display: flex; gap: 10px; font-stretch: 62%; font-weight: 900; text-transform: uppercase; font-size: 18px; }
.crumbs a { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 700px) {
  .ph-title { font-size: 13.4vw; }
  .tile { width: 1.3em; }
}

/* ================= CTA BAND ================= */
.band { padding: 140px var(--m); display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.band h2 { font-size: clamp(56px, 9vw, 170px); }
.band p { margin-top: 20px; font-size: var(--s-lead); max-width: 44ch; line-height: 1.4; }
@media (max-width: 760px) { .band { grid-template-columns: 1fr; padding: 96px var(--m); } }

/* ================= CASES (trabajos) ================= */
.cases { padding: 40px var(--m) 140px; display: grid; gap: clamp(96px, 10vw, 160px); }
.case { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(24px, 4vw, 64px); align-items: center; scroll-margin-top: calc(var(--nav-h) + 24px); }
.case:nth-child(even) { grid-template-columns: 5fr 7fr; }
.case:nth-child(even) .case-shot { order: 2; }
.case-shot { aspect-ratio: 1600 / 740; position: relative; overflow: hidden; background: #1a1a1a; }
.case-shot > .tc { position: absolute; inset: 0; padding: 6%; }
.case-shot .tc-name { font-size: clamp(48px, 7vw, 120px); }
.case-shot .tc-sub { font-size: 16px; }
.case-num { font-stretch: 62%; font-weight: 900; text-transform: uppercase; font-size: 18px; color: var(--grey-on-black); }
.case h2 { font-size: clamp(48px, 1rem + 4.2vw, 104px); margin: 8px 0 20px; }
.case p { font-size: var(--s-body); line-height: 1.55; max-width: 46ch; }
.case dl { margin-top: 24px; display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; font-size: 16px; }
.case dt { font-stretch: 62%; font-weight: 900; text-transform: uppercase; font-size: 18px; }
.case dd { color: #D6D6D2; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.chips span { height: 36px; display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--rule-dark); font-stretch: 62%; font-weight: 900; text-transform: uppercase; font-size: 16px; } /* taste-skill-ignore: reference chips */
@media (max-width: 860px) {
  .case, .case:nth-child(even) { grid-template-columns: 1fr; }
  .case:nth-child(even) .case-shot { order: 0; }
}

/* ================= PRINCIPLES (nosotros) ================= */
.principles { padding: 140px var(--m); }
.principles h2 { font-size: var(--s-head); margin-bottom: 56px; }
.pr-list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.pr-list li { background: #E6E6E2; padding: 28px; min-height: 280px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.pr-list b { font-stretch: 62%; font-weight: 900; text-transform: uppercase; font-size: clamp(32px, 1rem + 2vw, 56px); line-height: 0.92; }
.pr-list p { font-size: 17px; line-height: 1.5; }
@media (max-width: 960px) { .pr-list { grid-template-columns: 1fr; } .pr-list li { min-height: 0; } }

/* ================= CONTACT PAGE ================= */
.cform-sec { scroll-margin-top: var(--nav-h); padding: 120px var(--m) 140px; display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 96px); align-items: start; }
.cform-sec h2 { font-size: var(--s-head); }
.cform-side p { margin-top: 20px; font-size: var(--s-body); line-height: 1.55; max-width: 40ch; }
.cform-side dl { margin-top: 40px; display: grid; gap: 18px; }
.cform-side dt { font-stretch: 62%; font-weight: 900; text-transform: uppercase; font-size: 18px; }
.cform-side dd { font-size: var(--s-lead); }
.cform-side dd a { text-decoration: underline; text-underline-offset: 4px; }
.cform { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cform label { display: grid; gap: 8px; font-stretch: 62%; font-weight: 900; text-transform: uppercase; font-size: 18px; }
.cform .full { grid-column: 1 / -1; }
.cform input, .cform select, .cform textarea {
  font: inherit; font-stretch: 100%; font-weight: 400; text-transform: none; font-size: 17px; color: var(--black);
  background: #E6E6E2; border: 2px solid transparent; padding: 16px; min-height: 56px; width: 100%; border-radius: 0;
  transition: border-color .2s ease, background-color .2s ease;
}
.cform textarea { min-height: 160px; resize: vertical; }
.cform input:focus, .cform select:focus, .cform textarea:focus { outline: none; border-color: var(--black); background: #fff; }
.cform-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.btn.ghost { background: transparent; color: var(--black); box-shadow: inset 0 0 0 2px var(--black); } /* taste-skill-ignore: outlined secondary button of the reference */
@media (max-width: 860px) { .cform-sec { grid-template-columns: 1fr; } .cform { grid-template-columns: 1fr; } }

/* ================= REAL PROJECT SCREENSHOTS ================= */
.wcard .shot { aspect-ratio: 1600 / 740; background: #1a1a1a; }
.wcard .shot img { object-position: center top; }
.case-media { position: relative; }
.case-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.case-second { position: absolute; right: -4%; bottom: -16%; width: 46%; aspect-ratio: 1600 / 750; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); } /* taste-skill-ignore: a floating second screen */
.case-second img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.case:nth-child(even) .case-second { right: auto; left: -4%; }
.ui-browser .ui-shot { display: block; width: 100%; height: auto; }
@media (max-width: 860px) {
  .case-second { position: relative; right: auto; left: auto !important; bottom: auto; width: 70%; margin: -12% 0 0 auto; }
}

/* ================= SAFE MARGINS ON PHONES AND TABLETS ================= */
/* "DI HOLA" is sized from the width left between the two margins, so it never touches an edge */
.hello { font-size: calc((100vw - 2 * var(--m)) / 2.98); padding-left: var(--m); padding-right: var(--m); }
@media (min-width: 701px) and (max-width: 1100px) { .stack { font-size: 9.4vw; } }
@media (max-width: 700px) {
  .ph-title { font-size: 11.8vw; }
  .tile { width: 1.15em; }
  .stack { font-size: 11.4vw; }
  /* studio facts: one per line, figure beside its note */
  .about-facts { grid-template-columns: 1fr; gap: 14px; }
  .about-facts > div { display: grid; grid-template-columns: 8.6rem 1fr; align-items: baseline; gap: 12px; }
  .about-facts b { font-size: 40px; }
  /* footer: cities and details stacked, each with the full width */
  .foot-r { grid-template-columns: 1fr; gap: 32px; }
  .cities li { font-size: 36px; }
  .foot-det p { font-size: 16px; }
  .foot-links { gap: 10px 16px; }
}

/* ================= SCROLL CUE (subpage heroes) =================
   A plain-language hint for anyone who doesn't know the page continues below.
   It says what to do with the device in hand, it is a button that scrolls for you,
   and it fades away once the visitor starts moving. */
.cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: none; border: 0; color: inherit; cursor: pointer; font: inherit;
  padding: 12px 20px; min-width: 44px; min-height: 44px; text-align: center;
  transition: opacity .5s ease, transform .5s var(--ease-out);
}
.cue.gone { opacity: 0; transform: translate(-50%, 16px); pointer-events: none; }
.cue-text { font-size: 18px; font-weight: 500; line-height: 1.3; max-width: 22ch; }
.cue-touch { display: none; }
.cue-mouse { display: block; width: 26px; height: 40px; border: 2.5px solid currentColor; border-radius: 14px; position: relative; }
.cue-mouse i { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: currentColor; animation: cue-wheel 1.6s var(--ease-out) infinite; }
.cue-hand { display: none; width: 26px; height: 44px; border: 2.5px solid currentColor; border-radius: 6px; position: relative; }
.cue-hand i { position: absolute; left: 50%; bottom: 6px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: currentColor; animation: cue-swipe 1.6s var(--ease-out) infinite; }
.cue-arrow { font-size: 28px; line-height: 1; animation: cue-bounce 1.6s ease-in-out infinite; }
@keyframes cue-wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes cue-swipe { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 75% { transform: translateY(-20px); opacity: 0; } 100% { opacity: 0; } }
@keyframes cue-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
@media (hover: hover) and (pointer: fine) { .cue:hover .cue-text { text-decoration: underline; text-underline-offset: 4px; } }
@media (prefers-reduced-motion: reduce) { .cue-mouse i, .cue-hand i, .cue-arrow { animation: none; } }
/* touch screens: the finger hint replaces the mouse hint (declared after both icons so it wins) */
@media (hover: none), (pointer: coarse) { .cue-desk, .cue-mouse { display: none; } .cue-touch { display: inline; } .cue-hand { display: block; } }
/* keep the hero's content clear of the cue */
.page-hero { padding-bottom: 190px; }
@media (max-height: 640px) { .cue { display: none; } .page-hero { padding-bottom: 32px; } }

/* ================= LOGO ================= */
.wordmark { display: inline-flex; align-items: center; line-height: 0; }
.wordmark img { display: block; height: 26px; width: auto; }
.foot-logo img { height: 34px; }
.pt-in { display: flex; flex-direction: column; align-items: center; gap: clamp(16px, 2.4vw, 32px); }
.pt-logo { display: block; width: clamp(72px, 9vw, 140px); height: auto; }
@media (max-width: 960px) { .wordmark img { height: 22px; } }
@media (max-width: 700px) { .wordmark img { height: 18px; } .foot-logo img { height: 26px; } }
