/* ============================================================
   季河X季享 — AI IMPACT 成果發佈 Landing Page
   Editorial magazine style. Three variants: 保守 / 平衡 / 大膽
   ============================================================ */

:root {
  /* Brand — extracted from booth jade/teal */
  --jade-900: #0d3d36;
  --jade-800: #135449;
  --jade-700: #1a6e60;
  --jade-600: #1f8273;
  --jade-500: #2a9d8c;
  --jade-300: #79c2b6;
  --jade-100: #cfe3df;
  --jade-50:  #ecf3f1;

  /* Jinher orange (from logo) */
  --jinher-orange: #e98f3f;
  --jinher-blue: #2c6fb5;

  /* Warm neutrals */
  --cream: #f5f1ea;
  --paper: #faf7f2;
  --ink: #14201d;
  --ink-soft: #3a4844;
  --rule: #d9d3c8;

  /* Accent */
  --accent: #d97a3a;

  /* derived */
  --bg: var(--paper);
  --fg: var(--ink);
  --fg-soft: var(--ink-soft);
  --surface: #fff;
  --surface-2: var(--cream);
  --border: var(--rule);
  --brand: var(--jade-700);
  --brand-deep: var(--jade-900);
  --brand-soft: var(--jade-50);
}

[data-theme="dark"] {
  --bg: #0c1514;
  --fg: #ece7dc;
  --fg-soft: #a8aea9;
  --surface: #131e1c;
  --surface-2: #0a1311;
  --border: #243330;
  --brand: var(--jade-500);
  --brand-deep: #061715;
  --brand-soft: #0f2624;
  --cream: #1a2522;
  --paper: #0c1514;
  --rule: #243330;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body, "Noto Serif TC", "Source Han Serif TC", "Songti TC", Georgia, serif);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* type system */
.display, h1, h2, h3, h4 {
  font-family: var(--font-display, "Noto Serif TC", "Source Han Serif TC", "Songti TC", Georgia, serif);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}
.sans, .mono, .label, button, input, select, textarea, .nav, .meta, .kicker, .nums {
  font-family: var(--font-sans, "Inter", "Noto Sans TC", "PingFang TC", system-ui, sans-serif);
}
.mono, .nums {
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-feature-settings: "tnum" 1;
}
.kicker {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
}

/* container */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 960px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) {
  .wrap, .wrap-narrow { padding: 0 20px; }
}

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px; gap: 20px;
}
.nav-brand { display: flex; align-items: center; gap: 14px; font-weight: 600; font-size: 13px; letter-spacing: 0.02em; }
.nav-brand .x { display: inline-flex; align-items: center; line-height: 1; }
.nav-logo { width: auto; display: block; object-fit: contain; }
.nav-logo[alt="季河資訊"] { height: 26px; }
.nav-logo[alt="季享未來"] { height: 36px; }
[data-theme="dark"] .nav-logo { filter: brightness(0) invert(1) brightness(0.95); }
.nav-brand .x { opacity: 0.4; font-weight: 300; margin: 0 2px; }
.nav-links { display: flex; gap: 28px; font-size: 13px; color: var(--fg-soft); }
.nav-links a { color: inherit; text-decoration: none; }
.nav-links a:hover { color: var(--brand); }
.nav-cta {
  font-size: 12px; letter-spacing: 0.05em;
  background: var(--fg); color: var(--bg);
  padding: 9px 16px; border-radius: 999px;
  text-decoration: none; font-weight: 500;
  transition: transform .2s;
}
.nav-cta:hover { transform: translateY(-1px); }
@media (max-width: 720px) { .nav-links { display: none; } }

/* hero */
.hero { padding: 80px 0 60px; position: relative; }
.hero-edition {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-soft); padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.hero-edition .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--brand); display: inline-block; margin-right: 8px; }

.hero-title {
  font-size: clamp(48px, 8.5vw, 132px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.94;
  margin: 60px 0 32px;
}
.hero-title .accent { color: var(--brand); font-style: italic; font-weight: 500; }
.hero-title .ja { font-feature-settings: "palt" 1; }

.hero-meta {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  padding: 40px 0 0; border-top: 1px solid var(--border); margin-top: 60px;
}
.hero-meta .label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-soft); margin-bottom: 10px; }
.hero-meta .value { font-size: 18px; font-weight: 500; color: var(--fg); }
.hero-meta .value .nums { font-size: 22px; font-weight: 500; }
@media (max-width: 720px) {
  .hero-meta { grid-template-columns: 1fr; gap: 24px; }
}

