/* AI Hero visual system — cream newsprint, charcoal type, amber mark */

:root {
  --page-background: #f0f0f0;
  --background: #fafafa;
  --card: #f5f5f5;
  --border: #e8e8e8;
  --foreground: #171717;
  --ah-fg-body: #404040;
  --ah-fg-muted: #737373;
  --ah-fg-subtle: #8a8a8a;
  --ah-fg-faint: #a3a3a3;
  --accent: #e8c547;
  --primary: #171717;
  --cta-blue: #3b82f6;
  --cta-blue-wash: rgba(59, 130, 246, 0.1);
  --band: #f5f5f5;
  --hover-wash: rgba(23, 23, 23, 0.06);
  --secondary: rgba(23, 23, 23, 0.04);
  --destructive: #b42318;
  --nav-height: 56px;

  --color-bg: var(--background);
  --color-bg-page: var(--page-background);
  --color-bg-card: var(--card);
  --color-bg-code: var(--card);
  --color-bg-hover: var(--hover-wash);
  --color-bg-muted: var(--band);
  --color-bg-weak: var(--card);
  --color-bg-weak-hover: color-mix(in srgb, var(--foreground) 6%, var(--background));
  --color-bg-strong: var(--primary);
  --color-bg-strong-hover: #0a0a0a;
  --color-bg-interactive: var(--hover-wash);
  --color-text-strong: var(--foreground);
  --color-text-heading: var(--foreground);
  --color-text: var(--ah-fg-body);
  --color-text-muted: var(--ah-fg-muted);
  --color-text-subtle: var(--ah-fg-subtle);
  --color-text-weak: var(--ah-fg-muted);
  --color-text-weaker: var(--ah-fg-subtle);
  --color-text-inverted: var(--background);
  --color-accent: var(--accent);
  --color-accent-hover: #d4b33a;
  --color-link: var(--foreground);
  --color-link-hover: var(--foreground);
  --color-primary: var(--primary);
  --color-primary-hover: #0a0a0a;
  --color-border: var(--border);
  --color-border-strong: #d4d4d4;
  --color-border-weak: var(--border);
  --color-success-bg: rgba(61, 92, 54, 0.1);
  --color-success-border: rgba(61, 92, 54, 0.28);
  --color-error-bg: rgba(180, 35, 24, 0.08);
  --color-error-border: rgba(180, 35, 24, 0.28);
  --color-warning-bg: rgba(232, 93, 4, 0.1);
  --color-warning-border: rgba(232, 93, 4, 0.28);
  --color-info-bg: var(--cta-blue-wash);
  --color-info-border: rgba(59, 130, 246, 0.28);

  --radius-chip: 4px;
  --radius-sm: 6px;
  --radius-md: 7px;
  --radius-lg: 8px;
  --radius-btn: 9px;
  --radius-xl: 12px;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-serif: "Source Serif 4", Georgia, serif;
}

html {
  background: var(--page-background);
}

body {
  font-family: var(--font-sans);
  background: var(--page-background);
  color: var(--ah-fg-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.font-mono, code, kbd, pre, samp {
  font-family: var(--font-mono);
}

.ah-sheet {
  max-width: 1456px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.ah-masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0 18px;
  background: color-mix(in srgb, var(--background) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 1024px) {
  .ah-masthead { padding: 0 44px; }
}

.ah-wordmark {
  display: inline-flex;
  align-items: center;
  color: var(--foreground);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  border-radius: 7px;
}

.ah-wordmark .ah-mark {
  font-family: var(--font-mono);
  color: var(--foreground);
}

.ah-nav {
  display: none;
  align-items: center;
  gap: 2px;
}

@media (min-width: 640px) {
  .ah-nav { display: flex; }
}

.ah-nav-link {
  color: var(--ah-fg-muted);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1;
  border-radius: 7px;
  padding: 7px 12px;
  transition: color 200ms, background-color 200ms;
}

.ah-nav-link:hover,
.ah-nav-link.is-active {
  color: var(--foreground);
  background: var(--hover-wash);
}

.ah-masthead-right {
  margin-left: auto;
  display: none;
  align-items: center;
  gap: 18px;
}

@media (min-width: 640px) {
  .ah-masthead-right { display: flex; }
}

.ah-main {
  flex: 1;
}

.ah-band {
  border-top: 1px solid var(--border);
  margin-top: -1px;
}

.ah-footer {
  border-top: 1px solid var(--border);
  padding: 40px 18px 32px;
}

@media (min-width: 1024px) {
  .ah-footer { padding: 48px 44px 36px; }
}

.ah-footer-grid {
  display: grid;
  gap: 28px;
}

@media (min-width: 768px) {
  .ah-footer-grid { grid-template-columns: repeat(4, 1fr); }
}

.ah-footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ah-fg-muted);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.ah-footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ah-footer-links a {
  color: var(--ah-fg-body);
  font-size: 13.5px;
  transition: opacity 200ms;
}

.ah-footer-links:hover a { opacity: 0.6; }
.ah-footer-links a:hover { opacity: 1; }

.cafe-card {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: none;
  transition: border-color 200ms, background-color 200ms;
}

.cafe-card:hover {
  border-color: var(--color-border-strong);
  background: var(--hover-wash);
  box-shadow: none;
}

.cafe-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary) !important;
  color: var(--background) !important;
  border: none;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  min-height: 46px;
  padding: 0 1.25rem;
  cursor: pointer;
  transition: background-color 200ms;
}

.cafe-btn-primary:hover {
  background: var(--color-primary-hover) !important;
}

