/* Nextworkhub — contemporary structured creative theme */

:root {
  --color-navy: #1a365d;
  --color-navy-light: #2c5282;
  --color-teal: #2d6a6a;
  --color-gold: #c9a227;
  --color-gold-light: #e2c04a;
  --color-cream: #faf9f7;
  --color-warm-white: #ffffff;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-error: #b91c1c;
  --color-success: #166534;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --shadow-sm: 0 1px 3px rgba(26, 54, 93, 0.08);
  --shadow-md: 0 4px 20px rgba(26, 54, 93, 0.1);
  --shadow-lg: 0 12px 40px rgba(26, 54, 93, 0.12);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: var(--color-teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-navy); }

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

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.625rem); }

p + p { margin-top: 1rem; }

.container {
  width: min(1140px, 92%);
  margin-inline: auto;
}

main { flex: 1; }

/* 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;
  letter-spacing: 0.02em;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-navy);
  color: var(--color-warm-white);
  border-color: var(--color-navy);
}
.btn-primary:hover {
  background: var(--color-navy-light);
  border-color: var(--color-navy-light);
  color: var(--color-warm-white);
}

.btn-outline {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-navy);
}
.btn-outline:hover {
  background: var(--color-navy);
  color: var(--color-warm-white);
}

.btn-gold {
  background: var(--color-gold);
  color: var(--color-navy);
  border-color: var(--color-gold);
}
.btn-gold:hover {
  background: var(--color-gold-light);
  border-color: var(--color-gold-light);
  color: var(--color-navy);
}

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

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-navy);
  text-decoration: none;
}
.logo:hover { color: var(--color-teal); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  transition: var(--transition);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.site-nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9375rem;
}
.site-nav a:hover { color: var(--color-teal); }

/* Footer */
.site-footer {
  background: var(--color-navy);
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  padding: 3.5rem 0 2.5rem;
}

.footer-brand .logo { color: var(--color-warm-white); margin-bottom: 1rem; }
.footer-brand p { font-size: 0.9375rem; line-height: 1.6; opacity: 0.85; }

.site-footer h3 {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gold);
  margin-bottom: 1rem;
}

.site-footer ul { list-style: none; }
.site-footer li + li { margin-top: 0.5rem; }
.site-footer a { color: rgba(255, 255, 255, 0.85); }
.site-footer a:hover { color: var(--color-gold-light); }

.site-footer address { font-style: normal; font-size: 0.9375rem; }
.site-footer address p + p { margin-top: 0.375rem; }

.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.25rem 0;
}

.footer-legal .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
  opacity: 0.7;
}

.footer-legal ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

/* Hero variants */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 520px;
  align-items: center;
}

.hero-content {
  padding: 4rem 0;
}

.hero-content .eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-teal);
  margin-bottom: 1rem;
}

.hero-content h1 { margin-bottom: 1.25rem; }

.hero-content .lead {
  font-size: 1.1875rem;
  color: var(--color-text-muted);
  max-width: 32rem;
  margin-bottom: 2rem;
}

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

.hero-visual {
  position: relative;
  height: 100%;
  min-height: 400px;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 54, 93, 0.15) 0%, transparent 60%);
}

.hero-banner {
  background: var(--color-navy);
  color: var(--color-warm-white);
  padding: 5rem 0;
  text-align: center;
}

.hero-banner h1 { color: var(--color-warm-white); }
.hero-banner .lead { color: rgba(255, 255, 255, 0.8); max-width: 40rem; margin: 1rem auto 2rem; }

.hero-compact {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-warm-white);
}

.hero-compact h1 { margin-bottom: 0.75rem; }
.hero-compact p { color: var(--color-text-muted); max-width: 36rem; }

/* Sections */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--color-warm-white); }

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

.section-header.centered {
  text-align: center;
  margin-inline: auto;
}

.section-header .eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
}

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

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

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

.card img {
  width: 100%;
  height: 200px;
  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; }

.card-meta {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* Feature blocks */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }

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

.feature-image img { width: 100%; height: 320px; object-fit: cover; }

.feature-list {
  list-style: none;
  margin-top: 1.5rem;
}

.feature-list li {
  padding: 0.625rem 0 0.625rem 1.75rem;
  position: relative;
  border-bottom: 1px solid var(--color-border);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1rem;
  width: 8px;
  height: 8px;
  background: var(--color-gold);
  border-radius: 50%;
}

/* Testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.testimonial {
  background: var(--color-warm-white);
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-gold);
  box-shadow: var(--shadow-sm);
}

.testimonial blockquote {
  font-style: italic;
  color: var(--color-text);
  margin-bottom: 1rem;
  font-size: 0.9875rem;
}

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

.testimonial .service-tag {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Pricing */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-warm-white);
  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-navy);
  color: var(--color-warm-white);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.pricing-note {
  margin-top: 2rem;
  padding: 1.25rem;
  background: rgba(201, 162, 39, 0.1);
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.375rem;
  color: var(--color-navy);
}

.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);
  background: var(--color-warm-white);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(45, 106, 106, 0.15);
}

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

.form-error {
  color: var(--color-error);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  display: none;
}

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

.form-success {
  padding: 1.25rem;
  background: rgba(22, 101, 52, 0.1);
  color: var(--color-success);
  border-radius: var(--radius);
  margin-top: 1rem;
  display: none;
}

.form-success.visible { display: block; }

.form-failure {
  padding: 1.25rem;
  background: rgba(185, 28, 28, 0.1);
  color: var(--color-error);
  border-radius: var(--radius);
  margin-top: 1rem;
  display: none;
}

.form-failure.visible { display: block; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
}

.contact-info address {
  font-style: normal;
  margin-top: 1.5rem;
}

.contact-info address p {
  margin-top: 0.5rem;
  font-size: 1rem;
}

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

.blog-card {
  background: var(--color-warm-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.blog-card:hover { box-shadow: var(--shadow-md); }

.blog-card img { height: 220px; object-fit: cover; width: 100%; }

.blog-card-body { padding: 1.5rem; }

.blog-card .date {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.article-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.article-content h2 { margin: 2rem 0 1rem; }
.article-content h3 { margin: 1.5rem 0 0.75rem; }
.article-content ul, .article-content ol { margin: 1rem 0 1rem 1.5rem; }
.article-content li + li { margin-top: 0.375rem; }

.article-meta {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

/* Legal pages */
.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

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

.legal-content ul { margin: 0.75rem 0 0.75rem 1.5rem; }

.cookies-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

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

.cookies-table th { background: var(--color-navy); color: white; }

/* Framework page */
.framework-steps {
  counter-reset: step;
}

.framework-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border);
}

.framework-step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-navy);
  color: var(--color-gold);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

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

.error-page h1 {
  font-size: 6rem;
  color: var(--color-gold);
  line-height: 1;
}

.error-page p { margin: 1rem 0 2rem; color: var(--color-text-muted); }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-navy);
  color: var(--color-warm-white);
  padding: 1.25rem;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

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

.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  max-width: 1140px;
  margin: 0 auto;
  width: 92%;
}

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

.cookie-banner a { color: var(--color-gold-light); }

.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-banner .btn-accept {
  background: var(--color-gold);
  color: var(--color-navy);
  border: none;
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
}

.cookie-banner .btn-reject {
  background: transparent;
  color: var(--color-warm-white);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
}

/* Script error */
.script-error {
  background: rgba(185, 28, 28, 0.1);
  color: var(--color-error);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin: 0.5rem 0;
  display: none;
}

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

/* Breadcrumb */
.breadcrumb {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  padding: 1rem 0;
}

.breadcrumb a { color: var(--color-text-muted); }

/* Service detail */
.service-detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  padding: 2rem 0 4rem;
}

.service-sidebar {
  background: var(--color-warm-white);
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  height: fit-content;
  position: sticky;
  top: 5rem;
}

.service-sidebar dl { margin-top: 1rem; }
.service-sidebar dt {
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-teal);
  margin-top: 1rem;
}
.service-sidebar dd { margin-top: 0.25rem; font-size: 0.9375rem; }

.service-hero img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

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

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

/* Responsive */
@media (max-width: 900px) {
  .hero-split,
  .feature-row,
  .contact-grid,
  .service-detail-grid,
  .footer-grid { grid-template-columns: 1fr; }

  .feature-row.reverse { direction: ltr; }

  .hero-visual { min-height: 280px; }

  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    background: var(--color-warm-white);
    padding: 5rem 2rem 2rem;
    box-shadow: var(--shadow-lg);
    transition: right var(--transition);
    z-index: 99;
  }

  .site-nav.open { right: 0; }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
}

@media (max-width: 600px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
}
