/*
Theme Name: IPNU Ruang Pelajar
Author: IPNU
Description: Editorial homepage theme for Ikatan Pelajar Nahdlatul Ulama.
Version: 1.3.0
Text Domain: ipnu-ruang-pelajar
*/

:root {
  --ink: #122a26;
  --green: #086b52;
  --green-dark: #06483d;
  --green-soft: #dceee4;
  --red: #df4736;
  --lime: #d8f16b;
  --paper: #f5f7f1;
  --white: #fff;
  --muted: #64736d;
  --line: #dce3db;
  --font-body: "DM Sans", sans-serif;
  --font-display: "Newsreader", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.wrap {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.announcement {
  color: var(--white);
  background: var(--green-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.announcement-inner {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
}

.announcement a {
  color: var(--lime);
}

.site-header {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.header-inner {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  min-width: 190px;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: grid;
  width: 46px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--green);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-name {
  display: block;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand-subtitle {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
}

.custom-logo-link img {
  width: auto;
  max-height: 56px;
}

.custom-logo-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.primary-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.primary-nav > ul,
.footer-nav > ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav li {
  position: relative;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-block: 10px;
  font-size: 13px;
  font-weight: 650;
  transition: color 160ms ease;
}

.primary-nav .menu-item-has-children > a::after {
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  content: "";
  transform: rotate(45deg) translateY(-2px);
}

.primary-nav .sub-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 2px);
  left: 0;
  display: none;
  min-width: 210px;
  padding: 7px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 12px 28px rgba(10, 34, 29, 0.12);
  list-style: none;
}

.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu {
  display: block;
}

.primary-nav .sub-menu a {
  display: flex;
  width: 100%;
  padding: 9px 11px;
  white-space: nowrap;
}

.primary-nav .sub-menu li + li {
  border-top: 1px solid var(--line);
}

.primary-nav .sub-menu .sub-menu {
  top: -8px;
  left: calc(100% - 1px);
}

.primary-nav a:hover,
.footer-nav a:hover {
  color: var(--red);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 750;
  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-dark {
  color: var(--white);
  background: var(--green-dark);
}

.button-dark:hover {
  background: var(--green);
}

.button-lime {
  color: var(--green-dark);
  background: var(--lime);
}

.button-outline {
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--white);
  background: transparent;
}

.mobile-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.mobile-menu-toggle span,
.mobile-menu-toggle span::before,
.mobile-menu-toggle span::after {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.mobile-menu-toggle span::before,
.mobile-menu-toggle span::after {
  position: absolute;
  left: 0;
  content: "";
}

.mobile-menu-toggle span::before {
  top: -6px;
}

.mobile-menu-toggle span::after {
  top: 6px;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 640px;
  align-items: stretch;
  overflow: hidden;
  color: var(--white);
  background: var(--green-dark);
}

.hero-video,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-video {
  z-index: 0;
  overflow: hidden;
  background: var(--green-dark) center / cover no-repeat;
}

.hero-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-width: 177.78vh;
  min-height: 100vh;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}

.hero-shade {
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(4, 36, 30, var(--hero-overlay-opacity, 0.58)) 0%,
    rgba(4, 36, 30, var(--hero-overlay-opacity, 0.58)) 54%,
    rgba(4, 36, 30, var(--hero-overlay-opacity, 0.58)) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: center;
  gap: 64px;
  min-height: inherit;
  padding-block: 72px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 24px;
  height: 2px;
  background: var(--red);
  content: "";
}

.hero h1 {
  max-width: 700px;
  margin: 0;
  font-family: var(--font-display);
  font-size: 76px;
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: var(--lime);
}

.hero h1 em {
  color: var(--lime);
  font-weight: 500;
}

.hero-description {
  max-width: 520px;
  margin: 23px 0 28px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.hero-sound-toggle {
  color: var(--white);
  background: rgba(4, 36, 30, 0.4);
  cursor: pointer;
}

.hero-sound-toggle:hover {
  background: rgba(4, 36, 30, 0.75);
}

.hero .text-link {
  color: var(--white);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 750;
}

.text-link span {
  font-size: 18px;
  transition: transform 160ms ease;
}

.text-link:hover span {
  transform: translateX(4px);
}

.hero-feature {
  align-self: end;
  padding: 23px 24px 25px;
  border-left: 3px solid var(--lime);
  background: rgba(4, 36, 30, 0.72);
  backdrop-filter: blur(8px);
}

.feature-label {
  display: block;
  margin-bottom: 15px;
  color: var(--lime);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-content {
  color: var(--white);
}

.feature-content h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

.feature-content h2 a:hover {
  color: var(--lime);
}

.feature-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 600;
}

.feature-meta span + span::before {
  margin-right: 9px;
  color: var(--lime);
  content: "/";
}

.topic-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #edf2e9;
}

.topic-inner {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topic-title {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topic-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.topic-links a {
  padding: 7px 12px;
  border: 1px solid #d5dfd3;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.topic-links a:hover {
  color: var(--white);
  background: var(--green);
}

.topic-links a.is-active {
  border-color: var(--green-dark);
  color: var(--white);
  background: var(--green-dark);
}

.stories {
  padding-block: 90px 100px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-heading .eyebrow {
  margin-bottom: 10px;
}

.section-heading h2,
.join-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(37px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0;
}

.section-heading h2 em {
  color: var(--green);
  font-weight: 500;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
}

.story-card {
  min-width: 0;
}

.story-image {
  position: relative;
  display: block;
  aspect-ratio: 1.42;
  overflow: hidden;
  background: var(--green-soft);
}

.story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.story-card:hover .story-image img {
  transform: scale(1.04);
}

.story-category {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 6px 9px;
  color: var(--white);
  background: var(--green);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 17px 0 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.story-meta span + span::before {
  margin-right: 8px;
  color: var(--red);
  content: "/";
}

.story-card h3 {
  margin: 0 0 13px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0;
}

.story-card h3 a:hover {
  color: var(--green);
}

.story-grid[aria-busy="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.post-pagination {
  display: flex;
  justify-content: center;
  margin-top: 38px;
}

.post-pagination .page-numbers {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-pagination .page-numbers a,
.post-pagination .page-numbers .current,
.post-pagination .page-numbers .dots {
  display: grid;
  min-width: 38px;
  height: 38px;
  place-items: center;
  padding-inline: 8px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
}

.post-pagination .page-numbers a:hover,
.post-pagination .page-numbers .current {
  border-color: var(--green-dark);
  color: var(--white);
  background: var(--green-dark);
}

.join-section {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--green-dark);
}

.join-section::before {
  position: absolute;
  top: -125px;
  right: -80px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(216, 241, 107, 0.24);
  border-radius: 50%;
  box-shadow:
    0 0 0 35px rgba(216, 241, 107, 0.04),
    0 0 0 70px rgba(216, 241, 107, 0.035);
  content: "";
}

.join-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  align-items: center;
  gap: 70px;
  padding-block: 82px;
}

.join-copy .eyebrow {
  color: var(--lime);
}

.join-copy h2 {
  max-width: 630px;
  font-size: clamp(42px, 5vw, 63px);
}

.join-copy h2 em {
  color: var(--lime);
  font-weight: 500;
}

.join-copy p:not(.eyebrow) {
  max-width: 510px;
  margin: 18px 0 24px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

.join-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.join-steps li {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 13px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 650;
}

.join-steps li:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.join-steps span {
  color: var(--lime);
  font-family: var(--font-display);
  font-size: 22px;
}

.site-footer {
  color: var(--white);
  background: #102b26;
}

.footer-main {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 35px;
  padding-block: 44px 38px;
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
}

.footer-logo img {
  width: auto;
  max-width: 220px;
  max-height: 64px;
  object-fit: contain;
}

.footer-brand .brand-mark {
  color: var(--green-dark);
  background: var(--lime);
}

.footer-brand p {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
}

.footer-nav ul {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 24px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 600;
}

.footer-bottom {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
}

.archive-page {
  min-height: 55vh;
  padding-block: 70px;
}

.archive-heading {
  margin-bottom: 34px;
}

.archive-heading .eyebrow {
  margin-bottom: 10px;
}

.archive-heading h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 58px);
  font-weight: 500;
  line-height: 1.05;
}

.archive-description {
  max-width: 680px;
  margin-top: 14px;
  color: var(--muted);
}

.archive-page .navigation.pagination {
  display: flex;
  justify-content: center;
  margin-top: 38px;
}

.archive-page .nav-links {
  display: flex;
  align-items: center;
  gap: 7px;
}

.archive-page .page-numbers {
  display: grid;
  min-width: 38px;
  height: 38px;
  place-items: center;
  padding-inline: 8px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
}

.archive-page .page-numbers.current,
.archive-page .page-numbers:hover {
  border-color: var(--green-dark);
  color: var(--white);
  background: var(--green-dark);
}

.single-page {
  padding-block: 64px 90px;
}

.single-article {
  max-width: 860px;
  margin-inline: auto;
}

.single-article > header {
  max-width: 740px;
  margin: 0 auto 34px;
}

.single-article h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 66px);
  font-weight: 500;
  line-height: 1.02;
}

.single-cover {
  width: 100%;
  max-height: 540px;
  margin-bottom: 36px;
  object-fit: cover;
}

.single-content {
  max-width: 740px;
  margin-inline: auto;
  font-size: 17px;
  line-height: 1.85;
}

.single-content h2,
.single-content h3 {
  margin-top: 1.7em;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
}

.single-content a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-content figure {
  margin-inline: 0;
}

.single-content img {
  height: auto;
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: 740px;
  margin: 42px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  z-index: 100000;
  width: auto;
  height: auto;
  padding: 12px 16px;
  clip: auto;
  color: var(--white);
  background: var(--green-dark);
}

@media (max-width: 900px) {
  .primary-nav > ul {
    flex-wrap: wrap;
    gap: 2px 15px;
  }

  .header-inner {
    gap: 20px;
  }

  .brand {
    min-width: auto;
  }

  .header-actions .button {
    padding-inline: 14px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 0.8fr);
    gap: 32px;
  }

  .hero h1 {
    font-size: 62px;
  }

  .story-grid {
    gap: 18px;
  }

  .story-card h3 {
    font-size: 22px;
  }

  .join-inner {
    gap: 42px;
  }
}

@media (max-width: 700px) {
  .wrap {
    width: min(100% - 36px, 520px);
  }

  .announcement-inner {
    min-height: 34px;
    font-size: 10px;
  }

  .announcement-inner span:last-child {
    display: none;
  }

  .header-inner {
    min-height: 72px;
  }

  .brand-mark {
    width: 42px;
  }

  .brand-name {
    font-size: 14px;
  }

  .brand-subtitle {
    font-size: 8px;
  }

  .header-actions > .button {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    padding: 0 18px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .primary-nav li + li {
    border-top: 1px solid var(--line);
  }

  .primary-nav a {
    display: flex;
    padding: 12px 2px;
  }

  .primary-nav .sub-menu,
  .primary-nav .sub-menu .sub-menu {
    position: static;
    display: block;
    min-width: 0;
    padding: 0 0 0 15px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .primary-nav .sub-menu a {
    padding: 10px 8px;
    white-space: normal;
  }

  .primary-nav .sub-menu li + li {
    border-top: 0;
  }

  .hero {
    min-height: auto;
  }

  .hero-video iframe {
    min-width: 177.78vh;
    min-height: 100vh;
  }

  .hero-shade {
    background: linear-gradient(
      180deg,
      rgba(4, 36, 30, var(--hero-overlay-opacity, 0.58)),
      rgba(4, 36, 30, var(--hero-overlay-opacity, 0.58))
    );
  }

  .hero-inner {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 36px;
    padding-block: 66px 54px;
  }

  .hero h1 {
    max-width: 480px;
    font-size: 52px;
  }

  .hero-description {
    margin-block: 18px 22px;
    font-size: 14px;
  }

  .hero-feature {
    max-width: 480px;
    padding: 18px 19px 20px;
  }

  .feature-content h2 {
    font-size: 25px;
  }

  .topic-inner {
    align-items: start;
    flex-direction: column;
    padding-block: 14px;
  }

  .topic-links {
    justify-content: flex-start;
  }

  .stories {
    padding-block: 60px 66px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 17px;
    margin-bottom: 24px;
  }

  .section-heading h2 {
    font-size: 43px;
  }

  .story-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .story-image {
    aspect-ratio: 1.55;
  }

  .story-card h3 {
    max-width: 480px;
    font-size: 25px;
  }

  .join-inner {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-block: 61px;
  }

  .join-copy h2 {
    font-size: 47px;
  }

  .footer-main {
    flex-direction: column;
    padding-block: 36px 30px;
  }

  .footer-nav > ul {
    justify-content: flex-start;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 13px;
  }

  .single-page {
    padding-block: 44px 62px;
  }

  .single-content {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video iframe {
    display: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
