/* ==========================================================================
   Smart-Workspace-Tabs - Official Website Stylesheet
   Brand Colors sampled from Grupo Ōkami artwork
   ========================================================================== */

:root {
  /* Brand Teal Scale */
  --brand-50: #eef6f9;
  --brand-100: #dceef0;
  --brand-200: #b8e0e2;
  --brand-300: #9fd1d2;
  --brand-400: #4dafb0;
  --brand-500: #00acb0; /* bright cyan */
  --brand-600: #009393; /* primary teal */
  --brand-700: #007f82; /* deep teal (AA contrast on white) */
  --brand-800: #00686b;
  --brand-900: #0b5355;
  --brand-950: #073638;

  /* Ink / Neutrals Scale */
  --ink-50: #f7fafb;
  --ink-100: #eef4f5;
  --ink-200: #dce7e8;
  --ink-300: #b8c9ca;
  --ink-400: #8ea2a3;
  --ink-500: #6a7c7c;
  --ink-600: #4f5e5d;
  --ink-700: #434e4d;
  --ink-800: #363f3e;
  --ink-900: #2a3231;
  --ink-950: #1b2121;

  /* Semantic Theme Tokens (Light Mode Default) */
  --bg-page: #f8fbfa;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f0f6f7;
  --border-subtle: #dce7e8;
  --border-strong: #b8c9ca;
  --text-main: #2a3231;
  --text-muted: #5e7272;
  --text-faint: #8ea2a3;
  --accent: #007f82;
  --accent-hover: #00686b;
  --accent-light: #eef6f9;
  --accent-glow: rgba(0, 147, 147, 0.15);
  --shadow-sm: 0 1px 3px rgba(27, 33, 33, 0.05);
  --shadow-md: 0 4px 14px rgba(27, 33, 33, 0.08);
  --shadow-lg: 0 12px 32px rgba(27, 33, 33, 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --container-max: 1160px;
  --transition-fast: 0.18s ease;
  --transition-base: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-page: #141818;
  --bg-surface: #1b2121;
  --bg-surface-elevated: #242c2b;
  --bg-subtle: #1f2727;
  --border-subtle: #2d3838;
  --border-strong: #3f4e4e;
  --text-main: #eef4f5;
  --text-muted: #9fb1b2;
  --text-faint: #6a7c7c;
  --accent: #00acb0;
  --accent-hover: #4dafb0;
  --accent-light: rgba(0, 172, 176, 0.12);
  --accent-glow: rgba(0, 172, 176, 0.22);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-page: #141818;
    --bg-surface: #1b2121;
    --bg-surface-elevated: #242c2b;
    --bg-subtle: #1f2727;
    --border-subtle: #2d3838;
    --border-strong: #3f4e4e;
    --text-main: #eef4f5;
    --text-muted: #9fb1b2;
    --text-faint: #6a7c7c;
    --accent: #00acb0;
    --accent-hover: #4dafb0;
    --accent-light: rgba(0, 172, 176, 0.12);
    --accent-glow: rgba(0, 172, 176, 0.22);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

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

html {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-page);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-muted);
}

code, kbd, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

kbd {
  display: inline-block;
  padding: 0.15em 0.45em;
  font-size: 0.8em;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 251, 250, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-base), border-color var(--transition-base);
}

[data-theme="dark"] .site-header,
:root:not([data-theme="light"]) .site-header {
  background: rgba(20, 24, 24, 0.85);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-main);
  text-decoration: none;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 2px 6px var(--accent-glow);
}

.brand-title {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.brand-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  background: var(--accent-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Control Buttons (Lang & Theme) */
.btn-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 2.25rem;
  padding: 0 0.65rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-control:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.btn-control svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-main);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 0.85rem 1.65rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-brand {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(0, 147, 147, 0.25);
}

.badge-outline {
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.hero-content {
  max-width: 840px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 1.25rem 0 1.25rem;
  letter-spacing: -0.035em;
}

.hero-title-highlight {
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-400) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-faint);
  flex-wrap: wrap;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-preview {
  margin-top: 3rem;
  position: relative;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-subtle);
  overflow: hidden;
  background: var(--bg-surface);
}

.hero-preview img {
  width: 100%;
  display: block;
}

