/*
Theme Name: Paisagens
Author: Sa Couto Graca
Version: 1.0
*/

:root {
  --green: #00FF00;
  --grey: #4D4945;
  --black: #000000;
  --white: #FFFFFF;
  --ink: #1C1C1C;

  --side: clamp(20px, 17vw, 260px);     /* where section titles start */
  --side_right: clamp(20px, 6vw, 96px);
  --indent: clamp(0px, 7vw, 110px);     /* content starts right of the titles */
  --fade: 0.45s;
}

/* =========================================================
   Base
   ========================================================= */

* {
  box-sizing: border-box;
}

/* IBM Plex Mono everywhere, whatever reset.css or plugins set */
*,
*::before,
*::after {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--black);
  color: var(--white);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.no_scroll {
  overflow: hidden;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

section {
  position: relative;
  padding: 56px var(--side_right) 56px var(--side);
}

h1, h2, h3, h6, p {
  margin: 0;
}

h6 {
  font-size: 9px;
  font-weight: 500;
}

/* Section colours */

.grey_section  { background-color: var(--grey);  color: var(--white); }
.green_section { background-color: var(--green); color: var(--ink); }
.black_section { background-color: var(--black); color: var(--white); }

.section_title {
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.grey_section .section_title,
.black_section .section_title {
  color: var(--green);
}

/* White corner shapes */

.corner {
  position: absolute;
  z-index: 5;
  width: clamp(30px, 3.4vw, 44px);
  aspect-ratio: 1;
  background-color: var(--white);
}

.corner_hero {
  left: var(--side);
  bottom: 24px;
  clip-path: polygon(0 0, 42% 0, 42% 58%, 100% 58%, 100% 100%, 0 100%);
}

.corner_sobre {
  top: 0;
  left: calc(var(--side) - 50px);
  clip-path: polygon(0 0, 100% 0, 100% 42%, 42% 42%, 42% 100%, 0 100%);
}

.corner_parceiros {
  top: 0;
  right: var(--side_right);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 58% 100%, 58% 42%, 0 42%);
}

/* =========================================================
   Navigation
   ========================================================= */

.navigation_header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 26px var(--side_right) 32px var(--side);
  color: var(--white);
}

/* Darker gradient + progressive blur behind the header.
   Each layer blurs more and is masked to a shorter band at the top,
   so the blur fades out smoothly towards the bottom. */

.header_blur {
  position: absolute;
  inset: 0 0 -20px 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.385) 45%,
    rgba(0, 0, 0, 0.14) 75%,
    rgba(0, 0, 0, 0) 100%
  );
}

.header_blur span {
  position: absolute;
  inset: 0;
  opacity: 0.7;
}

.header_blur span:nth-child(1) {
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
}

.header_blur span:nth-child(2) {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 75%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 75%);
}

.header_blur span:nth-child(3) {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 25%, transparent 55%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 25%, transparent 55%);
}

.header_blur span:nth-child(4) {
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 10%, transparent 35%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 10%, transparent 35%);
}

.header_left {
  flex-shrink: 0;
}

.header_left img,
img.home {
  display: block;
  height: clamp(32px, 3.4vw, 44px);
  width: auto;
}

.header_right {
  display: flex;
  align-items: flex-start;
  gap: 56px;
}

.header_pages,
.language_pages {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header_pages li + li,
.language_pages li + li {
  border-left: 1px solid currentColor;
}

.header_pages a,
.language_pages a {
  display: block;
  padding: 0 9px;
  font-size: 10px;
  text-transform: uppercase;
  text-decoration: none;
}

.header_pages a:hover,
.language_pages a:hover {
  color: var(--green);
}

.current-language-menu-item a {
  font-weight: 700;
}

.hamburger,
.close_menu {
  display: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

/* Single pages: logo + PT | EN only */

body.single .hamburger,
body.single .close_menu {
  display: none;
}

body.single .header_pages li:not(:nth-last-child(-n+2)) {
  display: none;
}

body.single .header_pages li:nth-last-child(2) {
  border-left: 0;
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  display: flex;
  align-items: center;
  min-height: clamp(640px, 58vw, 800px);
  overflow: hidden;
  background-color: var(--grey);
}

.hero_images,
.hero_image {
  position: absolute;
  inset: 0;
}

.hero_image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.hero_image.active {
  opacity: 1;
}

.hero_title {
  position: relative;
  z-index: 2;
  margin-left: var(--indent);
  padding-top: 40px;
  color: var(--green);
  font-size: clamp(28px, 4.1vw, 54px);
  font-weight: 700;
  line-height: 1.18;
  text-transform: uppercase;
}

/* =========================================================
   Notícias / Podcast — 3 fade out, next 3 fade in
   ========================================================= */

.fade_pager {
  margin-left: var(--indent);
}

.pager_pages {
  display: grid;
  overflow: hidden;
  transition: height 0.4s ease 0.3s;   /* resizes between the fade-out and the fade-in */
}

.pager_page {
  grid-area: 1 / 1;
  align-self: start;                   /* each group keeps its own height */
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3.5vw, 56px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--fade) ease, visibility 0s linear var(--fade);
}

.pager_page.active {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--fade) ease var(--fade), visibility 0s linear var(--fade);
}

