/* ---------------------------------------------------------
   Coyote and Powell LLC — corporate site
   Visual language adapted from visitors.now:
   · Open Runde + Noto Sans JP
   · Tight tracking (-0.02em body, -0.03em headings)
   · Light surface, subtle grays for hierarchy
   · Floating dark pill navigation
   · 24px radii, minimal shadows
   --------------------------------------------------------- */

@font-face {
  font-family: "Open Runde";
  src: url("./fonts/OpenRunde-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Runde";
  src: url("./fonts/OpenRunde-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Runde";
  src: url("./fonts/OpenRunde-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Neutral surfaces */
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --bg-1: #f7f7f7;
  --bg-2: #f2f2f2;
  --bg-3: #ebebeb;
  --bg-4: #e4e4e4;

  /* Foreground */
  --fg-strong: #181925;
  --fg-body: #4a4a55;
  --fg-mute: #7a7a87;
  --fg-faint: #a3a3ad;

  /* Rule */
  --line: rgba(24, 25, 37, 0.08);
  --line-strong: rgba(24, 25, 37, 0.16);

  /* Brand — teal (Figma teal scale) */
  --teal-tint: #9EFCFF;      /* light pearl */
  --teal-400: #07B7B7;       /* light */
  --teal-500: #069494;       /* base / primary */
  --teal-600: #058484;       /* hover */
  --teal-700: #057373;       /* active / deeper emphasis */
  --teal-800: #046363;
  --teal-900: #034242;       /* deepest */
  --teal-tint-6: rgba(6, 148, 148, 0.06);
  --teal-tint-10: rgba(6, 148, 148, 0.10);
  --teal-tint-16: rgba(6, 148, 148, 0.16);
  --teal-ring: rgba(6, 148, 148, 0.38);

  /* Nav — brand teal pill */
  --nav-bg: rgba(6, 148, 148, 0.94);
  --nav-fg: #ffffff;
  --nav-fg-mute: rgba(255, 255, 255, 0.74);
  --nav-fg-faint: rgba(255, 255, 255, 0.46);
  --nav-border: rgba(255, 255, 255, 0.14);

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(24, 25, 37, 0.04);
  --shadow-sm: 0 4px 16px rgba(24, 25, 37, 0.06);
  --shadow-nav: 0 10px 28px rgba(6, 148, 148, 0.22), 0 2px 6px rgba(6, 148, 148, 0.14);
  --shadow-card: 0 1px 2px rgba(24, 25, 37, 0.04), 0 8px 24px rgba(24, 25, 37, 0.04);

  /* Radii */
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  /* Typography */
  --font-sans: "Open Runde", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Yu Gothic", "Segoe UI", Helvetica, Arial, sans-serif;

  /* Layout */
  --container: min(1160px, calc(100vw - 48px));
  --container-narrow: min(760px, calc(100vw - 48px));

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg-body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.02em;
  font-feature-settings: "palt" 1, "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  cursor: default;
  overflow-x: hidden;
}

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

::selection {
  background: var(--teal-tint-16);
  color: var(--fg-strong);
}

:focus-visible {
  outline: 2px solid var(--teal-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------- Top bar (fixed, holds logo + pill) ---------------- */
.topbar {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
  pointer-events: none; /* allow clicks to pass through empty area */
}
.topbar > * {
  pointer-events: auto;
}

/* Free-floating site logo */
.site-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.site-logo-img {
  height: 34px;
  width: auto;
  display: block;
  -webkit-user-select: none;
  user-select: none;
}

/* Floating pill navigation */
.pillnav {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 10px 16px;
  background: var(--nav-bg);
  color: var(--nav-fg);
  border: 1px solid var(--nav-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-nav);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
}

.pillnav-items {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13.5px;
  color: var(--nav-fg-mute);
}
.pillnav-items a:first-child {
  margin-left: 5px;
}
.pillnav-items a {
  transition: color 200ms var(--ease);
}
.pillnav-items a:hover {
  color: var(--nav-fg);
}
.pillnav-items a:focus-visible {
  color: var(--nav-fg);
  outline: 2px solid var(--teal-ring);
  outline-offset: 4px;
  border-radius: 4px;
}

.pillnav-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.lang-btn {
  border: 0;
  background: transparent;
  padding: 2px 4px;
  color: var(--nav-fg-faint);
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  transition: color 180ms var(--ease);
}
.lang-btn:hover,
.lang-btn:focus-visible {
  color: var(--nav-fg-mute);
  outline: none;
}
.lang-btn.is-active {
  color: var(--nav-fg);
}
.lang-sep {
  color: var(--nav-fg-faint);
}

/* ---------------- Hero with landscape visual ---------------- */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  min-height: min(780px, 92vh);
  padding: clamp(140px, 16vh, 200px) 0 clamp(72px, 10vw, 120px);
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  z-index: 0;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Left-side fade ensures text sits on pale ground, not on the canyon */
.hero-fade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.88) 0%,
      rgba(255, 255, 255, 0.72) 28%,
      rgba(255, 255, 255, 0.38) 52%,
      rgba(255, 255, 255, 0) 72%
    );
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: var(--container);
  margin: 0 auto;
  max-width: none;
  text-align: left;
}

.hero-meta {
  margin: 0 0 28px;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--fg-mute);
}

.hero-title {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(44px, 6.6vw, 80px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.04;
  color: var(--fg-strong);
  text-wrap: balance;
}
html[lang="ja"] .hero-title {
  letter-spacing: -0.015em;
  line-height: 1.18;
  max-width: 10ch;
}

.hero-lead {
  max-width: 460px;
  margin: 28px 0 40px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg-body);
  text-wrap: pretty;
}

.hero-ctas {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-marks {
  margin: 0 auto;
  padding: clamp(28px, 4vw, 44px) 0 clamp(40px, 5vw, 56px);
  width: var(--container);
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  color: var(--fg-faint);
  font-size: 13px;
  border-top: 1px solid var(--line);
}
.hero-marks li {
  position: relative;
  letter-spacing: -0.005em;
}
.hero-marks li + li::before {
  content: "·";
  position: absolute;
  left: -16px;
  color: var(--fg-faint);
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: transform 200ms var(--ease), background 200ms var(--ease),
    color 200ms var(--ease), border-color 200ms var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-sm {
  padding: 9px 14px;
  font-size: 13px;
}
.btn-dark {
  background: var(--teal-500);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 2px 6px rgba(6, 148, 148, 0.18);
}
.btn-dark:hover {
  background: var(--teal-600);
}
.btn-dark:focus-visible {
  background: var(--teal-600);
  outline-offset: 3px;
}
.btn-ghost {
  background: var(--bg-1);
  color: var(--fg-strong);
  border-color: var(--line);
}
.btn-ghost:hover {
  background: var(--bg-2);
  border-color: var(--line-strong);
}
.btn-arrow {
  transition: transform 240ms var(--ease);
}
.btn:hover .btn-arrow,
.btn:focus-visible .btn-arrow {
  transform: translateX(3px);
}

/* ---------------- Chapter / Section ---------------- */
.chapter {
  padding: clamp(80px, 10vw, 140px) 0;
}
.chapter + .chapter {
  border-top: 1px solid var(--line);
}

.chapter-inner {
  width: var(--container);
  margin: 0 auto;
}
.chapter-inner-centered {
  text-align: center;
}
.chapter-inner-centered .eyebrow {
  justify-content: center;
}
.chapter-inner-centered .prose {
  margin-left: auto;
  margin-right: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 24px;
  color: var(--fg-mute);
  font-size: 13px;
  letter-spacing: 0;
}
.eyebrow-mark {
  color: var(--teal-700);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.h2 {
  margin: 0 0 28px;
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--fg-strong);
  text-wrap: balance;
  max-width: 18ch;
}
html[lang="ja"] .h2 {
  letter-spacing: -0.015em;
  line-height: 1.28;
}
.chapter-inner-centered .h2 {
  margin-left: auto;
  margin-right: auto;
}

.prose {
  margin: 0 0 48px;
  max-width: 620px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg-body);
  text-wrap: pretty;
}

/* ---------------- 3-column cards ---------------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.card {
  padding: 28px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: transform 240ms var(--ease), box-shadow 240ms var(--ease),
    border-color 240ms var(--ease);
}
.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.card-no {
  margin: 0 0 18px;
  color: var(--fg-mute);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.card-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg-strong);
}
.card-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-body);
}

/* ---------------- Product feature ---------------- */
.product-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  padding: clamp(28px, 4vw, 48px);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  margin-top: 20px;
}
.product-feature + .product-feature {
  margin-top: 16px;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.product-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  font-size: 13px;
}
.product-no {
  color: var(--fg-mute);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--teal-tint-10);
  color: var(--teal-800);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--teal-500);
  box-shadow: 0 0 0 3px var(--teal-tint-10);
}
.badge-muted {
  background: transparent;
  color: var(--fg-mute);
  border: 1px solid var(--line);
}
.badge-muted::before {
  background: var(--fg-faint);
  box-shadow: none;
}

