:root {
  --black: #050505;
  --white: #ffffff;
  --line: #cfcfcf;
  --page-pad: 24px;
  --sans: "Helvetica Neue", Helvetica, Arial, "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
}

img { display: block; width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, figure { margin: 0; }

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 50;
  padding: 10px 14px;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--black);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: relative;
  background: var(--white);
  color: var(--black);
  border-bottom: 1px solid var(--black);
}

.masthead {
  min-height: 0;
  padding: 18px var(--page-pad);
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand {
  width: clamp(112px, 9.5vw, 140px);
  display: block;
  overflow: visible;
}

.brand-xplan {
  width: clamp(92px, 8vw, 118px);
}

.brand img {
  width: 100%;
  height: auto;
  object-fit: initial;
  filter: invert(1);
}

.category-nav {
  height: 56px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  padding: 0 clamp(28px, 7.5vw, 116px);
  border-top: 1px solid #e0e0e0;
}

.category-nav a {
  flex: 1 1 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  font-size: clamp(13px, 1.1vw, 17px);
  font-weight: 700;
  letter-spacing: -0.035em;
  white-space: nowrap;
  transition: opacity 180ms ease;
}

.category-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.category-nav a:hover,
.category-nav a:focus-visible { opacity: 0.55; }
.category-nav a:hover::after,
.category-nav a:focus-visible::after { transform: scaleX(1); }

.xplan-nav-link {
  min-width: 74px;
}

.xplan-nav-label {
  transition: opacity 140ms ease, transform 220ms ease;
}

.xplan-nav-mark {
  position: absolute;
  width: 66px;
  height: auto;
  filter: invert(1);
  opacity: 0;
  transform: translateY(8px) rotate(-7deg) scale(0.72);
  transition:
    opacity 180ms ease,
    transform 300ms cubic-bezier(0.2, 0.9, 0.25, 1.35);
  pointer-events: none;
}

.xplan-nav-link:hover,
.xplan-nav-link:focus-visible {
  opacity: 1;
}

.xplan-nav-link:hover .xplan-nav-label,
.xplan-nav-link:focus-visible .xplan-nav-label {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
}

.xplan-nav-link:hover .xplan-nav-mark,
.xplan-nav-link:focus-visible .xplan-nav-mark {
  opacity: 1;
  animation: xplan-nav-pop 360ms cubic-bezier(0.2, 0.9, 0.25, 1.35) both;
}

@keyframes xplan-nav-pop {
  0% { opacity: 0; transform: translateY(8px) rotate(-9deg) scale(0.68); }
  65% { opacity: 1; transform: translateY(-1px) rotate(2deg) scale(1.08); }
  100% { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}

.home-page .xplan-nav-label {
  animation: xplan-label-tease 1050ms 500ms ease both;
}

.home-page .xplan-nav-mark {
  animation: xplan-mark-tease 1050ms 500ms cubic-bezier(0.2, 0.9, 0.25, 1) both;
}

@keyframes xplan-label-tease {
  0%, 18%, 82%, 100% { opacity: 1; transform: translateY(0); }
  34%, 68% { opacity: 0; transform: translateY(-5px); }
}

@keyframes xplan-mark-tease {
  0%, 18%, 82%, 100% { opacity: 0; transform: translateY(8px) rotate(-8deg) scale(0.7); }
  42% { opacity: 1; transform: translateY(-1px) rotate(2deg) scale(1.08); }
  58%, 68% { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .xplan-nav-mark,
  .xplan-nav-label {
    animation: none !important;
    transition-duration: 0ms;
  }
}

.xplan-intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--white);
  pointer-events: none;
  animation: xplan-curtain 1450ms cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.xplan-intro img {
  width: clamp(138px, 18vw, 250px);
  height: auto;
  filter: invert(1);
  animation: xplan-logo-enter 1450ms cubic-bezier(0.2, 0.9, 0.25, 1) forwards;
}

@keyframes xplan-logo-enter {
  0% {
    opacity: 0;
    transform: scale(0.45) rotate(-12deg);
  }
  30% {
    opacity: 1;
    transform: scale(1.08) rotate(2deg);
  }
  52% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
  74% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-42vh) scale(0.46) rotate(0);
  }
}