.pager_item h3 {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.pager_item h3 a {
  text-decoration: none;
}

.pager_item h3 a:hover {
  text-decoration: underline;
}

.pager_item h6 {
  margin-bottom: 18px;
  color: var(--green);
}

.green_section .pager_item h6 {
  color: inherit;
}

.pager_item p {
  font-size: 12px;
  line-height: 1.55;
  margin-bottom: 14px;
}

.text_cta {
  font-size: 9px;
  text-transform: uppercase;
  text-decoration: none;
}

.text_cta:hover {
  text-decoration: underline;
}

/* Arrows — SF Symbols style: arrow.left.square / arrow.right.square */

.arrows {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
}

.arrow {
  display: block;
  width: 24px;
  height: 24px;
  background-color: currentColor;   /* takes the section's text colour */
  -webkit-mask: var(--arrow_icon) center / contain no-repeat;
  mask: var(--arrow_icon) center / contain no-repeat;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.arrow:hover {
  opacity: 1;
}

.arrow_prev {
  --arrow_icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.8' y='2.8' width='18.4' height='18.4' rx='4.2'/%3E%3Cpath d='M16.5 12H7.8M11.3 8.4 7.6 12l3.7 3.6'/%3E%3C/svg%3E");
}

.arrow_next {
  --arrow_icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.8' y='2.8' width='18.4' height='18.4' rx='4.2'/%3E%3Cpath d='M7.5 12h8.7M12.7 8.4 16.4 12l-3.7 3.6'/%3E%3C/svg%3E");
}

/* =========================================================
   Sobre
   ========================================================= */

.long_text {
  max-width: 64ch;
  margin-left: var(--indent);
  font-size: 13px;
  line-height: 1.6;
}

.long_text p {
  margin-bottom: 1em;
}

/* =========================================================
   Equipa
   ========================================================= */

.equipa_header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 64px;
  margin-bottom: 32px;
}

.equipa_header .section_title {
  margin-bottom: 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  row-gap: 6px;
}

.tab {
  padding: 0 8px;
  font-size: 9px;
  text-transform: uppercase;
  opacity: 0.5;
}

.tab + .tab {
  border-left: 1px solid currentColor;
}

.tab:hover {
  opacity: 0.8;
}

.tab[aria-selected="true"] {
  opacity: 1;
  font-weight: 700;
}

.tab_panel {
  animation: fade_in 0.4s ease;
}

@keyframes fade_in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Team carousel — one card per step */

.team_viewport {
  overflow: hidden;
  touch-action: pan-y;
}

.team_track {
  --gap: clamp(20px, 2.6vw, 36px);
  --visible: 3;
  display: flex;
  gap: var(--gap);
}

.team_member {
  flex: 0 0 calc((100% - (var(--visible) - 1) * var(--gap)) / var(--visible));
  display: grid;
  grid-template-columns: 44% 1fr;
  gap: 10px;
  align-items: start;
  user-select: none;
}

.team_photo {
  aspect-ratio: 3 / 4;
  background-color: var(--green);
  overflow: hidden;
}

.team_photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15);
  mix-blend-mode: multiply;   /* green duotone */
  pointer-events: none;
}

.team_info h3 {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 8px;
}

/* ORCID (ID.svg) and Ciência Vitae (CV.svg) — white, black on hover */

