:root {
  --primary: #e94560;
  --primary-dark: #c73650;
  --primary-light: #ff6b81;
  --secondary: #533483;
  --accent: #0f3460;
  --bg: #f7f7fb;
  --bg-alt: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.7);
  --text: #1a1a2e;
  --text-secondary: #4a4a5a;
  --text-muted: #8888a0;
  --border: rgba(26, 26, 46, 0.1);
  --shadow: 0 4px 24px rgba(26, 26, 46, 0.08);
  --shadow-hover: 0 12px 40px rgba(233, 69, 96, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-blur: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --header-h: 68px;
}

[data-theme="dark"] {
  --bg: #0d0d1a;
  --bg-alt: #14142a;
  --bg-card: rgba(26, 26, 46, 0.7);
  --text: #eaeaf5;
  --text-secondary: #b0b0c8;
  --text-muted: #6a6a88;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 12px 40px rgba(233, 69, 96, 0.25);
  --glass-bg: rgba(20, 20, 42, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; display: block; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary-dark); }

ul, ol { list-style: none; }

h1, h2, h3, h4 {
  line-height: 1.35;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.35rem); }

p { margin-bottom: 1rem; color: var(--text-secondary); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ===== Header ===== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition), box-shadow var(--transition);
}
#site-header.scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text);
}
.logo svg {
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(233, 69, 96, 0.35);
  transition: transform var(--transition);
}
.logo:hover svg { transform: rotate(-6deg) scale(1.06); }
.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#main-nav { flex: 1; }
#main-nav ul {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
}
#main-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
  transition: color var(--transition), background var(--transition);
}
#main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: translateX(-50%);
  transition: width var(--transition);
}
#main-nav a:hover {
  color: var(--primary);
  background: rgba(233, 69, 96, 0.06);
}
#main-nav a:hover::after { width: 60%; }

.header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.header-actions button {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.header-actions button:hover {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(233, 69, 96, 0.35);
}
#menu-toggle { display: none; }

.search-bar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 24px 18px;
  animation: slideDown 0.3s ease;
}
.search-bar form {
  display: flex;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 6px 6px 20px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  min-width: 0;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar button {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 9px 22px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  color: #fff;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.search-bar button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(233, 69, 96, 0.4);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 24px 0;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 6px;
  color: var(--text-muted);
  opacity: 0.5;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb [aria-current="page"] { color: var(--text-secondary); font-weight: 600; }

/* ===== Main layout ===== */
main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

section {
  margin-top: 56px;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

section > h2 {
  position: relative;
  padding-left: 18px;
  margin-bottom: 24px;
}
section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 70%;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
}

section h3 {
  margin: 28px 0 10px;
  color: var(--text);
}

section ul, section ol {
  margin: 12px 0 20px;
  padding-left: 0;
}
section ul li, section ol li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  color: var(--text-secondary);
}
section ul li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.68em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.12);
}
section ol { counter-reset: item; }
section ol li { counter-increment: item; }
section ol li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lead {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-secondary);
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

/* ===== Hero / Carousel ===== */
#hero {
  margin-top: 24px;
}
.carousel {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--accent);
}
.carousel-slide {
  display: none;
  animation: fadeSlide 0.7s ease;
}
.carousel-slide.active { display: block; }
.carousel-slide svg {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 360;
  object-fit: cover;
}
@keyframes fadeSlide {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}

.carousel-controls {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  pointer-events: none;
}
.carousel-controls button {
  pointer-events: auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-controls button:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.45);
}

.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.carousel-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
  transition: all var(--transition);
}
.carousel-dots button[aria-selected="true"] {
  width: 28px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 12px rgba(233, 69, 96, 0.7);
}

/* ===== Cards / content blocks ===== */
#about, #products, #solutions, #cases, #articles, #faq, #howto, #contact, #sitemap {
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
#about:hover, #products:hover, #solutions:hover, #cases:hover,
#articles:hover, #faq:hover, #howto:hover, #contact:hover, #sitemap:hover {
  box-shadow: var(--shadow-hover);
}

/* ===== Articles ===== */
#articles article {
  position: relative;
  padding: 22px 24px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 20px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity var(--transition);
}
#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(233, 69, 96, 0.3);
}
#articles article:hover::before { opacity: 1; }
#articles article h3 { margin: 0 0 8px; }
#articles article h3 a {
  color: var(--text);
  transition: color var(--transition);
}
#articles article h3 a:hover { color: var(--primary); }
#articles article time {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(233, 69, 96, 0.08);
}
#articles article p { font-size: 0.93rem; margin-bottom: 10px; }
#articles article > a {
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
#articles article > a::after {
  content: "→";
  transition: transform var(--transition);
}
#articles article > a:hover::after { transform: translateX(4px); }

