/* ==========================================================
   TransPacific — site styles
   ========================================================== */

:root {
  --blue: #0f62fe;
  --blue-medium: #0050e6;
  --blue-dark: #002d9c;
  --ink: #161616;
  --paper: #f7f6f5;
  --white: #ffffff;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;

  --container: 1184px;
  --container-wide: 1312px;
  --gutter: 24px;
}

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

html { scroll-behavior: smooth; }

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

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

body.is-locked { overflow: hidden; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--wide { max-width: calc(var(--container-wide) + var(--gutter) * 2); }

.section { padding: 64px 0; }

/* ---------- Typography ---------- */
.heading-xl {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.2;
  margin-bottom: 10px;
}
.heading-sm {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 40px;
  letter-spacing: .04px;
  margin-bottom: 8px;
}
.lead {
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.44;
  margin-bottom: 48px;
}
.text-blue { color: var(--blue); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: .02px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}
.btn--dark-outline { padding: 14px 40px; border: 1px solid #000; color: #000; }
.btn--dark-outline:hover { background: #000; color: var(--white); }

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  min-width: 170px;
  padding: 10px 16px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: var(--white);
  font-size: 12px;
  font-weight: 500;
  line-height: 26px;
  letter-spacing: .02px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color .2s, border-color .2s;
}
.action-btn:hover { background: var(--blue-medium); border-color: var(--blue-medium); }
.action-btn svg { flex: none; }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  text-align: left;
}
.link-btn:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  padding-top: 25px;
}
/* Equal side columns keep the nav centered on the page, not between logo and edge */
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; max-width: none; }
.logo { justify-self: start; }
.nav-toggle { grid-column: 3; justify-self: end; }
.logo img { width: 104px; }

.primary-nav ul { display: flex; align-items: center; gap: 36px; }
.primary-nav a {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.primary-nav a:hover { color: var(--blue); }

.nav-toggle {
  display: none;
  width: 32px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  position: relative;
  z-index: 31;
}
.nav-toggle span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--blue);
  transition: transform .25s, opacity .25s;
}
.nav-toggle span:nth-child(1) { top: 3px; }
.nav-toggle span:nth-child(2) { top: 11px; }
.nav-toggle span:nth-child(3) { top: 19px; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  /* Keeps the title above the skyline: on short, wide screens the cover image
     pushes the towers up, so the offset shrinks with height and grows with width. */
  padding-top: clamp(100px, calc(50vh - 5.43vw - 168px), 230px);
  background-size: cover;
  background-position: center;
  position: relative;
}
/* Cloud in the top-left corner for the logo to sit on, as in the Teams background */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(240px, 20vw, 380px);
  aspect-ratio: 620 / 270;
  background: url(/assets/img/hero-cloud.png) no-repeat 0 0 / 100% 100%;
  pointer-events: none;
}
.hero > .container { position: relative; }
.hero__title {
  max-width: 13em;
  margin-inline: auto;
  text-align: center;
  color: var(--ink);
}

/* ---------- Overview ---------- */
.section--overview { padding: 128px 0 96px; }
.overview-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 64px;
}
.overview-gallery img { width: 100%; }

/* ---------- Market ---------- */
.section--market { padding: 160px 0 96px; }
.market-card {
  position: relative;
  z-index: 2;
  width: 58%;
  padding: 0 24px 48px 0;
  background: var(--paper);
}
.market-card::before {
  /* extend the card background to the left page edge */
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 100%;
  width: 100vw;
  background: var(--paper);
}
.market-image { margin-top: -160px; }
.market-image img { width: 100%; }

/* ---------- Strategy ---------- */
.section--strategy { padding: 80px 0 96px; }
.strategy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding-top: 88px;
}
.strategy-block {
  background: var(--white);
  padding: 70px 10px;
  text-align: center;
  color: var(--blue);
}
.strategy-block img { width: 142px; margin: 0 auto 32px; }
.strategy-block h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 20px;
  line-height: 26px;
}

/* ---------- Team ---------- */
.section--team { padding: 112px 0 192px; }
.team-cta { margin-bottom: 112px; }

.carousel {
  position: relative;
  padding: 0 70px;
}
.carousel__viewport { overflow: hidden; }
.carousel__track {
  display: flex;
  gap: 10px;
  transition: transform .4s cubic-bezier(.165, .84, .44, 1);
  will-change: transform;
}
.carousel__track li { flex: 0 0 calc((100% - 30px) / 4); }
.carousel__track img {
  width: 100%;
  aspect-ratio: 288 / 330;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}
.carousel__arrow {
  position: absolute;
  top: 50%;
  width: 60px;
  height: 60px;
  padding: 6px 18px;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: var(--blue);
}
.carousel__arrow svg { width: 100%; height: 100%; }
.carousel__arrow:hover { color: var(--blue-dark); }
.carousel__arrow--prev { left: 0; }
.carousel__arrow--next { right: 0; }