.team_links {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.team_icon {
  display: block;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  background-color: var(--white);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transition: background-color 0.2s ease;
}

.team_icon:hover,
.team_icon:focus-visible {
  background-color: var(--black);
}

.team_icon_orcid {
  -webkit-mask-image: url("../img/ID.svg");
  mask-image: url("../img/ID.svg");
}

.team_icon_cv {
  -webkit-mask-image: url("../img/CV.svg");
  mask-image: url("../img/CV.svg");
}

.team_bio {
  max-height: calc(8 * 1.45em);
  overflow: hidden;
  font-size: 9px;
  line-height: 1.45;
  transition: max-height 0.45s ease;
}

.team_bio p {
  margin-bottom: 0.6em;
}

.team_member.open .team_bio {
  max-height: 60em;
}

.team_more {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1;
}

/* Team names list (Estudantes, etc.) */

.team_list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 64px;
  margin-left: var(--indent);
}

.team_list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.7;
}

.team_list_text {
  max-width: 34ch;
  font-size: 10px;
}

/* =========================================================
   Financiamento e Parceiros
   ========================================================= */

.logos {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  gap: 32px 80px;
  margin: 0 0 64px var(--indent);
}

.logo_group_parceiros {
  grid-column: 1 / -1;
}

.logo_group h6 {
  margin-bottom: 10px;
  font-size: 8px;
  color: var(--green);
}

.logo_row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
}

.logo_row img {
  width: auto;
  max-height: 34px;
}

.info_text {
  max-width: 64ch;
  margin-left: var(--indent);
  font-size: 13px;
  line-height: 1.55;
}

.info_text p {
  margin: 0;
}

.info_text h1, .info_text h2, .info_text h3,
.info_text h4, .info_text h5, .info_text h6,
.info_text pre {
  margin: 24px 0 2px;
  font: inherit;
  color: var(--green);
  text-transform: uppercase;
  white-space: normal;
}

.info_text > :first-child {
  margin-top: 0;
}

/* =========================================================
   Footer
   ========================================================= */

footer {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  align-items: end;
  padding: 96px var(--side_right) 40px var(--side);
  background-color: var(--black);
  color: var(--white);
}

.footer_left {
  height: 100%;
}

.footer_logo {
  width: clamp(110px, 12vw, 150px);
  margin-bottom: 40px;
}

.footer_slogan {
  max-width: 16ch;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.footer_middle,
.footer_right {
  font-size: 11px;
  line-height: 1.6;
}

.footer-menu {
  list-style: none;
  margin: 10px 0 14px;
  padding: 0;
}

footer a {
  text-decoration: none;
}

footer a:hover {
  color: var(--green);
}

.footer_right h6 {
  font-weight: 700;
  text-transform: uppercase;
}

.footer_right p {
  margin-bottom: 12px;
}

.social {
  display: flex;
  gap: 6px;
  margin-top: 18px;
}

.social a {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--white);
  color: var(--black);
}

.social a:hover {
  background-color: var(--green);
  color: var(--black);
}

.social svg {
  width: 11px;
  height: 11px;
}

.copyright {
  padding: 18px 20px;
  background-color: var(--green);
  color: var(--ink);
  font-size: 9px;
  text-align: center;
}

/* =========================================================
   Single — Notícias / Podcast
   ========================================================= */

.single_top {
  display: flex;
  align-items: flex-end;
  min-height: clamp(380px, 32vw, 600px);
  padding-bottom: 56px;
  overflow: hidden;
  background-color: var(--grey);
}

