/* ==========================================================================
   Anthropic Design System — Premium Hub API
   ========================================================================== */

:root {
  /* Anthropic Brand Color Tokens (Light Warm Theme) */
  --clay: #da7756;
  --clay-hover: #c86646;
  --clay-subtle: rgba(218, 119, 86, 0.12);
  --green-accent: #2e7d32;
  --green-subtle: rgba(46, 125, 50, 0.1);

  --bg-main: #faf8f5;
  --bg-card: #ffffff;
  --bg-elevated: #f5f2eb;
  --border-color: #e6e1da;
  --border-hover: #d1c9be;

  --text-main: #191918;
  --text-muted: #66615c;
  --text-light: #8c867e;

  /* Typography */
  --font-serif: 'Lora', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', 'Consolas', monospace;

  /* Layout */
  --container-max: 1160px;
  --header-h: 76px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --shadow-soft: 0 4px 20px rgba(25, 25, 24, 0.04);
  --shadow-hover: 0 12px 30px rgba(25, 25, 24, 0.08);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --clay: #e08264;
  --clay-hover: #eb9174;
  --clay-subtle: rgba(224, 130, 100, 0.18);
  --green-accent: #4caf50;
  --green-subtle: rgba(76, 175, 80, 0.15);

  --bg-main: #141413;
  --bg-card: #1e1d1b;
  --bg-elevated: #282623;
  --border-color: #2e2c28;
  --border-hover: #423f3a;

  --text-main: #f5f2eb;
  --text-muted: #9e9890;
  --text-light: #706b64;

  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-main);
  color: var(--text-main);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--text-main);
  font-weight: 500;
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

code {
  font-family: var(--font-mono);
  background: var(--bg-elevated);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--clay);
}

.container {
  width: min(var(--container-max), calc(100% - 48px));
  margin: 0 auto;
}

.text-center { text-align: center; }
.hidden { display: none !important; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--clay);
  margin-bottom: 0.75rem;
}

/* Header Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(250, 248, 245, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s var(--ease);
}

[data-theme="dark"] .header {
  background: rgba(20, 20, 19, 0.88);
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-symbol {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--clay);
  color: #fff;
  display: grid;
  place-items: center;
}

.logo-brand {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.logo-sub {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--clay);
  text-transform: uppercase;
  margin-left: 0.2rem;
}

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

.nav-link {
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  transition: all 0.2s var(--ease);
}

.nav-link:hover {
  color: var(--text-main);
  background: var(--bg-elevated);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme Toggle Button */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-elevated);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  transition: all 0.2s var(--ease);
}

.theme-toggle:hover {
  border-color: var(--border-hover);
  transform: scale(1.05);
}

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
}

/* Buttons System (Anthropic Style) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 0.9rem 1.8rem;
  font-size: 1rem;
}

.btn-block { width: 100%; }

.btn-clay {
  background: var(--clay);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(218, 119, 86, 0.25);
}

.btn-clay:hover {
  background: var(--clay-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(218, 119, 86, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  padding: calc(var(--header-h) + 4.5rem) 0 5.5rem;
}

.hero-container {
  max-width: 860px;
  text-align: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  padding: 0.35rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
}

.tag-clay {
  font-weight: 700;
  color: var(--clay);
}

.tag-divider { color: var(--border-hover); }

.hero-title {
  font-size: clamp(2.5rem, 5.5vw, 4.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero-title em {
  font-style: italic;
  color: var(--clay);
}

.hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

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

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metric-val {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--clay);
}

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

/* Sections Global */
.section {
  padding: 5.5rem 0;
}

.section-bordered {
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-elevated);
}

.section-header {
  max-width: 720px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  margin-bottom: 0.75rem;
}

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

/* Filter Pills */
.filter-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.pill {
  padding: 0.5rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: all 0.2s var(--ease);
}

.pill:hover {
  color: var(--text-main);
  border-color: var(--border-hover);
}

.pill.active {
  background: var(--clay);
  color: #ffffff;
  border-color: transparent;
}

/* Models Grid */
.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.model-card {
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s var(--ease);
}

