:root {
  --color-bg: #faf9f7;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #5a5a5a;
  --color-accent: #e86340;
  --color-accent-alt: #f2a83c;
  --gradient-warm: linear-gradient(135deg, #ff8a65 0%, #e86340 50%, #f2a83c 100%);
  --glow-soft: radial-gradient(circle at 50% 50%, rgba(232, 99, 64, 0.12) 0%, transparent 65%);
  --font-main: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, 'Courier New', monospace;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --shadow-card: 0 6px 28px rgba(0,0,0,0.05);
  --shadow-hover: 0 12px 36px rgba(0,0,0,0.08);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; color: var(--color-text); }
h1 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: var(--space-sm); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); margin-bottom: var(--space-xs); }
p { margin-bottom: 1rem; max-width: 75ch; }
a { color: inherit; text-decoration: none; transition: color var(--transition-fast); }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.5rem; }
img, svg { display: block; max-width: 100%; height: auto; }
.container { width: 92%; max-width: 1240px; margin: 0 auto; }
section { padding: var(--space-xl) 0; position: relative; }
.grid-wrapper { display: grid; gap: var(--space-md); }
.mono { font-family: var(--font-mono); letter-spacing: 0.05em; }
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Header & Nav */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(250,249,247,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(0,0,0,0.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: var(--space-xs); font-weight: 700; font-size: 1.1rem; }
.brand img { height: 32px; width: auto; }
nav ul { display: flex; list-style: none; gap: var(--space-md); }
nav a { padding: 0.5rem 0; border-bottom: 2px solid transparent; font-weight: 500; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-accent); border-color: var(--color-accent); }

/* Hero */
.hero { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; padding-top: var(--space-xl); background: var(--glow-soft); }
.hero-content { max-width: 640px; margin-right: auto; }
.hero-cta { display: inline-flex; align-items: center; gap: var(--space-xs); margin-top: var(--space-md); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1.5rem; border-radius: var(--radius-md); font-weight: 600; cursor: pointer; border: none; transition: all var(--transition-base); }
.btn-primary { background: var(--gradient-warm); color: #fff; box-shadow: 0 4px 16px rgba(232,99,64,0.25); }
.btn-primary:hover, .btn-primary:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(232,99,64,0.35); filter: brightness(1.05); }
.btn-outline { background: transparent; border: 2px solid var(--color-accent); color: var(--color-accent); }
.btn-outline:hover, .btn-outline:focus-visible { background: rgba(232,99,64,0.08); }

/* Cards & Bento */
.bento-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-md); }
.card { background: var(--color-surface); border-radius: var(--radius-lg); padding: var(--space-md); box-shadow: var(--shadow-card); transition: transform var(--transition-base), box-shadow var(--transition-base); border: 1px solid rgba(0,0,0,0.04); }
.card:hover, .card:focus-within { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-icon { width: 40px; height: 40px; margin-bottom: var(--space-sm); color: var(--color-accent); }
.card-body h3 { margin-bottom: 0.5rem; }

/* Interface Mockup */
.mockup-frame { background: #f4f5f7; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); border: 1px solid rgba(0,0,0,0.08); }
.mockup-header { background: #eef0f2; padding: 0.75rem 1rem; display: flex; gap: 0.5rem; align-items: center; border-bottom: 1px solid #dde1e6; }
.mockup-dot { width: 12px; height: 12px; border-radius: 50%; }
.mockup-body { display: flex; height: 320px; }
.mockup-sidebar { width: 260px; background: #fff; border-right: 1px solid #e0e0e0; padding: var(--space-sm); }
.mockup-chat { flex: 1; background: #fff; padding: var(--space-md); display: flex; flex-direction: column; gap: 0.75rem; }
.chat-bubble { padding: 0.75rem 1rem; border-radius: var(--radius-md); max-width: 70%; margin-bottom: 0.5rem; }
.chat-in { background: #f0f2f5; align-self: flex-start; }
.chat-out { background: #d9fdd3; align-self: flex-end; }

/* Table */
.table-wrapper { overflow-x: auto; margin: var(--space-md) 0; border-radius: var(--radius-md); border: 1px solid #e0e0e0; }
table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid #eee; }
th { background: #fafafa; font-weight: 600; font-size: 0.95rem; }
td { font-size: 0.95rem; }
tr:last-child td { border-bottom: none; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: var(--space-sm); }
details { background: var(--color-surface); border-radius: var(--radius-md); border: 1px solid #eaeaea; overflow: hidden; transition: border-color var(--transition-fast); }
details[open] { border-color: var(--color-accent); }
summary { padding: 1.25rem; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.25rem; color: var(--color-accent); font-weight: 400; }
details[open] summary::after { content: '−'; }
details > div { padding: 0 1.25rem 1.25rem; color: var(--color-text-muted); line-height: 1.6; }

/* Updates & Related */
.updates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-md); }
.update-card { background: var(--color-surface); border-radius: var(--radius-lg); padding: var(--space-md); border: 1px solid #eee; display: flex; flex-direction: column; }
.update-date { font-family: var(--font-mono); font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0.5rem; }
.update-title { font-weight: 600; margin-bottom: 0.75rem; }
.update-excerpt { font-size: 0.95rem; color: var(--color-text-muted); margin-bottom: var(--space-md); flex: 1; }
.link-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-sm); }
.link-item { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.75rem; border-radius: var(--radius-md); background: var(--color-surface); border: 1px solid #eee; transition: background var(--transition-fast); }
.link-item:hover { background: #fafafa; }
.link-title { font-weight: 500; }
.link-desc { font-size: 0.85rem; color: var(--color-text-muted); }

/* Footer */
.site-footer { background: #f4f5f7; padding: var(--space-lg) 0 var(--space-md); margin-top: var(--space-xl); border-top: 1px solid #e0e0e0; }
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-md); }
.footer-col h4 { font-size: 1rem; margin-bottom: var(--space-sm); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { font-size: 0.9rem; color: var(--color-text-muted); }
.footer-col a:hover { color: var(--color-accent); }
.copyright { text-align: center; margin-top: var(--space-md); font-size: 0.85rem; color: var(--color-text-muted); padding-top: var(--space-md); border-top: 1px solid #ddd; }

/* SVG Animation Styles */
.contour-path {
  fill: none;
  stroke: url(#warm-stroke);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  opacity: 0.8;
}
.contour-path.animated-1 { animation: flow-contour 6s ease-in-out infinite alternate; }
.contour-path.animated-2 { animation: flow-contour 8s ease-in-out infinite alternate-reverse; }
.contour-path.animated-3 { animation: flow-contour 7s ease-in-out infinite alternate; }

@keyframes flow-contour {
  0% { stroke-dashoffset: 1; opacity: 0.3; }
  50% { opacity: 0.8; }
  100% { stroke-dashoffset: 0; opacity: 0.3; }
}

.rotate-element {
  transform-box: fill-box;
  transform-origin: center;
  animation: spin-slow 12s linear infinite;
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.pulse-circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse-glow 4s ease-in-out infinite alternate;
}
@keyframes pulse-glow {
  0% { transform: scale(0.95); opacity: 0.6; }
  100% { transform: scale(1.05); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .contour-path { opacity: 0.6; }
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 0.75rem 0; }
  nav ul { flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 0.5rem; }
  .mockup-sidebar { display: none; }
  .bento-grid { grid-template-columns: 1fr; }
  section { padding: var(--space-lg) 0; }
}
