/* ==========================================================================
   SUBMARINE MAG
   Main stylesheet
   ========================================================================== */

/* ==========================================================================
   01. Fonts
   ========================================================================== */

@font-face {
  font-family: "Area";
  src: url("assets/fonts/Area-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Area";
  src: url("assets/fonts/Area-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Area";
  src: url("assets/fonts/Area-RegularItalic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Area";
  src: url("assets/fonts/Area-BoldItalic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ==========================================================================
   02. Design tokens
   ========================================================================== */

:root {
  --color-black: #000;
  --color-white: #fff;
  --color-dark-grey: #2e2e2e;
  --color-n3: #59ffa7;

  --bg-start: #59ffa7;
  --bg-previous: #363636;

  --space-s: 1rem;

  --dur-bg: 500ms;
  --dur-panel-open: 600ms;
  --dur-panel-close: 500ms;
  --dur-hover: 220ms;
  --dur-reveal: 900ms;

  --ease-standard: cubic-bezier(.455, .03, .515, .955);
  --ease-in: cubic-bezier(.895, .03, .685, .22);
  --ease-out: cubic-bezier(.215, .61, .355, 1);
  --ease-cover: cubic-bezier(.22, 1, .36, 1);
}

/* ==========================================================================
   03. Reset / Document
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg-start);
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg-start);
  color: var(--color-white);
  font-family: "Area", sans-serif;
  font-size: 1rem;
  line-height: 1.3;
  overflow-x: hidden;
}

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

button {
  font: inherit;
  color: inherit;
}

a {
  color: var(--color-black);
  text-decoration: none;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  margin-bottom: 10px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

p {
  margin-bottom: 0;
}

/* ==========================================================================
   04. Global utilities
   ========================================================================== */

.u-section-padding {
  padding: 4rem;
}

.u-full-height {
  min-height: 100dvh;
}

.u-container {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90rem;
  margin-inline: auto;
}

.body-n3 {
  background-color: var(--color-n3);
  color: var(--color-black);
}

.n3-area,
.link-block {
  position: relative;
}

/* ==========================================================================
   05. Header / Navigation
   ========================================================================== */

.site-header {
  position: absolute;
  z-index: 1100;
  inset: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  height: 5rem;
  padding-top: max(1rem, env(safe-area-inset-top));
  padding-right: max(2rem, env(safe-area-inset-right));
  padding-left: max(2rem, env(safe-area-inset-left));
  pointer-events: none;
}

.site-header .campus-link,
.site-header .info-toggle {
  pointer-events: auto;
}

.site-header .campus-link {
  margin-left: auto;
}

.campus-link {
  position: relative;
  z-index: 2;
  display: inline-block;
}

.nav-wrap {
  display: inline-flex;
}

.nav-link {
  position: relative;
  z-index: 1101;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.35rem;
  margin: 0;
  padding: .48rem .82rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--color-black);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color var(--dur-hover) ease,
    color var(--dur-hover) ease,
    border-color var(--dur-hover) ease,
    transform var(--dur-hover) ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
  outline: none;
  transform: translateY(-1px);
}

.nav-link:active {
  transform: translateY(0) scale(.97);
}

body.about-visible .site-header,
body.about-open .site-header {
  position: fixed;
  z-index: 1100;
}

body.about-visible .site-header .campus-link,
body.about-open .site-header .campus-link {
  visibility: hidden;
  pointer-events: none;
}

body.about-visible .info-toggle,
body.about-open .info-toggle {
  background: rgb(0 0 0 / 16%);
  color: var(--color-white);
  border-color: rgb(255 255 255 / 78%);
}

body.about-visible .info-toggle:hover,
body.about-visible .info-toggle:focus-visible,
body.about-open .info-toggle:hover,
body.about-open .info-toggle:focus-visible {
  background: var(--color-white);
  color: var(--color-black);
  border-color: var(--color-white);
}

/* Legacy structural wrapper retained for old markup compatibility. */
.header-wrap {
  position: absolute;
  z-index: 20;
  inset: 0 0 auto;
  width: 100%;
  max-width: 100%;
  height: 5rem;
  padding-top: var(--space-s);
  padding-right: 2rem;
  padding-left: 2rem;
  overflow: clip;
}

.header-wrap.about {
  position: sticky;
}

/* ==========================================================================
   06. Logos
   ========================================================================== */

.top-logo-wrap {
  position: sticky;
  z-index: 1;
  top: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 15rem;
  height: 3rem;
  margin: -3rem auto 0;
}

.submarine-logo-top {
  width: 100%;
  height: 100%;
  background-image: url("assets/images/submarine-logo.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 90%;
}

.submarine-logo-top.pill {
  width: 80%;
}

.submarine-logo-top-link {
  position: absolute;
  inset: 0;
}

.logo-campus {
  width: 14rem;
}

.top_logos {
  position: absolute;
  z-index: 1;
  inset: 0 0 auto auto;
  height: 4rem;
  margin-right: var(--space-s);
  padding-top: var(--space-s);
  padding-right: var(--space-s);
  overflow: clip;
}

/* Sticky masthead structure. Entrance and archive-state motion live in
   home-motion.css so there is only one homepage motion system. */
.top-logo-wrap.intro-logo {
  position: sticky;
  z-index: 4;
  top: 1rem;
  will-change: transform;
}

.top-logo-wrap.intro-logo .submarine-logo-top {
  transform-origin: center top;
  will-change: transform, opacity;
}

/* ==========================================================================
   07. Hero
   ========================================================================== */

.hero_section {
  width: 100vw;
  max-width: 100%;
  height: 100svh;
  overflow: clip;
}

.hero_section.u-full-height {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100vw;
  margin-top: 0;
}

.hero_layout {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.hero_content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100vw;
  max-width: 100%;
}

.hero_heading-copy {
  margin-bottom: 2rem;
}

.hero_card-text {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  transition: transform var(--dur-hover) var(--ease-out);
}

.hero_paragraph {
  position: relative;
  max-width: 40ch;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.5;
}

.hero_cover {
  width: 10rem;
  box-shadow: 0 2px 7px rgb(0 0 0 / 20%);
}

/* ==========================================================================
   08. Hero video
   ========================================================================== */

.submarine-3-reel-center {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: flex-end;
  pointer-events: none;
}

.submarine-3-video-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100dvh;
  overflow: clip;
}

.submarine-3-video-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.submarine-3-video {
  position: relative;
  width: 100%;
  min-width: 40rem;
  max-width: 50rem;
  height: 50%;
  margin-inline: auto;
  aspect-ratio: 16 / 11.3;
  overflow: hidden;
  border: 0;
  border-radius: .5rem;
  background:
    #111
    url("assets/images/hero-poster.jpg")
    center / cover
    no-repeat;
}

.submarine-3-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   09. New issue
   ========================================================================== */

.nuevo-numero_section {
  position: relative;
  z-index: 1;
}

.nuevo-numero_section.u-full-height {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100vw;
  margin-top: 0;
}

/* ==========================================================================
   10. Previous editions
   ========================================================================== */

.ediciones-anteriores_section {
  width: 100vw;
  max-width: 100%;
}

.ediciones-anteriores_section.u-full-height {
  position: relative;
  z-index: 1;
  color: var(--color-white);
  overflow: clip;
}

.ediciones-anteriores_layout {
  width: 100%;
}

.ediciones-anteriores_heading {
  padding-top: 4rem;
  padding-bottom: 4rem;
  text-align: center;
  letter-spacing: .2rem;
  text-transform: uppercase;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
}

.ediciones-anteriores_cards-layout {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding-top: var(--space-s);
}

/* ==========================================================================
   11. Magazine cards
   ========================================================================== */

.revista_card-wrap {
  position: relative;
  display: flex;
  flex: 0 0 50%;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  opacity: 0;
  transform: scale(.75);
  transition:
    opacity var(--dur-reveal) var(--ease-out),
    transform var(--dur-reveal) var(--ease-out);
}

.revista_card-wrap.is-visible {
  opacity: 1;
  transform: scale(1);
}

.revista_card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: var(--space-s);
  color: inherit;
  text-decoration: none;
}

.u-card-link {
  position: absolute;
  z-index: 1;
  inset: 0;
}

.revista_card-img-wrap {
  position: relative;
  display: block;
  width: 20rem;
  height: auto;
  aspect-ratio: 595 / 842;
  overflow: clip;
  box-shadow: 0 2px 12px -1px rgb(0 0 0 / 20%);
}

.revista_card-img,
.revista_card-img-retiro {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.revista_card-img.retiro {
  position: absolute;
  inset: 0 auto auto 0;
  transform: translateX(-100%);
}

.revista_card-img-retiro {
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
}

.revista_card-img-retiro.retiro {
  inset: 0 auto auto 0;
  transform: translateX(-100%);
}

.revista_card-txt {
  font-weight: 700;
}

.revista_card-txt,
.revista_card .hero_card-text {
  transition: transform var(--dur-hover) var(--ease-out);
}

.u-btn {
  display: inline-block;
  align-self: flex-start;
  min-width: 10ch;
  max-width: 12ch;
  padding: 9px 15px;
  border: 0;
  border-radius: 2rem;
  background: var(--color-white);
  color: var(--color-dark-grey);
  text-align: center;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.25;
  transition:
    transform var(--dur-hover) var(--ease-out),
    background-color var(--dur-hover) ease,
    color var(--dur-hover) ease,
    filter var(--dur-hover) ease;
}

.u-btn:hover {
  filter: invert(1);
}

.u-btn.n3:hover {
  background: var(--color-dark-grey);
  color: var(--color-n3);
  filter: none;
}

@media (hover: hover) and (pointer: fine) {
  .revista_card:hover .revista_card-txt,
  .revista_card:hover .hero_card-text {
    transform: translateX(.28rem);
  }

  .revista_card:hover .u-btn {
    transform: translateY(-2px);
  }
}

/* ==========================================================================
   12. Background logo marquee
   ========================================================================== */

.logo-marquee-wrap {
  position: fixed;
  z-index: 0;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100vw;
  height: 100dvh;
  padding: 1rem;
  overflow: clip;
  pointer-events: none;
}

.logo-marquee {
  display: flex;
  column-gap: 50vw;
  row-gap: 50vw;
  will-change: transform;
  animation: submarine-marquee 50s linear infinite;
}

.submarine-logo-marquee {
  max-width: none;
  height: 80dvh;
}

@keyframes submarine-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-566vw); }
}

/* ==========================================================================
   13. Top pill logo
   ========================================================================== */

.pill-logo-wrap {
  position: fixed;
  z-index: 10;
  inset: 0 0 auto;
  display: none;
  align-items: flex-start;
  justify-content: center;
  width: 10rem;
  height: 3rem;
  margin-top: var(--space-s);
  margin-right: auto;
  margin-left: auto;
  border: 2px solid var(--color-white);
  border-radius: 5rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ==========================================================================
   14. About panel
   ========================================================================== */

html:not(.app-ready) .about_section {
  display: none !important;
}

.about_section {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: block;
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background: rgb(228 228 228 / 30%);
  filter: hue-rotate(320deg) invert(1);
  backdrop-filter: saturate(200%) blur(40px);
  -webkit-backdrop-filter: saturate(200%) blur(40px);
  mix-blend-mode: normal;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-100%);
  contain: layout paint;
  will-change: transform;
}

@supports (height: 100dvh) {
  .about_section {
    height: 100dvh;
    max-height: 100dvh;
  }
}

.about_section.is-interactive {
  visibility: visible;
  pointer-events: auto;
}

.about_section .about_content {
  opacity: 0;
  transition: opacity calc(var(--dur-panel-open) * .55) ease;
}

.about_section.is-content-visible .about_content {
  opacity: 1;
}

.top-logo-wrap.about {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(90vw, 72rem);
  max-width: calc(100vw - 2rem);
  height: auto;
  min-height: 0;
  margin: 0 auto;
  padding-top:
    max(
      clamp(4.5rem, 8vh, 7rem),
      calc(env(safe-area-inset-top) + 4rem)
    );
  padding-right: 1rem;
  padding-bottom: 1rem;
  padding-left: 1rem;
  overflow: visible;
}

.about-submarine-logo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 500 / 57;
  object-fit: contain;
  overflow: visible;
  clip-path: none;
}

