/* ==========================================================================
   Ana Carolina — Graphic Designer · Portfolio v2
   Clean, editorial, colourful. Plain CSS, no build step.
   ========================================================================== */

@font-face {
  font-family: "Awesome Serif";
  src: url("../fonts/awesome-serif-var-vf.woff") format("woff");
  font-weight: 1 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Awesome Serif";
  src: url("../fonts/awesome-serif-italic-var-vf.woff") format("woff");
  font-weight: 1 700;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Palette */
  --oat: #F4E9D6;            /* beige */
  --blush: #CF9583;
  --clay: #AA6C58;
  --ochre: #9A7D46;
  --coffee: #543F2E;
  --cream: #F7F1E8;
  --light: #F8F0E3;          /* soft beige-white for text on coloured backgrounds */

  --serif: "Awesome Serif", "Cormorant Garamond", Georgia, serif;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Awesome Serif everywhere: light weight + tall letterforms */
  --tall: "hght" 820, "wght" 250;
  --taller: "hght" 820, "wght" 250;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 1320px;
  --radius: 4px;
  --radius-card: 14px;       /* project cards: cover + palette bars */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 50px;

  /* Section colours (overridden per section) */
  --bg: var(--cream);
  --fg: var(--coffee);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0;
  background: var(--cream);
  color: var(--coffee);
  font: 300 1rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 250; font-variation-settings: var(--tall); line-height: 1.02; letter-spacing: .005em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--coffee); color: var(--light); padding: .75rem 1.25rem; border-radius: 999px;
}
.skip-link:focus { top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

/* ---------- Coloured sections ---------- */
.section { position: relative; background: var(--bg); color: var(--fg); padding-block: clamp(5rem, 10vw, 8.5rem); }
.section--cream { --bg: var(--cream); --fg: var(--coffee); }
.section--oat   { --bg: var(--oat);   --fg: var(--coffee); }
.section--blush { --bg: var(--blush); --fg: var(--coffee); }
.section--clay  { --bg: var(--clay);  --fg: var(--light); }
.section--ochre { --bg: var(--ochre); --fg: var(--light); }
.section--coffee{ --bg: var(--coffee);--fg: var(--oat); }

/* Section changes are straight cuts (no waves). */

.eyebrow {
  display: inline-block; margin-bottom: 1.25rem;
  font: 300 .78rem/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase;
}
.section-title { font-size: clamp(2.75rem, 7vw, 5.5rem); margin-bottom: 1.5rem; }
.section-title em { font-style: italic; }
.section-title--italic { font-style: italic; font-weight: 150; font-variation-settings: "hght" 820, "wght" 150; }
.lead { font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.65; max-width: 36em; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .7rem 1.6rem; border-radius: 999px;
  font: 300 .9rem/1 var(--sans); letter-spacing: .04em; text-decoration: none;
  background: var(--coffee); color: var(--light); border: 1.5px solid transparent;
  transition: background-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--oat { background: var(--oat); color: var(--coffee); }
.btn--oat:hover { background: var(--light); }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn--ghost:hover { background: var(--fg); color: var(--bg); }
.btn--light { background: var(--light); color: var(--coffee); }

.arrow-link { display: inline-flex; gap: .45em; align-items: center; font: 300 .9rem/1.4 var(--sans); text-decoration: none; }
.arrow-link span { transition: transform .3s var(--ease); }
.arrow-link:hover span, a:hover .arrow-link span { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  --hfg: var(--coffee);
  background: var(--oat);
  position: fixed; top: 12px; left: var(--gutter); right: var(--gutter); max-width: var(--max); margin-inline: auto;
  z-index: 50; height: var(--header-h); border-radius: 999px; box-shadow: 0 6px 24px rgba(84, 63, 46, .12);
  color: var(--hfg);
  transition: background-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
}

.site-header.is-solid { box-shadow: 0 8px 28px rgba(84, 63, 46, .18); }
.site-header .container { max-width: none; padding-inline: clamp(1.1rem, 2vw, 1.6rem); height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand-mark { display: block; width: 27px; height: auto; }
.brand-mark--light { display: none; }
.nav a { min-height: 40px; }
.brand {
  font-family: var(--serif); font-variation-settings: var(--tall); font-size: 1.7rem; line-height: 1;
  text-decoration: none; white-space: nowrap; padding-block: 0;
}
.nav ul { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); }
.nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  font: 300 .92rem/1 var(--sans); letter-spacing: .03em; text-decoration: none;
}
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 10px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:hover::after, .nav a[aria-current]::after { transform: scaleX(1); }
.back-link { font: 300 .88rem/1 var(--sans); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.header-right { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem); }

.menu-toggle {
  display: none; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
  position: relative; z-index: 60;
}
.menu-toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease), opacity .2s; }
.menu-toggle span:nth-child(1) { top: 16px; }
.menu-toggle span:nth-child(2) { top: 22px; }
.menu-toggle span:nth-child(3) { top: 28px; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 820px) {
  .menu-toggle { display: block; }
  .nav {
    position: fixed; inset: 0; z-index: 55; background: var(--coffee); color: var(--oat);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
  }
  .nav ul { flex-direction: column; align-items: center; gap: .5rem; }
  .nav a { font: 250 2.6rem/1.1 var(--serif); font-variation-settings: var(--tall); min-height: 56px; }
  .nav a::after { display: none; }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .menu-open .site-header { --hfg: var(--oat); background: transparent; box-shadow: none; }
  .site-header { top: 8px; left: 12px; right: 12px; }
  .menu-open { overflow: hidden; }
  .back-link .long { display: none; }
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; min-height: 90vh; min-height: 90svh;
  display: grid; align-items: center; text-align: left; color: var(--light);
  padding: calc(var(--header-h) + 3rem) 0 3rem;
  /* Dark wash over the photo (site/assets/img/hero.jpg); palette gradient shows if the photo is missing. */
  background:
    linear-gradient(180deg, rgba(43, 29, 19, .34), rgba(43, 29, 19, .18) 45%, rgba(43, 29, 19, .4)),
    url("../assets/img/hero.jpg") center / cover no-repeat,
    linear-gradient(135deg, var(--blush) 0%, #C08573 35%, var(--clay) 100%);
  overflow: hidden;
}
.hero__inner { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.hero__headline {
  max-width: 11ch; font-size: clamp(3rem, 7.5vw, 6.75rem); line-height: .98;
  font-weight: 250; font-variation-settings: "hght" 820, "wght" 250;
}
.hero__name { margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.hero__name-main { display: block; font: 500 clamp(1.05rem, 1.4vw, 1.25rem)/1.3 var(--sans); }
.hero__name-role { display: block; font: 200 clamp(.95rem, 1.2vw, 1.1rem)/1.4 var(--sans); }

/* Thin, straight blush band under the hero */
.band { background: var(--blush); color: var(--coffee); padding-block: .85rem; overflow: hidden; }
.band__track { display: flex; width: max-content; animation: drift 80s linear infinite; }
.band__group { display: flex; align-items: center; flex-shrink: 0; }
.band__item { font: 300 1rem/1.4 var(--sans); white-space: nowrap; padding-inline: 1.5rem; }
.band__sep { flex-shrink: 0; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; }
@keyframes drift { to { transform: translateX(-50%); } }

/* ---------- Work grid: Pinterest-style boards ---------- */
.work-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem 3rem; margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.work-head .lead { max-width: 30em; }
.card { display: block; text-decoration: none; color: inherit; }
.board {
  position: relative; display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr;
  gap: clamp(6px, .8vw, 10px); aspect-ratio: 3 / 2;
}
.board__tile { position: relative; overflow: hidden; border-radius: var(--radius-card); background: var(--oat); }
.board__tile--big { grid-row: 1 / 3; }
.board__tile img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease), filter .6s var(--ease);
}
.board__tile:nth-child(2) img { transition-delay: .06s; }
.board__tile:nth-child(3) img { transition-delay: .12s; }
.board__tile:nth-child(1) { transition: transform .8s var(--ease); }
.board__tile:nth-child(2), .board__tile:nth-child(3) { transition: transform .8s var(--ease); }
.card:hover .board__tile--big img, .card:focus-visible .board__tile--big img { transform: scale(1.07) translateY(-1.5%); }
.card:hover .board__tile:nth-child(2) img, .card:focus-visible .board__tile:nth-child(2) img { transform: scale(1.12) translateX(-3%); }
.card:hover .board__tile:nth-child(3) img, .card:focus-visible .board__tile:nth-child(3) img { transform: scale(1.12) translateX(3%); }
.card:hover .board__tile:nth-child(2) { transform: translateY(-6px); }
.card:hover .board__tile:nth-child(3) { transform: translateY(6px); }
.card:hover .board__tile img { filter: brightness(.92); }
/* palette swatches beside the cover: rounded bars that fill the column */
.board__swatches {
  list-style: none; margin: 0; padding: 0;
  grid-row: 1 / 3; display: flex; flex-direction: column; gap: clamp(5px, .6vw, 8px);
}
.swatch {
  flex: 1; border-radius: var(--radius-card); background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(84, 63, 46, .12);
  transition: transform .6s var(--ease); transition-delay: calc(var(--i) * 45ms);
}
.card:hover .swatch, .card:focus-visible .swatch { transform: translateX(4px); }
.card__body { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: 1.25rem; }
.card__title, .case-hero h1, .next__title { font-family: var(--sans); font-weight: 500; font-variation-settings: normal; letter-spacing: -.01em; }
.card__title { font-size: clamp(1.15rem, 1.5vw, 1.35rem); line-height: 1.25; }
.card__meta { font-size: .9rem; margin-top: .45rem; opacity: .82; }
.card .arrow-link { white-space: nowrap; opacity: .85; }
.card__num { font: 300 .75rem/1 var(--sans); letter-spacing: .14em; opacity: .6; display: block; margin-bottom: .6rem; }


/* ---------- Project lanes: two rows drifting in opposite directions ---------- */
.lanes { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
.lane { position: relative; overflow: hidden; padding-block: 28px; margin-block: -28px; --cw: clamp(290px, 30vw, 520px); --gap: clamp(14px, 1.6vw, 22px); }
.lane__nudge { transition: transform .7s var(--ease); }
.lane__belt { display: flex; width: max-content; animation: lane var(--dur, 70s) linear infinite; will-change: transform; }
.lane[data-dir="-1"] .lane__belt { animation-direction: reverse; }
@keyframes lane { from { transform: translate3d(-25%, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
.lane__set { display: flex; gap: var(--gap); padding-right: var(--gap); }
.lane__card { flex: 0 0 var(--cw); transition: filter .45s var(--ease), opacity .45s var(--ease), transform .45s var(--ease); }
/* Focus effect: the hovered project stands out, the others soften */
.lanes:has(.lane__card:hover) .lane__card { opacity: .55; filter: blur(1.5px) saturate(.85); }
/* higher specificity than the rule above, so the hovered card stays sharp and grows */
.lanes:has(.lane__card:hover) .lane__card:hover { opacity: 1; filter: none; transform: scale(1.06); position: relative; z-index: 2; }
.lane__arrow {
  position: absolute; z-index: 5; top: calc(28px + var(--cw) / 3); transform: translateY(-50%);
  width: 48px; height: 48px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(84, 63, 46, .78); color: var(--light); font: 300 1.2rem/1 var(--sans);
  transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.lane__arrow:hover { background: var(--coffee); transform: translateY(-50%) scale(1.06); }
.lane__arrow--prev { left: var(--gutter); }
.lane__arrow--next { right: var(--gutter); }
.card__go {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: .45em; min-height: 44px; padding: 0 1.2rem;
  border: 1px solid currentColor; border-radius: 999px; font: 300 .88rem/1 var(--sans);
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
.card:hover .card__go, .card:focus-visible .card__go { background: var(--coffee); color: var(--light); border-color: var(--coffee); }

@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  .lane { --cw: 80vw; }
  .lane__nudge { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; transform: none !important; transition: none; }
  .lane__nudge::-webkit-scrollbar { display: none; }
  .lane__belt { animation: none; }
  .lane__set[aria-hidden] { display: none; }
  .lane__set { padding-inline: var(--gutter); }
  .lane__card { scroll-snap-align: center; }
  .lanes:has(.lane__card:hover) .lane__card, .lanes:has(.lane__card:hover) .lane__card:hover { opacity: 1; filter: none; transform: none; }
  .lane__arrow { width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .lane__nudge { overflow-x: auto; }
  .lane__set[aria-hidden] { display: none; }
}

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: center; }
.about__photo { aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden; background: var(--oat); position: relative; border: clamp(10px, 1.2vw, 16px) solid var(--oat); }
.about__photo img { position: relative; z-index: 1; border-radius: 16px; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.about-title { margin-bottom: 1.75rem; }
.about-title__big { display: block; font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.1; margin-bottom: .4rem; }
.about-title__small { display: block; font-size: clamp(3.2rem, 7vw, 6rem); line-height: .95; }
.about__placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font: 300 .85rem/1.5 var(--sans); letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.about__text p:not(.eyebrow) { font-size: clamp(1.15rem, 1.5vw, 1.3rem); line-height: 1.7; max-width: 34em; }
.about__text .btn { margin-top: 1.5rem; }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 6vw, 6rem); margin-top: clamp(2.5rem, 5vw, 4rem); }
.service { border-top: 1px solid rgba(84, 63, 46, .3); padding-block: 2rem 2.5rem; display: grid; grid-template-columns: 3.5rem 1fr; gap: 0 1rem; }
.service__num { font: 250 1.5rem/1.2 var(--serif); font-variation-settings: var(--tall); }
.service h3 { font-size: clamp(2rem, 3.4vw, 2.75rem); margin-bottom: .75rem; }
.service p { font-size: 1.1rem; line-height: 1.6; }
.service ul { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }

.tag {
  display: inline-block; padding: .38rem .9rem; border-radius: 999px; border: 1px solid currentColor;
  font: 300 .82rem/1.3 var(--sans); letter-spacing: .02em;
}

/* ---------- Contact / CTA ---------- */
.contact { text-align: center; }
.contact .section-title { font-size: clamp(2.4rem, 5.5vw, 4.5rem); font-weight: 250; font-variation-settings: "hght" 820, "wght" 250; }
.contact__mail { display: inline-block; font: 300 clamp(1.3rem, 2.6vw, 2rem)/1.2 var(--sans); font-variation-settings: var(--tall); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: .15em; margin-block: 1rem 2.5rem; word-break: break-word; }
.contact__mail:hover { border-bottom-width: 2px; }
.contact .lead { margin-inline: auto; max-width: none; font-size: 1.1rem; font-weight: 300; }
.lead__line { display: block; }
.contact .eyebrow { font-weight: 300; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.socials .btn { font-size: .95rem; font-weight: 300; }

/* ---------- Footer ---------- */
.site-footer { --bg: var(--coffee); --fg: var(--oat); position: relative; background: var(--bg); color: var(--fg); padding-block: 4.5rem 2.5rem; }
.site-footer--blush { --bg: var(--blush); --fg: var(--light); }
.site-footer--blush .footer-bottom { border-top-color: rgba(248, 240, 227, .35); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; align-items: start; }
.footer-name { display: inline-flex; align-items: center; gap: 1rem; text-decoration: none; }
.footer-mark { width: 40px; height: auto; flex-shrink: 0; }
.footer-brand { font: 250 2.4rem/1 var(--serif); font-variation-settings: var(--tall); text-decoration: none; }
.footer-grid p { margin-top: .75rem; font-size: .95rem; opacity: .85; }
.footer-title { font: 300 .75rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; opacity: .7; margin-bottom: 1rem; }
.footer-links a { display: inline-flex; min-height: 36px; align-items: center; text-decoration: none; font-size: .95rem; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(221, 204, 170, .25); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .85rem; opacity: .8; }

/* ==========================================================================
   Case study pages
   ========================================================================== */
.case-hero { padding-top: calc(var(--header-h) + 12px + clamp(3.5rem, 8vw, 6.5rem)); padding-bottom: clamp(4rem, 8vw, 6.5rem); }
.case-hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: end; }
.case-hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); line-height: 1.05; margin-bottom: 1.5rem; }
.case-hero .lead { max-width: 34em; }
.meta { display: grid; gap: 1.25rem; margin: 0; }
.meta div { border-top: 1px solid currentColor; padding-top: .8rem; }
.meta dt { font: 300 .74rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; opacity: .8; margin-bottom: .45rem; }
.meta dd { margin: 0; font-size: 1.02rem; }
.meta .tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .2rem; }

.case-cover { padding-top: clamp(2.5rem, 5vw, 4rem); }
.case-cover img { width: 100%; border-radius: var(--radius); }

.case-text { padding-block: clamp(4rem, 9vw, 7rem) 0; }
.case-block { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 1.5rem clamp(2rem, 6vw, 6rem); padding-block: 2.25rem; border-top: 1px solid rgba(84, 63, 46, .18); }
.case-block h2 { font-size: clamp(2.2rem, 4vw, 3.3rem); }
.case-block p { font-size: 1.12rem; line-height: 1.75; max-width: 40em; }

/* Brand elements */
.brand-elements { padding-top: clamp(4rem, 8vw, 6rem); }
.brand-elements > .container > h2 { font-size: clamp(2.2rem, 4vw, 3.3rem); margin-bottom: 2rem; }
.be-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.be-card { background: #fff; border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.25rem); }
.be-card h3 { font: 300 .74rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 1.5rem; opacity: .75; }
.be-logo { grid-column: span 5; display: flex; flex-direction: column; }
.be-logo .be-logo__img { flex: 1; display: grid; place-items: center; min-height: 220px; }
.be-logo img { max-height: 220px; width: auto; object-fit: contain; }
.be-palette { grid-column: span 7; }
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: .75rem; }
.swatch__chip { aspect-ratio: 1 / 1.15; border-radius: var(--radius); box-shadow: inset 0 0 0 1px rgba(84, 63, 46, .1); }
.swatch__name { display: block; font-size: .85rem; font-weight: 300; margin-top: .6rem; }
.swatch__hex { display: block; font-size: .8rem; opacity: .75; text-transform: uppercase; letter-spacing: .04em; }
.be-type { grid-column: span 12; }
.type-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem 2.5rem; }
.type-item__name { font: 250 clamp(1.8rem, 3vw, 2.4rem)/1.1 var(--serif); font-variation-settings: var(--tall); }
.type-item__role { font-size: .92rem; opacity: .75; margin-top: .35rem; }

/* Gallery */
.gallery { padding-block: clamp(4rem, 8vw, 6rem); }
.gallery__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 2rem; }
.gallery__head h2 { font-size: clamp(2.2rem, 4vw, 3.3rem); }
.gallery__count { font-size: .9rem; opacity: .7; }
.g-row { margin: 0 0 clamp(1.25rem, 2.6vw, 2rem); }
.g-row figcaption, .g-caption { font-size: .85rem; opacity: .75; margin-top: .7rem; }
.g-grid {
  --gap: clamp(.75rem, 1.6vw, 1.25rem);
  display: grid; gap: var(--gap); align-items: start; justify-content: center;
  /* fixed-width tracks: a short last row stays centred instead of leaving a hole */
  grid-template-columns: repeat(auto-fit, calc((100% - (var(--cols, 3) - 1) * var(--gap)) / var(--cols, 3)));
}
.g-item { display: block; overflow: hidden; border-radius: var(--radius); background: rgba(84, 63, 46, .05); cursor: zoom-in; }
.g-item img { width: 100%; transition: transform .7s var(--ease), filter .5s var(--ease); }
.g-item:hover img { transform: scale(1.03); }
.g-row--full .g-grid { --cols: 1; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.25rem, 3vw, 2.5rem); }
.compare__side { display: flex; flex-direction: column; }
.compare__side .g-grid { margin-block: auto; }
.compare__label { font: 500 .8rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .8rem; opacity: .7; }
.compare__side--after .compare__label { opacity: 1; }
@media (max-width: 760px) { .compare { grid-template-columns: 1fr; } }
.g-row--single .g-grid { --cols: 1; max-width: 560px; margin-inline: auto; }
.g-item--scroll { cursor: auto; max-height: min(80vh, 900px); overflow-y: auto; overscroll-behavior: contain; box-shadow: inset 0 0 0 1px rgba(84, 63, 46, .12); }
.g-item--scroll:hover img { transform: none; }
.g-row--tall .g-grid { max-width: 1000px; margin-inline: auto; }
.case-cover .g-grid img { width: 100%; border-radius: var(--radius); }

