/* ============================================
   FUDE Landing Page — style.css
   ============================================ */

/* ----- Custom Properties ----- */
:root {
  --color-sumi: #2c2c2c;
  --color-sumi-light: #4a4a4a;
  --color-washi: #f5f0e8;
  --color-washi-dark: #e8e0d0;
  --color-beni: #c0392b;
  --color-ai: #2471a3;
  --color-matcha: #27ae60;
  --color-kitsune: #d4a017;
  --color-kuriume: #8b4513;
  --color-border: #d5c8b4;
  --color-bg: #faf7f2;
  --color-white: #ffffff;

  --font-heading: 'Zen Antique', serif;
  --font-body: 'Noto Sans JP', sans-serif;

  --header-height: 64px;
}

/* ----- Reset & Base ----- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.8;
  color: var(--color-sumi);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Washi-paper-like subtle texture on body */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg width='4' height='4' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='0' width='1' height='1' fill='%23000' opacity='0.015'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

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

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

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

ul {
  list-style: none;
}

/* ----- Custom Scrollbar (WebKit) ----- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-washi);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #bfb49e;
}

/* ----- Utility ----- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Scroll-margin for fixed header offset */
section[id] {
  scroll-margin-top: var(--header-height);
}

/* ----- Animate on Scroll ----- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background-color: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  height: 36px;
  width: auto;
}

/* Nav */
.nav-list {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-sumi);
  text-decoration: none;
  padding: 4px 0;
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-kuriume);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.nav-link:hover {
  color: var(--color-kuriume);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link.active {
  color: var(--color-kuriume);
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-sumi);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ============================================
   DRAWER (Mobile)
   ============================================ */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 70%;
  max-width: 320px;
  height: 100%;
  background-color: var(--color-bg);
  z-index: 1200;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer-close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-sumi);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.drawer-nav-list {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.drawer-nav-link {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-sumi);
  text-decoration: none;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
  transition: color 0.2s ease;
}

.drawer-nav-link:hover {
  color: var(--color-kuriume);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  overflow: hidden;
}

/* Background decoration — ink splashes */
.hero-bg-decoration {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ink-splash {
  position: absolute;
  border-radius: 50%;
  opacity: 0.04;
  background: var(--color-sumi);
}

.splash-1 {
  width: 400px;
  height: 400px;
  top: -80px;
  right: -100px;
  border-radius: 45% 55% 60% 40% / 50% 45% 55% 50%;
}

.splash-2 {
  width: 300px;
  height: 300px;
  bottom: 10%;
  left: -60px;
  border-radius: 55% 45% 50% 50% / 40% 60% 40% 60%;
}

.splash-3 {
  width: 200px;
  height: 200px;
  top: 30%;
  right: 15%;
  border-radius: 50% 50% 45% 55% / 55% 45% 55% 45%;
  opacity: 0.03;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-sumi);
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--color-sumi-light);
  line-height: 1.8;
  margin-bottom: 40px;
}

/* CTA Button */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-cta {
  background-color: var(--color-kuriume);
  color: var(--color-white);
  padding: 16px 40px;
  box-shadow: 0 4px 14px rgba(139, 69, 19, 0.25);
}

.btn-cta:hover {
  background-color: #7a3b10;
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 69, 19, 0.35);
}

.btn-cta:active {
  transform: translateY(0);
}

/* Scroll hint arrow */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-arrow {
  display: block;
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--color-sumi-light);
  border-bottom: 2px solid var(--color-sumi-light);
  transform: rotate(45deg);
  animation: bounce-arrow 2s ease infinite;
  opacity: 0.5;
}

@keyframes bounce-arrow {
  0%, 20%, 50%, 80%, 100% {
    transform: rotate(45deg) translateY(0);
  }
  40% {
    transform: rotate(45deg) translateY(8px);
  }
  60% {
    transform: rotate(45deg) translateY(4px);
  }
}

/* ============================================
   SECTIONS — Common
   ============================================ */
.section {
  padding: 100px 0;
}

.section--white {
  background-color: var(--color-white);
}

.section--washi {
  background-color: var(--color-washi);
}

.section-heading {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
  /* Center the inline-block heading */
  left: 50%;
  transform: translateX(-50%);
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  width: 80%;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-kuriume) 15%,
    var(--color-kuriume) 60%,
    transparent 100%
  );
  border-radius: 2px;
}

/* ============================================
   FEATURES
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.feature-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2.4rem;
  margin-bottom: 16px;
}

.feature-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--color-sumi);
}

.feature-desc {
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--color-sumi-light);
}

/* ============================================
   HOW-TO STEPS
   ============================================ */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.step {
  flex: 1;
  max-width: 280px;
  text-align: center;
  padding: 0 16px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--color-kuriume);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.step-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--color-sumi);
}

.step-desc {
  font-size: 0.92rem;
  color: var(--color-sumi-light);
  line-height: 1.8;
}

.step-connector {
  display: flex;
  align-items: center;
  padding-top: 16px;
}

.connector-arrow {
  font-size: 1.8rem;
  color: var(--color-border);
  line-height: 1;
}

/* ============================================
   DEMO MOCKUP
   ============================================ */
