@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,400;1,400&display=swap');

:root {
  --bg: #FDFBF7;
  --surface: #FDFBF7;
  --text: #2B2523;
  --muted: #6E6967;
  --line: #2B2523;
  --accent: #f0d7df;
  --hero: #f8eaec;
  --hero-text: #2B2523;
  --spark: #e3e9dd;
  --rose-1: #f0d7df;
  --rose-2: #f9e0e2;
  --rose-3: #f7ddd9;
  --peach: #f7e6da;
  --sage: #e3e9dd;
  --aqua-1: #c4dbd9;
  --aqua-2: #d4e5e3;
  --blue: #cae0e4;
  --lilac: #c8c7d6;
  --shadow: 0 22px 0 #2B2523;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #2B2523;
  --surface: #2B2523;
  --text: #FDFBF7;
  --muted: rgba(253, 251, 247, .68);
  --line: #FDFBF7;
  --accent: #f0d7df;
  --hero: #2B2523;
  --hero-text: #FDFBF7;
  --spark: #e3e9dd;
  --shadow: 0 22px 0 #2B2523;
  color-scheme: dark;
}

[data-theme="dark"] .hero::before {
  background:
    radial-gradient(circle at var(--gradient-x, 50%) var(--gradient-y, 50%), rgba(240, 215, 223, .16) 0%, transparent 46%),
    #2B2523;
}
[data-theme="dark"] .hero .eyebrow { color: #f0d7df; }
[data-theme="dark"] .hero-aside { color: rgba(253, 251, 247, .72); }
[data-theme="dark"] .display-accent { color: #c4dbd9; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  transition: background .25s ease, color .25s ease;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; }

.shell { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-family: "Manrope", sans-serif; font-weight: 600; letter-spacing: -.045em; text-decoration: none; }
.brand-location { color: var(--muted); font-size: .88rem; font-weight: 500; letter-spacing: -.025em; }
.header-actions { display: flex; align-items: center; gap: 24px; }
.header-links { display: flex; align-items: center; gap: 18px; font-size: .86rem; font-weight: 500; }
.header-links a { border-radius: 2px; text-decoration-thickness: 1px; text-underline-offset: 4px; transition: background .16s ease, color .16s ease; }
.header-links a:hover { background: #F0D7DF; color: #2B2523; text-decoration-thickness: 2px; }
.controls { display: flex; align-items: center; gap: 10px; padding: 0 4px 4px 0; }
.control {
  min-width: 44px; min-height: 44px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 4px;
  background: var(--surface); color: var(--text); cursor: pointer;
  box-shadow: 4px 4px 0 var(--line);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
}
.control:hover { transform: translate(3px, 3px); background: #F0D7DF; box-shadow: 1px 1px 0 var(--line); color: #2B2523; }
.control:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--line); }
.lang-toggle { font-family: "Manrope", sans-serif; font-weight: 600; font-size: .82rem; letter-spacing: .04em; }

.hero { --gradient-x: 50%; --gradient-y: 50%; position: relative; isolation: isolate; padding: clamp(90px, 13vw, 180px) 0 105px; display: grid; grid-template-columns: 1fr; align-items: center; color: var(--hero-text); }
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 calc(50% - 50vw);
  background:
    radial-gradient(circle at var(--gradient-x) var(--gradient-y), rgba(253, 251, 247, .96) 0%, rgba(249, 224, 226, .8) 20%, rgba(240, 215, 223, .42) 38%, transparent 62%),
    linear-gradient(120deg, var(--hero) 0%, #f8eaec 58%, #c8c7d6 145%);
  will-change: background;
}
.eyebrow { color: var(--muted); font-family: "Manrope", sans-serif; text-transform: uppercase; letter-spacing: .11em; font-size: .76rem; font-weight: 600; }
.hero .eyebrow { color: #554F50; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-family: "Playfair Display", Georgia, serif; font-size: clamp(3.7rem, 8.8vw, 8.4rem); line-height: 1; letter-spacing: -.055em; margin-bottom: 34px; font-weight: 400; }
.display-accent { color: #2B2523; font-family: inherit; font-style: italic; font-weight: 400; letter-spacing: inherit; text-decoration: underline; text-decoration-color: #f0d7df; text-decoration-thickness: .12em; text-underline-offset: .08em; }
.hero-copy { max-width: 800px; font-size: clamp(1.18rem, 2vw, 1.7rem); line-height: 1.38; letter-spacing: -.025em; }
.hero-aside { color: #554F50; padding-bottom: 14px; }
.hero-aside a { border-radius: 2px; text-underline-offset: 4px; transition: background .16s ease, color .16s ease; }
.hero-aside a:hover { background: #F0D7DF; color: #2B2523; }
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 56px;
  height: 62px;
  border-radius: 999px;
  color: var(--hero-text);
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}
.scroll-cue:hover { transform: translate(-50%, -3px); background: color-mix(in srgb, var(--surface) 45%, transparent); }
.mouse-icon { display: block; width: 32px; height: 48px; }
.mouse-wheel { transform-box: fill-box; transform-origin: center; animation: mouse-scroll 1.8s ease-in-out infinite; }
@keyframes mouse-scroll {
  0% { transform: translateY(-1px); opacity: .35; }
  45% { opacity: 1; }
  75%, 100% { transform: translateY(5px); opacity: .2; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 30px 0 24px; border-top: 1px solid var(--line); }
.section-head h2 { font-family: "Manrope", sans-serif; font-size: .86rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.section-head span { color: var(--muted); }
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding-bottom: 120px; }
.project-card {
  position: relative; overflow: hidden; min-width: 0;
  border: 2px solid var(--text); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow);
  text-decoration: none; display: grid; grid-template-rows: 1fr auto;
  transition: transform .35s cubic-bezier(.2,.75,.25,1);
}
.project-card:hover { transform: translate(-5px, -7px); }
.project-visual { min-height: 0; aspect-ratio: 4 / 3; display: grid; place-items: center; padding: clamp(24px, 3vw, 44px); overflow: hidden; }
.project-visual img { width: 100%; height: 100%; max-height: 330px; object-fit: contain; filter: drop-shadow(0 22px 35px rgba(0,0,0,.18)); transition: transform .5s ease; }
.project-card:hover img { transform: scale(1.025); }
.violet { background: linear-gradient(135deg, #f0d7df, #f9e0e2); }
.sky { background: linear-gradient(135deg, #c4dbd9, #d4e5e3 50%, #cae0e4); }
.amber { background: linear-gradient(135deg, #f7ddd9, #f7e6da); }
.card-meta { padding: 24px 26px 28px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.card-meta h3 { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: clamp(1.75rem, 2.35vw, 2.45rem); font-weight: 400; letter-spacing: -.04em; line-height: 1; }
.landing-card .card-meta h3 { font-size: clamp(1.35rem, 1.9vw, 2.1rem); white-space: nowrap; }
.card-tag { display: inline-block; margin-bottom: 11px; padding: 6px 11px; border-radius: 999px; background: rgba(194, 109, 77, .5); color: #211916; font-size: .7rem; font-weight: 700; line-height: 1.2; text-transform: uppercase; letter-spacing: .055em; }
[data-theme="dark"] .card-tag { background: rgba(194, 109, 77, .5); color: #FDFBF7; }
.card-meta p { margin: 8px 0 0; color: var(--muted); }
.arrow { font-size: 2.3rem; line-height: 1; }

.case-hero { padding: 100px 0 62px; }
.back { display: inline-block; margin-bottom: 44px; border-radius: 2px; color: var(--muted); text-decoration: none; transition: background .16s ease, color .16s ease; }
.back:hover { background: #F0D7DF; color: #2B2523; }
.case-hero h1 { font-size: clamp(3rem, 7.2vw, 7rem); max-width: 1050px; font-family: "Playfair Display", Georgia, serif; font-weight: 400; line-height: 1; letter-spacing: -.045em; }
.case-summary { max-width: 780px; font-size: clamp(1.15rem, 1.9vw, 1.5rem); color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.tag {
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(221, 167, 151, .5);
  color: #2B2523;
  font-family: "Manrope", sans-serif;
  font-size: .85rem;
  font-weight: 500;
  line-height: 1.2;
}
[data-theme="dark"] .tag { background: rgba(221, 167, 151, .5); color: #FDFBF7; }
.tag.featured-tag { background: rgba(194, 109, 77, .5); color: #211916; font-weight: 700; }
[data-theme="dark"] .tag.featured-tag { background: rgba(194, 109, 77, .5); color: #FDFBF7; }
.case-image { border: 2px solid var(--text); border-radius: 8px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.case-image img { display: block; width: auto; max-width: 100%; height: auto; max-height: 760px; object-fit: contain; }
.project-page .case-hero h1 { max-width: 900px; font-size: clamp(2.75rem, 5vw, 4.8rem); }
.acciona-page .case-hero h1 { max-width: 820px; font-size: clamp(2.6rem, 4vw, 4rem); }
.project-page .case-image {
  width: max-content;
  max-width: calc(100% - 40px);
  margin-inline: auto;
}
.project-page .case-image,
.project-page .inline-image { box-shadow: none; }
.project-page .case-image img { margin-inline: auto; }
.project-page .inline-image {
  position: relative;
  left: 50%;
  display: block;
  width: min(1100px, calc(100vw - 40px));
  margin: 54px 0;
  transform: translateX(-50%);
}
.case-body { max-width: 820px; margin: 0 auto; padding: 110px 0; }
.case-body section { margin-bottom: 82px; }
.case-body h2 { font-family: "Playfair Display", Georgia, serif; font-weight: 400; font-size: clamp(2.2rem, 4.3vw, 4.1rem); line-height: 1; letter-spacing: -.035em; }
.case-body h3 { margin-top: 34px; font-size: 1.25rem; }
.case-body p, .case-body li { color: var(--muted); font-size: 1.08rem; }
.case-body strong { color: var(--text); }
.case-body ul { padding-left: 1.25rem; }
.inline-image { margin: 54px calc((820px - min(1100px, 92vw))/2); width: min(1100px, 92vw); border: 2px solid var(--text); border-radius: 8px; box-shadow: var(--shadow); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 30px 0; }
.metric { background: #e3e9dd; color: #2B2523; padding: 24px; border: 2px solid #2B2523; border-radius: 4px; }
.metric b { font-family: "Playfair Display", Georgia, serif; font-weight: 400; font-size: 2.4rem; display: block; }
.metric span { color: #66645F; font-size: .9rem; }
.next {
  display: block;
  width: max-content;
  max-width: calc(100% - 7px);
  min-height: 44px;
  margin: 0 7px 90px auto;
  padding: 11px 18px;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 6px 6px 0 var(--line);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0;
  text-align: right;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
}
.next:hover {
  transform: translate(3px, 3px);
  background: #F0D7DF;
  box-shadow: 3px 3px 0 var(--line);
  color: #2B2523;
}
.next:active { transform: translate(6px, 6px); box-shadow: 0 0 0 var(--line); }
.footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; border-top: 1px solid var(--line); padding: 36px 0 60px; color: var(--muted); }
.footer > :last-child { text-align: right; }
.footer-links { display: flex; align-items: center; justify-content: center; gap: 20px; }
.footer-links a { border-radius: 2px; color: inherit; text-underline-offset: 4px; transition: background .16s ease, color .16s ease; }
.footer-links a:hover { background: #F0D7DF; color: #2B2523; }

[data-lang="pt"] [data-en], [data-lang="en"] [data-pt] { display: none !important; }

@media (min-width: 1000px) {
  .hero {
    height: min(691px, calc(100svh - 77px));
    min-height: 600px;
    padding-top: 46px;
    padding-bottom: 46px;
  }

  .hero h1 {
    max-width: 920px;
    font-size: clamp(4rem, 6.4vw, 5.75rem);
    line-height: 1;
    margin-bottom: 24px;
  }

  .hero-copy {
    max-width: 740px;
    font-size: clamp(1.08rem, 1.45vw, 1.3rem);
    line-height: 1.38;
  }

  .hero-aside {
    padding-bottom: 4px;
    font-size: .95rem;
  }
}

@media (min-width: 761px) and (max-width: 999px) {
  .projects { grid-template-columns: 1fr; gap: 30px; }
  .project-visual { aspect-ratio: 16 / 9; padding: clamp(36px, 8vw, 72px); }
  .project-visual img { max-height: 430px; }
  .card-meta h3 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
  .hero {
    min-height: 0;
    padding: 84px 0 76px;
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero h1 {
    max-width: 820px;
    font-size: clamp(4.2rem, 9.5vw, 5.8rem);
    line-height: 1;
  }

  .hero-copy { max-width: 680px; }
  .hero-aside { max-width: 520px; padding-bottom: 0; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 24px, 1240px); }
  .nav { min-height: 66px; display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 10px 0; }
  .brand { grid-column: 1; grid-row: 1; }
  .header-actions { display: contents; }
  .controls { grid-column: 2; grid-row: 1; }
  .header-links { grid-column: 1 / -1; grid-row: 2; justify-content: flex-end; padding: 8px 4px 2px 0; }
  .hero { min-height: 0; height: auto; grid-template-columns: 1fr; gap: 26px; padding: 72px 0 64px; }
  h1 { font-size: clamp(3.35rem, 18vw, 5rem); }
  .scroll-cue { position: static; justify-self: center; transform: none; margin-top: 8px; }
  .scroll-cue:hover { transform: translateY(-3px); }
  .projects { grid-template-columns: 1fr; gap: 28px; }
  .project-card { border-radius: 6px; box-shadow: 0 12px 0 var(--text); }
  .project-visual { min-height: 330px; aspect-ratio: auto; padding: 24px; }
  .card-meta { padding: 22px; }
  .case-hero { padding-top: 70px; }
  .case-body { padding: 80px 8px; }
  .metric-grid { grid-template-columns: 1fr; }
  .footer { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer > :last-child { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .mouse-wheel { animation: none; }
}
