/*
Theme Name: GT SFS Minimal
Theme URI:  https://go-tomedia.com/
Author: GOtomedia
Description: ファイルダウンロード用途に特化した最小テーマ（index.php / 404.php中心）
Version: 1.0.0
Text Domain: gt-sfs-minimal
*/

:root { color-scheme: light; }
body { margin:0; font:16px/1.7 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans JP","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif; background:#fff; color:#111; }
a { color: inherit; }
.wrap { max-width: 980px; margin: 0 auto; padding: 24px; }
.site-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding: 16px 0; border-bottom: 1px solid #eee; }
.site-brand { display:flex; align-items:center; gap:12px; text-decoration:none; }
.site-brand img { height: 36px; width:auto; display:block; }
.site-title { font-weight: 700; letter-spacing: .02em; }
.main { padding: 24px 0; }
.card { border:1px solid #eee; border-radius: 12px; padding: 18px; background:#fff; }
.muted { color:#666; font-size: 14px; }
hr { border:0; border-top:1px solid #eee; margin: 18px 0; }
:root{
  --gt-logo-h: 36px; /* デフォルト */
}

.gt-site-logo{
  height: var(--gt-logo-h);
  width: auto;
  max-height: var(--gt-logo-h);
  display: block;
}

/* ===== Sticky footer 最終パッチ ===== */

/* まず余計なはみ出しを止める */
html, body { height: 100%; margin: 0; }

/* wrap を画面高に合わせる（dvh対応） */
.wrap{
  min-height: 100dvh !important;
  display: flex !important;
  flex-direction: column !important;
}

/* main が伸びる領域 */
.main{
  flex: 1 0 auto !important;
  min-height: 0 !important;   /* これが重要：内部要素で伸びるのを防ぐ */
}

/* footer を必ず下へ */
.site-footer{
  margin-top: auto !important;
}

/* ここが肝：wrap にpaddingがあると 100dvh を超えるので、wrap の padding を無効化 */
.wrap{
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* 上下余白（好みで調整） */
.site-header{ padding-top: 16px; padding-bottom: 16px; }
.main{ padding-top: 24px; padding-bottom: 24px; }
.site-footer{ padding-top: 16px; padding-bottom: 16px; }

.site-footer__inner{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-footer__note{
  font-size: 12px;
  line-height: 1.6;
  color: #666;
}
/* コピーライトリンク：色を変えない */
.site-footer__link{
  color: inherit;
  text-decoration: none;
}
.site-footer__link:hover,
.site-footer__link:focus{
  color: inherit;
  text-decoration: none;
}

/* =========================
   Download Button
   class="button gtfs-download"
========================= */

.button.gtfs-download{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 12px 20px;
  border-radius: 8px;

  background: #111;
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;

  text-decoration: none;
  border: none;
  cursor: pointer;

  transition: 
    background-color .2s ease,
    transform .15s ease,
    box-shadow .15s ease;
}

/* hover */
.button.gtfs-download:hover{
  background: #000;
  box-shadow: 0 6px 16px rgba(0,0,0,.15);
  transform: translateY(-1px);
  color: #fff;
}

/* active */
.button.gtfs-download:active{
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(0,0,0,.2) inset;
}

/* focus（キーボード操作用） */
.button.gtfs-download:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px #000;
}

/* disabled（もし使う場合） */
.button.gtfs-download.is-disabled,
.button.gtfs-download[disabled]{
  opacity: .5;
  pointer-events: none;
}
/* =========================
   Expired Download Button
========================= */

.button.gtfs-download.is-expired{
  background: #e5e5e5;
  color: #888 !important;
  border: 1px solid #ddd;
  cursor: not-allowed;

  box-shadow: none;
  transform: none;
}

/* hover / active を完全に無効化 */
.button.gtfs-download.is-expired:hover,
.button.gtfs-download.is-expired:active{
  background: #e5e5e5;
  color: #888;
  box-shadow: none;
  transform: none;
}

/* クリック不能 */
.button.gtfs-download.is-expired{
  pointer-events: none;
}

/* 補足テキスト用（任意） */
.gtfs-download-expired-note{
  margin-top: 6px;
  font-size: 12px;
  color: #999;
}

/* =========================
 GTFS LP 全画面背景（トップページのみ）
========================= */
body.home,
body.front-page {
  background: #0b1220;
}

body.home .wrap,
body.front-page .wrap {
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 10% 10%, rgba(79,140,255,.25), transparent 60%),
              radial-gradient(900px 500px at 90% 20%, rgba(34,197,94,.18), transparent 60%),
              linear-gradient(180deg, #070b14, #0b1220);
}
body.home,
body.front-page {
  margin: 0;
}

body.home .main,
body.front-page .main {
  padding: 0;
}
/* =========================
 GTFS LP: トップページだけ文字色を明るく
========================= */
body.home,
body.front-page{
  color: #eaf0ff;
}

/* ヘッダー/フッターなどテーマ側の要素も白寄りに */
body.home .site-header,
body.front-page .site-header,
body.home .site-footer,
body.front-page .site-footer,
body.home .main,
body.front-page .main{
  color: #eaf0ff;
}

/* リンク色を勝手に青にしない（見た目維持） */
body.home a,
body.front-page a{
  color: inherit;
}
body.home a:hover,
body.front-page a:hover{
  opacity: .9;
}

/* muted（フッター等の薄い文字）をダーク背景向けに */
body.home .muted,
body.front-page .muted{
  color: rgba(234,240,255,.70);
}
/* =========================
 トップページだけロゴを明るく表示
========================= */
body.home .site-header .gt-site-logo,
body.front-page .site-header .gt-site-logo{
  filter: invert(1) brightness(1.1);
}
