/*
 * Ignasi Calvo · adaptations to the approved CSS.
 * base.css and mobile.css are literal copies of assets/source/01-home-landing-unica/ (diff them against source/).
 * Everything that is not in the approved design goes here, only with the tokens of base.css :root.
 */

/* 1. Self-hosted fonts --------------------------------------------------------------------------------------
 * woff2 converted from the TTF of the delivery with ./bin/woff2: one file per weight with the subset
 * latin + latin-ext + cyrillic (the factory tool does not split them), so es/ca/en/ru share the same files.
 * Onest 400 and 600 are preloaded in layouts/base.blade.php. The google fonts embed of the README is ignored.
 */
@font-face{font-family:'Onest';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/onest-400.woff2') format('woff2')}
@font-face{font-family:'Onest';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/onest-500.woff2') format('woff2')}
@font-face{font-family:'Onest';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/onest-600.woff2') format('woff2')}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/jetbrains-mono-500.woff2') format('woff2')}

/* 2. <picture> is transparent to layout: the class goes on the <img>, so the approved selectors
 * (.crop img, .hero__img, .project-card__img with height:100%…) apply as on the bare <img> of the design. */
picture{display:contents}

/* 3. Carousel arrows stay hidden until site.js enables them: mobile.css gives .carousel-nav display:flex,
 * which would beat the browser's [hidden] rule. */
.carousel-nav[hidden]{display:none}
/* site.js marks the arrow of each end with aria-disabled (for screen readers). The approved CSS has no disabled
 * state, so the arrow keeps the approved look (qa-fix-1-1: the earlier opacity:.4 was flagged by visual QA);
 * only the cursor changes. */
.carousel-nav__btn[aria-disabled="true"]{cursor:default}

/* 4. Header (step 01-header) ---------------------------------------------------------------------------------
 * REVIEW: the stuck state, the solid variant and the open mobile panel have no approved design; they reuse the
 * approved .is-stuck look (ink background, brand visible) and only base.css tokens.
 */
/* The toggle is <a href="#mobile-menu"> (opens the panel with :target without JS) instead of the <button> of the
 * design: same class and look, without the link underline. */
.menu-toggle{text-decoration:none}
/* Stuck: the approved CSS only gives the background; site.js adds .is-stuck when the hero leaves the viewport.
 * The header is absolute over the hero, so switching to fixed does not move the page (CLS 0). */
.site-header.is-stuck{position:fixed}
/* Solid: privacy and 404 have no hero, so white text over sand would not read. Same look as .is-stuck, sticky. */
.site-header--solid{position:sticky;background:var(--color-ink)}
.site-header--solid .site-header__brand{display:block}
html.is-menu-locked{overflow:hidden}
/* "Close" link of the mobile panel (owner: keep it on mobile, never on desktop). Only shown inside the open panel.
 * .main-nav prefix: base.css ".main-nav a{display:flex}" (0,1,1) would beat a bare ".menu-close" and show it. */
.main-nav .menu-close{display:none}

/* Brand + toggle + 4-language switcher do not fit in one row below ~500 px: the brand (visible only when the
 * header is stuck or solid) is hidden there; the hero, the menu and the footer already carry the name. */
@media (max-width: 499px){
  .site-header.is-stuck .site-header__brand,.site-header--solid .site-header__brand{display:none}
}
@media (max-width: 767px){
  /* Open panel: full screen, ink background, under the header bar (toggle and switcher stay on top and usable). */
  .site-header__brand,.menu-toggle,.site-header .lang-switch{position:relative;z-index:1}
  .main-nav:target,.site-header.is-menu-open .main-nav{display:flex;flex-direction:column;position:fixed;inset:0;z-index:0;overflow-y:auto;padding:calc(68px + var(--space-5)) var(--space-4) var(--space-6);background:var(--color-ink)}
  .main-nav:target ul,.site-header.is-menu-open .main-nav ul{flex-direction:column;gap:0;padding:0;border-radius:0;background:none}
  .main-nav:target ul a,.site-header.is-menu-open .main-nav ul a{min-height:48px;padding:var(--space-2) 0;border-radius:0;border-bottom:1px solid var(--color-ink-2);color:var(--color-text-invert);font-size:22px;font-weight:600}
  .main-nav a:focus-visible{outline-color:var(--color-focus)}
  .main-nav:target .menu-close,.site-header.is-menu-open .menu-close{display:inline-flex;align-items:center;align-self:flex-start;min-height:48px;margin-top:var(--space-4);padding:0;color:var(--color-text-invert);font-size:16px;font-weight:600;text-decoration:underline;text-underline-offset:5px}
}

/* 5. Hero (step 02-hero) ---------------------------------------------------------------------------------------
 * INTENTIONAL DIFFERENCE for QA: the approved CSS fixes the hero at 900 px (--hero-h) with px framing of the photos;
 * the owner asked for 100vh with the photos centred in cover (liquid). Desktop and tablet only: mobile keeps the
 * approved stacked halves of 430 px.
 * min-height: below ~760 px the centred H1 (top:60%) would run into the CTAs at the bottom of each half.
 * + var(--overlap): .dev-intro climbs 48 px over the hero (approved rounded overlap). With a bare 100vh that strip of
 * light panel showed at the bottom of the first screen (owner: "1 cm of white"); now the hero fills the whole
 * viewport and the rounded panel starts right below the fold. The bottom padding of .hero__half already counts it.
 */
@media (min-width: 768px){
  .hero{height:calc(100vh + var(--overlap));height:calc(100svh + var(--overlap));min-height:760px}
}
/* Desktop: cover centred instead of the fixed px framing (1350 / 1977 px). Tablet already uses cover in base.css,
 * with its own approved object-position, which stays. */
@media (min-width: 1101px){
  .hero__half .hero__img{left:0;top:0;width:100%;height:100%;object-fit:cover;object-position:50% 50%}
}

/* 6. Mobile accordions (details module of site.js) -------------------------------------------------------------
 * REVIEW: mobile.css hides the content of these <details> unconditionally, so they would never open. The approved
 * CSS has no open state: the content shows again with [open] and the + icon turns into − (its vertical bar
 * rotates back onto the horizontal one). site.js keeps them open on desktop and closed on mobile.
 * 07-why-me: .reason. 12-adventure-services: .offer-card__more (the list shows again and the chevron, pointing
 * down when closed, turns to point up). 15-on-the-road: .about__more ("Read more": the second paragraph shows
 * again and the chevron turns to point up, as in 12).
 */
@media (max-width: 767px){
  .reason[open] .reason__text{display:block}
  .reason[open] .reason__icon::after{transform:translate(-50%,-50%)}
  .offer-card__more[open] .offer-card__list{display:block}
  .offer-card__more[open] .chev{transform:rotate(-135deg) translateY(-3px)}
  .about__more[open] .about__p{display:block}
  .about__more[open] .chev{transform:rotate(-135deg) translateY(-3px)}
}

/* 6b. Technical skills list (changes-4) -------------------------------------------------------------------------
 * INTENTIONAL DIFFERENCE for QA: the approved base.css sets .caps__list li at 17px. With the owner's final list of
 * 12 longer items (changes-3), the owner asked for 12px on desktop so they fit in the approved 2-column grid
 * (~217 px per column at 1440). Same rule for the 4 languages; mobile keeps the 16px of mobile.css.
 */
@media (min-width: 768px){
  .caps__list li{font-size:12px}
}

/* 7. Legal pages (step privacy-page) ---------------------------------------------------------------------------
 * REVIEW: no approved design. Reading column on the sand body, under the solid header, with base.css tokens only:
 * H1 at the .h2 size (44 → 30 px on mobile through the mobile.css tokens), H2 at the card-title size, body text at
 * --fs-body, warm muted tones and lines (the page sits on --color-sand), links underlined in the text colour.
 */
.legal{max-width:var(--bio-text-w);padding-block:var(--space-9) var(--space-section)}
.legal__title{font-size:var(--fs-h2);line-height:1.08;letter-spacing:-.025em;font-weight:600}
.legal__updated{margin-top:var(--space-4);font-family:var(--font-mono);font-size:var(--fs-small);font-weight:500;color:var(--color-text-warm-muted)}
.legal__intro{margin-top:var(--space-5);font-size:var(--fs-lead);line-height:1.55;color:var(--color-text-warm-muted)}
.legal__section{margin-top:var(--space-7);padding-top:var(--space-6);border-top:1px solid var(--color-line-warm)}
.legal__h2{margin-bottom:var(--space-3);font-size:var(--fs-card-title);line-height:1.25;letter-spacing:-.01em;font-weight:600}
.legal__section p + p{margin-top:var(--space-3)}
.legal a{overflow-wrap:anywhere;text-decoration-thickness:1px;text-underline-offset:4px}
.legal a:hover{color:var(--color-acc-dev)}
@media (max-width: 767px){
  .legal{padding-block:var(--space-7) var(--space-section)}
  .legal__section{margin-top:var(--space-6);padding-top:var(--space-5)}
}

/* 8. Not-found page (step not-found-page) ---------------------------------------------------------------------
 * REVIEW: no approved design. Same reading column and type scale as .legal (§7) on the sand body: "Error 404" in
 * mono with the eyebrow dot in the development green, H1 at the .h2 size, the text at --fs-lead in the warm muted
 * tone and the approved .btn--dev (full width on mobile, like the other primary buttons).
 */
.not-found{max-width:var(--bio-text-w);min-height:50vh;padding-block:var(--space-9) var(--space-section)}
.not-found__code{display:inline-flex;align-items:center;gap:10px;font-family:var(--font-mono);font-size:var(--fs-eyebrow);font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--color-acc-dev)}
.not-found__code::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor;flex:none}
.not-found__title{margin-top:var(--space-4);font-size:var(--fs-h2);line-height:1.08;letter-spacing:-.025em;font-weight:600}
.not-found__text{margin-top:var(--space-5);font-size:var(--fs-lead);line-height:1.55;color:var(--color-text-warm-muted)}
.not-found__cta{margin-top:var(--space-7)}
@media (max-width: 767px){
  .not-found{min-height:0;padding-block:var(--space-7) var(--space-section)}
  .not-found__cta{width:100%;white-space:normal;text-align:center}
}
