/* ================================
   1. Design Tokens
================================ */
:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --primary: #166534;
  --primary-contrast: #eaf5ee;
  --accent: #0ea5e9;
  --card: #f8fafc;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1100px;
  --header-h: 68px;
  --transition: 200ms ease;
}
[data-theme="dark"] {
  --bg: #0b1110;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --primary: #22c55e;
  --primary-contrast: #0f1a17;
  --accent: #38bdf8;
  --card: #0f1615;
  --border: #1f2937;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* ================================
   2. Base
================================ */
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.7;
}
a {
  color: var(--accent);
  text-decoration: none;
}
img {
  max-width: 100%;
  height: auto;
}
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
.small {
  font-size: 13px;
  color: var(--muted);
}
.eyebrow {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
section.container {
  padding: 80px 0;
}
section + section {
  margin-top: 60px;
}

/* ================================
   3. Layout: Header / Nav
================================ */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(120%) blur(8px);
}
.nav {
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.brand:hover {
  opacity: 0.85;
}
.brand-logo {
  max-height: calc(var(--header-h) - 16px);
  width: 100px;
  object-fit: contain;
}
.brand h1 {
  font-family: "Shippori Mincho", serif;
  font-weight: 600;
  font-size: 30px;
  margin: 0;
  letter-spacing: 0.02em;
}
.menu {
  display: flex;
  gap: 18px;
  align-items: center;
}
.menu a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
}
.menu a:hover {
  background: var(--card);
  transition: background var(--transition);
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ================================
   4. Components
================================ */
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}
.btn-primary:hover {
  filter: brightness(1.05);
}
.btn-outline {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  font-size: 18px;
  padding: 14px 28px;
  border-radius: 999px;
  transition: all 0.2s ease;
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Mobile menu */
.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
}
.mobile-panel {
  position: fixed;
  top: var(--header-h);
  inset: 0 0 auto 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: none;
  padding: 16px 20px;
  box-shadow: var(--shadow);
  z-index: 60;
}
.mobile-panel a {
  display: block;
  padding: 12px;
  border-radius: 8px;
  color: var(--text);
}
.mobile-panel a:hover {
  background: var(--card);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  background: url("/img/main/hero.png") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.hero-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  padding: 0 20px;
  text-align: center;
}
.hero-content h2 {
  font-size: 56px;
  margin: 0 0 16px;
  font-weight: 700;
  line-height: 1.2;
}
.hero-content p {
  font-size: 18px;
  margin: 0 auto 24px;
  max-width: 700px;
  line-height: 1.8;
}
.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* About */
#about {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 0;
  padding: 60px 20px;
  background: url("https://chicodeza.com/wordpress/wp-content/uploads/washi-txillust6.png")
    center/cover repeat;
}
#about::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  z-index: 0;
}
#about .container {
  position: relative;
  z-index: 1;
}
#about h2 {
  font-family: "Shippori Mincho", serif;
  font-size: 28px;
  margin-bottom: 20px;
  text-align: center;
}
#about .lead {
  font-size: 16px;
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.8;
  text-align: center;
}
.about-points {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}
.about-points .point {
  flex: 1 1 300px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 20px;
}
.about-points .point h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

/* Scroll indicator */
.scroll-down {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  color: #fff;
  opacity: 0.7;
  animation: bounce 1.5s infinite;
}
@keyframes bounce {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, -8px);
  }
}

/* Section headers */
.section-header {
  margin-bottom: 28px;
  text-align: center;
}
.section-header h3 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 12px;
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}
.section-header h3::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 50px; /* 下線の長さ */
  height: 2px; /* 下線の太さ */
  background: var(--primary);
  border-radius: 2px;
}

.section-header p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* ================================
   Grid & Cards
================================ */
.grid {
  display: grid;
  gap: 18px;
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.card .body {
  padding: 18px;
}
.badge {
  font-size: 12px;
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

/* ================================
   List items
================================ */
.list {
  display: grid;
  gap: 12px;
}
.list-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: transparent;
}

/* ================================
   CTA band
================================ */
.cta {
  background: linear-gradient(
    90deg,
    rgba(34, 197, 94, 0.1),
    rgba(14, 165, 233, 0.1)
  );
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

/* ================================
   News section
================================ */
#news {
  padding: 40px 20px;
}
#news h2 {
  font-size: 24px;
  margin-bottom: 20px;
  border-bottom: 2px solid #ccc;
  display: inline-block;
}
.news-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.news-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease;
}
.news-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.news-card time {
  font-size: 12px;
  color: #999;
  margin-bottom: 6px;
}
.news-card h3 {
  font-size: 18px;
  margin: 0 0 10px;
}
.news-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  margin-bottom: 10px;
}
.news-card p {
  font-size: 14px;
  color: #555;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.news-card .read-more {
  font-size: 13px;
  color: #0066cc;
  text-decoration: underline;
  margin-top: auto;
  align-self: flex-end;
}
.news-card .read-more:hover {
  color: #004499;
}

/* ================================
   Footer
================================ */
footer {
  background: linear-gradient(rgba(44, 44, 44, 0.9), rgba(44, 44, 44, 0.9)),
    url("https://chicodeza.com/wordpress/wp-content/uploads/washi-txillust7.png");
  background-size: cover;
  background-position: center;
  color: #f5f5f5;
  padding: 40px 20px;
  margin-top: 60px;
}
footer .container {
  max-width: 1200px;
  margin: 0 auto;
}
footer h4 {
  font-family: "Shippori Mincho", serif;
  font-size: 18px;
  margin-bottom: 12px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-block;
  padding-bottom: 4px;
}
footer p,
footer a {
  font-size: 14px;
  color: #ddd;
  text-decoration: none;
  line-height: 1.6;
}
footer a:hover {
  color: #fff;
}
footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 30px;
  padding-top: 15px;
  font-size: 13px;
  text-align: center;
  color: #aaa;
}

/* ================================
   Back to top button
================================ */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  transform: translateY(-2px);
}

/* ================================
   Reveal animations
================================ */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ================================
   Responsive adjustments
================================ */
@media (max-width: 900px) {
  .nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .menu {
    display: none;
  }
  .hamburger {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .cta {
    grid-template-columns: 1fr;
  }
  section.container {
    padding: 60px 0;
  }
  section + section {
    margin-top: 40px;
  }
  .hero-content h2 {
    font-size: 36px;
  }
  .hero-content p {
    font-size: 16px;
  }
  .news-cards {
    grid-template-columns: 1fr;
  }
  #about {
    height: auto;
    padding: 60px 20px;
  }
}

/* ================================
   Motion reduction
================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}