/* hero variant: split */
.hero-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: end; padding: 60px 0; }
.hero-split .right { aspect-ratio: 4/5; background: var(--brand-soft); border-radius: 4px; overflow: hidden; }
.hero-split .right img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 900px) { .hero-split { grid-template-columns: 1fr; } }

/* hero variant: poster */
.hero-poster {
  position: relative; min-height: 90vh;
  display: grid; place-items: center; text-align: center;
  background:
    radial-gradient(60% 50% at 50% 30%, color-mix(in srgb, var(--brand) 18%, transparent), transparent),
    var(--bg);
  overflow: hidden;
}
.hero-poster::before, .hero-poster::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.18;
  pointer-events: none;
}
.hero-poster .content { position: relative; padding: 80px 32px; }
.hero-poster h1 {
  font-size: clamp(64px, 12vw, 200px);
  letter-spacing: -0.04em;
  line-height: 0.88;
}
.hero-poster .sub { margin-top: 24px; font-size: 18px; color: var(--fg-soft); max-width: 600px; margin-left: auto; margin-right: auto; }

/* sections */
section { padding: 100px 0; border-top: 1px solid var(--border); }
section:first-of-type { border-top: 0; }
.sec-label {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 48px;
}
.sec-label .num { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--fg-soft); letter-spacing: 0.1em; }
.sec-label h2 { font-size: clamp(32px, 4.5vw, 56px); margin: 12px 0 0; }
.sec-label .lede { color: var(--fg-soft); font-size: 16px; max-width: 480px; margin-top: 16px; line-height: 1.55; }
.sec-head-row { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: end; }
@media (max-width: 720px) { .sec-head-row { grid-template-columns: 1fr; gap: 24px; } }

/* ABOUT — two-up companies */
.companies { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.company {
  background: var(--surface); padding: 48px;
  display: flex; flex-direction: column; gap: 20px;
  min-height: 420px;
}
.company .badge {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brand); font-weight: 600;
}
.company h3 { font-size: 36px; line-height: 1.05; }
.company .ja { color: var(--fg-soft); font-size: 13px; letter-spacing: 0.15em; text-transform: uppercase; }
.company p { color: var(--fg-soft); margin: 0; font-size: 15px; line-height: 1.7; }
.company .tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.company .tag {
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  padding: 5px 10px; border: 1px solid var(--border); border-radius: 4px;
  color: var(--fg-soft);
}
.company.dark { background: var(--brand-deep); color: #ece7dc; }
.company.dark p { color: #b6c2bf; }
.company.dark .tag { border-color: rgba(255,255,255,0.18); color: #b6c2bf; }
.company.dark .ja, .company.dark .badge { color: var(--jade-300); }
@media (max-width: 800px) { .companies { grid-template-columns: 1fr; } }

/* STATS */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat { padding: 36px 0; border-right: 1px solid var(--border); padding-right: 32px; }
.stat:last-child { border-right: 0; }
.stat .num {
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.stat .num .unit { font-size: 0.4em; color: var(--fg-soft); margin-left: 4px; letter-spacing: 0.05em; font-weight: 400; }
.stat .label { font-size: 13px; color: var(--fg-soft); margin-top: 16px; line-height: 1.45; }
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--border); }
}

/* HIGHLIGHTS — magazine grid */
.highlights {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  grid-auto-rows: 220px;
}
.tile { position: relative; overflow: hidden; background: var(--brand-soft); border-radius: 2px; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s ease; }
.tile:hover img { transform: scale(1.04); }
.tile .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.78), transparent);
  color: #f5f1ea;
  font-size: 12px;
  letter-spacing: 0.04em;
  font-family: "JetBrains Mono", monospace;
}
.tile .cap .num { opacity: 0.6; margin-right: 10px; }

/* magazine layout spans */
.t-a { grid-column: span 8; grid-row: span 2; }
.t-b { grid-column: span 4; grid-row: span 1; }
.t-c { grid-column: span 4; grid-row: span 1; }
.t-d { grid-column: span 5; grid-row: span 2; }
.t-e { grid-column: span 4; grid-row: span 1; }
.t-f { grid-column: span 3; grid-row: span 1; }
.t-g { grid-column: span 4; grid-row: span 1; }
.t-h { grid-column: span 3; grid-row: span 1; }
.t-i { grid-column: span 6; grid-row: span 2; }
.t-j { grid-column: span 6; grid-row: span 1; }
.t-k { grid-column: span 6; grid-row: span 1; }
@media (max-width: 900px) {
  .highlights { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 180px; }
  .tile { grid-column: span 6 !important; grid-row: span 1 !important; }
  .t-a, .t-d, .t-i { grid-row: span 2 !important; }
}

