/* BuiltByTom app — global layout, scrollbar, light/dark */
:root {
  --bbt-canvas: #ededed;
  --bbt-ink-50: #f8fafc;
  --bbt-ink-100: #f1f5f9;
  --bbt-ink-200: #e2e8f0;
  --bbt-ink-300: #cbd5e1;
  --bbt-ink-400: #94a3b8;
  --bbt-ink-500: #64748b;
  --bbt-ink-600: #475569;
  --bbt-ink-700: #334155;
  --bbt-ink-800: #1e293b;
  --bbt-ink-900: #0f172a;
  --bbt-ink-950: #020617;
  --bbt-primary-50: #fff5f0;
  --bbt-primary-100: #ffe8de;
  --bbt-primary-400: #ff6b35;
  --bbt-primary-500: #ff4d00;
  --bbt-primary-600: #e64500;
  --bbt-tom: #ff4d00;
  --bbt-bg: var(--bbt-canvas);
  --bbt-text: var(--bbt-ink-900);
  --bbt-text-muted: var(--bbt-ink-700);
  --bbt-border: var(--bbt-ink-200);
}

[data-theme="dark"] {
  --bbt-bg: var(--bbt-ink-950);
  --bbt-text: #f1f5f9;
  --bbt-text-muted: #94a3b8;
  --bbt-border: #334155;
}

html {
  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  background: var(--bbt-bg);
  color: var(--bbt-text);
}

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

/* Themed scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bbt-ink-100, #f1f5f9);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--bbt-ink-800, #1e293b);
}

::-webkit-scrollbar-thumb {
  background: var(--bbt-ink-400, #94a3b8);
  border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--bbt-ink-600, #475569);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--bbt-ink-500, #64748b);
}

/* Theme toggle — floating wrap (landing, auth, legal) */
.theme-toggle-wrap {
  position: fixed;
  bottom: 6rem;
  right: 1.5rem;
  z-index: 40;
}

.theme-toggle-wrap .theme-toggle {
  width: 3.5rem;
  height: 3.5rem;
  padding: 1rem;
  border-radius: 9999px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, background 0.2s;
}

.theme-toggle-wrap .theme-toggle:hover {
  transform: scale(1.1);
}

.theme-toggle-wrap .theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle-wrap .theme-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

[data-theme="dark"] .theme-toggle-wrap .theme-toggle {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* Theme toggle button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 9999px;
  background: var(--bbt-primary-500);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.theme-toggle:hover {
  background: var(--bbt-primary-400);
}

.theme-toggle:active {
  transform: scale(0.96);
}

[data-theme="dark"] .theme-toggle {
  background: var(--bbt-primary-500);
}

[data-theme="dark"] .theme-toggle:hover {
  background: var(--bbt-primary-400);
}

/* Container alignment with builtbytom.uk */
.container-content {
  width: 100%;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container-content {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-content {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Inline text links — orange default, underline on hover */
.text-link {
  color: var(--bbt-primary-500);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.text-link:hover {
  text-decoration: underline;
  color: var(--bbt-primary-400);
}

[data-theme="dark"] .text-link {
  color: var(--bbt-primary-400);
}

[data-theme="dark"] .text-link:hover {
  color: var(--bbt-primary-400);
  text-decoration: underline;
}

/* Section label */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--bbt-primary-500);
}

[data-theme="dark"] .section-label {
  color: var(--bbt-primary-400);
}
