/* Visual design based on the "korpen-website" dark template. */

@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 200 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #080a0d;
  --bg-alt: #0c1014;
  --panel-hover: #151b21;
  --text: #f0f1ef;
  --muted: #929ba5;
  --dim: #77818c;
  --line: #282f37;
  --silver: #c6cbd0;
  --accent-muted: #929ca7;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
strong { font-weight: 500; color: var(--text); }
:focus-visible { outline: 1px solid var(--silver); outline-offset: 3px; }
[hidden] { display: none !important; }

.container { width: min(1160px, 88%); margin: 0 auto; }

/* Uppercase micro-labels */
.nav-links a, .eyebrow, .button, .card-index, .card-tag, .footer-inner, .lang-toggle, .hero-index {
  text-transform: uppercase;
  letter-spacing: .16em;
}

/* Header */
.site-header {
  height: 90px; position: sticky; top: 0; z-index: 20;
  background: rgba(8, 10, 13, .9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; height: 100%; }
.brand-logo { display: block; height: 72px; width: auto; }
.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 36px; }
.nav-links a { color: var(--muted); font-size: 11px; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.lang-toggle {
  background: none; color: var(--silver); font: 500 11px "Manrope", sans-serif;
  border: 1px solid #4b535d; padding: 6px 10px; cursor: pointer; transition: border-color .2s;
}
.lang-toggle:hover { border-color: #dce0e3; }
.menu-toggle { display: none; color: var(--text); background: none; border: 0; font-size: 22px; cursor: pointer; }

/* Hero */
.hero {
  min-height: 660px; display: flex; align-items: center; position: relative;
  overflow: hidden; border-bottom: 1px solid var(--line);
}
.hero-glow {
  position: absolute; width: 680px; height: 680px; right: -170px; top: -120px;
  background: radial-gradient(circle, rgba(155, 170, 185, .12), transparent 68%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; padding: 110px 0; }
.eyebrow { color: var(--silver); font-size: 11px; letter-spacing: .25em; margin-bottom: 24px; }
h1, h2 {
  font-family: "Montserrat", sans-serif; font-weight: 300;
  letter-spacing: -.045em; line-height: 1.17;
}
h1 { font-size: clamp(42px, 6.4vw, 80px); }
h2 { font-size: clamp(32px, 4.5vw, 52px); }
h1 span, h2 span { color: var(--accent-muted); }
.hero-copy { color: var(--muted); font-size: 16px; margin-top: 27px; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-index {
  position: absolute; bottom: 36px; right: 6%; color: #5f6872;
  font: 11px "Montserrat", sans-serif; letter-spacing: .2em;
}

/* Animated "film" (driven by assets/film.js) */
.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;
}
.film-section { padding: 88px 0 96px; border-bottom: 1px solid var(--line); }
.film-tabs {
  display: flex; gap: 28px; margin: -6px 0 18px; overflow-x: auto; scrollbar-width: none;
}
.film-tabs::-webkit-scrollbar { display: none; }
.film-tab {
  flex: none; padding: 8px 0; background: none; border: 0; border-bottom: 1px solid transparent;
  color: var(--dim); font: 500 11px "Manrope", sans-serif; letter-spacing: .16em; text-transform: uppercase;
  cursor: pointer; transition: color .2s, border-color .2s;
}
.film-tab:hover { color: var(--text); }
.film-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--silver); }
.film { border: 1px solid var(--line); background: var(--bg-alt); }
.film-stage {
  position: relative; overflow: hidden; aspect-ratio: 16 / 7;
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 40px 40px;
}
.film-scene { position: absolute; inset: 0; }
.film-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.film-lines .chaos { fill: none; stroke: #4b535d; stroke-width: 1; stroke-dasharray: 4 6; }
.film-lines .flow { fill: none; stroke: #6a737d; stroke-width: 1; }
.film-lines .pulse { fill: var(--silver); filter: drop-shadow(0 0 6px rgba(220, 225, 230, .8)); }
.film-scan {
  position: absolute; top: 0; bottom: 0; left: 0; width: 90px; margin-left: -90px;
  background: linear-gradient(90deg, transparent, rgba(198, 203, 208, .07));
  border-right: 1px solid var(--silver); opacity: 0; pointer-events: none;
}
.film-node {
  position: absolute; left: 0; top: 0; display: grid; place-items: center;
  max-width: clamp(108px, 12.5vw, 160px); padding: 10px 14px;
  background: var(--bg); border: 1px dashed #3d454e; color: var(--muted);
  font-size: 12.5px; font-weight: 400; line-height: 1.35; text-align: center;
  transition: border-color .4s, color .4s, background .4s; will-change: transform;
}
.film-node > .film-before, .film-node > .film-after { grid-area: 1 / 1; transition: opacity .45s; }
.film-node > .film-after { opacity: 0; }
.film-node-index {
  position: absolute; top: -9px; left: 10px; padding: 0 6px; background: var(--bg-alt);
  color: var(--dim); font-size: 10px; line-height: 16px; letter-spacing: .16em;
  opacity: 0; transition: opacity .3s;
}
.film-node-label {
  position: absolute; top: -9px; left: 10px; padding: 0 6px; background: var(--bg-alt);
  color: var(--silver); font-size: 10px; line-height: 16px; letter-spacing: .16em; text-transform: uppercase;
  white-space: nowrap; opacity: 0; transition: opacity .4s;
}
.film.is-ordered .film-node-index { opacity: 0; }
.film.is-ordered .film-node-label { opacity: 1; }
.film-node.is-scanned { border-color: #6a737d; }
.film-node.is-scanned .film-node-index { opacity: 1; }
.film.is-ordered .film-node { border-style: solid; border-color: #4b535d; color: var(--text); }
.film.is-ordered .film-before { opacity: 0; }
.film.is-ordered .film-after { opacity: 1; }
.film.is-ordered .film-node.is-active { border-color: var(--silver); background: var(--panel-hover); }
.film-result {
  position: absolute; left: 0; right: 0; top: 74%; text-align: center;
  font: 300 clamp(20px, 2.6vw, 30px) "Montserrat", sans-serif; letter-spacing: -.03em;
  opacity: 0; transform: translateY(10px); transition: opacity .7s, transform .7s;
}
.film-result span { color: var(--accent-muted); }
.film.show-result .film-result { opacity: 1; transform: none; }
.film-tag, .film-time {
  position: absolute; top: 18px; color: #5f6872;
  font: 11px "Montserrat", sans-serif; letter-spacing: .2em;
}
.film-tag { left: 22px; }
.film-time { right: 22px; font-variant-numeric: tabular-nums; }
.film-bar { border-top: 1px solid var(--line); }
.film-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 0 24px; margin-top: -1px; }
.film-seg { display: block; height: 2px; background: var(--line); overflow: hidden; }
.film-seg i { display: block; height: 100%; background: var(--silver); transform: scaleX(0); transform-origin: left; }
.film-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 24px 20px; }
.film-captions { display: grid; flex: 1; min-width: 0; }
.film-caption {
  grid-area: 1 / 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px;
  color: var(--muted); font-size: 14px; opacity: 0; transition: opacity .4s;
}
.film-caption.is-active { opacity: 1; }
.film-caption strong { font-weight: 400; }
.film-cap-index { color: var(--dim); font-size: 11px; letter-spacing: .16em; }
.film-toggle {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  background: none; border: 1px solid #4b535d; cursor: pointer; transition: border-color .2s;
}
.film-toggle:hover { border-color: #dce0e3; }
.film-icon { width: 10px; height: 12px; border-left: 3px solid var(--silver); border-right: 3px solid var(--silver); }
.film.is-paused .film-icon {
  width: 0; height: 0; margin-left: 3px; border-style: solid; border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent var(--silver);
}
.film:not(.is-paused) .film-label-play, .film.is-paused .film-label-pause { display: none; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; font-size: 11px; font-weight: 500; transition: .25s;
}
.button-light { color: #0b0d10; background: #e7e9e9; }
.button-light:hover { background: #fff; transform: translateY(-2px); }
.button-outline { border: 1px solid #4b535d; color: var(--text); }
.button-outline:hover { border-color: #dce0e3; }

/* Sections */
.section { padding: 112px 0; }
.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-intro { display: flex; justify-content: space-between; align-items: end; gap: 50px; }
.section-intro > p, .body-copy { color: var(--muted); font-size: 15px; max-width: 470px; }
.body-copy { margin-top: 22px; line-height: 2; }

/* Two-column: heading left, rows right */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; align-items: center; }
.rows { border-top: 1px solid var(--line); }
.rows li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted);
}
.row-index { color: var(--dim); font-size: 11px; letter-spacing: .16em; }

/* Card grids (1px line separators) */
.grid { display: grid; gap: 1px; margin-top: 58px; background: var(--line); border: 1px solid var(--line); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--bg); min-height: 220px; padding: 38px; display: flex; flex-direction: column; transition: background .25s; }
.alt .card { background: var(--bg-alt); }
.card:hover, .alt .card:hover { background: var(--panel-hover); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-index { color: #87919c; font-size: 11px; }
.card-tag { color: var(--bg); background: var(--silver); font-size: 10px; font-weight: 500; padding: 2px 8px; }
.card h3 { font-size: 19px; font-weight: 400; margin: 22px 0 9px; }
.card p { color: var(--muted); font-size: 14px; max-width: 440px; }
.card .card-meta { margin-top: auto; padding-top: 18px; color: var(--dim); font-size: 12px; letter-spacing: .08em; }

/* Team: alternating rows (text box + round photo) */
.team-list { display: grid; gap: 64px; margin-top: 58px; }
.member { display: grid; grid-template-columns: 1.5fr 1fr; gap: 72px; align-items: center; }
.member--photo-left { grid-template-columns: 1fr 1.5fr; }
.member--photo-left .member-photo { order: -1; }
.member .card { min-height: auto; border: 1px solid var(--line); background: var(--bg); }
.member .card:hover { background: var(--panel-hover); }
.member .card h3 { margin-top: 0; font-size: 24px; font-family: "Montserrat", sans-serif; font-weight: 300; letter-spacing: -.02em; }
.card .member-role { color: var(--silver); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 14px; }
.member-photo {
  justify-self: center; display: block; width: min(280px, 100%); height: auto; aspect-ratio: 1;
  object-fit: cover; border-radius: 50%; background: var(--panel-hover);
  outline: 1px solid var(--line); outline-offset: 12px;
}

/* FAQ */
.faq .split { align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 22px 0; cursor: pointer; list-style: none; font-size: 16px; font-weight: 400;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; flex: none; color: var(--silver); font-size: 20px; line-height: 1;
  transition: transform .25s;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:hover { color: var(--silver); }
.faq-list details p { color: var(--muted); font-size: 14px; padding: 0 40px 24px 0; }

/* Contact */
.contact-split { align-items: start; }
.contact-direct { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.contact-direct-label { color: var(--dim); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.contact-email { display: inline-block; margin-top: 8px; font-size: 17px; border-bottom: 1px solid #4b535d; transition: border-color .2s; }
.contact-email:hover { border-color: var(--silver); }
.contact-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.contact-buttons:not(:has(a:not([hidden]))) { display: none; }
.contact-form { display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { color: var(--silver); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.field input, .field textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 0;
  background: var(--bg); color: var(--text); font: inherit; font-size: 15px; line-height: 1.5;
  transition: border-color .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--silver); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-note { color: var(--dim); font-size: 12px; }
.contact-form .button { justify-self: start; border: 0; cursor: pointer; font-family: inherit; }
.contact-form .button:disabled { opacity: .6; cursor: wait; transform: none; }
.form-status { color: var(--silver); font-size: 14px; min-height: 1.8em; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; color: var(--dim); font-size: 10px; }

@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

}

/* Narrow screens: the film switches to a vertical layout (keep in sync with TALL_QUERY in film.js) */
@media (max-width: 860px) {
  .film-stage { aspect-ratio: 4 / 5; max-height: 640px; }
  .film-node { max-width: 220px; }
  .film-result { top: auto; bottom: 22px; padding: 0 16px; }
}

@media (max-width: 760px) {
  .film-section { padding: 64px 0 72px; }
  .film-bar-inner { padding: 16px 18px 18px; }
  .film-progress { padding: 0 18px; }
  .film-caption { font-size: 13px; }
  .film-tabs { gap: 20px; }
  .site-header { height: 76px; }
  html { scroll-padding-top: 76px; }
  .brand-logo { height: 58px; }
  .nav-right { gap: 16px; }
  .menu-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 76px; left: 0; right: 0;
    padding: 22px 6%; background: #0b0e12; border-bottom: 1px solid var(--line);
    flex-direction: column; gap: 18px;
  }
  .nav-links.open { display: flex; }
  .hero { min-height: 590px; }
  .hero-inner { padding: 90px 0; }
  .section { padding: 82px 0; }
  .section-intro, .split { display: grid; grid-template-columns: 1fr; gap: 32px; }
  .grid-2, .grid-4 { grid-template-columns: 1fr; margin-top: 38px; }
  .team-list { gap: 48px; margin-top: 38px; }
  .member, .member--photo-left { grid-template-columns: 1fr; gap: 32px; }
  .member .member-photo { order: -1; justify-self: start; width: 180px; margin-left: 12px; }
  .form-row { grid-template-columns: 1fr; }
  .card { min-height: auto; padding: 30px; }
  .footer-inner { flex-direction: column; gap: 6px; }
}

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

/* Process: thin segmented timeline, one description at a time */
.timeline { list-style: none; margin: 58px -16px 0; display: flex; gap: 10px; flex-wrap: wrap; }
.tl-item { display: contents; }
.tl-head {
  position: relative; flex: 1 1 0; min-width: 0; padding: 22px 16px 20px; background: none; border: 0;
  color: var(--dim); font: inherit; text-align: left; cursor: pointer; transition: color .25s;
}
.tl-head::before, .tl-head::after { content: ""; position: absolute; top: 0; left: 0; height: 1px; }
.tl-head::before { right: 0; background: var(--line); }
.tl-head::after { width: 0; background: var(--silver); }
.tl-item.done .tl-head::after { width: 100%; }
.tl-item.active .tl-head::after { animation: tl-fill var(--tl-time, 7s) linear forwards; }
.timeline.paused .tl-item.active .tl-head::after { animation-play-state: paused; }
@keyframes tl-fill { to { width: 100%; } }
.tl-num { display: block; font-size: 11px; letter-spacing: .16em; margin-bottom: 6px; }
.tl-head h3 { font-size: 15px; font-weight: 300; line-height: 1.4; margin: 0; }
.tl-head:hover, .tl-item.done .tl-head { color: var(--muted); }
.tl-item.active .tl-head { color: var(--text); background: linear-gradient(to bottom, rgba(198, 203, 208, .07), transparent 85%); }
.tl-item.active .tl-head::before, .tl-item.active .tl-head::after { height: 2px; }
.tl-item.active .tl-head::before { background: #3a424b; }
.tl-item.active .tl-num { color: var(--silver); }
.tl-body { margin-left: 16px; }
.tl-head:focus-visible { outline: 1px solid var(--silver); outline-offset: 4px; }
.tl-body { display: none; flex: 0 0 100%; order: 1; min-height: 64px; margin-top: 28px; }
.tl-item.active .tl-body { display: block; animation: tl-in .45s ease; }
.tl-body p { color: var(--muted); font-size: 17px; line-height: 1.7; max-width: 620px; }
@keyframes tl-in { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 760px) {
  .timeline { margin: 38px 0 0; gap: 6px; }
  .tl-body { margin-left: 0; }
  .tl-head { flex: 0 0 40px; padding: 22px 0 16px; }
  .tl-item.active .tl-head { padding: 22px 10px 16px; }
  .tl-item.active .tl-head { flex: 1 1 0; }
  .tl-head h3 { display: none; }
  .tl-item.active .tl-head h3 { display: block; }
  .tl-body { margin-top: 28px; min-height: 0; }
  .tl-body p { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .tl-item.active .tl-body { animation: none; }
  .tl-item.active .tl-head::after { animation: none; width: 100%; }
}

/* Privacy page */
.legal { padding: 90px 0 112px; }
.legal-body { max-width: 680px; }
.legal h2 { font-family: "Montserrat", sans-serif; font-weight: 300; font-size: 22px; letter-spacing: -.02em; margin: 88px 0 18px; padding-top: 56px; border-top: 1px solid var(--line); }
.legal-body > .body-copy + h2 { margin-top: 72px; }
.legal p { color: var(--muted); font-size: 15px; line-height: 2; }
.legal a, .form-note a, .footer-inner a { text-decoration: underline; text-underline-offset: 3px; }
.legal-updated { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--dim) !important; font-size: 12px !important; }
.legal-back { display: inline-block; margin-top: 28px; color: var(--silver); font-size: 13px; }

/* People strip under the hero */
.people { border-bottom: 1px solid var(--line); }
.people-inner { display: flex; align-items: center; gap: 22px; padding: 26px 0; }
.people-faces { display: flex; flex-shrink: 0; }
.people-faces img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); background: var(--panel-hover); }
.people-faces img + img { margin-left: -16px; }
.people-text { color: var(--muted); font-size: 15px; flex: 1; }
.people-text strong { margin-right: 6px; }
.people-link { color: var(--silver); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.people-link:hover { color: var(--text); }
@media (max-width: 720px) {
  .people-inner { flex-wrap: wrap; gap: 14px 18px; }
  .people-text { flex-basis: calc(100% - 100px); }
}

/* "Revê-se nisto?": ticking problems */
.problems .rows li { cursor: pointer; transition: color .2s, background .2s; }
.problems .rows li:hover { color: var(--text); }
.problems .rows li.is-selected { color: var(--text); background: rgba(198, 203, 208, .06); }
.problems .rows li .row-index { display: inline-block; height: 16px; line-height: 16px; }
.problems .rows li.is-selected .row-index { color: var(--text); font-size: 0; }
.problems .rows li.is-selected .row-index::after { content: "✓"; font-size: 16px; }
.problems-hint { font-size: 13px; color: var(--dim); margin-top: 18px; }
/* Always takes up its space (invisible until something is ticked), so the layout never jumps */
.problems-cta { margin-top: 22px; visibility: hidden; }
.problems-cta.is-visible { visibility: visible; }

/* "Revê-se nisto?" on phones: the button goes below the list, so it never leaves a gap or pushes the list down */
@media (max-width: 760px) {
  .problems .split { gap: 0; }
  .problems .split > div { display: contents; }
  .problems .rows { order: 1; margin-top: 32px; }
  .problems-cta { order: 2; margin-top: 28px; justify-self: start; }
}