.product-name {
  margin: 0;
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--fg-strong);
}
.product-name-muted {
  color: var(--fg-mute);
  font-style: italic;
}

.product-tag {
  margin: 4px 0 10px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg-strong);
}

.product-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg-body);
  max-width: 520px;
}

.product-facts {
  display: grid;
  gap: 8px;
  margin: 18px 0 4px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}
.product-facts > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  font-size: 13px;
}
.product-facts dt {
  margin: 0;
  color: var(--fg-mute);
}
.product-facts dd {
  margin: 0;
  color: var(--fg-strong);
  font-weight: 500;
}

.product-feature .btn {
  align-self: flex-start;
  margin-top: 12px;
}

/* Forthcoming variant */
.product-forth {
  grid-template-columns: 1fr;
}

/* Product visual — editorial data surface */
.product-visual {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  align-self: stretch;
}
.visual-label {
  margin: 0 0 4px;
  color: var(--fg-mute);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}
.moments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.moment {
  padding: 14px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.moment-next {
  background: var(--teal-500);
  border-color: var(--teal-500);
  color: #fff;
  box-shadow: 0 6px 18px rgba(6, 148, 148, 0.2);
}
.moment-next .moment-kind,
.moment-next .moment-meta {
  color: rgba(255, 255, 255, 0.78);
}
.moment-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  margin-bottom: 4px;
  color: var(--fg-mute);
  font-variant-numeric: tabular-nums;
}
.moment-kind {
  letter-spacing: 0;
}
.moment-time {
  font-weight: 500;
  color: var(--fg-strong);
}
.moment-next .moment-time {
  color: #fff;
}
.moment-title {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg-strong);
}
.moment-next .moment-title {
  color: #fff;
}
.moment-meta {
  margin: 0;
  font-size: 13px;
  color: var(--fg-mute);
}

