/* Three physical, two-sided doors into Beyond Earth. */
.featured { padding-top: 100px; padding-bottom: 116px; }
.featured::before { content: none; }
.featured .section-head { margin-bottom: 42px; }
.feature-intro { max-width: 880px; margin: 0 auto 54px; text-align: center; }
.feature-intro .kicker { margin: 0 0 16px; font-size: 10px; letter-spacing: .22em; }
.feature-intro h2 { font-size: clamp(42px, 4.7vw, 64px); line-height: 1.04; max-width: 810px; margin: 0 auto; }
.feature-intro .feature-lead { max-width: 660px; margin: 22px auto 0; font-size: 15px; line-height: 1.8; }
.portal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.portal-card { --portal-fill: #eab18b; --portal-ink: #142638; --portal-depth: 9px; --portal-tilt: -7deg; position: relative; min-width: 0; perspective: 1100px; }
.portal-read { --portal-fill: #e6dac5; }
.portal-play { --portal-fill: #254250; --portal-ink: #fff0de; }
.portal-card::after { content: ''; position: absolute; z-index: 0; left: 12%; right: 3%; bottom: -17px; height: 28px; background: rgb(0 0 0 / 45%); filter: blur(14px); border-radius: 50%; pointer-events: none; }
.portal-solid { position: relative; z-index: 1; display: grid; min-height: 440px; height: 100%; }
.portal-face { grid-area: 1 / 1; border: 1px solid rgb(255 237 213 / 24%); border-radius: 18px; }
.portal-front { display: none; }
.portal-back { position: relative; padding: 28px; background: var(--portal-fill); color: var(--portal-ink); display: flex; flex-direction: column; align-items: flex-start; }
.portal-back-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; font: 500 9px/1.4 'Space Grotesk', sans-serif; letter-spacing: .06em; }
.portal-close { display: none; }
.portal-symbol { font: 400 45px/1 Georgia, serif; margin: 26px 0 16px; opacity: .65; }
.portal-back h3 { font: 600 clamp(28px, 2.65vw, 38px)/1.06 Syne, sans-serif; letter-spacing: -.055em; margin: 0 0 20px; max-width: 280px; }
.portal-back p { font-size: 14px; line-height: 1.75; margin: 0 0 28px; }
.portal-back a { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; margin-top: auto; min-height: 48px; padding: 12px 0 5px; border-bottom: 1px solid currentColor; color: inherit; font-size: 12px; font-weight: 700; }
.portal-back a b { font-size: 20px; font-weight: 400; }
.portal-back a:hover span { text-decoration: underline; text-underline-offset: 4px; }
.portal-back a:focus-visible,.portal-close:focus-visible { outline: 3px solid currentColor; outline-offset: 5px; }
.portal-edge { display: none; }
/* Progressive enhancement: without JS, explanations and links stay visible. */
.portal-card.is-interactive .portal-solid { transform-style: preserve-3d; transform: rotateY(calc(var(--portal-turn, 0deg) + var(--portal-tilt))) rotateX(2deg); transition: transform 760ms cubic-bezier(.35,.05,.2,1); }
.portal-card.is-interactive .portal-face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.portal-card.is-interactive .portal-front { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; min-height: 440px; padding: 28px; width: 100%; overflow: hidden; cursor: pointer; color: #fff3e4; background: #162737; text-align: left; transform: translateZ(var(--portal-depth)); box-shadow: inset 0 0 0 1px rgb(255 230 203 / 16%); font: inherit; }
.portal-front img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.portal-read .portal-front img { object-position: 65% center; }
.portal-play .portal-front img { object-position: 39% center; }
.portal-front::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(5 16 28 / 50%), transparent 35%, rgb(5 16 28 / 25%) 55%, rgb(5 16 28 / 95%)); }
.portal-category { font: 500 10px/1.4 'Space Grotesk', sans-serif; letter-spacing: .15em; }
.portal-front-copy { display: block; margin-top: 180px; }
.portal-word { display: block; font: 600 clamp(44px, 5.15vw, 72px)/1 Syne, sans-serif; letter-spacing: -.075em; }
.portal-hint { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 20px; padding-top: 15px; border-top: 1px solid rgb(255 237 213 / 35%); font-size: 11px; }
.portal-hint>span { font-size: 22px; line-height: 1; }
.portal-front:focus-visible { outline: 3px solid #efb28d; outline-offset: 6px; }
.portal-card.is-interactive .portal-back { transform: rotateY(180deg) translateZ(var(--portal-depth)); box-shadow: inset 0 0 0 1px rgb(255 246 232 / 18%); }
.portal-card.is-interactive .portal-close { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; min-height: 44px; border: 0; padding: 0 2px; background: none; color: inherit; cursor: pointer; font: 500 10px/1.4 'Space Grotesk', sans-serif; }
.portal-close b { font: 400 20px/1 sans-serif; }
.portal-card.is-interactive .portal-edge { display: block; position: absolute; background: linear-gradient(90deg, color-mix(in srgb, #254250 62%, #15232c), #254250 45%, color-mix(in srgb, #254250 62%, #15232c)); backface-visibility: visible; }
.portal-edge.edge-left,.portal-edge.edge-right { width: calc(var(--portal-depth) * 2); height: calc(100% - 36px); top: 18px; }
.portal-edge.edge-left { left: 0; transform: translateX(-50%) rotateY(90deg); }
.portal-edge.edge-right { right: 0; transform: translateX(50%) rotateY(90deg); }
.portal-edge.edge-top,.portal-edge.edge-bottom { height: calc(var(--portal-depth) * 2); width: calc(100% - 36px); left: 18px; }
.portal-edge.edge-top { top: 0; transform: translateY(-50%) rotateX(90deg); }
.portal-edge.edge-bottom { bottom: 0; transform: translateY(50%) rotateX(90deg); }
/* Keep the original solid and stationary hit area on both input types. */
@media (any-hover: hover) {
  .portal-card.is-interactive .portal-solid { transition-duration: 650ms; }
}
@media (max-width: 1050px) and (min-width: 761px) {
  .portal-grid { gap: 24px; }
  .portal-back,.portal-card.is-interactive .portal-front { padding: 23px; }
  .portal-back-top>span { font-size: 8px; }
  .portal-back h3 { font-size: 29px; }
  .portal-back p { font-size: 13px; }
  .portal-word { font-size: 48px; }
}
@media (max-width: 760px) {
  .featured { padding-top: 78px; padding-bottom: 92px; }
  .feature-intro { text-align: left; margin-bottom: 38px; }
  .feature-intro h2 { font-size: clamp(39px, 9vw, 58px); }
  .feature-intro .feature-lead { font-size: 14px; margin-top: 20px; }
  .portal-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; gap: 38px; }
  .portal-card { --portal-tilt: -5deg; --portal-depth: 8px; }
  .portal-solid,.portal-card.is-interactive .portal-front { min-height: 410px; }
  .portal-back h3 { font-size: 36px; }
  .portal-word { font-size: 64px; }
}

html:not([lang="pt-BR"]) .portal-card .portal-word { font-size: clamp(34px, 4.8vw, 64px); }
/* Fit the orange strip plus the complete featured section during the native hold. */
@media screen and (min-width: 900px) {
  .featured { padding-block: clamp(18px, 3.2svh, 40px); min-height: calc(100svh - 66px); }
  .featured .section-head { margin-bottom: clamp(14px, 2.4svh, 26px); }
  .feature-intro { margin-bottom: clamp(18px, 3svh, 32px); }
  .feature-intro .kicker { margin-bottom: 10px; }
  .feature-intro h2 { font-size: clamp(40px, 6.4svh, 60px); }
  .feature-intro .feature-lead { margin-top: 14px; font-size: 14px; line-height: 1.65; }
  .portal-solid,.portal-card.is-interactive .portal-front { min-height: clamp(330px, 46svh, 440px); }
  .portal-back,.portal-card.is-interactive .portal-front { padding: 24px; }
  .portal-front-copy { margin-top: 100px; }
  .portal-hint { margin-top: 16px; padding-top: 12px; }
  .portal-symbol { font-size: 36px; margin: 16px 0 12px; }
  .portal-back h3 { font-size: 32px; margin-bottom: 14px; }
  .portal-back p { line-height: 1.6; margin-bottom: 20px; }
}
@media screen and (min-width: 900px) and (max-height: 700px) {
  .featured { padding-block: 14px; }
  .featured .section-head { margin-bottom: 14px; }
  .feature-intro { display: grid; grid-template-columns: 1.1fr 1fr; column-gap: 40px; row-gap: 8px; max-width: none; text-align: left; margin-bottom: 18px; align-items: center; }
  .feature-intro .kicker { grid-column: 1; margin: 0; }
  .feature-intro h2 { grid-column: 1; font-size: 36px; max-width: 600px; margin: 0; }
  .feature-intro .feature-lead { grid-column: 2; grid-row: 1 / 3; margin: 0; max-width: 500px; }
  .portal-solid,.portal-card.is-interactive .portal-front { min-height: 330px; }
  .portal-back,.portal-card.is-interactive .portal-front { padding: 20px; }
  .portal-front-copy { margin-top: 62px; }
  .portal-symbol { display: none; }
  .portal-back h3 { font-size: 28px; margin: 14px 0 12px; }
  .portal-back p { margin-bottom: 16px; }
}
/* The requested card flip follows an explicit action; shorten it without turning it into a cut. */
@media (prefers-reduced-motion: reduce) { .portal-card.is-interactive .portal-solid { transition-duration: 450ms; transition-timing-function: ease-out; } }
@media print {
  .portal-grid { display: block; }
  .portal-card { break-inside: avoid; margin-bottom: 24px; }
  .portal-card.is-interactive .portal-solid,.portal-card.is-interactive .portal-back { transform: none; }
  .portal-card.is-interactive .portal-front,.portal-card.is-interactive .portal-edge,.portal-card.is-interactive .portal-close { display: none; }
  .portal-card.is-interactive .portal-back { backface-visibility: visible; }
}

/* Preserve the complete portal faces; compact only the surrounding gaps. */
@media screen and (min-width:900px) and (max-height:700px){
 .featured .section-head{margin-bottom:10px}
 .feature-intro{row-gap:4px;margin-bottom:10px}
}
