:root {
  --accent:#DF3F0B;
  --primary:#252525;
  --text:#ffede7;
  --tertiary:#454545;
  --radius:16px;
  --shadow:0 10px 30px rgba(0,0,0,.35);
}
canvas.embers {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;         /* put it behind content */
  opacity: 0.6;        /* tweak to taste */
}
.lang-toggle {
  border: 1px solid currentColor;
  padding: .4rem .7rem;
  border-radius: .6rem;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
}

* { box-sizing:border-box }
html,body { height:100% }
html { scroll-behavior:smooth }
body {
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background:var(--primary);
  color:var(--text);
  line-height:1.6;
  overflow-x:hidden;
}

.container { width:min(1200px, 92vw); margin-inline:auto }
.grid { display:grid; gap:1.25rem }
a { color:inherit; text-decoration:none }
a.link { color: var(--accent) }

/* Embers background */
canvas.embers.global {
  position:fixed; inset:0;
  width:100vw; height:100vh;
  z-index:-2; pointer-events:none; display:block;
}

/* Header & Nav */
header {
  position:sticky; top:0; z-index:1000;
  backdrop-filter: blur(8px);
  background: color-mix(in oklab, var(--primary) 86%, transparent);
  border-bottom:1px solid color-mix(in oklab, var(--tertiary) 60%, transparent);
}
.nav {
  display:flex; align-items:center; justify-content:space-between; padding:.8rem 0;
}
.nav a.logo { display:flex; align-items:center; gap:.65rem }
.nav img.logo-wordmark { height:28px; width:auto; display:block }
.nav ul {
  display:flex; gap:1rem; list-style:none; margin:0; padding:0;
  align-items:center; flex-wrap:wrap;
}
.nav ul a {
  position:relative; color:var(--text); opacity:.85;
  font-weight:600; font-size:.95rem;
  padding:.4rem .6rem; border-radius:10px;
  transition:opacity .2s ease, transform .2s ease;
}
.nav ul a:hover { opacity:1; transform:translateY(-1px) }
.nav ul a.active::after,
.nav ul a:hover::after {
  content:""; position:absolute; inset:auto 10% -6px 10%;
  height:3px; background:var(--accent); border-radius:3px;
  box-shadow:0 4px 14px rgba(223,63,11,.3);
}

/* Mobile nav */
.menu-toggle {
  display:none; align-items:center; gap:.5rem;
  border:1px solid #3a3a3a; background:#2b2b2b; color:var(--text);
  padding:.5rem .75rem; border-radius:10px; font-weight:800;
}
.menu-toggle .icon { font-size:1.05rem; line-height:1 }

/* Always exists, controlled by transform */
.mobile-menu {
  position:fixed; top:calc(60px + env(safe-area-inset-top));
  left:0; right:0; background:#2a2a2a;
  border-bottom:1px solid #343434;
  box-shadow: var(--shadow);
  padding:.6rem .8rem;
  transform-origin: top;
  transform: scaleY(0);
  transition: transform .18s ease;
  z-index:999;
  overflow: hidden;
}
.mobile-menu.open { transform: scaleY(1) }

