/* ==========================================================================
   Àkàndé Voice Assistant Design System - Apple HIG Minimalist Precision
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --bg-canvas: #ffffff;
  --bg-surface: #ffffff;
  --bg-subtle: #f3f4f6;
  --bg-glass: rgba(255, 255, 255, 0.92);
  --text-headline: #111827;
  --text-body: #111827;
  --text-muted: #374151;
  --cl-primary: #0056b3;
  --cl-primary-hover: #004494;
  --border-hairline: rgba(0, 0, 0, 0.12);
  --border-subtle: rgba(0, 0, 0, 0.22);
  --radius-pill: 980px;
  --radius-card: 20px;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.05);
  --container-max: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme-mode="light"]) {
    --bg-canvas: #090d16;
    --bg-surface: #111827;
    --bg-subtle: #1f2937;
    --bg-glass: rgba(17, 24, 39, 0.92);
    --text-headline: #f9fafb;
    --text-body: #f9fafb;
    --text-muted: #d1d5db;
    --cl-primary: #3b82f6;
    --cl-primary-hover: #60a5fa;
    --border-hairline: rgba(255, 255, 255, 0.15);
    --border-subtle: rgba(255, 255, 255, 0.25);
    --shadow-card: 0 12px 36px rgba(0, 0, 0, 0.4);
  }
}

:root[data-theme-mode="dark"] {
  --bg-canvas: #090d16;
  --bg-surface: #111827;
  --bg-subtle: #1f2937;
  --bg-glass: rgba(17, 24, 39, 0.92);
  --text-headline: #f9fafb;
  --text-body: #f9fafb;
  --text-muted: #d1d5db;
  --cl-primary: #3b82f6;
  --cl-primary-hover: #60a5fa;
  --border-hairline: rgba(255, 255, 255, 0.15);
  --border-subtle: rgba(255, 255, 255, 0.25);
  --shadow-card: 0 12px 36px rgba(0, 0, 0, 0.4);
}

:root[data-theme-mode="light"] {
  --bg-canvas: #ffffff;
  --bg-surface: #ffffff;
  --bg-subtle: #f3f4f6;
  --bg-glass: rgba(255, 255, 255, 0.92);
  --text-headline: #111827;
  --text-body: #111827;
  --text-muted: #374151;
  --cl-primary: #0056b3;
  --cl-primary-hover: #004494;
  --border-hairline: rgba(0, 0, 0, 0.12);
  --border-subtle: rgba(0, 0, 0, 0.22);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.05);
}

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

html {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  background-color: var(--bg-canvas);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Base Layout & Utilities */
.container-xxl, .content-wrapper, .navbar-container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  width: 100%;
}

.content-wrapper {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
  flex: 1;
}

.d-flex { display: flex !important; }
.d-none { display: none !important; }
.d-inline-block { display: inline-block !important; }
.flex-column { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }

.text-center { text-align: center !important; }
.text-start { text-align: left !important; }
.text-headline { color: var(--text-headline) !important; }
.text-muted { color: var(--text-muted) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 2.5rem !important; }
.mt-0 { margin-top: 0 !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 2.5rem !important; }
.my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
.my-5 { margin-top: 2.5rem !important; margin-bottom: 2.5rem !important; }
.pt-4 { padding-top: 1.5rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

.border-top { border-top: 1px solid var(--border-hairline) !important; }
.list-unstyled { list-style: none !important; padding-left: 0 !important; margin: 0 !important; }

/* Grid System */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -0.75rem;
  margin-right: -0.75rem;
}

.row.g-4 {
  margin-left: -1rem;
  margin-right: -1rem;
}
.row.g-4 > [class*="col-"] {
  padding-left: 1rem;
  padding-right: 1rem;
  margin-bottom: 1.5rem;
}

.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-md-6 { flex: 0 0 100%; max-width: 100%; }
.col-lg-3 { flex: 0 0 100%; max-width: 100%; }
.col-lg-4 { flex: 0 0 100%; max-width: 100%; }

@media (min-width: 768px) {
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
}

@media (min-width: 993px) {
  .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
  .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
  .d-lg-flex { display: flex !important; }
  .d-lg-none { display: none !important; }
}

/* Typography */
h1, .h1, .display-5 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--text-headline);
  margin-bottom: 1.25rem;
}

h2, .h2 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--text-headline);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h3, .h3, .h5 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-headline);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

p, .fs-5 {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-body);
  margin-bottom: 1.25rem;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background-color: var(--bg-glass) !important;
  border-bottom: 1px solid var(--border-hairline);
  padding: 0.65rem 0;
  width: 100%;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.navbar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-headline) !important;
  text-decoration: none;
  font-size: 1.05rem;
  white-space: nowrap;
}