/* ---------- Performance ---------- */
.section--performance {
  padding-bottom: 240px;
  background-size: cover;
  background-position: center;
}
.performance-card {
  position: relative;
  width: 50%;
  padding: 128px 24px 64px 0;
  background: var(--paper);
}
.performance-card::before {
  content: "";
  position: absolute;
  inset: 0 100% 0 auto;
  width: 100vw;
  background: var(--paper);
}

/* ---------- Contact ---------- */
.section--contact {
  padding: 80px 0;
  background: var(--blue-medium);
  color: var(--white);
  font-size: 14px;
  line-height: 20px;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 64px;
  width: 75%;
  margin: 0 auto;
  padding-top: 96px;
}
.contact-grid p + p { margin-top: 16px; }
.contact-grid a { text-decoration: none; }
.contact-grid a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 72px 0;
  background: var(--blue-dark);
  color: var(--white);
}
.footer-inner { display: flex; justify-content: space-between; gap: 32px; }
.footer-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 20px;
  line-height: 30px;
  margin-bottom: 80px;
}
.footer-navs { display: flex; gap: 64px; }
.footer-legal li {
  font-size: 9px;
  line-height: 13.5px;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.footer-legal__gap { margin-bottom: 10px !important; }
.footer-legal a { text-decoration: none; }
.footer-legal a:hover { text-decoration: underline; }
.footer-nav li { margin-bottom: 10px; }
.footer-nav a {
  font-size: 13px;
  line-height: 19.5px;
  text-transform: uppercase;
  text-decoration: none;
}
.footer-nav a:hover { text-decoration: underline; }

/* ---------- Inner pages ---------- */
.primary-nav a[aria-current="page"] { color: var(--blue); }

.page-hero { padding-top: 230px; margin-bottom: 48px; }
.page-hero .heading-xl { margin-bottom: 0; }
.page-image { width: 100%; }

.heading-md {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.25;
}
.section--body { padding: 128px 0 112px; }
.offset-columns {
  display: grid;
  grid-template-columns: 378fr 686fr;
  gap: 120px;
}
.body-copy { line-height: 26px; }
.body-copy p + p { margin-top: 20px; }


.strategy-grid--page { padding-top: 64px; }
.section--strategy-body { padding-top: 80px; }


.team-bg { background: var(--white); padding: 48px 0 64px; }

/* Half-width tracks (each card spans two) so a short last row can sit centered */
.team-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 64px 28px;
}
.team-grid > li { grid-column: span 2; }
@media (min-width: 961px) {
  .team-grid > li:nth-child(3n+1):last-child { grid-column: 3 / span 2; }
  .team-grid > li:nth-child(3n+1):nth-last-child(2) { grid-column: 2 / span 2; }
}
.person-card__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
}
.person-card__image {
  width: 100%;
  aspect-ratio: 376 / 430;
  object-fit: cover;
  margin-bottom: 6px;
}
.person-card__name {
  display: block;
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 40px;
  color: var(--blue);
}
.person-card__title { display: block; }
.person-card__btn:hover .person-card__name,
.person-card__btn:focus-visible .person-card__name { text-decoration: underline; }
@media (max-width: 960px) {
  .team-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 561px) and (max-width: 960px) {
  .team-grid > li:nth-child(2n+1):last-child { grid-column: 2 / span 2; }
}
@media (max-width: 560px) {
  .team-grid { grid-template-columns: 1fr; }
  .team-grid > li { grid-column: auto; }
}

.person-overlay__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 128px;
  align-items: end;
}
.person-overlay__head .heading-xl { margin-bottom: 0; }
.person-overlay__title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 30px;
  line-height: 40px;
  padding-bottom: 8px;
}
.person-overlay__image { width: 100%; max-width: 376px; }
.js-person-overlay-bio p + p { margin-top: 24px; }
.person-overlay__controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 64px;
}
.person-overlay__controls .btn:disabled { opacity: .3; pointer-events: none; }
@media (max-width: 767px) {
  .person-overlay__head { grid-template-columns: 1fr; }
  .person-overlay__title { order: 2; font-size: 22px; line-height: 30px; }
}