.mobile-menu a {
  display:block; padding:.9rem 1rem;
  border-radius:10px; font-weight:800; color:var(--text);
}
.mobile-menu a:hover{ background:#313131 }
body.menu-open{ overflow:hidden }

@media (max-width: 900px){
  .nav ul{ display:none }
  .menu-toggle{ display:flex }
}

/* Buttons */
.btn {
  --bg:var(--accent); --fg:var(--text);
  display:inline-flex; align-items:center; gap:.5rem;
  font-weight:800; color:var(--fg); background:var(--bg);
  border:0; padding:.9rem 1.1rem; border-radius:14px;
  cursor:pointer; position:relative; overflow:hidden;
  transform:translateZ(0);
  transition: transform .15s ease, filter .2s ease;
  box-shadow:0 8px 22px rgba(223,63,11,.3);
}
.btn:hover{ transform: translateY(-2px) }
.btn:active{ transform: translateY(0) }
.btn.ghost{ background:transparent; border:1px solid rgba(223,63,11,.6); box-shadow:none }
.btn.ghost:hover{ background: rgba(223,63,11,.1) }
.btn .rip {
  position:absolute; border-radius:999px; transform:translate(-50%,-50%);
  pointer-events:none; background: rgba(255,237,231,.4); opacity:.3;
  animation:rip .6s ease forwards;
}
@keyframes rip {
  from{width:0;height:0;opacity:.5}
  to{width:420px;height:420px;opacity:0}
}

/* Hero */
.hero {
  position:relative; padding:5rem 0 4rem;
  min-height:calc(100vh - 70px);
  display:flex; align-items:center;
}
.hero h1 {
  font-size: clamp(3.2rem, 9vw, 9rem);
  line-height:.92; margin:0 0 1rem;
  font-weight:900; letter-spacing:-.02em;
}
.hero p {
  color: rgba(255,237,231,.9);
  max-width: 56ch; margin: 0 0 2rem;
  font-size: clamp(1.05rem, 1.2vw, 1.2rem);
}
.hero .cta{display:flex; gap:.8rem; flex-wrap:wrap}

/* Section titles */
.sec-title {
  display:flex; align-items:flex-end; justify-content:space-between;
  margin-bottom:1.2rem; gap:1rem; flex-wrap:wrap;
}
.sec-title h1 {
  margin:0; font-size: clamp(3.4rem, 8.5vw, 8rem);
  font-weight:900; letter-spacing:-.01em;
}

/* General sections */
section { padding:5rem 0 }
@media (max-width:900px){
  section { padding: 3.5rem 0 }
}
/* Stats section */
.stats {
  margin-top: 2.2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.stats .card {
  background: #2b2b2b;
  border: 1px solid #2f2f2f;
  border-radius: 16px;
  padding: 1.2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}

.stats .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(223,63,11,.35);
}

.stats .card strong {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.stats .card span {
  display: block;
  opacity: .85;
  font-size: 0.95rem;
  color: rgba(255,237,231,.85);
}
/* === Portfolio === */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
  margin: 1.5rem 0 2rem;
}

.chip {
  background: #2b2b2b;
  border: 1px solid #3a3a3a;
  color: var(--text);
  padding: .5rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s ease;
}

.chip.active,
.chip:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.grid-portfolio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.project {
  background: #2b2b2b;
  border: 1px solid #343434;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}

.project:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(223,63,11,.35);
}

.project .thumb {
  background: linear-gradient(135deg, #3a3a3a, #2a2a2a);
  height: 160px;
  width: 100%;
}

.project .meta {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.project .meta h4 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.project .meta span {
  display: block;
  color: rgba(255,237,231,.7);
  font-size: .95rem;
  margin-top: .2rem;
}

/* Services Table */
.table-wrap {
  background: #2b2b2b;
  border: 1px solid #323232;
  border-radius: 16px;
  overflow: auto;
  box-shadow: var(--shadow);
  margin-top: 2rem;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 680px;
  font-size: 0.95rem;
}

thead th {
  position: sticky;
  top: 0;
  background: #2d2d2d;
  color: var(--text);
  font-weight: 800;
  text-align: left;
  padding: 1rem;
  border-bottom: 1px solid #3a3a3a;
  z-index: 1;
}

tbody td {
  padding: 1rem;
  border-bottom: 1px solid #333;
  color: rgba(255,237,231,.9);
}

tbody tr:hover {
  background: #2c2c2c;
  transition: background .3s ease;
}

th.sort {
  cursor: pointer;
  user-select: none;
}

th.sort .dir {
  opacity: .6;
  font-size: 0.85em;
  margin-left: 0.25rem;
}

/* Animate services table */
.table-wrap.reveal.in {
  animation: fadeUp 0.8s ease forwards;
}

/* Process section */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.process-card {
  position: relative;
  background: #2b2b2b;
  border: 1px solid #343434;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow);
  text-align: left;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}

.process-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(223,63,11,.4);
}

/* step number */
.process-card .bullet {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  opacity: .3;
}

/* shine effect */
.process-card .shine {
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-25deg);
}

.process-card:hover .shine {
  animation: shineMove 1s ease;
}

@keyframes shineMove {
  from { left: -75%; }
  to   { left: 125%; }
}

.process-card h3 {
  margin-top: 0;
  margin-bottom: 0.8rem;
  font-size: 1.4rem;
  color: var(--text);
}

.process-card p {
  margin: 0;
  color: rgba(255,237,231,.85);
  line-height: 1.5;
}

/* Footer */
footer {
  padding:2.5rem 0; border-top:1px solid #2f2f2f;
  color: rgba(255,237,231,.9);
}
.foot {
  display:flex; justify-content:space-between; gap:1rem;
  align-items:center; flex-wrap:wrap;
}

/* Reveal*/
.reveal {
  opacity:0; transform: translateY(20px);
  transition: opacity .5s ease, transform .6s ease;
}
.reveal.in { opacity:1; transform: none }

/* Subtle navigation glow transition (replaces orange bar) */
#page-glow{
  position:fixed; inset:0; pointer-events:none; z-index:1500;
  opacity:0;
}
#page-glow.glow{ animation: revive-glow .35s ease both; }
@keyframes revive-glow{
  0%{
    opacity:0;
    background: radial-gradient(16rem 12rem at var(--x) var(--y),
      color-mix(in oklab, var(--accent) 75%, white 0%) .25,
      rgba(223,63,11,0) 60%);
  }
  60%{
    opacity:.55;
    background: radial-gradient(28rem 20rem at var(--x) var(--y),
      color-mix(in oklab, var(--accent) 55%, white 0%) .18,
      rgba(223,63,11,0) 62%);
  }
  100%{
    opacity:0;
    background: radial-gradient(48rem 34rem at var(--x) var(--y),
      color-mix(in oklab, var(--accent) 35%, white 0%) .08,
      rgba(223,63,11,0) 70%);
  }
}

