/* FREEPA marketing — shared design system */
:root {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-soft: #64748b;
  --line: #e2e8f0;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: rgba(79, 70, 229, 0.08);
  --accent-glow: rgba(99, 102, 241, 0.35);
  --success: #059669;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 40px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
  --font: "Noto Sans JP", "Hiragino Sans", "Segoe UI", sans-serif;
  --header-h: 4rem;
  --max: 1120px;
  --max-narrow: 720px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

.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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-logo:hover {
  color: var(--ink);
}

.site-logo__mark {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #312e81 100%);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.site-logo__text {
  font-size: 1.15rem;
}

.site-nav-toggle {
  display: none;
  border: none;
  background: transparent;
  padding: 0.5rem;
  cursor: pointer;
}

.site-nav-toggle__bar,
.site-nav-toggle__bar::before,
.site-nav-toggle__bar::after {
  display: block;
  width: 1.35rem;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav-toggle__bar::before,
.site-nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.site-nav-toggle__bar::before {
  top: -6px;
}

.site-nav-toggle__bar::after {
  top: 6px;
}

.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__bar {
  background: transparent;
}

.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__bar::before {
  top: 0;
  transform: rotate(45deg);
}

.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__bar::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.25rem;
}

.site-nav__link {
  color: var(--ink-muted);
  font-size: 0.925rem;
  font-weight: 500;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav__link:hover,
.site-nav__link.is-active {
  color: var(--ink);
}

.site-nav__link.is-active {
  border-color: var(--accent);
}

.site-nav__cta {
  margin-left: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn--primary:hover {
  color: #fff;
  box-shadow: 0 12px 32px var(--accent-glow);
}

.btn--ghost {
  background: var(--bg-elevated);
  color: var(--ink);
  border-color: var(--line);
}

.btn--ghost:hover {
  border-color: #cbd5e1;
  color: var(--ink);
}

.btn--sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
}

/* Main layouts */
.page-main {
  min-height: calc(100vh - var(--header-h) - 12rem);
}

.page-main--legal {
  padding: 2.5rem 1.25rem 4rem;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container--narrow {
  max-width: var(--max-narrow);
}

.section {
  padding: 4.5rem 0;
}

.section--tight {
  padding: 3rem 0;
}

.section__eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.section__title {
  font-size: clamp(1.65rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 0 0 1rem;
}

.section__lead {
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 40rem;
  margin: 0;
}

/* Hero */
.hero {
  position: relative;
  padding: 4rem 0 5rem;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% -10%, rgba(99, 102, 241, 0.18), transparent),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(14, 165, 233, 0.08), transparent),
    var(--bg);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: 1.05fr 0.95fr;
    padding-top: 1rem;
  }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 0 0 1.25rem;
}

.hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__desc {
  font-size: 1.08rem;
  color: var(--ink-muted);
  margin: 0 0 2rem;
  max-width: 32rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__visual {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem;
  animation: float-in 0.8s ease-out both;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mock-card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: #fff;
}

.mock-card__bar {
  height: 2.5rem;
  background: linear-gradient(90deg, #f1f5f9, #fff);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  gap: 0.35rem;
}

.mock-card__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #cbd5e1;
}

.mock-card__body {
  padding: 1rem;
}

.mock-post {
  display: grid;
  gap: 0.75rem;
}

.mock-post__img {
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  background: linear-gradient(145deg, #e0e7ff 0%, #fce7f3 45%, #fef3c7 100%);
}

.mock-post__lines span {
  display: block;
  height: 0.55rem;
  border-radius: 4px;
  background: #e2e8f0;
  margin-bottom: 0.4rem;
}

.mock-post__lines span:last-child {
  width: 70%;
}

/* Feature grid */
.feature-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.feature-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.925rem;
  color: var(--ink-muted);
}

/* Steps */
.steps {
  counter-reset: step;
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step-card {
  position: relative;
  padding: 1.35rem 1.15rem 1.15rem;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.step-card::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.step-card h3 {
  font-size: 0.98rem;
  margin: 0 0 0.35rem;
}

.step-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* Audience */
.audience-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .audience-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.audience-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #fff 0%, #f1f5f9 100%);
  border: 1px solid var(--line);
}

.audience-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.audience-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* CTA band */
.cta-band {
  margin: 0 1.25rem;
  max-width: calc(var(--max) - 2.5rem);
  margin-left: auto;
  margin-right: auto;
  padding: 2.5rem 2rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4f46e5 100%);
  color: #e0e7ff;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.cta-band h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  color: #fff;
}

.cta-band p {
  margin: 0 auto 1.5rem;
  max-width: 32rem;
  font-size: 0.98rem;
  opacity: 0.92;
}

.cta-band .btn--primary {
  background: #fff;
  color: var(--accent-hover);
  box-shadow: none;
}

.cta-band .btn--primary:hover {
  color: var(--ink);
}

/* FAQ */
.faq-list {
  margin-top: 2rem;
  max-width: 40rem;
}

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 1.15rem 0;
}

.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0.75rem 0 0;
  font-size: 0.925rem;
  color: var(--ink-muted);
}

