/* Claude Loops - Main Stylesheet */
:root {
  --primary: #C96442;
  --primary-dark: #A04E31;
  --primary-light: #E8A589;
  --secondary: #1A1A1A;
  --accent: #F4A261;
  --bg: #FAFAF7;
  --bg-alt: #F5F1EB;
  --bg-dark: #1F1F1D;
  --text: #2B2B2B;
  --text-light: #6B6B6B;
  --text-on-dark: #FAFAF7;
  --border: #E5E0D8;
  --code-bg: #2D2A26;
  --code-text: #F0E9DD;
  --success: #2D8659;
  --warning: #D4801E;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 6px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, monospace;
  --max-width: 1200px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--secondary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.main-nav a:hover { color: var(--primary); }

.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-lg { padding: 16px 32px; font-size: 1rem; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 4px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* Hero */
.hero {
  padding: 80px 0 100px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 60%;
  height: 100%;
  background: radial-gradient(circle, rgba(201, 100, 66, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201, 100, 66, 0.1);
  color: var(--primary-dark);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.15;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: 32px;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-visual {
  background: var(--code-bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.terminal-header {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}

.terminal-header span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-red { background: #FF5F57; }
.dot-yellow { background: #FFBD2E; }
.dot-green { background: #28CA42; }

.code-block {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--code-text);
  line-height: 1.8;
}

.code-block .cmd { color: var(--accent); }
.code-block .arg { color: #B8D9C9; }
.code-block .comment { color: #7A7A75; }
.code-block .prompt { color: #6BB6FF; }

/* Sections */
section {
  padding: 80px 0;
}

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

.section-tag {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-light);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: white;
  padding: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: var(--transition);
}

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

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(201, 100, 66, 0.12), rgba(244, 162, 97, 0.12));
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: var(--primary);
  font-size: 1.6rem;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--secondary);
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Steps Section */
.bg-alt { background: var(--bg-alt); }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  counter-reset: step;
}

.step-card {
  background: white;
  padding: 32px 28px;
  border-radius: var(--radius-md);
  position: relative;
  border: 1px solid var(--border);
  counter-increment: step;
}

.step-card::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 24px;
  right: 28px;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  opacity: 0.2;
  font-family: var(--font-mono);
}

.step-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--secondary);
}

.step-card p { color: var(--text-light); font-size: 0.95rem; }

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--secondary), #2A2A28);
  color: white;
  text-align: center;
  border-radius: var(--radius-lg);
  padding: 70px 40px;
  margin: 40px 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(201, 100, 66, 0.25) 0%, transparent 60%);
}

.cta-section > * { position: relative; z-index: 1; }

.cta-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 16px;
  font-weight: 800;
}

.cta-section p {
  font-size: 1.1rem;
  margin-bottom: 32px;
  opacity: 0.85;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* Code samples */
.code-sample {
  background: var(--code-bg);
  border-radius: var(--radius-md);
  padding: 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--code-text);
  line-height: 1.7;
  margin: 24px 0;
  position: relative;
}

.code-sample .copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.1);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.code-sample .copy-btn:hover { background: rgba(255,255,255,0.2); }

/* Article / Content Pages */
.page-header {
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
  padding: 60px 0 50px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.page-header .lead {
  font-size: 1.15rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
}

.breadcrumbs {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

.breadcrumbs a { color: var(--text-light); }
.breadcrumbs a:hover { color: var(--primary); }

.article-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 50px 24px 80px;
}

.article-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 50px 0 18px;
  color: var(--secondary);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.article-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 36px 0 14px;
  color: var(--secondary);
}

.article-content h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--secondary);
}

.article-content p {
  margin-bottom: 18px;
  font-size: 1.05rem;
  color: var(--text);
}

.article-content ul, .article-content ol {
  margin: 0 0 24px 24px;
  padding-left: 8px;
}

.article-content li {
  margin-bottom: 10px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.article-content code {
  background: var(--bg-alt);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--primary-dark);
  border: 1px solid var(--border);
}

.callout {
  padding: 20px 24px;
  border-radius: var(--radius-md);
  margin: 28px 0;
  border-left: 4px solid var(--primary);
  background: rgba(201, 100, 66, 0.06);
}

.callout-tip { border-left-color: var(--success); background: rgba(45, 134, 89, 0.06); }
.callout-warn { border-left-color: var(--warning); background: rgba(212, 128, 30, 0.06); }

.callout strong { color: var(--secondary); }

/* FAQ */
.faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition);
}

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

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 22px 24px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--secondary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: inherit;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 400;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.faq-item.open .faq-question::after { content: '−'; }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 24px;
}

.faq-item.open .faq-answer {
  max-height: 600px;
  padding: 0 24px 22px;
}

.faq-answer p { color: var(--text-light); line-height: 1.7; }
.faq-answer p + p { margin-top: 12px; }

/* Use Cases */
.use-cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.use-case {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: var(--transition);
}

.use-case:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.use-case-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
}

.use-case h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--secondary);
}

.use-case p { color: var(--text-light); font-size: 0.95rem; margin-bottom: 14px; }

.use-case .tag {
  display: inline-block;
  background: var(--bg-alt);
  color: var(--text-light);
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 500;
}

/* Comparison Table */
.table-wrap { overflow-x: auto; margin: 24px 0; }

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

th, td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--secondary);
}

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

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.blog-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.blog-image {
  height: 200px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  position: relative;
  display: grid;
  place-items: center;
  color: white;
  font-size: 3rem;
}

.blog-body { padding: 26px; }

.blog-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
}

.blog-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--secondary);
  line-height: 1.4;
}

.blog-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.read-more {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Form */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--secondary);
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background: white;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(201, 100, 66, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 140px;
}

.contact-card {
  background: white;
  padding: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  max-width: 700px;
  margin: 0 auto;
}

/* Footer */
.site-footer {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 60px 0 30px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand p {
  color: rgba(250, 250, 247, 0.7);
  font-size: 0.95rem;
  margin: 16px 0;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }

.footer-col a {
  color: rgba(250, 250, 247, 0.65);
  font-size: 0.95rem;
  transition: var(--transition);
}

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

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(250, 250, 247, 0.5);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
  .menu-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    align-items: stretch;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a { padding: 8px 0; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .form-row { grid-template-columns: 1fr; }

  section { padding: 60px 0; }

  .hero { padding: 50px 0 70px; }

  .cta-section { padding: 50px 24px; }

  .article-content { padding: 30px 16px 60px; }

  .article-content h2 { font-size: 1.5rem; margin-top: 36px; }
}

@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
}

/* Print */
@media print {
  .site-header, .site-footer, .cta-section, .menu-toggle { display: none; }
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp 0.6s ease-out backwards; }
.fade-up:nth-child(2) { animation-delay: 0.1s; }
.fade-up:nth-child(3) { animation-delay: 0.2s; }
.fade-up:nth-child(4) { animation-delay: 0.3s; }

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

a:focus-visible, button:focus-visible, .form-control:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
}