/* Soft page-in on load (very light) */
html:not(.page-ready) body{ opacity:0; transform: translateY(2px); }
body{ transition: opacity .22s ease, transform .22s ease; }

/* === Fade-up animation (shared globally) === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Apply fadeUp to elements */
.card.reveal.in,
.process-card.reveal.in,
.team-card.reveal.in,
.value-card.reveal.in,
.vision-box.reveal.in,
.sec-title.reveal.in,
.hero .reveal.in {
  animation: fadeUp 0.8s ease forwards;
}
/* Prevent horizontal scroll on mobile */
html, body {
  overflow-x: hidden;
}

/* Make sure containers don’t exceed viewport width */
.container {
  max-width: 100%;
  overflow-x: hidden;
}

/* Fix for grid and flex layouts */
.grid,
.stats,
.process-grid,
.team-grid,
.values-grid,
.grid-portfolio {
  min-width: 0; /* allow shrinking */
}

/* Prevent buttons and chips from overflowing */
.btn,
.chip {
  max-width: 100%;
  white-space: nowrap;
}
/* ===== MOBILE FIXES ===== */
@media (max-width: 768px) {

  /* Hero */
  .hero {
    padding: 3.5rem 0 2.5rem;
    text-align: center;
  }
  .hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 1.1;
  }
  .hero p {
    font-size: 1rem;
    margin: 0 auto 1.5rem;
  }
  .hero .cta {
    justify-content: center;
  }

  /* Stats cards under hero */
  .stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
  }
  .stats .card {
    padding: 1rem;
    text-align: center;
  }

  /* Process section */
  .process-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .process-card {
    padding: 1.5rem;
  }

  /* Navigation fix for long menus */
  .mobile-menu {
    padding: 1rem;
  }
  .mobile-menu a {
    font-size: 1.05rem;
  }
}

/* Extra-small phones */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }
  .btn, .btn.ghost {
    width: 100%;
    justify-content: center;
  }
}
/* ===== MOBILE FIXES: Portfolio & Team ===== */
@media (max-width: 768px) {
  /* Portfolio grid */
  .grid-portfolio {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .project .thumb {
    height: 140px;
  }
  .project .meta {
    flex-direction: column;
    align-items: flex-start;
    gap: .8rem;
  }
  .project .btn {
    align-self: stretch;
    text-align: center;
  }

  /* Team grid */
  .team-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .team-card {
    padding: 1.5rem;
  }
  .team-card img {
    width: 160px;
    height: 160px;
  }
}
.project .btn.big-btn {
  font-size: 1.1rem;
  padding: 1rem 1.4rem;
  border-radius: 16px;
}
.project-feature .image {
  background: url("assets/portfolio/btwcreative.png") center/cover no-repeat;
  border-radius: 20px;
  min-height: 320px;
  position: relative;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .6s ease, filter .6s ease;
}

.project-feature .image:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}
/* Shared Page Headers */
.page-header {
  text-align: center;
  margin: 2.5rem 0 1.5rem;
  position: relative;
}

