/* ポモドーロ戦士 / Focus Quest — 全ページ共通スタイル
   システムフォント、Web Font 読込なし、トラッキングなし。 */

:root {
  /* ライトモード配色: 麻紙オフホワイト + 墨と藍 + 琥珀 */
  --color-bg: #f5f1e8;
  --color-surface: #fbf6ec;
  --color-text: #1c1c20;
  --color-text-muted: #6b5f4d;
  --color-border: #e6dfcd;
  --color-accent-ink: #1f3a5f;
  --color-accent-amber: #d49a3a;
  --color-link: #1f3a5f;
  --color-link-hover: #14253e;
  --gradient-hero: linear-gradient(135deg, #1f3a5f 0%, #2d4f7d 100%);
  --shadow-card: 0 4px 16px rgba(40, 32, 22, 0.10);

  --max-width: 960px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --font-family-base: -apple-system, BlinkMacSystemFont, "Hiragino Mincho ProN", "Yu Mincho", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --font-family-display: -apple-system, BlinkMacSystemFont, "Hiragino Mincho ProN", "Yu Mincho", "Hiragino Sans", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* ダークモード: 黒漆 + 暖かい琥珀 */
    --color-bg: #16161c;
    --color-surface: #1f1f28;
    --color-text: #f0ebe0;
    --color-text-muted: #a59c8c;
    --color-border: #2e2e3a;
    --color-accent-ink: #7090c0;
    --color-accent-amber: #e8b95c;
    --color-link: #9bb2d4;
    --color-link-hover: #c6d2e6;
    --gradient-hero: linear-gradient(135deg, #2d4f7d 0%, #14253e 100%);
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.5);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover,
a:focus {
  color: var(--color-link-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--color-accent-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  font-family: var(--font-family-display);
  line-height: 1.3;
  margin: 0 0 0.6em;
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }

p { margin: 0 0 1em; }

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

/* ===== ヘッダー / ナビ ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(245, 241, 232, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-border);
}

@media (prefers-color-scheme: dark) {
  .site-header {
    background-color: rgba(22, 22, 28, 0.88);
  }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--color-text);
  text-decoration: none;
}

.site-logo:hover {
  text-decoration: none;
  color: var(--color-accent-ink);
}

.site-logo__icon {
  width: 28px;
  height: 28px;
}

.site-nav__list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__list a {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav__list a:hover {
  color: var(--color-accent-ink);
  text-decoration: none;
}

.site-nav__toggle {
  display: none;
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  color: var(--color-text);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

@media (max-width: 768px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-110%);
    /* visibility で閉じ状態を完全に不可視化（nav 項目数に依存せず header への漏れを防ぐ）。
       閉じる時は transform 完了後に hidden を適用してスライドアップアニメを温存。 */
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
    pointer-events: none;
  }
  .site-nav.is-open {
    transform: translateY(0);
    visibility: visible;
    /* 開く時は visibility を即時 visible にしてスライドダウンアニメを開始させる。 */
    transition: transform 0.25s ease, visibility 0s;
    pointer-events: auto;
  }
  .site-nav__list {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }
  .site-nav__list li {
    border-top: 1px solid var(--color-border);
  }
  .site-nav__list li:first-child {
    border-top: 0;
  }
  .site-nav__list a {
    display: block;
    padding: 0.9rem 1.25rem;
  }
  .site-nav__toggle {
    display: inline-flex;
  }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 4rem 0 3rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(31, 58, 95, 0.10), transparent 60%),
    radial-gradient(circle at 90% 30%, rgba(212, 154, 58, 0.12), transparent 55%);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero__inner {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero__eyebrow {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--gradient-hero);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.hero__title {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  margin-bottom: 0.4rem;
}

.hero__subtitle {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  margin-bottom: 1.2rem;
  font-weight: 600;
}

.hero__description {
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 1.6rem;
  max-width: 36em;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.hero__visual {
  display: flex;
  justify-content: center;
}

.hero__screenshot {
  max-width: 320px;
  width: 100%;
  border-radius: 28px;
  box-shadow: 0 18px 48px rgba(28, 22, 14, 0.22);
}

/* App Store DL バッジ (placeholder) */
.app-store-placeholder {
  display: inline-flex;
  flex-direction: column;
  padding: 0.85rem 1.1rem;
  background-color: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.app-store-placeholder strong {
  display: block;
  color: var(--color-text);
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.btn--primary:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(31, 58, 95, 0.32);
}

.btn--ghost {
  background-color: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn--ghost:hover {
  color: var(--color-text);
  border-color: var(--color-accent-ink);
  text-decoration: none;
}

/* ===== セクション共通 ===== */
.section {
  padding: 3.5rem 0;
}

.section--alt {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section__header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section__eyebrow {
  color: var(--color-accent-ink);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section__lead {
  max-width: 32em;
  margin: 0 auto;
  color: var(--color-text-muted);
}

/* ===== 特徴ブロック ===== */
.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 2rem 0;
}

.feature + .feature {
  border-top: 1px solid var(--color-border);
}

@media (min-width: 768px) {
  .feature {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
  .feature--reverse .feature__media {
    order: 2;
  }
}

.feature__media {
  display: flex;
  justify-content: center;
}

.feature__media img {
  max-width: 280px;
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}

.feature__icon {
  font-size: 2rem;
  margin-bottom: 0.4rem;
  line-height: 1;
}

.feature__title {
  margin-bottom: 0.6rem;
}

.feature__list {
  padding-left: 1.2rem;
  margin: 0;
  color: var(--color-text-muted);
}

.feature__list li {
  margin-bottom: 0.35rem;
}

/* ===== スクショギャラリー ===== */
.gallery {
  margin-top: 2rem;
}

.gallery__heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 1rem;
  text-align: center;
}

.gallery__scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 240px);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding: 0.5rem 0 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.gallery__scroller--ipad {
  grid-auto-columns: minmax(280px, 320px);
}

.gallery__item {
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}

.gallery__item img {
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  background-color: var(--color-surface);
}

.gallery__caption {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ===== CTA バナー ===== */
.cta-banner {
  text-align: center;
  padding: 3rem 1.25rem;
  background: var(--gradient-hero);
  color: #fff;
  border-radius: var(--radius-lg);
  margin: 2.5rem auto;
  max-width: calc(var(--max-width) - 2rem);
}

.cta-banner h2 {
  color: #fff;
  margin-bottom: 0.6rem;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 30em;
  margin: 0 auto 1.4rem;
}

.cta-banner .btn--ghost {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.cta-banner .btn--ghost:hover {
  background-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

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

.faq-list details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.2rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-accent-ink);
  transition: transform 0.2s ease;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list__answer {
  padding: 0 1.2rem 1.1rem;
  color: var(--color-text-muted);
}

.faq-list__answer p:last-child {
  margin-bottom: 0;
}

/* ===== お問い合わせフォーム ===== */
.contact {
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--color-surface);
  padding: 1.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.contact__notice {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  background-color: rgba(31, 58, 95, 0.06);
  border-left: 3px solid var(--color-accent-amber);
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}

.contact__notice code {
  font-size: 0.85rem;
  background-color: rgba(0, 0, 0, 0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

@media (prefers-color-scheme: dark) {
  .contact__notice code {
    background-color: rgba(255, 255, 255, 0.1);
  }
}

.contact__field {
  margin-bottom: 1rem;
}

.contact__field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

.contact__field label .required {
  color: var(--color-accent-ink);
  margin-left: 0.2rem;
}

.contact input,
.contact textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background-color: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contact input:focus,
.contact textarea:focus {
  outline: 0;
  border-color: var(--color-accent-ink);
  box-shadow: 0 0 0 3px rgba(31, 58, 95, 0.18);
}

.contact textarea {
  min-height: 140px;
  resize: vertical;
}

.contact__submit {
  text-align: right;
}

/* ===== フッター ===== */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 0 2rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  background-color: var(--color-surface);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

@media (min-width: 768px) {
  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

.site-footer__links a {
  color: var(--color-text-muted);
}

.site-footer__meta {
  font-size: 0.8rem;
}

/* ===== 共通: 文章ページ (privacy / 404) ===== */
.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

.doc h1 {
  margin-bottom: 0.4rem;
}

.doc__updated {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

.doc h2 {
  margin-top: 2.4rem;
  border-top: 1px solid var(--color-border);
  padding-top: 1.6rem;
}

.doc h2:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 1.5rem;
}

.doc ul, .doc ol {
  padding-left: 1.4rem;
}

.doc li {
  margin-bottom: 0.4rem;
}

.doc code {
  font-size: 0.9em;
  background-color: rgba(0, 0, 0, 0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

@media (prefers-color-scheme: dark) {
  .doc code {
    background-color: rgba(255, 255, 255, 0.1);
  }
}

/* ===== 404 ===== */
.not-found {
  text-align: center;
  padding: 5rem 1.25rem;
}

.not-found__code {
  font-size: clamp(4rem, 14vw, 7rem);
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
  line-height: 1;
}

/* ===== ユーティリティ ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