/* Video */
.case-video { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; padding-block: clamp(2rem, 5vw, 4rem); }
.case-video video { width: 100%; max-width: 420px; margin-inline: auto; border-radius: var(--radius); background: var(--oat); }
.case-video h2 { font-size: clamp(2.2rem, 4vw, 3.3rem); margin-bottom: 1rem; }
.case-video p { font-size: 1.1rem; }

/* Next project */
.next { display: block; text-decoration: none; padding-block: clamp(4rem, 8vw, 6rem); }
.next__grid { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
.next__label { font: 300 .78rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; opacity: .8; margin-bottom: 1rem; display: block; }
.next__title { font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.05; display: inline-flex; gap: .3em; align-items: baseline; }
.next__title span { font-family: var(--sans); font-weight: 300; font-size: .6em; transition: transform .4s var(--ease); }
.next:hover .next__title span { transform: translateX(10px); }
.next__thumb { width: clamp(120px, 18vw, 240px); aspect-ratio: 4 / 5; border-radius: var(--radius-card); overflow: hidden; border: 4px solid var(--coffee); box-shadow: 0 10px 24px -14px rgba(84, 63, 46, .5); }
.next__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.next:hover .next__thumb img { transform: scale(1.03); }

/* Lightbox */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: rgba(43, 31, 22, .94); color: var(--light); }
.lightbox::backdrop { background: rgba(43, 31, 22, .94); }
.lightbox__stage { position: absolute; inset: 60px 70px; display: grid; place-items: center; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: var(--radius); }
.lightbox button { position: absolute; width: 48px; height: 48px; border: 0; border-radius: 999px; background: rgba(255, 250, 243, .12); color: inherit; font: 300 1.4rem/1 var(--sans); cursor: pointer; }
.lightbox button:hover { background: rgba(255, 250, 243, .25); }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: .85rem; opacity: .8; }

