/* iCard 愛卡官網 v3
   語言: 卡牌情報誌。直角、細線、大字、真實截圖。
   單一強調色(燒橘),單一圓角尺度(4px),不使用卡片陰影。 */

:root {
    color-scheme: light dark;
    --bg: #F4F4F5;
    --surface: #FAFAFA;
    --ink: #18181B;
    --muted: #52525B;
    --line: #D4D4D8;
    --accent: #D9531E;
    --accent-ink: #FFFFFF;
    --accent-soft: #F6DCCF;
    --r: 4px;
    --font: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", system-ui, sans-serif;
    --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
    --nav-h: 64px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #131315;
        --surface: #1B1B1E;
        --ink: #ECECEE;
        --muted: #A1A1AA;
        --line: #34343A;
        --accent: #F0763B;
        --accent-ink: #1A0D05;
        --accent-soft: #3A2316;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-wrap: pretty;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap { width: min(1240px, 100% - 48px); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: calc(100% - 32px); } }

/* ---------- 導覽列 ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--nav-h); width: min(1240px, 100% - 48px); margin-inline: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.1rem; letter-spacing: .01em; white-space: nowrap; }
.brand img { width: 32px; height: 32px; border-radius: var(--r); }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-btn { display: none; cursor: pointer; padding: 8px 14px; border: 1px solid var(--ink); border-radius: var(--r); font-size: .9rem; font-weight: 700; }
.site-nav ul { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; font-size: .95rem; font-weight: 600; color: var(--muted); white-space: nowrap; padding: 6px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); border-color: var(--accent); }
.site-nav a.cta { color: var(--accent-ink); background: var(--accent); border: 0; padding: 9px 18px; border-radius: var(--r); font-weight: 700; transition: transform .2s; }
.site-nav a.cta:hover { transform: translateY(-2px); }
.site-nav a.cta:active { transform: translateY(0) scale(.98); }
@media (max-width: 960px) {
    .nav-btn { display: block; }
    .nav-toggle:focus-visible + .nav-btn { outline: 3px solid var(--accent); outline-offset: 3px; }
    .site-nav { display: none; position: absolute; left: 0; right: 0; top: var(--nav-h); background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 20px; }
    .nav-toggle:checked ~ .site-nav { display: block; }
    .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
    .site-nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
    .site-nav a.cta { margin-top: 14px; text-align: center; }
}

/* ---------- 按鈕 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 28px; border-radius: var(--r); font-family: inherit; font-size: 1rem; font-weight: 700; text-decoration: none; white-space: nowrap; border: 1.5px solid var(--ink); transition: transform .2s cubic-bezier(.16, 1, .3, 1), background .2s, color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--bg); }

/* ---------- 首頁:Hero ---------- */
.hero { border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; min-height: min(760px, calc(100dvh - var(--nav-h))); padding-block: 48px; }
.hero h1 { margin: 0 0 22px; font-size: clamp(2.5rem, 4.8vw, 4.2rem); line-height: 1.12; font-weight: 900; letter-spacing: -.02em; }
.hero h1 span { color: var(--accent); }
.hero p { margin: 0 0 32px; max-width: 30em; font-size: 1.08rem; color: var(--muted); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { position: relative; padding-bottom: 14%; }
.hero-art img { border: 1px solid var(--line); border-radius: var(--r); }
.hero-art .back { width: 100%; }
.hero-art .front { position: absolute; left: -9%; bottom: 0; width: 62%; border-color: var(--ink); }
@media (max-width: 900px) {
    .hero .wrap { grid-template-columns: 1fr; min-height: 0; gap: 36px; padding-block: 36px 48px; }
    .hero-art { padding-bottom: 12%; }
    .hero-art .front { left: -3%; }
}

/* ---------- 區塊通用 ---------- */
.block { padding-block: clamp(64px, 9vw, 120px); }
.block + .block { border-top: 1px solid var(--line); }
.block h2 { margin: 0 0 14px; font-size: clamp(1.8rem, 3.6vw, 2.9rem); line-height: 1.2; font-weight: 900; letter-spacing: -.015em; }
.block .sub { margin: 0 0 44px; max-width: 34em; color: var(--muted); }

/* ---------- 資訊站 bento(4 項內容 = 4 格)---------- */
.bento { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.cell { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); display: flex; flex-direction: column; }
.cell h3 { margin: 0 0 6px; font-size: 1.3rem; font-weight: 800; line-height: 1.3; }
.cell p { margin: 0; font-size: .95rem; color: var(--muted); }
.cell .txt { padding: 24px 24px 20px; }
.cell-news { grid-column: 1 / 3; }
.cell-news img { margin-top: auto; border-top: 1px solid var(--line); }
.cell-week { grid-column: 3; grid-row: 1 / 3; background: var(--accent-soft); border-color: transparent; }
.cell-week .shot { margin-top: auto; padding: 0 12% 0; }
.cell-week .shot img { border: 1px solid var(--ink); border-bottom: 0; border-radius: 22px 22px 0 0; }
.cell-price { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cell-price p { color: inherit; opacity: .9; }
.cell-price .txt { padding: 24px; height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.cell-price h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.25; font-weight: 900; }
.cell-events img { margin-top: auto; border-top: 1px solid var(--line); }
@media (max-width: 900px) {
    .bento { grid-template-columns: 1fr; }
    .cell-news, .cell-week { grid-column: auto; grid-row: auto; }
    .cell-week .shot { padding: 24px 22% 0; }
    .cell-price .txt { gap: 28px; }
}

/* ---------- 遊戲入口 ---------- */
.games { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; list-style: none; margin: 0; padding: 0; }
.games li { border-top: 1px solid var(--ink); }
.games a { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 16px; padding: 22px 0 26px; text-decoration: none; transition: color .2s, padding-left .25s cubic-bezier(.16, 1, .3, 1); }
.games a:hover { color: var(--accent); padding-left: 10px; }
.games strong { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 900; line-height: 1.2; }
.games span { grid-column: 1; font-family: var(--mono); font-size: .82rem; color: var(--muted); }
.games i { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; font-size: 1.4rem; }
@media (max-width: 760px) { .games { grid-template-columns: 1fr; } }

/* ---------- 網頁版與 APP ---------- */
.platform .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 72px; align-items: center; }
.points { list-style: none; margin: 0 0 36px; padding: 0; }
.points li { padding: 14px 0; border-top: 1px solid var(--line); }
.points li:last-child { border-bottom: 1px solid var(--line); }
.points strong { display: inline-block; min-width: 6.2em; font-weight: 800; }
.points span { color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.badges img { height: 52px; width: auto; border-radius: var(--r); transition: transform .2s; }
.badges a:hover img { transform: translateY(-2px); }
.platform-art { position: relative; padding-bottom: 8%; }
.platform-art .web { border: 1px solid var(--line); border-radius: var(--r); }
.platform-art .ph { position: absolute; width: 27%; border: 1px solid var(--ink); border-radius: 20px; background: var(--surface); }
.platform-art .ph-1 { left: -6%; bottom: 0; }
.platform-art .ph-2 { right: 2%; bottom: -4%; }
@media (max-width: 900px) { .platform .wrap { grid-template-columns: 1fr; gap: 48px; } .platform-art .ph-1 { left: -2%; } }

/* ---------- 店家 ---------- */
.shops .wrap { max-width: 880px; }
.shops .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 36px; }
.shops .link-case { font-weight: 700; }

/* ---------- 頁尾 ---------- */
.site-footer { border-top: 1px solid var(--ink); padding-block: 56px 40px; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr; gap: 28px; }
.site-footer .mark { margin: 0; font-size: clamp(2.4rem, 7vw, 5.5rem); font-weight: 900; line-height: 1; letter-spacing: -.03em; white-space: nowrap; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .92rem; font-weight: 600; }
.site-footer nav a { text-decoration: none; color: var(--muted); }
.site-footer nav a:hover { color: var(--accent); }
.site-footer .copy { grid-column: 1 / -1; margin: 12px 0 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
/* 子頁使用的簡化頁尾 */
.site-footer > .container { width: min(1240px, 100% - 48px); margin-inline: auto; display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; font-size: .9rem; color: var(--muted); }
.site-footer > .container p { margin: 0; }
.site-footer > .container a { margin-right: 20px; text-decoration: none; }
.site-footer > .container a:hover { color: var(--accent); }

/* ---------- 進場(有動機: 依閱讀順序帶出層級)---------- */
@media (prefers-reduced-motion: no-preference) {
    .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--i, 0) * 90ms); }
    .js [data-reveal].in { opacity: 1; transform: none; }
}