.model-card:hover {
  transform: translateY(-4px);
  border-color: var(--clay);
  box-shadow: var(--shadow-hover);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-clay {
  background: var(--clay-subtle);
  color: var(--clay);
}

.badge-green {
  background: var(--green-subtle);
  color: var(--green-accent);
}

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

.model-org {
  font-size: 0.8rem;
  color: var(--text-light);
}

.model-name {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.model-about {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  min-height: 2.6rem;
}

.rates-table {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.rate-row strong {
  font-family: var(--font-sans);
  color: var(--text-main);
}

.rate-row strong small {
  color: var(--text-light);
  font-weight: 400;
}

.card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.spec-tag {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Calculator Panel */
.calc-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-soft);
}

.calc-top {
  text-align: center;
  margin-bottom: 2.5rem;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.calc-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}

.slider-display {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--clay);
}

.slider-display small {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.anthropic-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  outline: none;
}

.anthropic-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--clay);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(218, 119, 86, 0.4);
  border: 2px solid #ffffff;
}

.preset-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.preset-pill {
  flex: 1;
  padding: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: all 0.2s var(--ease);
}

.preset-pill.active {
  background: var(--clay-subtle);
  border-color: var(--clay);
  color: var(--clay);
}

.results-heading {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.result-card {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
}

.result-clay {
  background: var(--clay-subtle);
  border-color: rgba(218, 119, 86, 0.3);
}

.result-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.result-value {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-main);
}

.result-note {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Tariffs Grid */
.tariffs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.tariff-box {
  padding: 2.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-soft);
  position: relative;
}

.tariff-featured {
  border-color: var(--clay);
  box-shadow: 0 8px 30px rgba(218, 119, 86, 0.15);
}

.plan-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.plan-tag-clay { color: var(--clay); }

.plan-name {
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

.plan-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.plan-price {
  margin-bottom: 1.5rem;
}

.price-num {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 600;
  display: block;
}

.price-note {
  font-size: 0.85rem;
  color: var(--clay);
}

.plan-features {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.plan-features li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-left: 1.25rem;
  position: relative;
}

.plan-features li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--clay);
}

/* Code Snippet Block */
.code-container {
  max-width: 800px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  background: #1a1917;
  color: #f5f2eb;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.code-tab-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: #141413;
  border-bottom: 1px solid #282623;
  font-size: 0.82rem;
  color: #9e9890;
}

.code-view {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  overflow-x: auto;
}

.c-keyword { color: #e08264; }
.c-string { color: #81c784; }
.c-comment { color: #706b64; font-style: italic; }

/* Guarantee & Contacts */
.guarantee-grid {
  max-width: 800px;
  margin: 0 auto;
}

.guarantee-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.guarantee-list li {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.org-card {
  max-width: 840px;
  margin: 0 auto;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.org-head {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.org-head h3 { font-size: 1.25rem; }
.org-head p { font-size: 0.85rem; color: var(--text-muted); }

.org-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.org-item {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
}

.org-wide { grid-column: 1 / -1; }

.org-label {
  font-size: 0.78rem;
  color: var(--text-light);
  display: block;
}

.org-val {
  font-size: 0.92rem;
  font-weight: 600;
}

.org-link:hover { color: var(--clay); }

/* Footer */
.footer {
  padding: 4rem 0 3rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-main);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-brand {
  max-width: 400px;
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

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

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

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-light);
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

/* Modal Window */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s var(--ease);
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 25, 24, 0.65);
  backdrop-filter: blur(8px);
}

.modal-box {
  position: relative;
  z-index: 10;
  width: min(500px, 100%);
  padding: 2.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(15px);
  transition: transform 0.3s var(--ease);
}

.modal.open .modal-box {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.modal-header { margin-bottom: 1.5rem; }
.modal-sub { font-size: 0.88rem; color: var(--text-muted); margin-top: 0.3rem; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--clay);
}

.form-error { font-size: 0.75rem; color: #d32f2f; }

.modal-success { text-align: center; padding: 1rem 0; }
.success-check {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green-accent);
  color: #fff;
  font-size: 1.75rem;
  display: grid;
  place-items: center;
  margin: 0 auto 1.25rem;
}

/* Scroll To Top */
.to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--clay);
  color: #ffffff;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(218, 119, 86, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--ease);
}

.to-top-btn.visible { opacity: 1; visibility: visible; }

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Breakdown */
@media (max-width: 1024px) {
  .metrics-strip { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .calc-grid { grid-template-columns: 1fr; gap: 2rem; }
  .tariffs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--bg-main);
    padding: 1.5rem;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid var(--border-color);
    display: none;
  }
  .nav-open .nav { display: flex; }
  .nav-toggle { display: flex; }
  .org-details { grid-template-columns: 1fr; }
}