.navbar-menu {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.nav-link {
  color: var(--text-headline) !important;
  font-size: 0.92rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.nav-link:hover, .nav-link.active {
  background: var(--bg-subtle);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.navbar-toggle {
  display: none;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  color: var(--text-headline);
  cursor: pointer;
  line-height: 1;
}

@media (max-width: 992px) {
  .navbar-container {
    flex-wrap: wrap;
    position: relative;
  }
  .navbar-header {
    width: 100%;
  }
  .navbar-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  .navbar-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(0,0,0,0.2);
    padding: 0.75rem;
    flex-direction: column;
    z-index: 9999;
  }
  .navbar-menu.show, .navbar-menu.open {
    display: flex !important;
  }
  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 0.35rem;
  }
  .nav-link {
    width: 100%;
    padding: 0.75rem 1rem;
  }
  .nav-item-cta {
    width: 100%;
    margin-top: 0.5rem;
  }
  .nav-item-cta .btn {
    width: 100% !important;
  }
}

/* Buttons & Pill Controls */
.btn, a.btn {
  border-radius: var(--radius-pill) !important;
  font-weight: 500;
  padding: 0.45rem 1.15rem !important;
  white-space: nowrap !important;
  line-height: 1.25 !important;
  min-height: 38px;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-primary, .btn-dark, a.btn-dark {
  background-color: var(--cl-primary) !important;
  border: 1px solid var(--cl-primary) !important;
  color: #ffffff !important;
}

.btn-primary:hover, .btn-dark:hover, a.btn-dark:hover {
  background-color: var(--cl-primary-hover) !important;
  transform: scale(1.02);
}

.btn-outline-dark, a.btn-outline-dark {
  background: transparent !important;
  color: var(--text-headline) !important;
  border: 2px solid var(--border-subtle) !important;
}

.btn-outline-dark:hover, a.btn-outline-dark:hover {
  background: var(--bg-subtle) !important;
}

/* Theme Switcher */
.theme-switcher {
  display: inline-flex;
  gap: 2px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  padding: 2px;
  border-radius: 980px;
  white-space: nowrap;
  height: 38px;
  align-items: center;
}

.theme-btn {
  background: transparent;
  border: none;
  border-radius: 980px;
  padding: 5px 8px;
  color: var(--text-headline);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: all 0.2s ease;
  height: 32px;
  min-width: 32px;
}

.theme-btn:hover { opacity: 1; }
.theme-btn.active {
  background: var(--bg-surface);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  opacity: 1;
}

/* Search Trigger & Kbd Badge */
.search-trigger {
  background-color: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  border-radius: 980px !important;
  padding: 0.35rem 0.85rem !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  height: 38px;
}

.search-trigger:hover {
  background-color: #f3f4f6 !important;
  color: #000000 !important;
}

.search-kbd {
  background-color: #000000 !important;
  color: #ffffff !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  font-size: 0.75rem !important;
  font-family: monospace !important;
  font-weight: 700 !important;
  display: inline-block !important;
  line-height: 1.2 !important;
  border: none !important;
}

:root[data-theme-mode="dark"] .search-trigger,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme-mode="light"]) .search-trigger {
    background-color: #111827 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
  }
  :root:not([data-theme-mode="light"]) .search-trigger:hover {
    background-color: #1f2937 !important;
    color: #ffffff !important;
  }
  :root:not([data-theme-mode="light"]) .search-kbd {
    background-color: #374151 !important;
    color: #ffffff !important;
    border: 1px solid #9ca3af !important;
  }
}

/* Hero Banner */
.hero-banner-container {
  width: 100%;
  max-height: 480px;
  min-height: 280px;
  overflow: hidden;
  position: relative;
  background-color: var(--bg-subtle);
}

.hero-banner-img {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

/* Card & Callout Surfaces */
.card-surface {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 3rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
  .card-surface {
    padding: 1.75rem 1.25rem;
    border-radius: 16px;
  }
}

.callout-surface {
  background: var(--bg-subtle);
  border-radius: var(--radius-card);
  padding: 2.25rem;
  margin-bottom: 2.5rem;
  border: 1px solid var(--border-hairline);
}

@media (max-width: 768px) {
  .callout-surface {
    padding: 1.5rem 1.25rem;
    border-radius: 16px;
  }
}

/* Search Modal */
.search-modal {
  display: none !important;
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 99999;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}

.search-modal.active, .search-modal.show {
  display: flex !important;
}

.search-backdrop {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.search-dialog {
  position: relative;
  width: 90%;
  max-width: 580px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-hairline);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-headline);
  font-size: 1.1rem;
  outline: none;
}

.search-close {
  background: none;
  border: none;
  color: var(--text-headline);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
}

.search-results {
  max-height: 50vh;
  overflow-y: auto;
  padding: 8px 0;
}