.page-header h1 {
  font-size: clamp(2.8rem, 6vw, 4rem);
  font-weight: 900;
  margin: 0;
  color: var(--text); /* solid by default */
  text-shadow: 0 0 18px rgba(223,63,11,0.35);
}

.page-header h1::after {
  content: "";
  display: block;
  width: 90px;
  height: 4px;
  background: var(--accent);
  margin: 1rem auto 0;
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(223,63,11,0.6);
}

.page-header p {
  margin-top: 0.6rem;
  font-size: 1.15rem;
  color: rgba(255,237,231,0.75);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Gradient header ONLY on Let's Talk page */
.lets-talk-page .page-header h1 {
  background: linear-gradient(90deg, var(--accent), var(--text));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 18px rgba(223,63,11,0.35);
}
.team-grid{ display:grid; gap:.8rem }
.member{ display:flex; gap:.7rem; align-items:center; background:#2b2b2b; border:1px solid #323232; border-radius:14px; padding:.7rem .8rem }
.avatar{ width:44px; height:44px; border-radius:50%; object-fit:cover; background:#3a3a3a }
@media (max-width:900px){ .avatar{ width:40px; height:40px } }
/* keep anchors clear of the sticky header */
#services, #about { scroll-margin-top: 84px; }

/* mobile menu (in case it’s missing) */
.menu-toggle{ display:none; align-items:center; gap:.5rem; border:1px solid #3a3a3a; background:#2b2b2b; color:var(--text); padding:.5rem .75rem; border-radius:10px; font-weight:800 }
.menu-toggle .icon{ font-size:1.05rem; line-height:1 }
.mobile-menu{ display:none }
@media (max-width:900px){
  .nav ul{ display:none }
  .menu-toggle{ display:flex }
  .mobile-menu{
    position:fixed; top:calc(60px + env(safe-area-inset-top)); left:0; right:0;
    background:#2a2a2a; border-bottom:1px solid #343434; box-shadow: var(--shadow);
    padding:.6rem .8rem; transform-origin: top; transform: scaleY(0); transition: transform .18s ease; z-index:999
  }
  .mobile-menu.open{ display:block; transform: scaleY(1) }
  .mobile-menu a{ display:block; padding:.9rem 1rem; border-radius:10px; font-weight:800; color:var(--text) }
  .mobile-menu a:hover{ background:#313131 }
}

/* subtle highlight when an anchor finishes scrolling */
.anchor-flash{ animation: anchorFlash .8s ease }
@keyframes anchorFlash{
  0%{ box-shadow: 0 0 0 0 rgba(223,63,11,0) }
  40%{ box-shadow: 0 0 0 6px rgba(223,63,11,.18) }
  100%{ box-shadow: 0 0 0 0 rgba(223,63,11,0) }
}
/* === Our process: reserve space so headers don't clash with the bullet === */
.process-cards .process-card {
  padding-right: 3.6rem;   /* add a right gutter for the number */
  position: relative;
}

.process-cards .process-card .bullet {
  position: absolute;
  top: 0.9rem;             /* sit slightly above the h3 baseline */
  right: 1.2rem;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  opacity: .3;
  line-height: 1;
  pointer-events: none;    /* don't steal hover/clicks */
}

/* make sure long headings wrap before touching the gutter */
.process-cards .process-card h3 {
  margin-right: 0;         /* rely on card's padding-right */
  word-break: break-word;
}

/* tighter on small screens */
@media (max-width: 700px) {
  .process-cards .process-card { padding-right: 3rem; }
  .process-cards .process-card .bullet { top: 0.8rem; right: 1rem; }
}
/* =========================
   1) MOBILE: Services numbers not colliding
   ========================= */
/* On phones/tablets, reserve a right gutter in the Services cards (like we did for Our process) */
@media (max-width: 900px) {
  #services .process-card.service {
    position: relative;
    padding-right: 3.2rem;   /* space for the number */
  }
  #services .process-card.service .bullet {
    position: absolute;
    top: 0.9rem;              /* keep nicely above the H3 baseline */
    right: 1rem;
    font-size: 2rem;          /* a hair smaller on mobile */
    font-weight: 900;
    color: var(--accent);
    opacity: .3;
    line-height: 1;
    pointer-events: none;
  }
}

/* If you still see overlap on desktop (rare), remove the media query above
   and keep these rules global to Services. */


/* =========================
   2) MOBILE: EN/PT toggle smaller
   ========================= */
@media (max-width: 900px) {
  .lang-toggle {
    padding: .35rem .6rem;
    font-size: .85rem;
    border-radius: 10px;
    line-height: 1;
    /* prevent it from stretching the header */
    max-width: none;
    white-space: nowrap;
  }
}
@media (max-width: 520px) {
  .lang-toggle {
    padding: .3rem .55rem;
    font-size: .82rem;
  }
}


/* =========================
   3) Mobile menu: nice reveal animation
   ========================= */
/* Base state already uses scaleY; add opacity + smooth child reveals */
@media (max-width: 900px) {
  .mobile-menu {
    will-change: transform, opacity;
    transform: scaleY(0);
    opacity: 0;
    transition: transform .22s ease, opacity .22s ease;
    transform-origin: top;
  }
  .mobile-menu.open {
    transform: scaleY(1);
    opacity: 1;
  }

  /* Stagger links */
  .mobile-menu a {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .24s ease, transform .24s ease;
  }
  .mobile-menu.open a {
    opacity: 1;
    transform: none;
  }
  .mobile-menu.open a:nth-child(1) { transition-delay: 40ms; }
  .mobile-menu.open a:nth-child(2) { transition-delay: 80ms; }
  .mobile-menu.open a:nth-child(3) { transition-delay: 120ms; }
  .mobile-menu.open a:nth-child(4) { transition-delay: 160ms; } /* room for future items */
}
/* =========================
   EN/PT button — mobile sizing to match Menu
   ========================= */
@media (max-width: 900px) {
  /* Your Menu button is: padding .5rem .75rem; radius 10px; bold, dark bg */
  /* Make EN/PT look the same but ~0.1rem wider */
  .lang-toggle {
    /* override .btn / .ghost padding */
    padding: .5rem .85rem !important;  /* a touch wider than Menu */
    border-radius: 10px !important;
    font-size: .9rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;

    /* match Menu button’s visual style on mobile */
    background: #2b2b2b !important;
    color: var(--text) !important;
    border: 1px solid #3a3a3a !important;
    box-shadow: none !important;

    /* prevent stretching */
    max-width: none;
    white-space: nowrap;
  }
}

/* Slightly tighter on very small phones */
@media (max-width: 520px) {
  .lang-toggle {
    padding: .48rem .8rem !important;
    font-size: .88rem !important;
  }
}


/* =========================
   Mobile menu reveal animation (ensure it plays)
   ========================= */
@media (max-width: 900px) {
  /* Override older rules that set display:none; transitions don't run from display:none */
  .mobile-menu {
    display: block !important;      /* keep in flow so CSS transforms can animate */
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    will-change: transform, opacity;
    transition: transform .22s ease, opacity .22s ease;
  }
  .mobile-menu.open {
    transform: scaleY(1);
    opacity: 1;
  }

  /* Staggered link fade/slide for polish */
  .mobile-menu a {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .24s ease, transform .24s ease;
  }
  .mobile-menu.open a { opacity: 1; transform: none; }
  .mobile-menu.open a:nth-child(1) { transition-delay: 40ms; }
  .mobile-menu.open a:nth-child(2) { transition-delay: 80ms; }
  .mobile-menu.open a:nth-child(3) { transition-delay: 120ms; }
  .mobile-menu.open a:nth-child(4) { transition-delay: 160ms; } /* for future links */
}


/* =========================
   Services cards — stop number overlap on mobile
   ========================= */
@media (max-width: 900px) {
  #services .process-card.service {
    position: relative;
    padding-right: 3.2rem;  /* gutter for the number */
  }
  #services .process-card.service .bullet {
    position: absolute;
    top: 0.9rem;
    right: 1rem;
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent);
    opacity: .3;
    line-height: 1;
    pointer-events: none;
  }
}
/* =========================
   FINAL EN/PT BUTTON FIX — matches "Let's Talk" but properly scaled
   ========================= */