/* ---------------- Vision ---------------- */
.chapter-vision .vision-body {
  display: grid;
  gap: 20px;
  max-width: 620px;
  margin-bottom: 36px;
}
.chapter-vision .vision-body .prose {
  margin: 0;
}

.pullquote {
  margin: 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
  max-width: 560px;
}
.pullquote blockquote {
  margin: 0;
}
.pullquote p {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--fg-strong);
}

/* ---------------- Company profile ---------------- */
.profile {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.profile > div {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.profile dt {
  margin: 0;
  color: var(--fg-mute);
  font-size: 13px;
  font-weight: 500;
}
.profile dd {
  margin: 0;
  color: var(--fg-strong);
  font-size: 15px;
  line-height: 1.6;
}
.rep-name-img {
  display: inline-block;
  height: 1em;
  width: auto;
  vertical-align: -0.12em;
  -webkit-user-select: none;
  user-select: none;
}

/* ---------------- Contact ---------------- */
.chapter-contact {
  padding-bottom: clamp(100px, 12vw, 160px);
}
.contact-mail {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 24px;
  background: var(--teal-500);
  color: #fff;
  border-radius: 999px;
  font-size: clamp(16px, 2.4vw, 22px);
  font-weight: 500;
  letter-spacing: -0.02em;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 6px 18px rgba(6, 148, 148, 0.2);
  transition: background 200ms var(--ease), transform 200ms var(--ease),
    box-shadow 200ms var(--ease);
}
.contact-mail:hover {
  background: var(--teal-600);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 10px 24px rgba(6, 148, 148, 0.26);
}
.contact-mail:focus-visible {
  background: var(--teal-600);
  outline-offset: 3px;
}

/* ---------------- Footer ---------------- */
.footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--line);
  color: var(--fg-mute);
}
.footer-inner {
  width: var(--container);
  margin: 0 auto;
  padding: 56px 0 36px;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
  margin-bottom: 48px;
}
.footer-key {
  margin: 0 0 14px;
  color: var(--fg-strong);
  font-size: 13px;
  font-weight: 500;
}
.footer-cols ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 14px;
}
.footer-cols a {
  color: var(--fg-body);
  transition: color 180ms var(--ease);
}
.footer-cols a:hover,
.footer-cols a:focus-visible {
  color: var(--fg-strong);
  outline: none;
}
.footer-fine {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--fg-faint);
}
.footer-fine p {
  margin: 0;
}
.footer-brand {
  color: var(--fg-mute);
  font-weight: 500;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
  :root {
    --container: min(100vw - 32px, 100%);
  }

  .topbar {
    top: 14px;
    padding: 0 16px;
  }
  .site-logo-img {
    height: 26px;
  }
  .pillnav {
    gap: 14px;
    padding: 8px 12px;
    max-width: calc(100vw - 200px);
  }
  .pillnav-items {
    gap: 14px;
    font-size: 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .pillnav-items::-webkit-scrollbar {
    display: none;
  }

  .product-feature {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .hero-marks {
    margin-top: 48px;
    gap: 8px 24px;
  }
  .hero-marks li + li::before {
    left: -14px;
  }

  .profile > div {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 16px 0;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-fine {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 760px) {
  /* Below this width the full lockup starts crowding the pill — switch to the C monogram only */
  .site-logo-img {
    height: 30px;
    width: 30px;
    object-fit: cover;
    object-position: 0% center;
  }
  .pillnav {
    max-width: calc(100vw - 80px);
  }

  .hero {
    align-items: flex-start;
    min-height: 640px;
    padding-top: 130px;
  }
  .hero-bg {
    object-position: 62% 68%;
  }
  .hero-fade {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.92) 0%,
      rgba(255, 255, 255, 0.78) 32%,
      rgba(255, 255, 255, 0.36) 58%,
      rgba(255, 255, 255, 0) 82%
    );
  }
  .hero-title {
    max-width: none;
  }
  html[lang="ja"] .hero-title {
    max-width: none;
  }
  .hero-lead {
    max-width: 440px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15.5px;
  }
  /* Mobile: show only the C monogram to avoid overlapping the pill */
  .site-logo-img {
    height: 28px;
    width: 28px;
    object-fit: cover;
    object-position: 0% center;
  }
  .pillnav {
    gap: 12px;
    padding: 6px 10px;
    max-width: calc(100vw - 80px);
  }
  .pillnav-items {
    font-size: 11.5px;
    gap: 12px;
  }
  .pillnav-lang {
    padding: 4px 8px;
    font-size: 11px;
  }
  .hero {
    padding-top: 120px;
    min-height: 600px;
  }
  .hero-title {
    font-size: clamp(36px, 11vw, 52px);
  }
  .product-name {
    font-size: clamp(30px, 8vw, 40px);
  }
}

/* ---------------------------------------------------------
   Legal pages
   /legal/company, /maptint/{terms,privacy,cookies,tokushoho}
   --------------------------------------------------------- */

.legal-page {
  background: var(--bg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.legal-nav {
  position: sticky;
  top: 16px;
  z-index: 10;
  margin: 16px auto 0;
  width: var(--container);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--nav-bg);
  color: var(--nav-fg);
  border-radius: 999px;
  box-shadow: var(--shadow-nav);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
}

.legal-logo {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--nav-fg);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.legal-logo:hover {
  color: var(--nav-fg);
}
.legal-logo .legal-logo-mark {
  font-weight: 600;
  letter-spacing: -0.02em;
}
.legal-logo .legal-logo-arrow {
  opacity: 0.6;
  font-size: 12px;
}

.legal-nav .pillnav-lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--nav-border);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.legal-main {
  flex: 1;
  width: var(--container-narrow);
  margin: 56px auto 0;
  padding: 0 0 96px;
}

.legal-content {
  font-family: var(--font-sans);
  color: var(--fg-body);
  font-size: 15px;
  line-height: 1.78;
  letter-spacing: -0.01em;
}
.legal-content[hidden] {
  display: none;
}

.legal-content h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--fg-strong);
  margin: 0 0 16px;
}

