/* ==========================================================================
   Key Linx — Common Styles
   ========================================================================== */

:root {
  /* Colors */
  --color-primary: #005ea5;
  --color-primary-dark: #004881;
  --color-primary-light: #d3e4ff;
  --color-primary-bg: rgba(211, 228, 255, 0.5);

  --color-text: #1b1b1c;
  --color-text-muted: #404753;
  --color-text-subtle: rgba(64, 71, 83, 0.7);

  --color-background: #f2f2f2;
  --color-surface: #ffffff;
  --color-surface-muted: #f0edee;
  --color-border: #e5e7eb;
  --color-border-light: #f3f4f6;
  --color-outline: #c0c7d5;

  /* Typography */
  --font-family: "Noto Sans JP", sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 0.9rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.375rem;
  --font-size-3xl: 2rem;

  --line-height-tight: 1.3;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.1rem;
  --space-xl: 2rem;
  --space-2xl: 2.5rem;

  --container-width: 600px;
  --header-height: 4rem;
  --gutter: 1.25rem;

  /* Border radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.75rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Shadow */
  --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  --shadow-header: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-primary);
  text-decoration: underline;
}

a:hover {
  opacity: 0.85;
}

ul {
  margin: 0;
  padding-left: 1.25rem;
}

p {
  margin: 0 0 var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.page-wrapper {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--color-surface);
}

.page-main {
  padding: var(--space-xl) var(--gutter) var(--space-2xl);
}

.page-main--with-fixed-header {
  padding-top: calc(var(--header-height) + var(--space-xl));
}

.content-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.page-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  width: 100%;
  height: var(--header-height);
  padding: 0 var(--gutter);
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-header);
}

.page-header--fixed {
  position: fixed;
  left: 0;
  right: 0;
}

.page-header__back {
  /*display: flex;*/
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  flex-shrink: 0;
}

.page-header__back:hover {
  opacity: 0.8;
}

.page-header__back svg {
  width: 1.5rem;
  height: 1.5rem;
}

.page-header__title {
  flex: 1;
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.05em;
}

.page-header__spacer {
  display: none;
  width: 2.5rem;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

.page-hero {
  text-align: center;
}

.page-hero__title {
  margin: 0 0 var(--space-xs);
  font-size: var(--font-size-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-hero__logo {
  display: block;
  margin: 0 auto;
  width: min(240px, 70vw);
  height: auto;
}

.page-hero__subtitle {
  margin: 0;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doc-header {
  margin-bottom: var(--space-xl);
  text-align: center;
}

.doc-header__title {
  margin: 0 0 var(--space-sm);
  font-size: var(--font-size-2xl);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

.doc-header__date {
  margin: var(--space-md) 0 0;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-align: right;
}

.doc-intro {
  margin-bottom: var(--space-md);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 var(--space-md);
  font-size: var(--font-size-xl);
  font-weight: 700;
}

.section-heading::before {
  content: "";
  display: block;
  width: 0.375rem;
  height: 1.5rem;
  background-color: var(--color-primary);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.section-heading--sm::before {
  height: 1.25rem;
}

.section-heading--center {
  justify-content: center;
  text-align: center;
}

.section-heading--center::before {
  display: none;
}

.subsection-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 var(--space-md);
  font-size: var(--font-size-lg);
  font-weight: 700;
}

.subsection-heading::before {
  content: "";
  display: block;
  width: 0.375rem;
  height: 1.25rem;
  background-color: var(--color-primary);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.policy-section__title {
  margin: 0 0 var(--space-sm);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-primary);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-small {
  font-size: var(--font-size-sm);
}

.text-note {
  font-size: var(--font-size-xs);
  color: var(--color-text-subtle);
  font-style: italic;
}

.text-primary {
  color: var(--color-primary);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.label-uppercase {
  margin: 0 0 var(--space-sm);
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Cards & Sections
   -------------------------------------------------------------------------- */

.content-card {
  padding: var(--space-md);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.content-card--muted {
  background-color: var(--color-surface-muted);
  border-color: transparent;
  box-shadow: none;
}

.content-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.content-card__divider {
  margin: var(--space-lg) 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border-light);
}

.highlight-box {
  padding: var(--space-md);
  background-color: var(--color-primary-bg);
  border: 1px solid rgba(0, 94, 165, 0.15);
  border-radius: var(--radius-md);
}

.highlight-box p {
  margin: 0;
  font-weight: 500;
  color: var(--color-primary-dark);
  line-height: var(--line-height-relaxed);
}

.policy-section {
  margin-bottom: var(--space-md);
}

.policy-section:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Steps / Flow
   -------------------------------------------------------------------------- */

.flow-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-list__item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  padding: var(--space-sm);
}

.flow-list__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-primary);
  background-color: var(--color-primary-light);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.flow-list__text {
  margin: 0;
  font-weight: 500;
}

.flow-list__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
  padding: var(--space-xs) 0;
}

.flow-list__arrow svg {
  width: 1.25rem;
  height: 1.25rem;
}

.step-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-list__item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  padding: var(--space-md);
  background-color: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.step-list__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-surface);
  background-color: var(--color-primary);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.step-list__text {
  margin: 0;
  font-weight: 500;
}

.step-list__connector {
  width: 2px;
  height: 1.5rem;
  background-color: rgba(0, 94, 165, 0.2);
}

/* --------------------------------------------------------------------------
   Info / Notice
   -------------------------------------------------------------------------- */

.notice-block {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.notice-block__icon {
  flex-shrink: 0;
  color: var(--color-primary);
  margin-top: 0.125rem;
}

.notice-block__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.notice-block__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Company Info
   -------------------------------------------------------------------------- */

.company-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.company-card__item {
  text-align: center;
}

.company-card__divider {
  width: 50%;
  height: 1px;
  margin: 0 auto;
  background-color: var(--color-border-light);
}

.company-card__name {
  margin: 0;
  font-size: var(--font-size-base);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Button
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  height: 3.5rem;
  padding: 0 var(--space-lg);
  font-family: inherit;
  font-size: var(--font-size-base);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-full);
  background-color: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.btn:hover {
  background-color: #f9fafb;
  opacity: 1;
}

.btn svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (min-width: 768px) {
  :root {
    --gutter: 1.5rem;
  }

  .page-main {
    padding-bottom: 3rem;
  }

  .content-card {
    padding: 2rem;
  }
}

@media (min-width: 1024px) {
  body {
    background-color: var(--color-background);
  }

  .page-wrapper {
    box-shadow: var(--shadow-soft);
  }
}