.ah-cta-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent) !important;
  color: var(--foreground) !important;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  height: 36px;
  padding: 0 14px;
  cursor: pointer;
  transition: background-color 200ms;
}

.ah-cta-gold:hover {
  background: #d4b33a !important;
}

.cafe-btn-primary:active { transform: none; }

.cafe-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  color: var(--foreground) !important;
  border: 1px solid rgba(28, 25, 23, 0.2) !important;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 600;
  min-height: 36px;
  padding: 0 0.9rem;
  cursor: pointer;
  transition: border-color 200ms, background-color 200ms;
}

.cafe-btn-secondary:hover {
  border-color: rgba(28, 25, 23, 0.4) !important;
  background: var(--secondary) !important;
}

.cafe-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="tel"],
input[type="search"],
input[type="datetime-local"],
input[type="date"],
textarea,
select {
  background: var(--background) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: var(--foreground) !important;
  font-size: 15px !important;
  font-family: var(--font-sans);
  box-shadow: none !important;
}

input:focus,
textarea:focus,
select:focus,
.cafe-input:focus {
  outline: 2px solid var(--foreground);
  outline-offset: 2px;
  border-color: var(--foreground) !important;
  background: var(--background) !important;
  box-shadow: none !important;
}

::placeholder { color: var(--ah-fg-faint); }

code:not(pre code) {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--ah-fg-muted);
  background: var(--hover-wash);
  border-radius: 4px;
  padding: 0.125rem 0.25rem;
}

pre, .ah-code {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  font-size: 13px;
}

h1 {
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.034em;
  text-wrap: balance;
  color: var(--foreground);
}

h2 {
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--foreground);
}

.ah-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ah-fg-muted);
}

.ah-cta-blue {
  background: var(--cta-blue) !important;
  color: #fff !important;
  border-radius: 9px;
}

.ah-cta-blue:hover { background: color-mix(in srgb, var(--cta-blue) 90%, #000) !important; }
.ah-cta-blue .ah-arrow { transition: transform 200ms; }
.ah-cta-blue:hover .ah-arrow { transform: translateX(4px); }

.shadow, .shadow-sm, .shadow-md, .shadow-lg, .shadow-xl, .shadow-2xl {
  box-shadow: none !important;
}

.rounded-2xl, .rounded-3xl { border-radius: 9px !important; }
.rounded-xl { border-radius: 8px !important; }
.rounded-full { border-radius: 9px !important; }

.bg-violet-50, .bg-violet-100, .bg-violet-900\/20, .bg-violet-900\/30, .bg-violet-900\/40,
.bg-indigo-50, .bg-indigo-100, .bg-purple-50, .bg-purple-900\/20, .bg-purple-900\/30 {
  background-color: var(--hover-wash) !important;
}

.bg-violet-500, .bg-violet-600, .bg-violet-700, .hover\:bg-violet-700:hover,
.bg-indigo-500, .bg-indigo-600, .bg-indigo-700, .hover\:bg-indigo-700:hover, .hover\:bg-indigo-500:hover,
.bg-purple-600, .bg-purple-700 {
  background-color: var(--primary) !important;
  color: var(--background) !important;
}

.text-violet-300, .text-violet-400, .text-violet-500, .text-violet-600, .text-violet-700,
.hover\:text-violet-300:hover, .hover\:text-violet-400:hover, .hover\:text-violet-700:hover,
.text-indigo-400, .text-indigo-500, .text-indigo-600, .text-indigo-700, .hover\:text-indigo-600:hover, .hover\:text-indigo-900:hover,
.text-purple-400, .text-purple-600 {
  color: var(--foreground) !important;
}

.border-violet-500, .border-violet-700\/50, .border-violet-700\/60, .border-violet-800\/40,
.border-indigo-500, .focus\:border-violet-500:focus, .focus\:border-indigo-500:focus,
.focus\:ring-violet-500:focus, .focus\:ring-indigo-500:focus {
  border-color: var(--border) !important;
  --tw-ring-color: var(--foreground) !important;
}

.bg-slate-800, .bg-slate-900, .bg-slate-950, .bg-gray-800, .bg-gray-900, .bg-gray-950 {
  background-color: var(--card) !important;
}

.text-slate-100, .text-slate-200, .text-gray-100, .text-gray-200 {
  color: var(--foreground) !important;
}

.text-white:not(.cafe-btn-primary):not(.ah-cta-blue):not(.ah-cta-gold) {
  color: var(--foreground) !important;
}

.bg-indigo-600.text-white,
.bg-indigo-700.text-white,
.bg-violet-600.text-white,
.bg-violet-700.text-white {
  color: var(--background) !important;
}

.text-slate-400, .text-slate-500, .text-gray-400, .text-gray-500, .text-gray-600 {
  color: var(--ah-fg-muted) !important;
}

.border-slate-700, .border-gray-700, .border-gray-800 {
  border-color: var(--border) !important;
}

.bg-green-900\/20 { background-color: var(--color-success-bg) !important; }
.bg-red-900\/20 { background-color: var(--color-error-bg) !important; }
.bg-orange-900\/20, .bg-yellow-50 { background-color: var(--color-warning-bg) !important; }
.text-green-400, .text-green-600 { color: #3d5c36 !important; }
.text-red-400, .text-red-500 { color: var(--destructive) !important; }
.text-orange-400, .text-yellow-400, .text-yellow-500, .text-yellow-700 { color: var(--accent) !important; }

.ring-1, .ring-white\/5, .ring-white\/10 { --tw-ring-color: transparent !important; box-shadow: none !important; }

nav[aria-label="Breadcrumb"] {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.ah-toast {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--foreground);
}
