/* ==========================================================================
   Design tokens
   ========================================================================== */

:root {
  --color-bg: #04150D;
  --color-text: #EDE8D8;
  --color-text-soft: rgba(237, 232, 216, 0.68);
  --color-text-faint: rgba(237, 232, 216, 0.42);
  --color-border: rgba(237, 232, 216, 0.14);
  --color-border-hover: rgba(149, 213, 178, 0.35);
  --color-surface: rgba(255, 255, 255, 0.05);
  --color-surface-hover: rgba(255, 255, 255, 0.08);
  --font-display: 'Instrument Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --content-width-landing: 800px;
  --content-width-careers: 690px;
  --space-hero-gap: clamp(12px, 2vh, 20px);
  --space-hero-epigraph: clamp(24px, 4vh, 48px);
}

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

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

html {
  height: 100%;
  color-scheme: dark;
}

body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

body.landing {
  height: 100dvh;
  overflow: hidden;
}

body.careers {
  min-height: 100dvh;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

main {
  min-height: 0;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-border-hover);
  outline-offset: 2px;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

body.careers .container {
  max-width: var(--content-width-careers);
}

.landing .hero .container {
  max-width: var(--content-width-landing);
}

/* ==========================================================================
   Top bar
   ========================================================================== */

.topbar {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 30px 0;
}

.logo-link {
  line-height: 0;
  text-decoration: none;
}

.logo {
  display: block;
  height: 56px;
  width: auto;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-soft);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--color-text);
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: -0.035em;
}

/* ==========================================================================
   Landing hero
   ========================================================================== */

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  text-align: center;
}

body.landing .hero {
  align-items: flex-start;
  padding-top: clamp(200px, 30vh, 280px);
}

.landing--jakarta .hero-lead,
.landing--jakarta .def {
  font-family: 'Plus Jakarta Sans', var(--font-display);
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-hero-gap);
}

.hero-lead {
  max-width: 22em;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--color-text-soft);
  text-wrap: balance;
}

.hero-em {
  background: linear-gradient(
    90deg,
    rgba(237, 232, 216, 0.92),
    rgba(149, 213, 178, 0.85)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.def {
  margin-top: clamp(8px, 1.4vh, 14px);
  margin-bottom: var(--space-hero-epigraph);
  font-family: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
  font-size: clamp(1.0625rem, 1.35vw, 1.1875rem);
  line-height: 1.45;
  color: var(--color-text-faint);
  text-wrap: balance;
}

.def__term {
  color: var(--color-text-soft);
  letter-spacing: -0.01em;
}

.def__word {
  font-weight: 700;
}

.def__pos {
  font-style: italic;
}

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

.site-footer {
  padding: 14px 24px;
}

.footer-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.footer-logo {
  width: min(64vw, 896px);
  height: auto;
  opacity: 0.04;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-link {
  color: var(--color-text-soft);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.footer-link:hover {
  color: var(--color-text);
}

.footer-meta {
  font-size: 0.8125rem;
  color: var(--color-text-faint);
}

/* ==========================================================================
   Careers
   ========================================================================== */

.careers-page {
  min-height: 0;
}

.careers-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: 24px 0 32px;
}

body.role-page .careers-main {
  justify-content: flex-start;
}

.page-intro {
  padding: 0 0 32px;
  text-align: center;
}

.page-intro .subtitle {
  max-width: 36rem;
  margin-inline: auto;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: var(--color-text-soft);
  text-wrap: balance;
}

.page-intro .subtitle + .subtitle {
  margin-top: 12px;
}

.roles {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 24px;
}

.role-card {
  padding: 24px 28px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  transition: background 0.2s, border-color 0.2s;
}

.role-card:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-hover);
}

.role-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.role-card__header > div {
  flex: 1;
  min-width: 0;
}

.role-card h2 {
  margin-bottom: 4px;
  font-size: 1.125rem;
  font-weight: 600;
}

.role-card__meta {
  font-size: 0.9375rem;
  color: var(--color-text-faint);
}

.role-link {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font: 500 0.875rem/1 var(--font-body);
  color: var(--color-text-soft);
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.role-link:hover {
  color: var(--color-text);
  background: var(--color-surface);
  border-color: var(--color-border-hover);
}

.role-link__arrow {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.role-link:hover .role-link__arrow {
  transform: translate(3px, -3px);
}

@media (prefers-reduced-motion: reduce) {
  .role-card,
  .role-link__arrow {
    transition: none;
  }

  .role-link:hover .role-link__arrow {
    transform: none;
  }
}

/* Role page */

.role-hero {
  padding: 32px 24px 28px;
  text-align: center;
}

.role-hero__title,
.page-intro__title {
  max-width: 28rem;
  margin-inline: auto;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--color-text);
  text-wrap: balance;
}

.page-intro__title {
  margin-bottom: 20px;
}

.role-hero__meta {
  max-width: 32rem;
  margin: 10px auto 0;
  font-size: 0.9375rem;
  color: var(--color-text-faint);
  text-wrap: balance;
}

.role-hero .role-apply {
  margin-top: 24px;
}

.role-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-soft);
  text-decoration: none;
  transition: color 0.2s;
}

.role-back:hover {
  color: var(--color-text);
}

.role-divider {
  height: 1px;
  margin: 24px auto 32px;
  background: var(--color-border);
}

.role-body {
  padding-bottom: 40px;
}

.role-body__content {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-text-soft);
}

.role-body__content section + section {
  margin-top: 24px;
}

.role-body__content h2 {
  margin-bottom: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.role-body__content h3 {
  margin: 14px 0 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.role-body__content p + p,
.role-body__content p + ul {
  margin-top: 12px;
}

.role-body__content ul + p {
  margin-top: 12px;
}

.role-body__content ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.role-body__content li + li {
  margin-top: 8px;
}

.role-apply {
  display: inline-flex;
}

.role-apply--bottom {
  margin-top: 32px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 8px;
  cursor: pointer;
}

.btn-outline {
  color: var(--color-text);
  background: transparent;
  border: 1.5px solid var(--color-border);
}

.btn-outline:hover {
  background: var(--color-surface);
  border-color: var(--color-border-hover);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
  .topbar {
    padding: 22px 22px 0;
  }

  .logo {
    height: 44px;
  }

  body.landing .hero {
    padding-top: clamp(240px, 36vh, 340px);
  }

  .page-intro {
    padding-bottom: 24px;
  }

  .role-card__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .role-link,
  .role-hero .role-apply,
  .role-apply--bottom {
    width: 100%;
    justify-content: center;
  }

  .role-link:hover .role-link__arrow {
    transform: translateX(3px);
  }
}

@media (max-height: 700px) {
  .hero-lead {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
  }
}