.about_layout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70vw;
  max-width: 60rem;
  margin-inline: auto;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.about_scroll-wrap {
  height: calc(100dvh - clamp(8rem, 16vh, 13rem));
  margin-top: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(transparent 0%, #000 7%);
  -webkit-mask-image: linear-gradient(transparent 0%, #000 7%);
}

.about_content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 6rem;
  padding-right: 2rem;
  padding-bottom: 10rem;
  padding-left: 2rem;
  text-wrap: balance;
}

.about-paragraph {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.4;
}

.about-text-small {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
}

.about_content a {
  text-decoration: underline;
  text-underline-offset: .15em;
}

body.scroll-locked {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

/* ==========================================================================
   15. Embedded magazine
   ========================================================================== */

.submarine-magazine_section {
  width: 100vw;
  max-width: 100%;
  border: 1px solid transparent;
}

.iframe {
  width: 100vw;
  height: 100dvh;
  border: 0;
}

/* ==========================================================================
   16. Tablet
   ========================================================================== */

@media (max-width: 991px) {
  .u-section-padding {
    padding: 2rem;
  }

  .submarine-3-video {
    min-width: 0;
    height: auto;
  }

  .submarine-3-video-wrap {
    align-items: flex-start;
    justify-content: flex-end;
    margin-top: 10rem;
  }

  .submarine-3-video-content {
    width: 40%;
  }

  .revista_card-img-wrap {
    width: 18rem;
  }

  .pill-logo-wrap {
    border-width: 0;
    border-color: var(--color-n3);
  }

  .top-logo-wrap {
    width: 40vw;
    margin-top: 6rem;
  }

  .hero_card-text,
  .hero_paragraph {
    font-size: 1.3rem;
  }

  .nuevo-numero_section.u-full-height {
    padding-top: 8rem;
  }

  .about_layout {
    width: 90vw;
  }

  .about-paragraph {
    font-size: 1.5rem;
  }
}

/* ==========================================================================
   17. Mobile
   ========================================================================== */

@media (max-width: 767px) {
  .hero_section {
    height: auto;
    min-height: 0;
    overflow: clip;
  }

  .hero_layout {
    min-height: 0;
    justify-content: flex-start;
    margin-top: clamp(1rem, 3.5svh, 2rem);
  }

  .u-section-padding {
    padding-right: max(1.25rem, env(safe-area-inset-right));
    padding-left: max(1.25rem, env(safe-area-inset-left));
  }

  .site-header {
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-left: max(1rem, env(safe-area-inset-left));
  }

  .submarine-3-video {
    min-width: 0;
  }

  .submarine-3-video-content {
    width: 50%;
  }

  .hero_content {
    gap: 3rem;
  }

  .hero_card-text,
  .hero_paragraph {
    font-size: 1.2rem;
  }

  .ediciones-anteriores_heading {
    padding-top: 2rem;
    padding-bottom: 2rem;
    font-size: 1.3rem;
  }

  .revista_card {
    gap: 1rem;
  }

  .revista_card-img-wrap {
    width: 13rem;
  }

  .logo-marquee {
    animation-duration: 20s;
  }

  .about_layout {
    width: 100%;
  }

  .about_scroll-wrap {
    height: calc(100dvh - 7.5rem);
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    mask-image: linear-gradient(transparent 0%, #000 4%);
    -webkit-mask-image: linear-gradient(transparent 0%, #000 4%);
  }

  .about_content {
    margin-bottom: 0;
    padding-right: 2rem;
    padding-bottom: 10rem;
    padding-left: 2rem;
  }

  .about-paragraph,
  .about-text-small {
    font-size: 1rem;
  }

  .top-logo-wrap.intro-logo {
    top: max(.75rem, env(safe-area-inset-top));
    width: min(78vw, 30rem);
  }
}