/* ===== Blockquote ===== */
blockquote {
  position: relative;
  margin: 18px 0;
  padding: 20px 24px 20px 28px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(233, 69, 96, 0.06), rgba(83, 52, 131, 0.06));
  border-left: 4px solid var(--primary);
  transition: transform var(--transition), box-shadow var(--transition);
}
blockquote:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow);
}
blockquote p {
  margin: 0;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== FAQ details ===== */
#faq details {
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
}
#faq details:hover { border-color: rgba(233, 69, 96, 0.3); }
#faq details[open] {
  box-shadow: var(--shadow);
  border-color: rgba(233, 69, 96, 0.35);
}
#faq summary {
  position: relative;
  padding: 16px 48px 16px 20px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: color var(--transition), background var(--transition);
  user-select: none;
}
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 1.1rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
}
#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
}
#faq summary:hover { color: var(--primary); background: rgba(233, 69, 96, 0.04); }
#faq details p {
  padding: 0 20px 18px;
  margin: 0;
  font-size: 0.93rem;
  animation: slideDown 0.3s ease;
}

/* ===== Contact / Form ===== */
#contact address {
  font-style: normal;
  display: grid;
  gap: 10px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}
#contact address p { margin: 0; font-size: 0.93rem; }
#contact address strong { color: var(--text); }

#contact form {
  display: grid;
  gap: 14px;
  max-width: 560px;
}
#contact label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: -6px;
}
#contact input,
#contact textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  resize: vertical;
}
#contact input:focus,
#contact textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.12);
}
#contact button[type="submit"] {
  justify-self: start;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 13px 36px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  color: #fff;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 6px 20px rgba(233, 69, 96, 0.3);
}
#contact button[type="submit"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(233, 69, 96, 0.45);
}
#contact button[type="submit"]:active { transform: translateY(-1px); }

/* ===== Sitemap / links ===== */
#sitemap ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
#sitemap ul li {
  padding: 0;
  margin: 0;
}
#sitemap ul li::before { display: none; }
#sitemap ul a {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
#sitemap ul a:hover {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(233, 69, 96, 0.3);
}

/* ===== Footer ===== */
#site-footer {
  background: linear-gradient(160deg, #1a1a2e 0%, #0f3460 60%, #533483 100%);
  color: #c8c8dc;
  padding: 56px 24px 0;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  padding-bottom: 40px;
}
#site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 14px;
  position: relative;
  padding-bottom: 10px;
}
#site-footer h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}
#site-footer p {
  color: #a8a8c0;
  font-size: 0.88rem;
  margin-bottom: 8px;
}
#site-footer strong { color: #fff; }
#site-footer a { color: #a8a8c0; }
#site-footer a:hover { color: var(--primary-light); }

.footer-brand p:first-child {
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 12px;
}
.footer-links ul { display: grid; gap: 8px; }
.footer-links li { padding: 0; margin: 0; }
.footer-links li::before { display: none; }
.footer-links a {
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform var(--transition), color var(--transition);
}
.footer-links a::before {
  content: "›";
  color: var(--primary);
  font-weight: 700;
}
.footer-links a:hover { transform: translateX(4px); }

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}
.footer-bottom p {
  font-size: 0.82rem;
  color: #8888a8;
  margin: 0;
}

/* ===== Back to top ===== */
#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.4);
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
#back-to-top:hover {
  transform: translateY(-5px) scale(1.08);
  box-shadow: 0 14px 34px rgba(233, 69, 96, 0.55);
}
#back-to-top[hidden] { display: none; }

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  #main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    padding: 12px 20px 20px;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    box-shadow: var(--shadow);
  }
  #main-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  #main-nav ul {
    flex-direction: column;
    gap: 4px;
  }
  #main-nav a {
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }
  #main-nav a::after { display: none; }
  #menu-toggle { display: inline-block; }
  #search-toggle { display: none; }
}

@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .header-inner { padding: 0 16px; gap: 12px; }
  .logo-text { font-size: 1.05rem; }
  .logo svg { width: 34px; height: 34px; }
  .header-actions button { padding: 7px 12px; font-size: 0.8rem; }

  main { padding: 0 16px 48px; }
  .breadcrumb { padding: 12px 16px 0; }

  section { margin-top: 40px; }
  #about, #products, #solutions, #cases, #articles, #faq, #howto, #contact, #sitemap {
    padding: 24px 18px;
    border-radius: var(--radius);
  }

  .lead { padding: 16px 18px; font-size: 0.98rem; }

  .carousel { border-radius: var(--radius); }
  .carousel-controls button { width: 38px; height: 38px; font-size: 1.2rem; }
  .carousel-dots { bottom: 10px; padding: 6px 10px; }

  #articles article { padding: 18px 16px; }
  blockquote { padding: 16px 18px; }

  #contact form { max-width: 100%; }
  #contact button[type="submit"] { width: 100%; justify-self: stretch; }

  #site-footer { padding: 40px 16px 0; }
  .footer-inner { gap: 24px; }

  #back-to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}

@media (max-width: 400px) {
  .header-actions button { padding: 6px 10px; font-size: 0.75rem; }
  .logo-text { display: none; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ===== Print ===== */
@media print {
  #site-header, #back-to-top, .carousel-controls, .carousel-dots { display: none; }
  body { background: #fff; color: #000; }
  section { box-shadow: none; border: 1px solid #ddd; }
}