/* ==========================================================================
   Tejo — tejo.pt
   Palette sampled from the launch photoshoot (see vault 07 — Design Brief).
   Direction 1a "Bone chrome" — light base, full-bleed dark photography.
   Picked 26 Jul 2026 over 1b "Ink drop"; 1b's tokens have been removed.
   ========================================================================== */

/* --- Fonts (self-hosted, latin + latin-ext only — PT/EN need nothing else) - */

@font-face {
  font-family: 'Archivo Black';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ArchivoBlack-400-1.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo Black';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ArchivoBlack-400-2.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/fonts/Manrope-400-5.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/fonts/Manrope-400-6.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Brand tokens (fixed — these are the brand, not the theme) ------------ */

:root {
  --tejo-ink:   #0D0C0F;
  --tejo-navy:  #16305C;
  --tejo-sky:   #204070;
  --tejo-brick: #8E2F2A;
  --tejo-rust:  #A63A2E;
  --tejo-bone:  #D6DADA;
  --tejo-sand:  #6B5238;

  --font-display: 'Archivo Black', 'Arial Black', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --section-y: clamp(4.5rem, 12vw, 9rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Surface tokens: 1a "Bone chrome" ------------------------------------- */

:root {
  --bg:            #FAFAF8;
  --bg-alt:        #F0F0ED;
  --surface-dark:  var(--tejo-ink);
  --text:          var(--tejo-ink);
  --text-muted:    #5A5A5E;
  --text-on-dark:  var(--tejo-bone);
  --rule:          rgba(13, 12, 15, 0.14);
  --rule-strong:   rgba(13, 12, 15, 0.28);
  --accent:        var(--tejo-rust);
  --accent-text:   #FFFFFF;
  --header-bg:     rgba(250, 250, 248, 0.88);
  --header-text:   var(--tejo-ink);
  --chip-border:   rgba(13, 12, 15, 0.24);
  --chip-active-bg: var(--tejo-ink);
  --chip-active-text: var(--tejo-bone);
}

/* --- Reset ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.94;
  margin: 0;
  /* PT runs ~20% longer than EN — let long words break rather than overflow */
  overflow-wrap: break-word;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- Shared bits ---------------------------------------------------------- */

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

.label {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.6; /* also used on an <h2> (About), whose base is 0.94 */
  margin: 0 0 1.25rem;
}

.label--muted { color: var(--text-muted); }

.section { padding-block: var(--section-y); }

/* --- Header --------------------------------------------------------------- */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

/* Over the hero the header sits on dark photography, so force light text */
.header:not(.is-scrolled) {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  --header-text: var(--tejo-bone);
}

.header.is-scrolled { border-bottom-color: var(--rule); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4.5rem;
}

/* The real hand-painted mark, inlined by build.py. Its fill is currentColor,
   so it follows --header-text: bone over the hero, ink once scrolled. */
.wordmark {
  display: inline-flex;
  color: var(--header-text);
  line-height: 0;
  transition: color 0.3s var(--ease);
}

.wordmark__logo {
  display: block;
  height: 1.875rem;
  width: auto;
}

@media (min-width: 900px) {
  .wordmark__logo { height: 2.125rem; }
}

/* The hero title's rust full stop. Rust is the only accent. */
.wordmark__dot { color: var(--accent); }

.nav {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--header-text);
  opacity: 0.82;
  transition: opacity 0.2s, color 0.3s var(--ease);
}

.nav__link:hover { opacity: 1; }

.header__right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.langswitch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--header-text);
  transition: color 0.3s var(--ease);
}

.langswitch a, .langswitch span { text-decoration: none; }
.langswitch__sep { opacity: 0.4; }
.langswitch__off { opacity: 0.5; }
.langswitch__off:hover { opacity: 0.85; }
.langswitch__on { color: var(--accent); }

.header__cta {
  display: none;
  padding: 0.6rem 1.1rem;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

@media (min-width: 900px) {
  .nav { display: flex; }
  .header__cta { display: inline-block; }
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  background: var(--tejo-navy);
  overflow: hidden;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Do not grade, brighten or filter — the grade is the brand. */
}

/* Scrim only where the text sits, so the sky keeps its colour */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(13, 12, 15, 0.82) 0%,
    rgba(13, 12, 15, 0.45) 32%,
    rgba(13, 12, 15, 0.05) 62%,
    rgba(13, 12, 15, 0.25) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: clamp(3rem, 9vh, 5.5rem);
  color: var(--tejo-bone);
}

.hero__eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tejo-bone);
  opacity: 0.85;
  margin: 0 0 1.25rem;
}

.hero__title {
  font-size: clamp(3.25rem, 15vw, 6.75rem);
  color: var(--tejo-bone);
  margin-bottom: 1.5rem;
}

/* Direct children only — the nested rust full stop must stay inline */
.hero__title > span { display: block; }

.hero__sub {
  max-width: 30ch;
  font-size: clamp(0.95rem, 2.6vw, 1.125rem);
  color: var(--tejo-bone);
  opacity: 0.9;
  margin: 0 0 2rem;
}

.hero__coords {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(3rem, 9vh, 5.5rem);
  z-index: 2;
  display: none;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--tejo-bone);
  opacity: 0.7;
}