@keyframes xplan-curtain {
  0%, 68% { clip-path: inset(0 0 0 0); }
  99% {
    opacity: 1;
    clip-path: inset(0 0 100% 0);
  }
  100% {
    opacity: 0;
    visibility: hidden;
    clip-path: inset(0 0 100% 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .xplan-intro { display: none; }
}

.hero {
  min-height: calc(100vh - 150px);
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(360px, 2fr);
  background: var(--black);
  color: var(--white);
}

.hero-media {
  height: 100%;
  min-height: 560px;
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  filter: contrast(1.03);
  transform: scale(1.012);
  transition: filter 600ms ease, transform 900ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.hero:hover .hero-media img { filter: contrast(1.08); transform: scale(1.026); }

.hero-copy {
  min-width: 0;
  padding: clamp(36px, 3.8vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--black);
}

.hero-copy h1 {
  font-size: clamp(38px, 3.5vw, 50px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-copy h1 span { display: block; white-space: nowrap; }

.hero-copy p {
  max-width: 31ch;
  margin-top: clamp(28px, 3vw, 44px);
  font-size: clamp(17px, 1.45vw, 23px);
  line-height: 1.4;
  letter-spacing: -0.025em;
}

.latest { padding: 52px var(--page-pad) 84px; }

.latest-header {
  margin-bottom: 20px;
}

.latest-header h2 {
  font-size: clamp(40px, 4.2vw, 64px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.latest-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  gap: 32px 14px;
}

.story { min-width: 0; }

.story a {
  display: block;
}

.story figure {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #e7e7e7;
}

.story figure img {
  height: 100%;
  object-fit: cover;
  filter: contrast(1.02);
  transition: transform 500ms cubic-bezier(0.2, 0.75, 0.2, 1), filter 300ms ease;
}

.story-image-chitiner img { object-position: center 43%; }
.story-image-gamma img { object-position: center 73%; }
.story-image-formula img { object-position: 58% center; }
.story-image-aubl-opener img { object-position: center top; }

.story a:hover figure img,
.story a:focus-visible figure img {
  filter: contrast(1.08);
  transform: scale(1.035);
}

.story-meta {
  padding-top: 14px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.story h2 {
  max-width: 22ch;
  margin-top: 8px;
  font-size: clamp(22px, 2vw, 34px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.site-footer {
  min-height: 150px;
  padding: 22px var(--page-pad);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: start;
  gap: 24px;
  color: var(--white);
  background: var(--black);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.site-footer a {
  font-size: clamp(20px, 2.2vw, 34px);
  font-weight: 900;
  letter-spacing: -0.06em;
  text-transform: none;
}

.site-footer .footer-brand {
  width: clamp(82px, 7vw, 104px);
  display: block;
}

.site-footer .footer-brand img {
  width: 100%;
  height: auto;
  filter: none;
}

.site-footer a span { display: inline-block; transition: transform 180ms ease; }
.site-footer a:hover span { transform: translateY(-4px); }
.site-footer p:nth-child(2) { text-align: center; }
.site-footer p:last-child { text-align: right; }

@media (max-width: 1180px) {
  .latest-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  :root { --page-pad: 16px; }
  .hero { grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr); }
  .hero-media { min-height: 520px; }
  .hero-copy { padding: 36px; }
  .hero-copy h1 { font-size: 40px; }
  .hero-copy p { font-size: 17px; }
  .latest-grid { grid-template-columns: 1fr 1fr; gap: 28px 14px; }
}

@media (max-width: 640px) {
  :root { --page-pad: 12px; }
  .masthead { padding: 14px 12px; }
  .brand { width: 108px; }
  .category-nav {
    height: 48px;
    padding: 0 14px;
    gap: 0;
    justify-content: space-between;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .category-nav::-webkit-scrollbar { display: none; }
  .category-nav a { flex: 0 0 auto; font-size: 12px; }
  .hero { min-height: 0; grid-template-columns: 1fr; }
  .hero-media { min-height: 410px; height: 68vh; }
  .hero-media img { object-position: 53% center; }
  .hero-copy { padding: 32px 18px 38px; }
  .hero-copy h1 { font-size: clamp(34px, 10vw, 40px); }
  .hero-copy p { max-width: 30ch; margin-top: 24px; font-size: 16px; }
  .latest { padding-top: 38px; padding-bottom: 56px; }
  .latest-header { margin-bottom: 16px; }
  .latest-header h2 { font-size: 44px; }
  .latest-grid { grid-template-columns: 1fr; gap: 32px; }
  .story figure { aspect-ratio: 4 / 3; }
  .story h2 { max-width: 20ch; font-size: 30px; }
  .site-footer { min-height: 180px; grid-template-columns: 1fr 1fr; }
  .site-footer p:nth-child(2) { display: none; }
}

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