.demo-mockup {
  margin-bottom: 40px;
}

.mock-viewer {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.mock-toolbar {
  background: var(--color-washi-dark);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--color-border);
}

.mock-toolbar-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.mock-toolbar-title {
  margin-left: 12px;
  font-size: 0.82rem;
  color: var(--color-sumi-light);
  font-weight: 500;
}

.mock-body {
  display: flex;
  min-height: 360px;
}

.mock-canvas {
  flex: 1;
  position: relative;
  background: var(--color-bg);
  padding: 24px;
}

.mock-design-area {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.mock-placeholder-header {
  height: 28px;
  background: var(--color-washi-dark);
  border-radius: 4px;
  margin-bottom: 16px;
  width: 60%;
}

.mock-placeholder-text {
  height: 12px;
  background: var(--color-border);
  border-radius: 2px;
  margin-bottom: 10px;
  width: 100%;
}

.mock-placeholder-text.short {
  width: 70%;
}

.mock-placeholder-img {
  height: 120px;
  background: var(--color-washi-dark);
  border-radius: 6px;
  margin-bottom: 16px;
  width: 100%;
}

.mock-pin {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-beni);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(192, 57, 43, 0.3);
  cursor: default;
  z-index: 2;
}

.mock-pin-label {
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 700;
}

.mock-comments {
  width: 300px;
  border-left: 1px solid var(--color-border);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--color-white);
  overflow-y: auto;
}

.mock-comment-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px;
  background: var(--color-bg);
}

.mock-comment-pin-num {
  font-size: 0.78rem;
  color: var(--color-beni);
  font-weight: 700;
  margin-bottom: 4px;
}

.mock-comment-author {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-sumi);
  margin-bottom: 4px;
}

.mock-comment-text {
  font-size: 0.82rem;
  color: var(--color-sumi-light);
  line-height: 1.6;
  margin-bottom: 8px;
}

.mock-comment-status {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
}

.status-request {
  background-color: #fdebd0;
  color: #b7950b;
}

.status-done {
  background-color: #d5f5e3;
  color: #1e8449;
}

.status-ok {
  background-color: #d4efdf;
  color: #1a5276;
}

.demo-cta-wrapper {
  text-align: center;
}

/* ============================================
   SETUP / REQUIREMENTS
   ============================================ */
.setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.setup-col-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 20px;
  color: var(--color-sumi);
}

.setup-table {
  width: 100%;
  border-collapse: collapse;
}

.setup-table th,
.setup-table td {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--color-border);
}

.setup-table th {
  font-weight: 700;
  color: var(--color-sumi);
  white-space: nowrap;
  width: 40%;
}

.setup-table td {
  color: var(--color-sumi-light);
}

.file-format-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-format-list li {
  font-size: 0.95rem;
  color: var(--color-sumi);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--color-white);
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.file-icon {
  font-size: 1.2rem;
}

.file-ext {
  color: var(--color-sumi-light);
  font-size: 0.85rem;
}

.file-note {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--color-sumi-light);
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child {
  border-top: 1px solid var(--color-border);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-sumi);
  gap: 16px;
  line-height: 1.6;
}

.faq-question:hover {
  color: var(--color-kuriume);
}

.faq-question:focus-visible {
  outline: 2px solid var(--color-ai);
  outline-offset: 2px;
  border-radius: 4px;
}

.faq-q-text {
  flex: 1;
}

.faq-toggle {
  flex-shrink: 0;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-kuriume);
  transition: transform 0.3s ease;
}

.faq-item.is-open .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-answer p {
  padding: 0 0 20px 0;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--color-sumi-light);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background-color: var(--color-sumi);
  padding: 48px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-logo {
  height: 32px;
  margin: 0 auto 16px;
  /* invert for dark background */
  filter: brightness(0) invert(0.9);
}

.footer-tagline {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--color-washi);
  margin-bottom: 12px;
  opacity: 0.8;
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--color-washi);
  opacity: 0.5;
}

/* ============================================
   RESPONSIVE — Mobile (768px and below)
   ============================================ */
@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  /* Header */
  .global-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Hero */
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .btn-cta {
    padding: 14px 32px;
    font-size: 0.95rem;
  }

  /* Sections */
  .section {
    padding: 64px 0;
  }

  .container {
    padding: 0 16px;
  }

  .section-heading {
    font-size: 1.6rem;
    margin-bottom: 40px;
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-card {
    padding: 28px 20px;
  }

  /* Steps */
  .steps {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .step {
    max-width: 100%;
    padding: 0;
  }

  .step-connector {
    padding: 8px 0;
  }

  .connector-arrow {
    display: inline-block;
    transform: rotate(90deg);
    font-size: 1.6rem;
  }

  /* Demo mockup */
  .mock-body {
    flex-direction: column;
  }

  .mock-comments {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--color-border);
    max-height: 240px;
    overflow-y: auto;
  }

  .mock-canvas {
    min-height: 200px;
  }

  /* Setup */
  .setup-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* FAQ */
  .faq-question {
    font-size: 0.92rem;
    padding: 16px 0;
  }
}

/* ============================================
   Focus visible
   ============================================ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-ai);
  outline-offset: 2px;
  border-radius: 4px;
}
