/* ============================================================
   tm² accounting solutions — base.css
   Design tokens + reset. Light/dark via [data-theme].
   Brand accent: #01aabc. Foundation: white/black/gray.
   ============================================================ */

:root {
  /* brand */
  --brand: #01aabc;
  --brand-deep: #018a99;
  --brand-soft: #e6f7f9;
  --brand-on-accent: #ffffff;

  /* type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* type scale (mobile-first, fluid) */
  --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.9375rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.06rem + 0.3vw, 1.25rem);
  --text-xl: clamp(1.375rem, 1.25rem + 0.6vw, 1.625rem);
  --text-2xl: clamp(1.75rem, 1.5rem + 1.2vw, 2.25rem);
  --text-3xl: clamp(2.25rem, 1.8rem + 2vw, 3.25rem);
  --text-hero: clamp(2.75rem, 2rem + 3.4vw, 4.5rem);

  /* spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  /* layout */
  --container: 1180px;
  --gutter: clamp(1rem, 4vw, 2rem);

  /* motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 140ms;
  --dur-med: 240ms;
}

/* Light theme */
:root,
[data-theme="light"] {
  --bg: #ffffff;
  --bg-elev: #fafafa;
  --surface: #f5f5f5;
  --surface-2: #efefef;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;
  --text: #0a0a0a;
  --text-muted: #525252;
  --text-faint: #8a8a8a;
  --accent: var(--brand);
  --accent-hover: var(--brand-deep);
  --accent-soft: var(--brand-soft);
  --focus-ring: 0 0 0 3px rgba(1, 170, 188, 0.35);
  --shadow-sm: 0 1px 2px rgba(10, 10, 10, 0.05);
  --shadow-md: 0 6px 24px -8px rgba(10, 10, 10, 0.12);
}

/* Dark theme */
[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-elev: #111111;
  --surface: #161616;
  --surface-2: #1d1d1d;
  --border: #262626;
  --border-strong: #383838;
  --text: #f5f5f5;
  --text-muted: #a3a3a3;
  --text-faint: #737373;
  --accent: var(--brand);
  --accent-hover: #36c4d3;
  --accent-soft: rgba(1, 170, 188, 0.14);
  --focus-ring: 0 0 0 3px rgba(1, 170, 188, 0.45);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 32px -10px rgba(0, 0, 0, 0.55);
}

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color var(--dur-med) var(--ease), color var(--dur-med) var(--ease);
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.12;
  color: var(--text);
}

::selection {
  background: var(--accent);
  color: var(--brand-on-accent);
}

/* ----- Utilities ----- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  background: var(--text);
  color: var(--bg);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  z-index: 100;
  transition: top var(--dur-fast) var(--ease);
}

.skip-link:focus {
  top: var(--space-3);
  color: var(--bg);
}

.eyebrow {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 var(--space-3);
}

.accent-text {
  color: var(--accent);
  font-style: italic;
  margin-right: 0.08em;
}
