/* Smart FieldBase — contemporary structured-creative theme */
:root {
  --color-bg: #f7f5f0;
  --color-bg-alt: #edeae3;
  --color-surface: #ffffff;
  --color-text: #1c2833;
  --color-text-muted: #5c6b7a;
  --color-primary: #1e4d6b;
  --color-primary-dark: #153a52;
  --color-accent: #c45c3e;
  --color-accent-light: #e8a090;
  --color-border: #d4cfc4;
  --color-success: #2d6a4f;
  --color-error: #9b2335;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(28, 40, 51, 0.08);
  --shadow-md: 0 4px 16px rgba(28, 40, 51, 0.1);
  --shadow-lg: 0 12px 40px rgba(28, 40, 51, 0.12);
  --max-width: 1200px;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

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

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  margin-top: 0;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.125rem); }
h3 { font-size: 1.375rem; }

p { margin: 0 0 1rem; }

ul, ol { margin: 0 0 1rem; padding-left: 1.5rem; }

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 1.5rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span { color: var(--color-accent); }

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--color-primary);
  border-bottom-color: var(--color-accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.875rem;
}

/* Footer */
.site-footer {
  background: var(--color-primary);
  color: #e8edf0;
  margin-top: 4rem;
  padding: 3rem 0 2rem;
}

.site-footer a { color: #c5dce8; }
.site-footer a:hover { color: var(--color-accent-light); }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-grid h4 {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent-light);
  margin-bottom: 0.75rem;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid li { margin-bottom: 0.4rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.5rem;
  font-size: 0.875rem;
  color: #a8bcc8;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: #a84d32;
  border-color: #a84d32;
  color: #fff;
}

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

.btn-secondary:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

.btn-outline-light:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* Hero variants */
.hero {
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

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

.hero-asymmetric {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: end;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  background: rgba(196, 92, 62, 0.1);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  max-width: 38ch;
}

.hero-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

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

.section-alt { background: var(--color-bg-alt); }

.section-header {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

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

.section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s, transform 0.2s;
}

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

.card-image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body { padding: 1.5rem; }

.card-body h3 { margin-bottom: 0.5rem; }

.card-body p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.card-meta {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* Feature strip */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding: 2.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.feature-item h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.feature-item p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Testimonials */
.testimonial {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.testimonial blockquote {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-style: italic;
}

.testimonial cite {
  font-style: normal;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Forms */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30, 77, 107, 0.15);
}

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

.field-error {
  color: var(--color-error);
  font-size: 0.8125rem;
  margin-top: 0.35rem;
}

.form-status {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(45, 106, 79, 0.1);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}

.form-status.error {
  display: block;
  background: rgba(155, 35, 53, 0.08);
  color: var(--color-error);
  border: 1px solid var(--color-error);
}

.script-error {
  background: rgba(155, 35, 53, 0.08);
  color: var(--color-error);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin: 1rem 0;
  display: none;
}

.script-error.visible { display: block; }

/* Pricing */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.pricing-table th,
.pricing-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.pricing-table th {
  background: var(--color-bg-alt);
  font-family: var(--font-display);
}

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

.price-note {
  background: var(--color-surface);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  margin-top: 2rem;
}

/* Glossary */
.glossary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.glossary-nav a {
  padding: 0.35rem 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
}

.glossary-term {
  background: var(--color-surface);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  border: 1px solid var(--color-border);
}

.glossary-term h3 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

/* Blog */
.article-header {
  max-width: 720px;
  margin-bottom: 2rem;
}

.article-meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.article-content {
  max-width: 720px;
}

.article-content h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  max-height: 400px;
}

.article-hero img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

/* Page header */
.page-header {
  padding: 3rem 0 2rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, #2a6f8f 100%);
  color: #fff;
}

.page-header h1 { margin-bottom: 0.5rem; }

.page-header p {
  opacity: 0.9;
  max-width: 600px;
  margin: 0;
}

/* 404 */
.error-page {
  text-align: center;
  padding: 6rem 0;
}

.error-page h1 {
  font-size: 6rem;
  color: var(--color-accent);
  margin-bottom: 0;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  padding: 1.25rem;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.cookie-banner.visible { transform: translateY(0); }

.cookie-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.cookie-inner p {
  margin: 0;
  flex: 1;
  min-width: 240px;
  font-size: 0.9375rem;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Legal pages */
.legal-content {
  max-width: 760px;
  padding: 3rem 0;
}

.legal-content h2 {
  margin-top: 2rem;
  font-size: 1.375rem;
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9375rem;
}

.legal-content th,
.legal-content td {
  border: 1px solid var(--color-border);
  padding: 0.6rem 0.8rem;
  text-align: left;
}

.legal-content th { background: var(--color-bg-alt); }

/* Contact layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  padding: 3rem 0;
}

.contact-info h3 { margin-bottom: 1rem; }

.contact-detail {
  margin-bottom: 1.5rem;
}

.contact-detail strong {
  display: block;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

/* Case study */
.case-study {
  background: var(--color-surface);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

.case-study h3 { margin-bottom: 1rem; }

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem;
  }

  .main-nav.open { display: block; }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav li { border-bottom: 1px solid var(--color-border); }
  .main-nav li:last-child { border-bottom: none; }
  .main-nav a { display: block; padding: 0.75rem 0; }

  .hero-split,
  .hero-asymmetric,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .header-inner { position: relative; }
}