/* ---------- Entrance animation (single, subtle) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .band__track { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .case-hero__grid, .about, .case-video { grid-template-columns: 1fr; }
  .about__photo { max-width: 460px; }
  .be-logo, .be-palette { grid-column: span 12; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  :root { --header-h: 50px; }
  .brand-mark { width: 27px; }
  .work-grid, .services { grid-template-columns: 1fr; }
  .case-block { grid-template-columns: 1fr; }
  .card__body { flex-direction: column; gap: .5rem; }
  .next__grid { grid-template-columns: 1fr; }
  .next__thumb { display: none; }
  /* Multi-image rows become swipeable strips on phones */
  .g-row--strip .g-grid {
    display: flex; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; gap: .75rem; scroll-padding-inline: var(--gutter);
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none;
  }
  .g-row--strip .g-grid::-webkit-scrollbar { display: none; }
  .g-row--strip .g-item { flex: 0 0 78%; scroll-snap-align: start; }
  .g-row--strip.g-row--stories .g-item { flex-basis: 62%; }
  .g-row--two .g-grid { --cols: 2; }
  .lightbox__stage { inset: 64px 12px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 8px; transform: none; }
  .band__item { font-size: 1.35rem; }
}
@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Lace trim on every colour change (not between hero and projects) ---------- */
.lace, .lace-bottom { position: relative; }
.lace::before, .lace-bottom::after {
  content: ""; position: absolute; left: 0; right: 0; z-index: 4; height: 40px; pointer-events: none;
  /* seamless tile (mirrored), beige lace on transparent */
  background: url("../assets/img/lace.png") repeat-x left center / auto 100%;
  filter: drop-shadow(0 1px 1px rgba(84, 63, 46, .25));
}
.lace::before { top: -20px; }
.lace-bottom::after { bottom: -20px; }
@media (max-width: 760px) { .lace::before, .lace-bottom::after { height: 30px; } .lace::before { top: -15px; } .lace-bottom::after { bottom: -15px; } }