.single_top_image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single_title {
  position: relative;
  z-index: 2;
  max-width: 22ch;
  color: var(--green);
  font-size: clamp(28px, 3.6vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}

.single_content {
  padding-top: 40px;
  padding-bottom: 80px;
}

.single_date {
  margin-bottom: 40px;
  color: var(--green);
  font-size: clamp(16px, 1.6vw, 24px);
  font-weight: 700;
}

.single_podcast {
  max-width: 560px;
  margin: 0 0 40px var(--indent);
}

.single_podcast iframe {
  display: block;
  width: 100% !important;
  border: 0;
}

/* WYSIWYG content (corpo_de_texto) */

.single_text {
  max-width: 84ch;
  margin-left: var(--indent);
  color: var(--white);
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.single_text > * {
  margin-top: 0;
  margin-bottom: 1.2em;
}

.single_text > :first-child {
  margin-top: 0;
}

.single_text > :last-child {
  margin-bottom: 0;
}

/* Headings */

.single_text h1,
.single_text h2,
.single_text h3,
.single_text h4,
.single_text h5,
.single_text h6 {
  margin-top: 2.4em;
  margin-bottom: 0.8em;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  scroll-margin-top: 120px; /* anchor links land below the fixed header */
}

.single_text h1 { color: var(--green); font-size: 24px; }
.single_text h2 { color: var(--green); font-size: 19px; }
.single_text h3 { color: var(--green); font-size: 15px; }
.single_text h4 { color: var(--white); font-size: 13px; }

.single_text h5 {
  color: var(--green);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.single_text h6 {
  color: var(--white);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

.single_text h1 + h2,
.single_text h2 + h3,
.single_text h3 + h4 {
  margin-top: 1em;
}

/* Paragraphs and inline formatting */

.single_text p {
  margin-bottom: 1.2em;
}

.single_text strong,
.single_text b {
  font-weight: 700;
}

.single_text em,
.single_text i {
  font-style: italic;
}

/* Links */

.single_text a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.single_text a:hover {
  color: var(--green);
}

/* Lists */

.single_text ul,
.single_text ol {
  padding-left: 2.4em;
}

.single_text ul {
  list-style: none;
}

.single_text ul > li {
  position: relative;
}

.single_text ul > li::before {
  content: "—";
  position: absolute;
  left: -2em;
  color: var(--green);
}

.single_text ol {
  list-style: decimal;
}

.single_text ol > li::marker {
  color: var(--green);
  font-weight: 700;
}

.single_text li {
  margin-bottom: 0.4em;
  padding-left: 0.2em;
}

.single_text li > ul,
.single_text li > ol {
  margin-top: 0.4em;
  margin-bottom: 0.2em;
  padding-left: 2em;
}

.single_text li > ol {
  list-style: lower-alpha;
}

.single_text ul ul > li::before {
  content: "–";
}

/* Blockquote */

.single_text blockquote {
  margin: 2em 0;
  padding: 0.2em 0 0.2em 1.6em;
  border-left: 3px solid var(--green);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}

.single_text blockquote p {
  margin-bottom: 0.8em;
}

.single_text blockquote p:last-child {
  margin-bottom: 0;
}

.single_text blockquote cite {
  display: block;
  margin-top: 1em;
  color: var(--green);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
}

.single_text blockquote cite::before {
  content: "— ";
}

/* Text alignment from the editor */

.single_text .has-text-align-left,
.single_text [style*="text-align: left"] {
  text-align: left;
}

.single_text .has-text-align-center,
.single_text [style*="text-align: center"] {
  text-align: center;
}

.single_text .has-text-align-right,
.single_text [style*="text-align: right"] {
  text-align: right;
}

/* Preformatted / code */

.single_text pre {
  margin: 2em 0;
  padding: 20px 24px;
  overflow-x: auto;
  background-color: var(--black);
  color: var(--green);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre;
  tab-size: 4;
}

.single_text code {
  padding: 0.1em 0.35em;
  background-color: rgba(0, 0, 0, 0.35);
  font-size: 0.95em;
}

.single_text pre code {
  padding: 0;
  background: none;
}

/* Horizontal rule */

.single_text hr {
  height: 0;
  margin: 2.4em 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
}

/* Images and captions */

.single_text img {
  display: block;
  max-width: 100%;
  height: auto;
}

.single_text figure,
.single_text .wp-caption {
  max-width: 100%;
  margin: 2em 0;
}

.single_text .wp-caption-text,
.single_text figcaption {
  margin-top: 10px;
  color: var(--green);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.single_text .alignnone {
  margin-left: 0;
  margin-right: 0;
}

.single_text .aligncenter {
  margin-left: auto;
  margin-right: auto;
}

.single_text .alignleft {
  float: left;
  max-width: 50%;
  margin: 0.4em 1.6em 1em 0;
}

.single_text .alignright {
  float: right;
  max-width: 50%;
  margin: 0.4em 0 1em 1.6em;
}

.single_text h1,
.single_text h2,
.single_text h3,
.single_text hr {
  clear: both;
}

.single_text::after {
  content: "";
  display: block;
  clear: both;
}

/* Tables */

.single_text table {
  width: 100%;
  margin: 2em 0;
  border-collapse: collapse;
  font-size: 12px;
}

.single_text th,
.single_text td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  text-align: left;
  vertical-align: top;
}

.single_text th {
  color: var(--green);
  font-weight: 700;
  text-transform: uppercase;
}

/* Responsive rules live in breakpoint_1080 / 840 / 540 / 400.css */

/* =========================================================
   Reduced motion — keep last
   ========================================================= */

/* =========================================================
   Reveal on scroll
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s ease var(--reveal_delay, 0ms),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal_delay, 0ms);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}