/* FEATURE — pull quote */
.feature {
  display: grid; grid-template-columns: 1fr; gap: 40px;
  padding: 80px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.feature blockquote {
  font-family: var(--font-display, serif);
  font-size: clamp(28px, 3.6vw, 48px);
  font-style: italic;
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.feature blockquote .mark { color: var(--brand); font-style: normal; font-size: 1.2em; line-height: 0; vertical-align: -0.1em; margin-right: 0.05em; }
.feature .attrib { display: flex; align-items: center; gap: 16px; color: var(--fg-soft); font-size: 13px; }
.feature .attrib .line { width: 40px; height: 1px; background: var(--fg-soft); }

/* SOLUTIONS */
.solutions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--border); }
.solution {
  padding: 40px 36px; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 18px; min-height: 360px;
}
.solution:last-child { border-right: 0; }
.solution .sn { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--fg-soft); letter-spacing: 0.1em; }
.solution h3 { font-size: 24px; line-height: 1.2; }
.solution h3 .en { display: block; font-size: 12px; letter-spacing: 0.18em; color: var(--brand); margin-bottom: 10px; font-weight: 500; font-family: "JetBrains Mono", monospace; }
.solution p { color: var(--fg-soft); font-size: 14px; line-height: 1.7; margin: 0; }
.solution ul { list-style: none; padding: 0; margin: auto 0 0; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); padding-top: 18px; }
.solution li { font-size: 13px; color: var(--fg-soft); display: flex; gap: 10px; }
.solution li::before { content: "→"; color: var(--brand); }
@media (max-width: 900px) {
  .solutions { grid-template-columns: 1fr; }
  .solution { border-right: 0; border-bottom: 1px solid var(--border); }
  .solution:last-child { border-bottom: 0; }
}

/* TIMELINE */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-row {
  display: grid; grid-template-columns: 120px 1fr 2fr; gap: 32px;
  padding: 32px 0; border-top: 1px solid var(--border);
  align-items: start;
}
.tl-row:last-child { border-bottom: 1px solid var(--border); }
.tl-row .time { font-family: "JetBrains Mono", monospace; font-size: 14px; color: var(--brand); font-weight: 500; }
.tl-row h4 { font-size: 22px; line-height: 1.3; }
.tl-row p { color: var(--fg-soft); font-size: 14px; margin: 6px 0 0; }
@media (max-width: 720px) {
  .tl-row { grid-template-columns: 1fr; gap: 8px; }
}

/* FOOTER */
footer { padding: 80px 0 40px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid h5 { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-soft); margin: 0 0 14px; font-weight: 500; }
.footer-grid p, .footer-grid a { font-size: 14px; color: var(--fg); text-decoration: none; line-height: 1.7; display: block; }
.footer-grid a:hover { color: var(--brand); }
.footer-bottom {
  margin-top: 60px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; font-size: 12px; color: var(--fg-soft);
  font-family: "JetBrains Mono", monospace;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* utility */
.divider-text {
  display: flex; align-items: center; gap: 16px;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg-soft); margin: 60px 0;
}
.divider-text .line { flex: 1; height: 1px; background: var(--border); }

/* density */
[data-density="compact"] section { padding: 60px 0; }
[data-density="compact"] .hero { padding: 50px 0 40px; }
[data-density="compact"] .hero-title { margin: 36px 0 20px; }
[data-density="compact"] .hero-meta { padding-top: 24px; margin-top: 36px; }
[data-density="compact"] .sec-label { margin-bottom: 28px; }
[data-density="compact"] .company { padding: 32px; min-height: 320px; }
[data-density="compact"] .solution { padding: 28px 24px; min-height: 280px; }
[data-density="compact"] .feature { padding: 50px 0; }
[data-density="compact"] .highlights { grid-auto-rows: 180px; }

/* HERO FIG layouts (single / triptych / poster / mosaic) */
.hero-fig { position: relative; }
.hero-fig > * { display: none; }
.hero-fig figure { margin: 0; overflow: hidden; border-radius: 4px; background: var(--brand-soft); }
.hero-fig img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-fig[data-layout="single"] .hf-single { display: block; aspect-ratio: 16/9; }
.hero-fig[data-layout="single"] .hf-single img { object-position: center 65%; }

.hero-fig[data-layout="triptych"] .hf-triptych {
  display: grid; grid-template-columns: 2fr 1fr; gap: 12px;
  aspect-ratio: 16/9;
}
.hero-fig[data-layout="triptych"] .hf-main { grid-row: span 2; }
.hero-fig[data-layout="triptych"] .hf-main img { object-position: center 60%; }