/* ---------- Cursor flower: follows the mouse and spins (desktop with a mouse only) ---------- */
.cursor-flower { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor-flower {
    display: block; position: fixed; top: 0; left: 0; z-index: 200; pointer-events: none;
    width: 52px; height: 52px; margin: -26px 0 0 -26px;
    opacity: 0; transition: opacity .3s ease; will-change: transform;
  }
  .cursor-flower.is-on { opacity: 1; }
  .cursor-flower img { display: block; width: 100%; height: 100%; object-fit: contain; animation: flower-spin 9s linear infinite; }
}
@keyframes flower-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cursor-flower img { animation: none; } }

/* ---------- Intro: monogram drawn on a coffee curtain, then it flies into the header ---------- */
.intro { display: none; }
.intro-on .intro {
  display: block; position: fixed; inset: 0; z-index: 300; cursor: pointer;
  animation: intro-failsafe 0s linear 8s forwards;     /* never trap the page if the script fails */
}
.intro-on, .intro-on body { overflow: hidden; }
.intro-on .site-header .brand { visibility: hidden; }
.intro__curtain { position: absolute; inset: 0; background: var(--coffee); }
.intro__logo {
  position: absolute; left: 50%; top: 50%; width: min(34vh, 220px); aspect-ratio: 263 / 360;
  transform: translate(-50%, -50%); transform-origin: 50% 50%;
}
.intro__logo svg { display: block; width: 100%; height: 100%; overflow: visible; }
.intro__stroke {
  stroke-dasharray: 1 2; stroke-dashoffset: 1.05;   /* start fully in the gap: no round-cap dot shows before drawing */
  animation: intro-draw var(--dur) cubic-bezier(.45, .05, .35, 1) var(--delay) forwards;
}
.intro__whole { opacity: 0; animation: intro-fade .35s ease 1.6s forwards; }   /* fills any spot the strokes missed */
.intro__dark { opacity: 0; }
@keyframes intro-draw { to { stroke-dashoffset: 0; } }
@keyframes intro-fade { to { opacity: 1; } }
@keyframes intro-failsafe { to { visibility: hidden; } }

