/* ==========================================================================
   Fitona 公式サイト 共通スタイル
   ブランドカラーはアプリ本体の Assets.xcassets 定義値と合わせている
   ========================================================================== */

:root {
  --primary-start: #2DC7A0;
  --primary-end: #5AC800;
  --accent: #5AC800;
  --accent-light: #A8E87C;
  --accent-dark: #3A8A00;
  --page-bg: #EEF8F1;
  --card-bg: #FFFFFF;
  --text-primary: #1A3A2A;
  --text-secondary: #6B9E82;
  --record: #FFAA00;
  --save: #63A063;
  --border: rgba(45, 199, 160, 0.25);
  --max-width: 1080px;
  --radius: 20px;

  --cat-food: #FF9500;
  --cat-alcohol: #FF3B30;
  --cat-toilet: #007AFF;
  --cat-exercise: #34C759;
  --cat-outdoor: #AF52DE;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-primary);
  background: var(--page-bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(238, 248, 241, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  height: 34px;
  width: auto;
  border-radius: 8px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: 0.2s;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
}

.main-nav a.active {
  color: var(--accent-dark);
  font-weight: 700;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  background: var(--card-bg);
}

.lang-switch a {
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--text-secondary);
  font-weight: 600;
}

.lang-switch a.active {
  background: var(--accent);
  color: #fff;
}

.lang-switch a:hover {
  text-decoration: none;
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  color: #fff;
  padding: 72px 0 96px;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-copy .eyebrow {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.hero-copy h1 {
  font-size: 2.4rem;
  line-height: 1.4;
  margin: 0 0 20px;
}

.hero-copy p {
  font-size: 1.05rem;
  opacity: 0.95;
  margin: 0 0 20px;
  max-width: 46ch;
}

.hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
}

.badge svg {
  width: 14px;
  height: 14px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--record);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

/* ブランドグラフィック：アプリアイコンのリング＋サマリーカード（スクショは使わない） */
.hero-brand {
  position: relative;
  width: 300px;
  max-width: 100%;
  height: 260px;
}

/* リングはカードの右下から中心がのぞくよう、大きめに配置。位置はここだけで調整可能。
   right/bottom を「よりマイナス」にすると右・下へ動いて緑背景からのはみ出しが増える */
.hero-ring {
  position: absolute;
  right: -375px;
  bottom: -435px;
  width: 700px;
  height: auto;
  z-index: 0;
  opacity: 0.8;
  pointer-events: none;
}

.hero-card {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 1;
  background: #fff;
  color: var(--text-primary);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: 0 20px 40px rgba(0, 40, 20, 0.28);
}

.hero-card-date {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.hero-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  text-align: center;
}

.hero-card-stats > div {
  padding: 0 4px;
}

.hero-card-stats .mid {
  border-left: 1px solid #EAF3ED;
  border-right: 1px solid #EAF3ED;
}

.hero-card-stats span {
  display: block;
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.hero-card-stats strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero-card-stats em {
  display: block;
  font-size: 0.62rem;
  color: var(--text-secondary);
  font-style: normal;
}

.hero-card-bars {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-top: 14px;
}

.hero-card-bars span {
  width: 26px;
  height: 9px;
  border-radius: 3px;
}

/* ---------- Screenshot showcase (alternating) ---------- */

.showcase {
  display: flex;
  flex-direction: column;
  gap: 88px;
}

.showcase-row {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 56px;
  align-items: center;
}

/* 偶数行は端末とテキストを左右入れ替える */
.showcase-row:nth-child(even) .showcase-media {
  order: 2;
}

.showcase-media {
  display: flex;
  justify-content: center;
  position: relative;
}

/* 端末の背後にブランドカラーのやわらかい光。透過PNGの枠がそのまま活きる */
.showcase-media::before {
  content: "";
  position: absolute;
  width: 74%;
  padding-bottom: 74%;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(90, 200, 0, 0.18),
    rgba(45, 199, 160, 0.08) 55%,
    rgba(45, 199, 160, 0) 78%
  );
  z-index: 0;
}

.showcase-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 250px;
  height: auto;
  filter: drop-shadow(0 26px 44px rgba(0, 50, 25, 0.22));
}

.showcase-text {
  max-width: 44ch;
}

.showcase-text .step-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-dark);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.showcase-text .step-badge span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  color: #fff;
  font-size: 0.82rem;
}

.showcase-text h3 {
  margin: 0 0 14px;
  font-size: 1.5rem;
  line-height: 1.4;
}

.showcase-text > p {
  margin: 0 0 18px;
  color: var(--text-secondary);
  font-size: 0.98rem;
}

