/* ============================================================
   Azure Pacific Partners — Pacific Forecast
   Think-tank single-page site: restrained, academic, space-led
   ============================================================ */

:root {
  --navy: #0b1f3a;
  --navy-deep: #071526;
  --navy-mid: #143056;
  --slate: #4a5568;
  --ink: #1a1a1a;
  --paper: #fafaf7;
  --white: #ffffff;
  --gold: #b8860b;
  --gold-soft: #c4a35a;
  --teal: #1a4d5c;
  --line: rgba(11, 31, 58, 0.12);
  --line-strong: rgba(11, 31, 58, 0.22);
  --shadow: 0 10px 30px rgba(11, 31, 58, 0.06);
  --serif: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --measure: 720px;
  --wrap: 1120px;
  --nav-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font-family: inherit;
}

/* ---------- Layout ---------- */

.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
}

.measure {
  width: min(var(--measure), calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 1000;
  background: var(--navy);
  color: #fff;
  padding: 8px 12px;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Navigation ---------- */

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease),
    border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  background: transparent;
  border-bottom: 1px solid transparent;
}

.site-nav.is-scrolled {
  background: rgba(250, 250, 247, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.site-nav.is-scrolled .brand,
.site-nav.is-scrolled .nav-links a,
.site-nav.is-scrolled .nav-toggle {
  color: var(--navy);
}

.nav-inner {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: #f4f1ea;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.82);
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.35s var(--ease);
}

.nav-links a:hover::after,
.nav-links a.is-active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #f4f1ea;
  cursor: pointer;
  width: 40px;
  height: 40px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  margin: 5px auto;
  background: currentColor;
}

/* ---------- Main view transition ---------- */

#app {
  min-height: 100vh;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.38s ease-out, transform 0.38s ease-out;
}

#app.is-leaving {
  opacity: 0;
  transform: translateY(8px);
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: #f4f1ea;
  position: relative;
  overflow: hidden;
  background-color: #0b1f3a;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 0%, #1a3a5c 0%, transparent 55%),
    linear-gradient(180deg, #0b1f3a 0%, #071526 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(184, 134, 11, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184, 134, 11, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 120px 24px 80px;
}

.hero-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 22px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.12;
  letter-spacing: 0.02em;
  margin: 0 0 22px;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  letter-spacing: 0.08em;
  color: rgba(244, 241, 234, 0.78);
  max-width: 640px;
  margin: 0 auto;
}

.hero-rule {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 28px auto 0;
}

/* ---------- Shared sections ---------- */

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--white);
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  margin: 0 0 18px;
  color: var(--navy);
}

.lede {
  font-size: 1.18rem;
  line-height: 1.85;
  color: #2a2a2a;
  max-width: var(--measure);
  margin: 0 auto;
  text-align: left;
}

.center .lede,
.center .section-title,
.center .eyebrow {
  text-align: center;
}

.center .lede {
  margin-inline: auto;
}

/* ---------- Mission ---------- */

.mission {
  padding: 108px 0 88px;
}

/* ---------- Focus areas ---------- */

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}

.focus-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 32px 28px 28px;
  min-height: 220px;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}

.focus-card:hover {
  transform: translateY(-4px);
  border-color: rgba(184, 134, 11, 0.45);
  box-shadow: var(--shadow);
}

.focus-index {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 16px;
}

.focus-card h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.35;
  margin: 0 0 12px;
  color: var(--navy);
}

.focus-card p {
  margin: 0;
  color: var(--slate);
  font-size: 0.98rem;
  line-height: 1.65;
}

/* ---------- Article cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  justify-content: start;
  align-items: stretch;
  gap: 24px;
  margin-top: 40px;
}

/* List-page fade wraps the card so hover translateY stays on .article-card */
.card-grid > .card-reveal {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.72s ease-out, transform 0.72s ease-out;
}

.card-grid > .card-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.card-grid > .card-reveal:nth-child(3n + 1) {
  transition-delay: 0ms;
}

.card-grid > .card-reveal:nth-child(3n + 2) {
  transition-delay: 100ms;
}

.card-grid > .card-reveal:nth-child(3n + 3) {
  transition-delay: 200ms;
}

.article-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
  color: inherit;
}

.article-card:hover {
  transform: translateY(-5px);
  border-color: rgba(26, 77, 92, 0.4);
  box-shadow: var(--shadow);
}