/* Desktop & tablet: same style as ghost buttons */
.lang-toggle {
  border: 1px solid rgba(223,63,11,.6);
  color: var(--accent);
  background: transparent;
  border-radius: 10px;
  font-weight: 800;
  font-size: .95rem;
  padding: .5rem .9rem;
  line-height: 1;
  cursor: pointer;
  transition: all .25s ease;
  box-shadow: none;
}
.lang-toggle:hover {
  background: rgba(223,63,11,.1);
  color: var(--text);
}

/* --- Mobile resize (match menu button proportions) --- */
@media (max-width: 900px) {
  .lang-toggle {
    font-size: .85rem !important;
    padding: .45rem .7rem !important;
    border-radius: 10px;
    border: 1px solid rgba(223,63,11,.7);
    background: transparent;
    color: var(--accent);
    font-weight: 800;
    box-shadow: none;
  }
}

/* Even smaller screens */
@media (max-width: 520px) {
  .lang-toggle {
    font-size: .82rem !important;
    padding: .4rem .65rem !important;
  }
}
/* === Language toggle (PT/EN) — orange/black pill === */
.lang-switch {
  position: relative;
  display: inline-block;
  width: 62px;
  height: 32px;
  margin: 0 .6rem 0 1rem;
  cursor: pointer;
  outline: none;
  user-select: none;
}
.lang-switch input { position: absolute; inset: 0; opacity: 0; pointer-events: none; }