.showcase-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.showcase-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.showcase-points svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Sections ---------- */

section {
  padding: 88px 0;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-head .tag {
  color: var(--accent-dark);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.section-head h2 {
  font-size: 1.9rem;
  margin: 12px 0 16px;
}

.section-head p {
  color: var(--text-secondary);
  margin: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.feature-card .icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-card .icon svg,
.placeholder-icon svg {
  width: 26px;
  height: 26px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.placeholder-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.pill-list li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.pill-list svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pill-list svg.cat-food { stroke: var(--cat-food); }
.pill-list svg.cat-toilet { stroke: var(--cat-toilet); }
.pill-list svg.cat-exercise { stroke: var(--cat-exercise); }
.pill-list svg.cat-outdoor { stroke: var(--cat-outdoor); }
.pill-list svg.cat-alcohol { stroke: var(--cat-alcohol); }
.pill-list svg.cat-generic { stroke: var(--accent-dark); }

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.93rem;
}

.section-alt {
  background: var(--card-bg);
}

.tag-cloud-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.tag-cloud-row.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 700px) {
  .tag-cloud-row.cols-2 {
    grid-template-columns: 1fr;
  }
}

.tag-block {
  background: var(--page-bg);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
}

.tag-block h3 {
  margin: 0 0 16px;
  font-size: 1.05rem;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.pill-list li {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.step {
  text-align: center;
}

.step .num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.step h4 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.step p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.note-box {
  background: #FFF7E6;
  border: 1px solid #FFD98A;
  border-radius: 16px;
  padding: 20px 24px;
  font-size: 0.9rem;
  color: #6B4E00;
  margin-top: 20px;
}

.cta {
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  color: #fff;
  border-radius: 28px;
  padding: 56px 40px;
  text-align: center;
}

.cta h2 {
  margin: 0 0 14px;
  font-size: 1.7rem;
}

.cta p {
  margin: 0 0 28px;
  opacity: 0.95;
}

/* ---------- Footer ---------- */

.site-footer {
  background: #16281F;
  color: rgba(255, 255, 255, 0.75);
  padding: 56px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-brand img {
  height: 28px;
  border-radius: 7px;
}

.site-footer h5 {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 16px;
}

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

.site-footer li {
  margin-bottom: 10px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Legal pages ---------- */

.legal-hero {
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  color: #fff;
  padding: 56px 0;
}

.legal-hero h1 {
  margin: 0 0 10px;
  font-size: 2rem;
}

.legal-hero .updated {
  opacity: 0.9;
  font-size: 0.9rem;
}

.legal-body {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 48px;
  margin: 48px 0;
}

.legal-body h2 {
  font-size: 1.25rem;
  margin: 40px 0 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.legal-body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.legal-body h3 {
  font-size: 1.02rem;
  margin: 22px 0 10px;
}

.legal-body p,
.legal-body li {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.legal-body ol,
.legal-body ul {
  padding-left: 1.4em;
}

.legal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.9rem;
}

.legal-body th,
.legal-body td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}

.legal-body th {
  background: var(--page-bg);
  width: 26%;
}

.toc {
  background: var(--page-bg);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 8px;
}

.toc h5 {
  margin: 0 0 12px;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.toc ol {
  columns: 2;
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.88rem;
}

/* ---------- Contact page ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}

.form-frame {
  background: var(--card-bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  color: var(--text-secondary);
}


.contact-info-card {
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
}

.contact-info-card h3 {
  margin: 0 0 10px;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  /* モバイルは見出しを上、ブランドカード＋リングを下に。
     リングはクリップせず小さめにして、下辺からふわっとはみ出させる（文字には重ならない） */
  .hero-visual {
    order: 0;
    margin-top: 16px;
  }

  .hero-ring {
    width: 520px;
    right: -220px;
    bottom: -220px;
  }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tag-cloud-row {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .showcase {
    gap: 64px;
  }

  .showcase-row {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }

  /* モバイルでは常に端末を上、テキストを下に揃える */
  .showcase-row:nth-child(even) .showcase-media {
    order: 0;
  }

  .showcase-text {
    max-width: 52ch;
    margin: 0 auto;
  }

  .showcase-points {
    display: inline-flex;
    text-align: left;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .legal-body {
    padding: 32px 22px;
  }

  .toc ol {
    columns: 1;
  }
}

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

  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--page-bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    gap: 16px;
    display: none;
  }

  .main-nav.open {
    display: flex;
  }

  .lang-switch {
    margin-top: 8px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 1.9rem;
  }
}