.article-card .card-body {
  padding: 24px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card .card-date {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 10px;
}

.article-card h3 {
  font-family: var(--serif);
  font-size: 1.28rem;
  line-height: 1.35;
  margin: 0 0 10px;
  color: var(--navy);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card .subtitle {
  position: relative;
  flex: 1;
  margin: 0;
  color: var(--slate);
  font-size: 0.95rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card .subtitle::after {
  content: "";
  position: absolute;
  top: 3.1em;
  right: 2.4em;
  left: 0;
  height: 1.55em;
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 55%, var(--white) 100%);
  pointer-events: none;
}

.article-card .subtitle + .subtitle {
  margin-top: 8px;
}

.article-card .read-more {
  margin-top: auto;
  padding-top: 18px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ---------- CTA ---------- */

.cta-band {
  text-align: center;
  padding: 36px 24px 108px;
}

.home-briefings {
  padding-bottom: 40px;
}

.cta-band p {
  max-width: 560px;
  margin: 0 auto 28px;
  font-size: 1.15rem;
  color: #2a2a2a;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #f4f1ea;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease-out, color 0.3s ease-out,
    border-color 0.3s ease-out;
}

.btn:hover {
  background: transparent;
  color: var(--navy);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
}

.btn-ghost:hover {
  background: var(--navy);
  color: #f4f1ea;
}

/* ---------- Inner page hero ---------- */

.page-hero {
  padding: 140px 0 48px;
  background: var(--navy);
  color: #f4f1ea;
}

.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.1rem);
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}

.page-hero p {
  margin: 0;
  max-width: 640px;
  color: rgba(244, 241, 234, 0.75);
}

/* ---------- Article detail ---------- */

.article-meta {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 8px 0 32px;
}

.article-toolbar {
  width: min(var(--measure), calc(100% - 48px));
  margin: 28px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.article-date {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--slate);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s ease-out;
}

.share-btn svg {
  width: 14px;
  height: 14px;
  display: block;
}

.share-btn:hover,
.share-btn:focus {
  color: var(--navy);
}

.share-toast {
  position: fixed;
  left: 50%;
  top: 75%;
  z-index: 200;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 12px 22px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease-out, visibility 0.35s ease-out;
}

.share-toast.is-visible {
  opacity: 1;
  visibility: visible;
}

.wp-content {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 8px 0 72px;
  color: var(--ink);
}

.wp-content > *:first-child {
  margin-top: 0;
}

.wp-content h1,
.wp-content h2,
.wp-content h3,
.wp-content h4 {
  font-family: var(--serif);
  color: var(--navy);
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.wp-content h2 {
  font-size: 1.7rem;
  margin: 2.2em 0 0.7em;
}

.wp-content h3 {
  font-size: 1.28rem;
  margin: 1.8em 0 0.55em;
}

.wp-content p {
  margin: 0 0 1.15em;
}

.wp-content a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wp-content blockquote {
  margin: 1.8em 0;
  padding: 0 0 0 20px;
  border-left: 2px solid var(--gold);
  color: var(--slate);
  font-family: var(--serif);
  font-size: 1.15rem;
}

.wp-content ul,
.wp-content ol {
  padding-left: 1.2em;
}

.wp-content figure,
.wp-content .wp-block-image,
.wp-content .wp-caption {
  display: block;
  max-width: calc(100% - 4em);
  margin: 2em auto;
  text-align: center;
}

.wp-content img {
  display: block;
  max-width: calc(100% - 4em);
  height: auto;
  margin: 2em auto;
}

.wp-content figure img,
.wp-content .wp-block-image img,
.wp-content .wp-caption img {
  max-width: 100%;
  margin: 0 auto;
}

.wp-content figcaption,
.wp-content .wp-caption-text {
  display: block;
  text-align: center;
  font-size: 0.85rem;
  color: var(--slate);
  margin-top: 0.65em;
}

.back-link {
  display: inline-block;
  margin: 28px 0 0;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.back-link-light {
  color: var(--teal);
  margin: 24px auto 0;
  display: block;
  width: min(var(--measure), calc(100% - 48px));
}

/* ---------- Article Related ---------- */

.related-block {
  width: min(var(--wrap), calc(100% - 48px));
  margin: 0 auto 80px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.related-heading {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--navy);
  margin: 0 0 28px;
  text-align: left;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 40px;
}

.related-item {
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--ink);
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition: color 0.3s ease-out, background-size 0.3s ease-out;
}

.related-item:hover {
  color: var(--gold);
  background-size: 100% 1px;
}

.related-empty {
  margin: 0;
  font-family: var(--sans);
  color: var(--slate);
  text-align: left;
}

/* ---------- Contact ---------- */

.contact-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 64px 0 96px;
}

.contact-copy p {
  color: var(--slate);
  max-width: 460px;
}

.email-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}

.email-list li {
  margin-bottom: 16px;
}

.email-list span {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.email-list a {
  color: var(--navy);
  border-bottom: 1px solid transparent;
}

.email-list a:hover {
  border-bottom-color: var(--gold);
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-form label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--white);
  padding: 12px 12px;
  color: var(--ink);
  font-size: 1rem;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 1px solid var(--navy);
  border-color: var(--navy);
}

.form-note {
  font-size: 0.85rem;
  color: var(--slate);
}

/* ---------- Status ---------- */

.status {
  padding: 48px 0 80px;
  color: var(--slate);
  text-align: center;
}

.status.error {
  color: #7a2e2e;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-deep);
  color: rgba(244, 241, 234, 0.78);
  padding: 56px 0 96px;
}

.site-footer .brand-line {
  font-family: var(--serif);
  color: #f4f1ea;
  font-size: 1.2rem;
  margin: 0 0 10px;
}

.site-footer p {
  margin: 0 0 6px;
  font-size: 0.92rem;
  line-height: 1.55;
}

.site-footer a {
  color: #f4f1ea;
  border-bottom: 1px solid rgba(184, 134, 11, 0.45);
}

.footer-rule {
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin: 18px 0;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.72s ease-out, transform 0.72s ease-out;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  #app,
  .article-card,
  .focus-card,
  .btn,
  .nav-links a::after {
    transition: none !important;
  }
  .reveal,
  .card-grid > .card-reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .focus-grid,
  .contact-stack {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  :root {
    --nav-h: 64px;
  }

  body {
    font-size: 16px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: var(--nav-h);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    background: rgba(7, 21, 38, 0.96);
    padding: 8px 0 16px;
  }

  .site-nav.is-scrolled .nav-links {
    background: rgba(250, 250, 247, 0.96);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 14px 24px;
  }

  .focus-grid,
  .card-grid,
  .contact-stack,
  .related-list {
    grid-template-columns: 1fr;
  }

  .section,
  .mission,
  .cta-band {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .home-briefings {
    padding-bottom: 32px;
  }

  .cta-band {
    padding-top: 28px;
  }

  .wrap,
  .measure,
  .related-block {
    width: min(var(--wrap), calc(100% - 32px));
  }
}