.lang-switch .track {
  position: absolute; inset: 0;
  background: #111;                         /* OFF (EN) = black */
  border: 1px solid rgba(223,63,11,.6);
  border-radius: 999px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.35);
  transition: background .2s ease, border-color .2s ease;
}

.lang-switch .thumb {
  position: absolute; top: 3px; left: 3px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent);                /* knob is orange when OFF */
  box-shadow: 0 4px 14px rgba(223,63,11,.35), 0 2px 6px rgba(0,0,0,.35);
  transition: transform .22s ease, background .2s ease, box-shadow .2s ease;
  will-change: transform;
}

/* tiny labels inside the switch */
.lang-switch .label {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: .65rem; font-weight: 800; letter-spacing: .02em;
  pointer-events: none; opacity: .85;
}
.lang-switch .label.en { left: 9px; color: rgba(255,255,255,.85); }
.lang-switch .label.pt { right: 8px; color: rgba(0,0,0,.75); }

/* ON (PT) state — we use [aria-checked="true"] to style */
.lang-switch[aria-checked="true"] .track {
  background: var(--accent);                /* ON (PT) = orange */
  border-color: var(--accent);
  box-shadow: inset 0 1px 6px rgba(0,0,0,.25);
}
.lang-switch[aria-checked="true"] .thumb {
  transform: translateX(30px);
  background: #0f0f0f;                      /* knob becomes black when ON */
  box-shadow: 0 4px 14px rgba(0,0,0,.45);
}

/* hover focus polish */
.lang-switch:focus-visible .track {
  outline: 2px solid color-mix(in oklab, var(--accent) 70%, white 0%);
  outline-offset: 2px;
}

/* scale nicely on mobile to match Menu button height */
@media (max-width: 900px) {
  .lang-switch { width: 56px; height: 28px; margin: 0 .5rem 0 .75rem; }
  .lang-switch .thumb { width: 22px; height: 22px; top: 3px; left: 3px; }
  .lang-switch[aria-checked="true"] .thumb { transform: translateX(26px); }
  .lang-switch .label { font-size: .6rem; }
}

/* super small phones */
@media (max-width: 520px) {
  .lang-switch { width: 52px; height: 26px; }
  .lang-switch .thumb { width: 20px; height: 20px; top: 3px; left: 3px; }
  .lang-switch[aria-checked="true"] .thumb { transform: translateX(24px); }
  .lang-switch .label { font-size: .58rem; }
}
/* === Language toggle label colors by state === */
/* Default: make both labels a bit muted */
.lang-switch .label { opacity: .7; }

/* EN active (aria-checked="false") -> EN = black */
.lang-switch[aria-checked="false"] .label.en {
  color: #000 !important;
  opacity: 1;
}
/* When EN active, keep PT readable but not highlighted */
.lang-switch[aria-checked="false"] .label.pt {
  color: #fff !important;  /* white on black track */
  opacity: .55;
}

/* PT active (aria-checked="true") -> PT = white */
.lang-switch[aria-checked="true"] .label.pt {
  color: #fff !important;
  opacity: 1;
}
/* When PT active, dim EN */
.lang-switch[aria-checked="true"] .label.en {
  color: #000 !important;  /* black on orange knob/track area */
  opacity: .55;
}
.page-work main.container {
  height: auto;
  min-height: 0;
  overflow: visible;
}