/* ---------- Contact page (reached through the star transition) ---------- */
.contact__cta { margin: 1.25rem 0 2.25rem; min-height: 64px; padding: 1.1rem 3rem; font-size: clamp(1.1rem, 1.6vw, 1.3rem); letter-spacing: .03em; }
.contact__cta:hover { transform: translateY(-3px) scale(1.03); }
.contact .socials { gap: .55rem; }
.contact .socials .btn { min-height: 36px; padding: .5rem 1.15rem; font-size: .82rem; }
.contact-page { min-height: 100svh; padding-top: calc(var(--header-h) + clamp(4rem, 9vw, 7rem)); }
.contact-page__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr); gap: clamp(3rem, 7vw, 7rem); align-items: start; }
.contact-page__title { font-size: clamp(2.8rem, 6.5vw, 5.2rem); line-height: 1; margin-bottom: 1.25rem; }
.contact-page__title em { font-style: italic; }
.contact-page__lead { font-weight: 300; opacity: .85; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.contact-form { display: grid; gap: 1.9rem; }
.contact-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.9rem; }
.field { display: grid; gap: .55rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field__label { font: 300 .78rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; opacity: .78; padding: 0; }
.field input, .field textarea {
  width: 100%; background: transparent; color: var(--light); border: 0; border-bottom: 1px solid rgba(244, 233, 214, .4);
  font: 300 1.05rem/1.5 var(--sans); padding: .45rem 0 .6rem; border-radius: 0; transition: border-color .3s var(--ease);
}
.field textarea { resize: vertical; min-height: 7.5rem; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--oat); }
.field input:focus-visible, .field textarea:focus-visible { box-shadow: 0 2px 0 0 var(--oat); }
.field.is-invalid input, .field.is-invalid textarea { border-bottom-color: var(--blush); }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .35rem; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: .55rem 1.1rem; border: 1px solid rgba(244, 233, 214, .45); border-radius: 999px;
  font: 300 .9rem/1 var(--sans); cursor: pointer; transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.chip span:hover { border-color: var(--oat); }