.preview-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.preview-dot.red { background: #ff5f56; }
.preview-dot.yellow { background: #ffbd2e; }
.preview-dot.green { background: #27c93f; }

.preview-title {
  margin-left: auto;
  margin-right: auto;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ==========================================================================
   Trust / Stats Bar
   ========================================================================== */

.trust-section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.trust-item h3 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.trust-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   Features Section
   ========================================================================== */

.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-subtle);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: inline-block;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  border-color: var(--brand-400);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-icon-wrapper svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Deep Dive Two-Column Feature Showcase */
.showcase-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
  margin-bottom: 5rem;
}

.showcase-row:last-child {
  margin-bottom: 0;
}

.showcase-row.reverse {
  direction: rtl;
}

.showcase-row.reverse > * {
  direction: ltr;
}

.showcase-content h3 {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.showcase-content p {
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.showcase-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.showcase-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.showcase-list li svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}

.showcase-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-subtle);
  background: var(--bg-surface);
  transition: transform var(--transition-base);
}

.showcase-media:hover {
  transform: scale(1.015);
}

.showcase-media img {
  width: 100%;
  height: auto;
}

/* ==========================================================================
   Interactive Tabbed Showcase
   ========================================================================== */

.tabs-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.tab-btn {
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.tab-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px var(--accent-glow);
}

.tab-panel {
  display: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-subtle);
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Steps / How It Works
   ========================================================================== */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.step-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
}

.step-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--brand-300);
  line-height: 1;
  margin-bottom: 1rem;
}

[data-theme="dark"] .step-number,
:root:not([data-theme="light"]) .step-number {
  color: var(--brand-800);
}

.step-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.step-card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ==========================================================================
   CTA Banner Section
   ========================================================================== */

.cta-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--brand-950) 0%, var(--brand-900) 100%);
  color: #ffffff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section .badge {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  margin-bottom: 1rem;
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1rem;
}

.cta-desc {
  font-size: 1.15rem;
  color: var(--brand-200);
  max-width: 640px;
  margin: 0 auto 2rem;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-section .btn-primary {
  background: #ffffff;
  color: var(--brand-900) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.cta-section .btn-primary:hover {
  background: var(--brand-100);
  transform: translateY(-1px);
}

.cta-section .btn-secondary {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.cta-section .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
}

/* ==========================================================================
   Inner Page (Privacy, FAQ, Changelog)
   ========================================================================== */

.page-header {
  padding: 4rem 0 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
}

.page-title {
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.page-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
}

.page-meta {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.content-body {
  padding: 3.5rem 0;
  max-width: 860px;
  margin: 0 auto;
}

.content-section {
  margin-bottom: 3.5rem;
}

.content-section:last-child {
  margin-bottom: 0;
}

.content-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.content-section h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
}

.content-section p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.content-section ul,
.content-section ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: var(--text-muted);
}

.content-section li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
}

.callout {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
}

.callout p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-main);
}

.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

th, td {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background: var(--bg-subtle);
  font-weight: 600;
  color: var(--text-main);
}

td {
  color: var(--text-muted);
}

tr:last-child td {
  border-bottom: none;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--border-strong);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

.faq-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 1rem;
}

.faq-item.open .faq-answer {
  display: block;
}

/* Changelog Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0;
  left: 6px;
  width: 2px;
  background: var(--border-subtle);
}

.timeline-entry {
  position: relative;
  margin-bottom: 3rem;
}

.timeline-entry::before {
  content: "";
  position: absolute;
  top: 0.45rem;
  left: -2rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-page);
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.timeline-version {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.timeline-date {
  font-size: 0.9rem;
  color: var(--text-faint);
}

.timeline-badge {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   Responsive / Mobile Styles
   ========================================================================== */

@media (max-width: 960px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .showcase-row {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .showcase-row.reverse {
    direction: ltr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 720px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-desc {
    font-size: 1.05rem;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 4.25rem;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    display: none;
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.open {
    display: flex;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}


/* ---------- Multi-language layout fixes ---------- */
/* Keep navigation labels and the brand on one line (Japanese has no spaces to wrap at). */
.nav-link,
.brand-name,
.brand-tag {
  white-space: nowrap;
}

/* Tighter navigation between tablet and small desktop so every language fits. */
@media (max-width: 1320px) and (min-width: 721px) {
  .nav-menu {
    gap: 0.35rem;
  }
  .nav-link {
    padding: 0.4rem 0.45rem;
    font-size: 0.9rem;
  }
}

/* Short status cells (e.g. "Required" / "必須") stay on one line. */
td:nth-child(2),
th:nth-child(2) {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .nav-actions {
    gap: 0.4rem;
  }
  /* The install call-to-action is repeated in the hero; hide the header copy on phones. */
  .nav-actions .btn-primary {
    display: none;
  }
  .brand-tag {
    display: none;
  }
}

/* Header install button becomes icon-only; its label stays available to screen readers. */
@media (max-width: 1440px) {
  .nav-actions .btn-primary {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }
  .nav-actions .btn-primary span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* Collapse the navigation into the hamburger menu before it runs out of room. */
@media (max-width: 1100px) {
  .mobile-toggle {
    display: block;
  }
  .nav-menu {
    position: fixed;
    top: 4.25rem;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    display: none;
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.open {
    display: flex;
  }
}

/* Very small phones: logo only. */
@media (max-width: 480px) {
  .brand-title {
    display: none;
  }
}

/* The brand never shrinks under the menu; the menu collapses instead (see breakpoints above). */
.brand-link {
  flex-shrink: 0;
}
