@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap");

:root {
  --bg: #f4f4f7;
  --ink: #18181b;
  --muted: #71717a;
  --white: #fff;
  --violet: #7c3aed;
  --sky: #0ea5e9;
  --rose: #f43f5e;
  --amber: #f59e0b;
  --emerald: #10b981;
  --line: rgba(24, 24, 27, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "DM Sans", "Noto Sans TC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }

/* ── Minimal header ── */
.bento-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 32px);
  background: rgba(244, 244, 247, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.bento-header .back {
  font-size: 0.82rem;
  color: var(--muted);
}

.bento-logo {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.bento-logo span {
  color: var(--violet);
}

.bento-header a.cta {
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
}

/* ── Bento grid shell ── */
.bento-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 28px);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(120px, auto);
  gap: 12px;
}

.bento-tile {
  border-radius: 20px;
  padding: clamp(20px, 3vw, 28px);
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-tile h1,
.bento-tile h2,
.bento-tile h3 {
  margin: 0;
  letter-spacing: -0.02em;
}

.bento-tile p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Tile spans */
.tile-hero {
  grid-column: span 8;
  grid-row: span 2;
  min-height: 320px;
  background: linear-gradient(135deg, #ede9fe, #dbeafe);
  border: none;
}

.tile-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  max-width: 480px;
}

.tile-hero .badge {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--violet);
  margin-bottom: 16px;
}

.tile-stat {
  grid-column: span 2;
  grid-row: span 1;
  text-align: center;
  align-items: center;
}

.tile-stat strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
}

.tile-stat span {
  font-size: 0.72rem;
  color: var(--muted);
}

.tile-stat.violet { background: var(--violet); color: #fff; }
.tile-stat.violet span { color: rgba(255,255,255,0.75); }

.tile-stat.sky { background: var(--sky); color: #fff; }
.tile-stat.sky span { color: rgba(255,255,255,0.75); }

.tile-preview {
  grid-column: span 4;
  grid-row: span 2;
  padding: 0;
  min-height: 280px;
}

.tile-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile-feature {
  grid-column: span 4;
  grid-row: span 1;
}

.tile-feature:nth-of-type(1) { border-top: 4px solid var(--violet); }
.tile-feature:nth-of-type(2) { border-top: 4px solid var(--sky); }
.tile-feature:nth-of-type(3) { border-top: 4px solid var(--emerald); }

.tile-feature h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.tile-feature .emoji {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.tile-wide {
  grid-column: span 6;
  grid-row: span 1;
  background: var(--ink);
  color: var(--white);
}

.tile-wide p { color: rgba(255,255,255,0.65); }

.tile-quote {
  grid-column: span 3;
  grid-row: span 1;
  background: var(--amber);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  justify-content: center;
}

.tile-pricing {
  grid-column: span 3;
  grid-row: span 1;
  background: linear-gradient(145deg, var(--rose), #fb7185);
  color: #fff;
  text-align: center;
  align-items: center;
}

.tile-pricing strong {
  font-size: 2rem;
  font-weight: 700;
}

.tile-pricing span {
  font-size: 0.78rem;
  opacity: 0.85;
}

.tile-logos {
  grid-column: span 6;
  grid-row: span 1;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.tile-logos span {
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--bg);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.tile-cta {
  grid-column: span 12;
  grid-row: span 1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(90deg, #ede9fe, #e0f2fe);
  border: none;
  padding: clamp(24px, 4vw, 36px);
}

.tile-cta h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 700;
}

.tile-cta a {
  padding: 12px 24px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
}

.bento-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 32px) 48px;
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tile-hero,
  .tile-preview,
  .tile-feature,
  .tile-wide,
  .tile-quote,
  .tile-pricing,
  .tile-logos,
  .tile-cta,
  .tile-stat {
    grid-column: span 2;
    grid-row: auto;
  }

  .tile-hero { min-height: 240px; }
  .tile-preview { min-height: 200px; }
  .tile-cta { flex-direction: column; text-align: center; }
}

@media (max-width: 520px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .tile-hero,
  .tile-preview,
  .tile-feature,
  .tile-wide,
  .tile-quote,
  .tile-pricing,
  .tile-logos,
  .tile-cta,
  .tile-stat {
    grid-column: span 1;
  }
}