.legal-content h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg-strong);
  margin: 56px 0 16px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.legal-content h2:first-of-type {
  margin-top: 40px;
}

.legal-content h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--fg-strong);
  margin: 32px 0 8px;
}

.legal-content p {
  margin: 0 0 16px;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 16px;
  padding-left: 20px;
}
.legal-content li {
  margin-bottom: 6px;
}
.legal-content li::marker {
  color: var(--fg-mute);
}

.legal-content a {
  color: var(--teal-600);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 160ms var(--ease);
}
.legal-content a:hover {
  color: var(--teal-700);
}

.legal-content strong {
  color: var(--fg-strong);
  font-weight: 600;
}

.legal-content code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--bg-2);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--fg-strong);
}

.legal-content blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--teal-tint-6);
  border-left: 3px solid var(--teal-500);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--fg-body);
  font-size: 14px;
}
.legal-content blockquote p:last-child {
  margin-bottom: 0;
}
.legal-content blockquote strong {
  color: var(--teal-700);
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.legal-content thead {
  background: var(--bg-1);
}
.legal-content th,
.legal-content td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.legal-content tr:last-child th,
.legal-content tr:last-child td {
  border-bottom: 0;
}
.legal-content th {
  font-weight: 600;
  color: var(--fg-strong);
  letter-spacing: -0.01em;
}

.legal-content hr {
  margin: 56px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.legal-meta {
  font-size: 12px;
  color: var(--fg-mute);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.legal-footer {
  width: var(--container);
  margin: 0 auto;
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--fg-mute);
}
.legal-footer a {
  color: var(--fg-strong);
  text-decoration: none;
  font-weight: 500;
}
.legal-footer a:hover {
  color: var(--teal-700);
}

@media (max-width: 720px) {
  .legal-nav {
    padding: 10px 16px;
  }
  .legal-main {
    margin-top: 36px;
    padding-bottom: 56px;
  }
  .legal-content {
    font-size: 14px;
  }
  .legal-content h2 {
    margin-top: 40px;
    font-size: 19px;
  }
  .legal-content table {
    font-size: 13px;
  }
  .legal-content th,
  .legal-content td {
    padding: 8px 10px;
  }
  .legal-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