.chip input:checked + span { background: var(--oat); color: var(--coffee); border-color: var(--oat); }
.chip input:focus-visible + span { outline: 2px solid var(--oat); outline-offset: 3px; }
.contact-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: .5rem; }
.contact-form__send { padding-inline: 2rem; font-size: .95rem; }
.contact-form__status { font: 300 .95rem/1.4 var(--sans); margin: 0; }
.contact-page__aside { position: relative; border-left: 1px solid rgba(244, 233, 214, .25); padding-left: clamp(1.5rem, 3.5vw, 3rem); padding-top: .6rem; }
.contact-page__aside-title { font: 300 .78rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; opacity: .78; margin-bottom: 1rem; }
.contact-page__mail { display: inline-block; font: 300 clamp(1.05rem, 1.6vw, 1.3rem)/1.3 var(--sans); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: .15em; word-break: break-word; }
.contact-page__socials { justify-content: flex-start; gap: .55rem; margin-top: 2rem; }
.contact-page__socials .btn { min-height: 36px; padding: .5rem 1.15rem; font-size: .82rem; }
@media (max-width: 860px) {
  .contact-page__grid { grid-template-columns: 1fr; }
  .contact-page__aside { border-left: 0; padding-left: 0; border-top: 1px solid rgba(244, 233, 214, .25); padding-top: 2.5rem; }
}
@media (max-width: 560px) { .contact-form__row { grid-template-columns: 1fr; } }

