/* ==========================================================================
   Base Styles - Modern & Polished CSS Framework
   ========================================================================== */

:root {
  --font-base: "Yu Gothic", "游ゴシック", YuGothic, "游ゴシック体", sans-serif;
  --font-heading: "Yu Mincho", "游明朝", YuMincho, "游明朝体", serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-base);
  color: var(--ink);
  background-color: var(--paper);
  line-height: 1.8;
  font-size: 16px;
  letter-spacing: 0.05em;
  -webkit-font-smoothing: antialiased;
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Images */
img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6, p, ul, ol, figure {
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.4;
  font-weight: 700;
  color: var(--ink);
}

h1 {
  font-size: clamp(36px, 4.5vw, 48px);
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(24px, 3vw, 30px);
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 24px;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

h3 {
  font-size: 21px;
  margin-bottom: 12px;
}

p {
  margin-bottom: 1.5em;
}

p:last-child {
  margin-bottom: 0;
}

/* Container */
.container {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

/* Header */
.header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.brand {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
  opacity: 0.9;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  flex-wrap: wrap;
}

.nav a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
  background: var(--tint);
  text-decoration: none;
}

/* Hero Section */
.hero {
  padding: 80px 0 100px;
  width: 100%;
}

.hero .container,
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 60px;
}

.hero-image-wrap {
  position: relative;
}

.hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.eyebrow {
  display: inline-block;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  background: transparent;
  padding: 0 0 4px 0;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(36px, 4.5vw, 48px);
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 16px;
  color: var(--ink);
  line-height: 2;
  margin-bottom: 40px;
  opacity: 0.8;
}

/* Sections */
.section {
  padding: 90px 0;
  width: 100%;
}

.section.bg-alt {
  background-color: var(--tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  margin-bottom: 36px;
}

.section-head p {
  color: var(--muted);
  font-size: 15px;
  max-width: 680px;
}

/* Cards Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
}

.grid-2col {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3col {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4col {
  grid-template-columns: repeat(2, 1fr);
}

.item {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 40px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  transition: var(--transition);
}

.item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 0, 0, 0.12);
}

.item h3 {
  font-size: 21px;
  margin-bottom: 12px;
}

.item p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.75;
  flex-grow: 1;
  margin-bottom: 20px;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 40px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #ffffff !important;
  background-color: var(--accent);
  border-radius: var(--radius-sm);
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  align-self: flex-start;
}

.button:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

/* Note Box */
.note {
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 24px 28px;
  margin: 32px 0;
  box-shadow: var(--shadow-sm);
}

.note h4 {
  font-size: 17px;
  color: var(--accent);
  margin-bottom: 12px;
}

.note p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.note ul {
  padding-left: 20px;
  color: var(--muted);
  font-size: 15px;
}

.note li {
  margin-bottom: 8px;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background: #ffffff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  text-align: left;
}

th, td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: var(--tint);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(0, 0, 0, 0.015);
}

/* Breadcrumb */
.breadcrumb {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
  padding: 20px 0 10px;
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  color: var(--ink);
  font-weight: 600;
}

/* Article Content & Subpage Layout */
.article-header {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}

.article-header h1 {
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

.article-body {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
  padding: 0 0 60px;
  font-family: var(--font-base);
  color: var(--ink);
  background-color: var(--paper);
  line-height: 1.8;
  font-size: 16px;
  letter-spacing: 0.05em;
  -webkit-font-smoothing: antialiased;
}

/* Container 内に配置された場合の二重幅制限防止 */
.container > .breadcrumb,
.container > .article-header,
.container > .article-body,
.container .article-body {
  width: 100%;
}

.article-body section {
  margin-bottom: 56px;
}

.article-body h2 {
  font-size: clamp(24px, 3vw, 30px);
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.article-body h3 {
  font-size: 21px;
  margin-bottom: 12px;
}

.article-body p {
  font-size: 15.5px;
  line-height: 1.85;
  color: #334155;
  margin-bottom: 20px;
}

/* Footer */
.footer {
  background: #1e293b;
  color: #e2e8f0;
  padding: 80px 0 40px;
  margin-top: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

.footer a {
  color: #cbd5e1;
}

.footer a:hover {
  color: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
}

.footer-desc {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.7;
}

.footer-nav-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-nav {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
}

.footer-nav a {
  font-size: 13.5px;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 28px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    padding: 50px 0;
  }
  .hero .container,
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  
  .grid-2col, .grid-3col, .grid-4col {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .footer-nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}
  
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 0;
    gap: 12px;
  }
  
  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  
  .nav a {
    padding: 6px 12px;
    font-size: 13px;
    white-space: nowrap;
  }
}
