/* ============================================================
   yMail LP – style.css
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    Meiryo, sans-serif;
  color: #333;
  background-color: #fff;
  line-height: 1.8;
  font-size: 16px;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul {
  list-style: none;
}

table {
  border-collapse: collapse;
}

/* ---------- Color Variables ---------- */
:root {
  --color-primary: #333;
  --color-primary-light: #666;
  --color-primary-dark: #000;
  --color-text: #333;
  --color-text-light: #666;
  --color-bg: #fff;
  --color-bg-alt: #f7f9fc;
  --color-border: #e0e6ed;
  --header-height: 64px;
  --section-padding: 96px 0;
  --inner-max-width: 1080px;
  --inner-padding: 0 24px;
}

/* ---------- Utility ---------- */
.section-inner {
  max-width: var(--inner-max-width);
  margin: 0 auto;
  padding: var(--inner-padding);
}

/* ============================================================
   Header
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: #fff;
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

.header.is-scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

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

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo-img {
  width: 32px;
  height: 32px;
}

.header-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.02em;
}

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

.header-nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  padding: 4px 0;
  transition: color 0.25s ease;
}

.header-nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.25s ease;
}

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

.header-nav-link:hover::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
}

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

.hamburger.is-active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  margin-top: var(--header-height);
  padding: 120px 24px 100px;
  background: linear-gradient(170deg, var(--color-primary-light) 0%, #fff 60%);
  text-align: center;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.hero-catch {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.5;
  color: var(--color-text);
  letter-spacing: 0.04em;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 16px;
  line-height: 1.9;
  color: var(--color-text-light);
}

/* ============================================================
   Features
   ============================================================ */
.features {
  padding: var(--section-padding);
  background: var(--color-bg);
}

.section-heading {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 56px;
  position: relative;
}

.section-heading::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--color-primary);
  margin: 16px auto 0;
  border-radius: 2px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}

.feature-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 36px 28px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.feature-card:hover {
  box-shadow: 0 8px 24px rgba(74, 144, 217, 0.1);
  transform: translateY(-4px);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  color: var(--color-text);
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-text);
  line-height: 1.5;
}

.feature-desc {
  font-size: 14px;
  line-height: 1.85;
  color: var(--color-text-light);
}

/* ============================================================
   Requirements
   ============================================================ */
.requirements {
  padding: var(--section-padding);
  background: var(--color-bg-alt);
}

.requirements-table-wrap {
  max-width: 720px;
  margin: 0 auto;
}

.requirements-table {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.requirements-table th,
.requirements-table td {
  padding: 18px 24px;
  font-size: 14px;
  line-height: 1.7;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.requirements-table tr:last-child th,
.requirements-table tr:last-child td {
  border-bottom: none;
}

.requirements-table th {
  width: 160px;
  background: var(--color-primary-light);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

.requirements-table td {
  color: var(--color-text-light);
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  padding: 32px 24px;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer-copy {
  font-size: 13px;
  color: var(--color-text-light);
}

/* ============================================================
   Scroll Animation
   -------------------------------------------------------
   デフォルトでは要素を通常表示。
   JS がロードされた場合のみ body に .js-ready が付き、
   アニメーション対象を非表示にして Observer で表示する。
   JS が無効・エラー時は全要素がそのまま見える。
   ============================================================ */
body.js-ready .animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ============================================================
   Responsive (max-width: 768px)
   ============================================================ */
@media screen and (max-width: 768px) {
  :root {
    --section-padding: 64px 0;
  }

  /* Hamburger visible */
  .hamburger {
    display: flex;
  }

  /* Nav slide-in panel */
  .header-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 240px;
    height: 100dvh;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.08);
    padding: 88px 32px 32px;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 1050;
  }

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

  .header-nav-list {
    flex-direction: column;
    gap: 0;
  }

  .header-nav-link {
    display: block;
    font-size: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
  }

  .header-nav-link::after {
    display: none;
  }

  /* Overlay backdrop */
  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }

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

  /* Hero */
  .hero {
    padding: 80px 20px 64px;
  }

  .hero-catch {
    font-size: 26px;
  }

  .hero-sub {
    font-size: 15px;
  }

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

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

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

  /* Requirements table */
  .requirements-table th {
    width: 120px;
    padding: 14px 16px;
    font-size: 13px;
  }

  .requirements-table td {
    padding: 14px 16px;
    font-size: 13px;
  }
}

/* Extra small screens */
@media screen and (max-width: 480px) {
  .requirements-table th,
  .requirements-table td {
    display: block;
    width: 100%;
  }

  .requirements-table th {
    border-bottom: none;
    padding-bottom: 4px;
  }

  .requirements-table td {
    padding-top: 4px;
  }
}