/* ================= 子頁 ================= */
.page { width: min(780px, 100% - 48px); margin: 0 auto; padding-block: clamp(40px, 7vw, 88px) 96px; }
.page > h1 { margin: 0 0 40px; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.15; font-weight: 900; letter-spacing: -.02em; }
.page h2 { margin: 0 0 14px; font-size: 1.5rem; font-weight: 800; line-height: 1.35; }
.page h3 { margin: 28px 0 8px; font-size: 1.15rem; font-weight: 800; }
.page p { margin: 0 0 16px; }
.page ul, .page ol { margin: 0 0 18px; padding-left: 1.4em; }
.page li { margin-bottom: 8px; }
.page li::marker { color: var(--accent); }
.page a { color: var(--accent); font-weight: 600; }
.content-section, .about-content, .policy-section, .contact-info { padding: 36px 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 16px); }
.about-content { border-top: 1px solid var(--ink); }
.policy-content { border-top: 1px solid var(--ink); }
.policy-section:first-of-type { border-top: 0; }
.content-section:first-of-type { border-top: 1px solid var(--ink); }
.highlight { background: var(--accent-soft); padding: 1px 6px; border-radius: 2px; font-weight: 700; }
p.highlight { display: block; padding: 14px 18px; }
.note { padding: 12px 18px; border-left: 3px solid var(--accent); background: var(--surface); }
.thank-you { margin-top: 32px; font-weight: 800; }
.policy-img { margin: 20px 0; border: 1px solid var(--line); border-radius: var(--r); }
.timeline { margin-bottom: 8px; }
.timeline ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 28px; }
.timeline a { display: block; padding: 8px 16px; border: 1px solid var(--ink); border-radius: var(--r); text-decoration: none; color: var(--ink); font-family: var(--mono); font-size: .88rem; font-weight: 600; transition: background .2s, color .2s; }
.timeline a:hover { background: var(--ink); color: var(--bg); }
.contact-info a { font-size: 1.2rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