.performance-columns {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 28px;
  padding-bottom: 80px;
}
.performance-copy { padding: 80px 0 112px; line-height: 26px; }
.performance-copy .heading-md { margin-bottom: 80px; }
.performance-stats { margin-bottom: 16px; font-size: 25px; line-height: 36px; }
.performance-stats p { position: relative; margin-top: 54px; }
.performance-stats p::before {
  content: "";
  position: absolute;
  top: -27px;
  left: 0;
  width: 73px;
  height: 1px;
  background: var(--blue);
}
.performance-stats + p { margin-top: 54px; }
.performance-chart {
  display: flex;
  align-items: center;
  margin-top: 0;
  padding: 80px 24px;
  background: var(--white);
}
.performance-chart svg { width: 100%; height: auto; overflow: visible; }
.performance-chart .pc-ring path { stroke: var(--white); stroke-width: 3; stroke-linejoin: round; }
.performance-chart .pc-number { fill: #0422d0; font-family: var(--font-serif); font-size: 26px; }
.performance-chart .pc-label { fill: var(--ink); font-family: var(--font-sans); font-size: 14px; }
.performance-chart .pc-center { fill: #000; font-family: var(--font-serif); font-size: 22px; text-anchor: middle; }
@media (max-width: 1100px) { .performance-columns { grid-template-columns: 1fr 1fr; } }
@media (max-width: 800px) {
  .performance-columns { grid-template-columns: 1fr; gap: 0; }
  .performance-copy { padding: 40px 0 48px; }
  .performance-copy .heading-md { margin-bottom: 48px; }
  .performance-stats { font-size: 20px; line-height: 30px; }
  .performance-chart { padding: 48px 16px; }
}

.fader { position: relative; aspect-ratio: 1184 / 581; overflow: hidden; }
.fader img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}
.fader img.is-active { opacity: 1; }

.contact-blocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding-bottom: 112px;
  font-size: 14px;
  line-height: 20px;
}
.contact-block img { width: 100%; margin-bottom: 36px; }
.contact-block p { margin-top: 16px; }
.contact-block .heading-sm + p { margin-top: 0; }
.contact-block__note { max-width: 60%; }
.contact-block a { color: var(--blue); text-decoration: none; }
.contact-block a:hover { text-decoration: underline; }

/* ---------- Japan disclaimer ---------- */
.disclaimer {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  background: var(--white);
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px);
  transition: opacity .3s, transform .3s, visibility 0s .3s;
}
.disclaimer.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .3s, transform .3s;
}
.disclaimer__header {
  position: relative;
  padding: 96px 0 48px;
  background: var(--paper);
  color: var(--blue);
}
.disclaimer__close {
  position: absolute;
  top: 32px;
  right: 32px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
}
.disclaimer__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 128px;
  padding-top: 112px;
  padding-bottom: 64px;
  line-height: 26px;
}
.disclaimer__body p + p { margin-top: 24px; }

/* ---------- Reveal animations ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(-40px);
  transition: opacity .8s ease, transform .8s ease;
}
[data-reveal="fade"] { transform: none; }
[data-reveal="right"] { transform: translateX(-40px); }
[data-reveal="left"] { transform: translateX(40px); }
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .carousel__track { transition: none; }
}

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1100px) {
  .primary-nav ul { gap: 22px; }
  .carousel__track li { flex-basis: calc((100% - 20px) / 3); }
}

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .primary-nav {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility 0s .25s;
  }
  .nav-open .primary-nav { opacity: 1; visibility: visible; transition: opacity .25s; }
  .primary-nav ul { flex-direction: column; gap: 28px; }
  .primary-nav a { font-size: 18px; }
}

@media (max-width: 767px) {
  :root { --gutter: 16px; }
  .section,
  .section--overview,
  .section--market,
  .section--strategy,
  .section--team { padding: 64px 0; }

  .logo img { width: 80px; }
  .hero { min-height: 600px; padding-top: 160px; }
  .hero__title { max-width: 100%; }

  .page-hero { padding-top: 140px; margin-bottom: 32px; }
  .section--body { padding: 56px 0; }
  .offset-columns { gap: 32px; }
  .contact-block__note { max-width: none; }
  .contact-blocks { gap: 48px; padding-bottom: 64px; }

  .overview-gallery,
  .offset-columns,
  .contact-blocks,
  .strategy-grid,
  .contact-grid,
  .disclaimer__body { grid-template-columns: 1fr; }
  .strategy-grid { padding-top: 64px; }
  .contact-grid { width: 100%; gap: 40px; padding-top: 48px; }

  .market-card,
  .performance-card { width: 100%; padding-right: 0; }
  .market-image { margin-top: 0; }
  .section--performance { padding-bottom: 160px; }
  .performance-card { padding-top: 64px; }

  .team-cta { margin-bottom: 64px; }
  .carousel { padding: 0 40px; }
  .carousel__arrow { width: 40px; padding: 6px 10px; }
  .carousel__track li { flex-basis: calc((100% - 10px) / 2); }

  .action-btn { min-width: 0; gap: 32px; }

  .footer-inner, .footer-navs { flex-direction: column; }
  .footer-heading { margin-bottom: 24px; }
  .footer-navs { gap: 32px; }

  .disclaimer__header { padding-top: 80px; }
  .disclaimer__body { padding-top: 48px; }
}

@media (max-width: 480px) {
  .carousel__track li { flex-basis: 100%; }
}