@media (min-width: 900px) {
  .hero__coords { display: block; }
  /* The slogan sits on two lines on desktop. Sized so the longest line
     ("FROM THE TAGUS") fits the wrap at any width from 900px up; on phones it
     wraps naturally inside each line span instead. */
  .hero__title { font-size: clamp(3.5rem, 6.6vw, 5.25rem); }
}

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 1.75rem;
  border: 0;
  background: var(--accent);
  color: var(--accent-text);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s var(--ease);
}

.btn:hover { background: var(--tejo-brick); }
.btn:active { transform: translateY(1px); }

.btn--block { width: 100%; }

.btn--ghost {
  background: transparent;
  color: var(--tejo-bone);
  border: 1px solid rgba(214, 218, 218, 0.55);
}

.btn--ghost:hover {
  background: var(--tejo-bone);
  color: var(--tejo-ink);
}

/* --- Manifesto ------------------------------------------------------------ */

.manifesto__title {
  font-size: clamp(2rem, 7.5vw, 3.75rem);
  margin-bottom: 1.75rem;
}

.manifesto__title > span { display: block; }

.manifesto__body {
  max-width: 46ch;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  color: var(--text-muted);
  margin: 0;
}

/* --- Product -------------------------------------------------------------- */

.product { border-top: 1px solid var(--rule); }

.product__grid { display: grid; gap: clamp(2rem, 6vw, 4rem); }

.product__gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.product__gallery img {
  width: 100%;
  /* height:auto is required — the width/height attributes on the <img> would
     otherwise win over aspect-ratio and blow the grid up to intrinsic size. */
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--bg-alt);
}

/* Landscape shots run the full width and keep their own ratio. Forcing one into
   the 4:5 cell would centre-crop it down to a narrow strip. */
.product__gallery img.is-wide {
  grid-column: 1 / -1;
  aspect-ratio: 3 / 2;
}

.product__name {
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  margin-bottom: 1rem;
}

.product__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.product__price-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.product__price-note {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

/* "Feito inteiramente em Portugal" — a real selling point for a brand built on
   place, so it sits with the price rather than in the small print. */
.product__origin {
  margin: 0 0 2.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.sizes__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.sizes__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.sizes__note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sizes__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.size {
  min-width: 3.25rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--chip-border);
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.18s var(--ease);
}

.size:hover:not([disabled]) { border-color: var(--rule-strong); }

.size[aria-pressed="true"] {
  background: var(--chip-active-bg);
  color: var(--chip-active-text);
  border-color: var(--chip-active-bg);
}

.size[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

.product__reassurance {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.product__alt {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-underline-offset: 3px;
}

@media (min-width: 900px) {
  .product__grid {
    grid-template-columns: 1.15fr 1fr;
    align-items: start;
  }
  .product__info { position: sticky; top: 7rem; }
}

/* --- Detail (full-bleed dark band) ---------------------------------------- */

.detail {
  position: relative;
  background: var(--surface-dark);
  color: var(--text-on-dark);
  overflow: hidden;
}

.detail__grid {
  display: grid;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}

.detail__img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.detail__title {
  font-size: clamp(1.75rem, 6vw, 3rem);
  color: var(--text-on-dark);
  margin-bottom: 1.25rem;
}

.detail__body {
  max-width: 34ch;
  color: rgba(214, 218, 218, 0.72);
  margin: 0;
}

@media (min-width: 900px) {
  .detail__grid { grid-template-columns: 1fr 1fr; }
}

/* --- About ---------------------------------------------------------------- */

/* No display title — the family's paragraph is the whole section, so it
   carries the weight a heading would. */
.about__body {
  max-width: 34ch;
  font-size: clamp(1.25rem, 3.4vw, 1.75rem);
  line-height: 1.45;
  color: var(--text);
  margin: 0;
}

/* --- Contact / footer ----------------------------------------------------- */

.footer {
  background: var(--surface-dark);
  color: var(--text-on-dark);
  padding-block: var(--section-y) 2.5rem;
}

.footer__title {
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  color: var(--text-on-dark);
  margin-bottom: 2.5rem;
}

.contacts {
  display: grid;
  gap: 1px;
  background: rgba(214, 218, 218, 0.16);
  border-block: 1px solid rgba(214, 218, 218, 0.16);
  margin-bottom: 3.5rem;
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0.25rem;
  background: var(--surface-dark);
  text-decoration: none;
  transition: padding-inline 0.2s var(--ease);
}

a.contact-row:hover { padding-inline: 0.75rem 0.25rem; }

.contact-row__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(214, 218, 218, 0.55);
}

.contact-row__value {
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  /* The email address is wider than a 320px phone; without these it widens
     the whole page and pushes the header's language switch off-screen. */
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
  color: rgba(214, 218, 218, 0.45);
}

/* --- Sticky mobile order bar ---------------------------------------------- */

.stickybar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem var(--gutter);
  padding-bottom: max(0.7rem, env(safe-area-inset-bottom));
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--rule);
  transform: translateY(110%);
  transition: transform 0.35s var(--ease);
}

.stickybar.is-visible { transform: translateY(0); }

.stickybar__meta { flex: 1; min-width: 0; }

.stickybar__price {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.1;
}

.stickybar__size {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stickybar .btn { padding: 0.85rem 1.35rem; }

@media (min-width: 900px) {
  .stickybar { display: none; }
}

/* --- Reveal on scroll ----------------------------------------------------- */

/* Only hide content when JS is running to bring it back. Without the .js class
   (script blocked, JS off, parse error) everything renders normally — content
   must never be trapped at opacity 0. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}