.hero-fig[data-layout="poster"] .hf-poster {
  display: block; position: relative; aspect-ratio: 16/9; overflow: hidden; border-radius: 4px;
}
.hero-fig[data-layout="poster"] .hf-poster figure { aspect-ratio: 16/9; border-radius: 4px; }
.hero-fig[data-layout="poster"] .hf-poster img { object-position: center 60%; filter: brightness(0.78); }
.hero-fig[data-layout="poster"] .hf-poster-overlay {
  position: absolute; inset: 0; padding: clamp(28px, 6vw, 72px);
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff; gap: 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent 60%);
}
.hero-fig[data-layout="poster"] .hf-poster-meta {
  display: flex; gap: 18px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  opacity: 0.9;
}
.hero-fig[data-layout="poster"] .hf-poster-meta span:first-child::after {
  content: ""; display: inline-block; width: 18px; height: 1px; background: #fff;
  vertical-align: middle; margin-left: 18px; opacity: 0.6;
}
.hero-fig[data-layout="poster"] .hf-poster-title {
  font-family: var(--font-display, "Noto Serif TC", serif);
  font-size: clamp(36px, 5.5vw, 84px); line-height: 1.0; font-weight: 600;
  letter-spacing: -0.02em;
}
.hero-fig[data-layout="poster"] .hf-poster-sub { font-size: 12px; letter-spacing: 0.18em; opacity: 0.85; }

.hero-fig[data-layout="mosaic"] .hf-mosaic {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px;
  aspect-ratio: 16/9;
}
.hero-fig[data-layout="mosaic"] .hf-mosaic figure:nth-child(1) { grid-row: span 2; }
.hero-fig[data-layout="mosaic"] .hf-mosaic figure:nth-child(1) img { object-position: center 65%; }
.hero-fig[data-layout="mosaic"] .hf-mosaic figure:nth-child(4) { grid-column: span 2; }

@media (max-width: 720px) {
  .hero-fig[data-layout="triptych"] .hf-triptych,
  .hero-fig[data-layout="mosaic"] .hf-mosaic {
    aspect-ratio: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .hero-fig[data-layout="triptych"] .hf-main { aspect-ratio: 16/9; grid-row: auto; }
  .hero-fig[data-layout="triptych"] .hf-side { aspect-ratio: 16/9; }
  .hero-fig[data-layout="mosaic"] figure { aspect-ratio: 4/3; grid-row: auto !important; grid-column: auto !important; }
}

/* logo blocks */
.logo-jinher, .logo-jx {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 700;
  letter-spacing: 0.02em;
}
.logo-jinher .mark { width: 22px; height: 22px; background: linear-gradient(135deg, #2c6fb5 50%, #e98f3f 50%); border-radius: 3px; }
.logo-jx .mark {
  width: 22px; height: 22px; position: relative;
  background:
    linear-gradient(45deg, transparent 45%, var(--jade-700) 45%, var(--jade-700) 55%, transparent 55%),
    linear-gradient(135deg, transparent 45%, var(--jade-700) 45%, var(--jade-700) 55%, transparent 55%);
}

/* AI IMPACT pill */
.ai-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border: 1px solid var(--brand);
  border-radius: 999px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brand); font-weight: 600;
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}
.ai-pill .star { width: 6px; height: 6px; background: var(--brand); border-radius: 999px; }

/* press strip */
.press {
  display: flex; align-items: center; gap: 40px; flex-wrap: wrap;
  padding: 32px 0; color: var(--fg-soft); font-size: 13px;
}
.press strong { color: var(--fg); font-weight: 600; }

/* fade-in */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .8s ease both; }

/* variant: 大膽 / bold */
[data-variant="bold"] {
  --bg: #0c1514;
  --fg: #ece7dc;
  --fg-soft: #a8aea9;
  --surface: #131e1c;
  --border: #243330;
  --brand: var(--jade-500);
  --brand-deep: #061715;
  --brand-soft: #0f2624;
  --cream: #1a2522;
  --paper: #0c1514;
  --rule: #243330;
}
[data-variant="bold"] .hero-title .accent {
  background: linear-gradient(110deg, var(--jade-500), #79c2b6 60%, #ece7dc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: normal;
  font-weight: 700;
}

/* variant: 保守 / safe */
[data-variant="safe"] {
  --brand: #155449;
  --brand-deep: #0d3d36;
}
[data-variant="safe"] .hero-title { font-weight: 600; letter-spacing: -0.02em; }
[data-variant="safe"] .hero-title .accent { font-style: normal; color: var(--brand); }
