/* ============================================================================
   Connect Voice AI — 展示网站共享设计系统
   AWS 品牌浅色风 · 编辑技术观感
   - 底色：暖白纸感 (#FBFAF7)
   - 墨色：AWS Squid Ink (#232F3E)
   - 强调：AWS 橙 (#FF9900) + 深青做数据流
   - 字体：Fraunces(display 衬线) / IBM Plex Sans(正文) / IBM Plex Mono(代码/标签)
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  --ink: #232f3e;          /* AWS squid ink */
  --ink-2: #3b4b5c;
  --paper: #fbfaf7;        /* warm paper */
  --paper-2: #f3f0e9;
  --card: #ffffff;
  --line: #e6e1d6;         /* hairline on paper */
  --orange: #ff9900;       /* AWS orange */
  --orange-deep: #ec7211;
  --teal: #0a7d7d;         /* data-flow accent */
  --teal-soft: #e2f1f0;
  --muted: #6b7686;
  --good: #1f8a4c;
  --warn: #b06a00;
  --shadow: 0 1px 2px rgba(35,47,62,.06), 0 8px 24px rgba(35,47,62,.08);
  --shadow-lg: 0 2px 6px rgba(35,47,62,.08), 0 24px 60px rgba(35,47,62,.14);
  --radius: 14px;
  --maxw: 1120px;
  --sans: 'IBM Plex Sans', 'IBM Plex Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', 'SF Mono', Monaco, monospace;
  --display: 'Fraunces', 'IBM Plex Sans SC', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* subtle grid texture */
  background-image:
    linear-gradient(rgba(35,47,62,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35,47,62,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
}

/* ---------- Top navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
  background: rgba(251,250,247,.82);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0.85rem 1.25rem;
  display: flex; align-items: center; gap: 1.5rem;
}
.brand {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 700; font-size: 1.02rem; letter-spacing: -.01em;
  text-decoration: none; color: var(--ink);
}
.brand .spark {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  display: grid; place-items: center; color: #fff; font-size: 15px;
  box-shadow: 0 2px 6px rgba(236,114,17,.35);
}
.nav-links { display: flex; gap: .35rem; margin-left: auto; flex-wrap: wrap; }
.nav-links a {
  text-decoration: none; color: var(--ink-2); font-weight: 500;
  font-size: .92rem; padding: .4rem .8rem; border-radius: 8px;
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--paper-2); color: var(--ink); }
.nav-links a.active { background: var(--ink); color: #fff; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
section { padding: 4rem 0; }
.section-tight { padding: 2.5rem 0; }

.eyebrow {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--orange-deep); font-weight: 600;
  margin-bottom: .8rem;
}
h1.display {
  font-family: var(--display); font-weight: 600; letter-spacing: -.02em;
  font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.05; color: var(--ink);
}
h2.display {
  font-family: var(--display); font-weight: 600; letter-spacing: -.015em;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.1; color: var(--ink);
  margin-bottom: 1rem;
}
h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: .4rem; }
p.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--muted); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem 1.5rem; box-shadow: var(--shadow);
}
.card .ic {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--teal-soft); color: var(--teal); font-size: 20px; margin-bottom: .9rem;
}
.card.accent { border-top: 3px solid var(--orange); }

.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--mono); font-size: .76rem; font-weight: 500;
  padding: .25rem .6rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink-2);
}
.pill.cdk { background: #eaf5ee; color: var(--good); border-color: #bfe3cc; }
.pill.sdk { background: #fdf0e0; color: var(--warn); border-color: #f0d3a8; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  padding: .7rem 1.4rem; border-radius: 10px; border: 1px solid transparent;
  text-decoration: none; transition: transform .12s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange); color: #1a1a1a; box-shadow: 0 4px 14px rgba(255,153,0,.3); }
.btn-primary:hover:not(:disabled) { background: var(--orange-deep); color:#fff; }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { background: var(--paper-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ---------- Tables ---------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.tbl th, table.tbl td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl th { background: var(--ink); color: #fff; font-weight: 600; font-size: .82rem; letter-spacing: .02em; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tr:nth-child(even) td { background: #faf8f3; }
code, .mono { font-family: var(--mono); font-size: .86em; background: var(--paper-2);
  padding: .1rem .35rem; border-radius: 5px; color: var(--ink); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 2rem 0; color: var(--muted); font-size: .85rem; }

/* ---------- Reveal on load ---------- */
.reveal { opacity: 0; transform: translateY(14px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- SVG diagram helpers ---------- */
.diagram { width: 100%; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; overflow-x: auto; }
.diagram svg { display: block; width: 100%; height: auto; min-width: 640px; }
.flow-dash { stroke-dasharray: 6 6; animation: dash 1.1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -24; } }