.search-item {
  padding: 12px 20px;
  display: block;
  text-decoration: none;
  color: var(--text-headline);
  border-bottom: 1px solid var(--border-hairline);
  transition: background 0.15s ease;
}

.search-item:hover { background: var(--bg-subtle); }
.search-item-title { font-weight: 600; font-size: 1rem; }
.search-item-desc { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }
.search-empty { padding: 28px; text-align: center; color: var(--text-muted); }

/* Footer */
footer {
  background-color: var(--bg-surface) !important;
  border-top: 1px solid var(--border-hairline);
  color: var(--text-body) !important;
  margin-top: auto;
  padding: 3.5rem 1.5rem 2rem;
}

footer a {
  color: var(--text-muted) !important;
  text-decoration: underline !important;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--text-headline) !important;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--cl-primary);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  z-index: 100000;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  top: 1rem;
}

/* ==========================================================================
   Breadcrumb & Inline Lists
   ========================================================================== */
nav[aria-label="Breadcrumbs"], .breadcrumbs-nav {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}
ol.list-inline, ul.list-inline {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  list-style: none !important;
  list-style-type: none !important;
  padding: 0 !important;
  margin: 0 0 1rem 0 !important;
  gap: 0.5rem !important;
}
li.list-inline-item {
  display: inline-flex !important;
  align-items: center !important;
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0.95rem;
  color: var(--text-muted);
}
li.list-inline-item a {
  color: var(--cl-primary) !important;
  text-decoration: none !important;
}
li.list-inline-item a:hover {
  text-decoration: underline !important;
}
#ssg-search-widget, #ssg-search-overlay {
  display: none !important;
}

/* ==========================================================================
   Apple UK "Questions? Answers." Exact Accordion & FAQ System
   ========================================================================== */
.apple-faq-page {
  width: 100%;
  max-width: 58rem;
  margin: 3.5rem auto 6rem;
  padding: 0 1.5rem;
}

.apple-faq-wrapper {
  width: 100%;
}

.apple-faq-title-main {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-headline);
  margin-bottom: 2.5rem;
}

.apple-faq-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 1.25rem;
}

.apple-expand-all-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.875rem;
  color: #0071e3;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

:root[data-theme-mode="dark"] .apple-expand-all-btn,
:root:not([data-theme-mode="light"]) .apple-expand-all-btn {
  color: #2997ff;
}

.apple-expand-all-btn:hover {
  opacity: 0.85;
}

.apple-expand-all-btn:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
}

.apple-faq-list-exact {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border-hairline);
}

.apple-faq-item-exact {
  border-bottom: 1px solid var(--border-hairline);
  list-style: none;
}

.apple-faq-item-exact details summary::-webkit-details-marker {
  display: none;
}

.apple-faq-summary-exact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 0;
  cursor: pointer;
  list-style: none;
  user-select: none;
  outline: none;
}

.apple-faq-summary-exact:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 4px;
  border-radius: 4px;
}

.apple-faq-q-text {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-headline);
  line-height: 1.3;
  margin: 0;
  padding-right: 1rem;
}

.apple-chevron-exact {
  color: #86868b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.apple-faq-item-exact details[open] .apple-chevron-exact {
  transform: rotate(180deg);
}

.apple-faq-body-exact {
  padding-bottom: 2rem;
  padding-right: 2rem;
  animation: faqFadeIn 0.3s ease-out;
}

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

.apple-faq-body-exact p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-body);
  margin-bottom: 1.25rem;
}

.apple-faq-link-exact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 1rem;
  color: #0071e3;
  text-decoration: none;
  font-weight: 400;
  transition: opacity 0.2s ease;
}

:root[data-theme-mode="dark"] .apple-faq-link-exact,
:root:not([data-theme-mode="light"]) .apple-faq-link-exact {
  color: #2997ff;
}

.apple-faq-link-exact:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Page Banner Styling
   ========================================================================== */
.page-banner-wrap {
  width: 100%;
  margin-bottom: 2rem;
  overflow: hidden;
  border-radius: 20px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-card);
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-banner-img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  display: block;
  border-radius: 20px;
}

/* Ensure SVG graphic and text banners are fully visible without cropping */
.page-banner-img[src$=".svg"],
.page-banner-wrap img[src$=".svg"],
img[src*="banner-static-site-generator"] {
  width: 100% !important;
  height: auto !important;
  max-height: 380px !important;
  object-fit: contain !important;
  background-color: #ffffff;
  padding: 1.5rem 1.5rem;
}

:root[data-theme-mode="dark"] .page-banner-img[src$=".svg"],
:root[data-theme-mode="dark"] .page-banner-wrap img[src$=".svg"],
:root:not([data-theme-mode="light"]) img[src*="banner-static-site-generator"] {
  background-color: #111827;
}