/* Pricing */
.pricing-hero {
  text-align: center;
  padding: 3rem 0 1rem;
}

.pricing-toggle-note {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 1rem;
}

.pricing-grid {
  display: grid;
  gap: 1.25rem;
  margin: 2.5rem 0;
}

@media (min-width: 900px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }
}

.plan-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.plan-card--featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-md);
}

.plan-card__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.plan-card h2 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.plan-card__price {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.25rem;
}

.plan-card__price small {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.plan-card__desc {
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin: 0 0 1.25rem;
}

.plan-card ul {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  flex: 1;
}

.plan-card li {
  font-size: 0.9rem;
  padding: 0.4rem 0;
  padding-left: 1.35rem;
  position: relative;
  color: var(--ink-muted);
}

.plan-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--success);
}

.plan-card .btn {
  width: 100%;
}

.pricing-table-wrap {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 520px;
}

.pricing-table th,
.pricing-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.pricing-table th {
  background: #f1f5f9;
  font-weight: 600;
}

.pricing-table tr:last-child td {
  border-bottom: none;
}

.pricing-disclaimer {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  font-size: 0.875rem;
  color: #92400e;
  margin: 2rem 0;
}

/* Legal prose */
.legal-doc {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-sm);
}

.legal-doc h1 {
  font-size: 1.75rem;
  margin: 0 0 0.35rem;
}

.legal-doc .meta {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.legal-doc h2 {
  font-size: 1.1rem;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}

.legal-doc h3 {
  font-size: 1rem;
  margin: 1rem 0 0.5rem;
}

.legal-doc p,
.legal-doc li {
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.legal-doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.legal-doc th,
.legal-doc td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  text-align: left;
}

.legal-doc th {
  background: #f1f5f9;
}

.legal-doc .note {
  background: #f8fafc;
  border-left: 3px solid var(--accent);
  padding: 0.85rem 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.legal-doc strong {
  color: var(--ink);
}

.privacy-callout {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  font-size: 0.9rem;
  margin: 1.25rem 0;
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 3rem 1.25rem 2rem;
  background: var(--ink);
  color: #94a3b8;
}

.site-footer a {
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer__grid {
  max-width: var(--max);
  margin: 0 auto 2rem;
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer__brand .site-logo__text {
  color: #fff;
  font-size: 1.1rem;
}

.site-footer__tagline {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  max-width: 18rem;
}

.site-footer__heading {
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
}

.site-footer__links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__links li {
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
}

.site-footer__copy {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid #334155;
  font-size: 0.8rem;
  text-align: center;
}

@media (max-width: 768px) {
  .site-nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.25rem;
    gap: 0.25rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
    box-shadow: var(--shadow-md);
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav__link {
    padding: 0.65rem 0;
  }

  .site-nav__cta {
    margin: 0.5rem 0 0;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