/* star transition: the star grows from the button to cover the screen, then the contact page rises in */
.star-wipe { position: fixed; z-index: 400; width: 60px; height: 60px; pointer-events: none; color: var(--coffee); will-change: transform; }
.star-wipe svg { display: block; width: 100%; height: 100%; fill: currentColor; overflow: visible; }
.star-in .star-rise { animation: star-rise .9s var(--ease) both; }
.star-in .contact-page__aside.star-rise { animation-delay: .12s; }
.star-in .site-header { animation: star-fade .7s ease .2s both; }
@keyframes star-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes star-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .star-in .star-rise, .star-in .site-header { animation: none; } }

/* ---------- App screens inside iPhone frames ---------- */
.phones { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1.25rem, 2.6vw, 2.25rem) clamp(1rem, 2vw, 1.75rem); padding: .5rem 0 1rem; }
.phone {
  position: relative; display: block; flex: 0 0 clamp(150px, 15.5vw, 205px); aspect-ratio: 402 / 875;
  padding: clamp(5px, .5vw, 8px); border-radius: 15% / 7%; background: #1d1b1a;
  box-shadow: inset 0 0 0 1.5px #4a4644, inset 0 0 0 4px #121110, 0 18px 40px -18px rgba(84, 63, 46, .55), 0 4px 10px rgba(84, 63, 46, .15);
  transition: transform .5s var(--ease);
}
.phone::before {   /* dynamic island */
  content: ""; position: absolute; z-index: 2; top: 3.6%; left: 50%; width: 30%; height: 3.4%; transform: translateX(-50%);
  border-radius: 999px; background: #0b0a0a;
}
.phone::after {    /* side button */
  content: ""; position: absolute; right: -2px; top: 24%; width: 3px; height: 11%; border-radius: 0 2px 2px 0; background: #2c2927;
}
.phone__screen { display: block; width: 100%; height: 100%; overflow: hidden; border-radius: 12.5% / 5.8%; background: #fff; }
.phone__screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone:hover { transform: translateY(-6px); }
@media (max-width: 760px) {
  .phones { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding-inline: 2px; scrollbar-width: none; }
  .phones::-webkit-scrollbar { display: none; }
  .phone { flex-basis: 46%; scroll-snap-align: start; }
}

/* ---------- Language switch (EN | PT) in the header ---------- */
.lang-switch { display: inline-flex; align-items: center; gap: .15rem; font: 400 .74rem/1 var(--sans); letter-spacing: .08em; margin-right: .35rem; }
.lang-switch__item { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; min-height: 30px; padding: 0 .35rem; border-radius: 999px; color: var(--coffee); text-decoration: none; opacity: .55; transition: opacity .25s var(--ease), background-color .25s var(--ease); }
a.lang-switch__item:hover { opacity: 1; background: rgba(84, 63, 46, .08); }
.lang-switch__item.is-current { opacity: 1; font-weight: 500; }
.lang-switch > :first-child { position: relative; }
.lang-switch > :first-child::after { content: ""; position: absolute; right: -.1rem; top: 50%; width: 1px; height: 12px; transform: translateY(-50%); background: currentColor; opacity: .35; }
