@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=DM+Serif+Display&display=swap');

/* =============================================
   DESIGN TOKENS
   ============================================= */

:root {
  /* Colours */
  --color-bg:           #ffffff;
  --color-surface:      #f7f8fa;
  --color-surface-alt:  #eef1f5;
  --color-border:       #dde1e9;
  --color-text:         #1a1f2e;
  --color-text-muted:   #5a6478;
  --color-accent:       #1a4ed8;
  --color-accent-hover: #1440b8;
  --color-accent-light: #e8eefb;
  --color-success:      #0d7a4e;
  --color-danger:       #c0392b;

  /* Typography */
  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'Courier New', monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.375rem;
  --text-2xl:  1.875rem;
  --text-3xl:  2.5rem;
  --text-4xl:  3.25rem;

  --leading-tight:  1.2;
  --leading-normal: 1.65;
  --leading-loose:  1.85;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-bold:   700;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-full: 9999px;

  /* Layout */
  --max-width:     1200px;
  --content-width: 700px;
  --section-gap:   var(--space-24);
}

/* =============================================
   RESET & BASE
   ============================================= */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
}

h1, h2 {
  font-family: var(--font-heading);
  font-weight: var(--weight-normal);
  line-height: var(--leading-tight);
  color: var(--color-text);
}

h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-text);
}

p {
  line-height: var(--leading-normal);
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

/* =============================================
   LAYOUT UTILITIES
   ============================================= */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--section-gap) 0;
}

/* =============================================
   NAVIGATION
   ============================================= */

.nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  height: 68px;
  display: flex;
  align-items: center;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  height: 38px;
  width: auto;
  display: block;
}

.nav-logo-text {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-normal);
  color: var(--color-text);
  margin-left: var(--space-3);
}

.nav-logo:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
}

.nav-links {
  display: none;
  list-style: none;
}

.nav-links li {
  display: flex;
  align-items: center;
}

.nav-links.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-6);
  gap: var(--space-4);
  align-items: flex-start;
}

.nav-link {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--color-accent);
}

.nav-link.active {
  color: var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 2px;
}

@media (min-width: 768px) {
  .nav-hamburger {
    display: none;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-8);
  }
}

/* =============================================
   BUTTONS
   ============================================= */

.btn-primary {
  background: var(--color-accent);
  color: #ffffff;
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  line-height: 1.2;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  color: #ffffff;
}

.btn-primary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.btn-primary[disabled],
.btn-primary.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.btn-secondary[disabled],
.btn-secondary.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* =============================================
   CARDS
   ============================================= */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

/* =============================================
   HERO
   ============================================= */

.hero {
  padding: var(--section-gap) 0;
  background: var(--color-bg);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.hero-eyebrow {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
}

.hero-headline {
  font-size: var(--text-3xl);
  max-width: 18ch;
}

.hero-sub {
  margin-top: var(--space-6);
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  max-width: 52ch;
  margin-bottom: var(--space-8);
}

.hero-visual {
  display: none;
  overflow: hidden;
  line-height: 0;
  font-size: 0;
}

.hero-visual img,
.hero-visual video {
  width: 100%;
  height: auto;
  display: block;
  transform: scale(1.08);
}

@media (min-width: 768px) {
  .hero-inner {
    flex-direction: row;
    align-items: center;
    gap: var(--space-16);
  }

  .hero-content {
    flex: 1 1 auto;
  }

  .hero-visual {
    display: block;
    flex: 0 0 420px;
  }

  .hero-headline {
    font-size: var(--text-4xl);
  }
}

/* =============================================
   SERVICES SUMMARY
   ============================================= */

.services-summary {
  background: var(--color-surface);
}

.section-heading {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-12);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.service-card h3 {
  font-size: var(--text-lg);
}

.service-card p {
  color: var(--color-text-muted);
  flex: 1;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* =============================================
   WHY NODE 9
   ============================================= */

.why-node9 {
  background: var(--color-bg);
}

.why-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.why-text h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

.why-intro {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  max-width: var(--content-width);
}

.why-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

.why-item h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-2);
}

.why-item p {
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .why-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =============================================
   TESTIMONIALS
   ============================================= */

.testimonials {
  background: var(--color-surface);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.testimonial-card blockquote {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.testimonial-card blockquote p {
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  font-style: italic;
  color: var(--color-text);
  flex: 1;
  margin-bottom: var(--space-6);
}

.testimonial-card blockquote footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-4);
}

.testimonial-card blockquote footer strong {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.testimonial-company {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* =============================================
   CTA STRIP
   ============================================= */

.cta-strip {
  background: var(--color-surface-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.cta-strip-inner {
  text-align: center;
}

.cta-strip h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

.cta-strip p {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  max-width: var(--content-width);
  margin: 0 auto var(--space-8);
}

/* =============================================
   FOOTER
   ============================================= */

.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-12) 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-6);
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  text-decoration: none;
}

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

.footer-social a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.footer-social svg {
  width: 22px;
  height: 22px;
  display: block;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-6);
}

.footer-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
}

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

.footer-nav a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* =============================================
   ACCESSIBILITY UTILITIES
   ============================================= */

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

.form-required-note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* =============================================
   PAGE HERO (inner pages)
   ============================================= */

.page-hero {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-16) 0;
}

.page-hero-eyebrow {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
}

.page-hero h1 {
  font-size: var(--text-3xl);
  max-width: 22ch;
  margin-bottom: var(--space-6);
}

.page-hero p {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  max-width: var(--content-width);
}

@media (min-width: 768px) {
  .page-hero h1 {
    font-size: var(--text-4xl);
  }
}

/* =============================================
   SERVICES DETAIL PAGE
   ============================================= */

.service-detail {
  padding: var(--section-gap) 0;
}

.service-detail:nth-child(even) {
  background: var(--color-surface);
}

.service-detail-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.service-detail-header {
  margin-bottom: var(--space-12);
}

.service-detail-header h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-6);
}

.service-detail-header p {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  max-width: var(--content-width);
  margin-bottom: var(--space-8);
}

.service-detail-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

.service-includes h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-4);
}

.service-includes ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.service-includes li {
  padding-left: var(--space-6);
  position: relative;
  color: var(--color-text-muted);
}

.service-includes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
}

.service-for {
  position: relative;
  background: var(--color-accent-light);
  border: 1.5px solid rgba(26, 78, 216, 0.18);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-sm);
  padding: var(--space-6);
}

.service-for::after {
  content: '';
  position: absolute;
  bottom: -11px;
  left: var(--space-6);
  width: 0;
  height: 0;
  border-top: 10px solid var(--color-accent-light);
  border-right: 10px solid transparent;
}

.service-for h3 {
  font-size: var(--text-base);
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.service-for p {
  color: var(--color-text-muted);
}

@media (max-width: 767px) {
  .service-for::after {
    display: none;
  }
}

@media (min-width: 768px) {
  .service-detail-body {
    grid-template-columns: 1fr 1fr;
  }

  .service-detail-header h2 {
    font-size: var(--text-4xl);
  }
}

/* =============================================
   ABOUT PAGE
   ============================================= */

.about-intro {
  background: var(--color-bg);
}

.about-intro-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.about-photo-placeholder {
  flex-shrink: 0;
  width: 100%;
  max-width: 280px;
}

.about-photo-placeholder img {
  width: 100%;
  height: auto;
  display: block;
}

.about-text h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-6);
}

.about-text p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-details {
  background: var(--color-surface);
}

.about-details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

.about-detail-item h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-3);
}

.about-detail-item p {
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .about-intro-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-16);
  }

  .about-photo-placeholder {
    flex: 0 0 280px;
  }

  .about-text h2 {
    font-size: var(--text-4xl);
  }

  .about-details-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =============================================
   CASE STUDIES PAGE
   ============================================= */

.case-studies-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.case-study-article {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.case-study-cover {
  background: var(--color-surface-alt);
  border-radius: var(--radius-lg);
  width: 100%;
  height: 200px;
}

.case-study-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}

.case-study-tag {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.case-study-sector {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.case-study-article h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

.case-study-article p {
  color: var(--color-text-muted);
  max-width: var(--content-width);
  margin-bottom: var(--space-6);
}

.case-study-results {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.case-study-results li {
  padding-left: var(--space-6);
  position: relative;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.case-study-results li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-success);
}

.case-study-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0;
}

.coming-soon-note {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-12) var(--space-8);
  text-align: center;
}

.coming-soon-note p {
  color: var(--color-text-muted);
  max-width: 40ch;
  margin: var(--space-3) auto 0;
}

@media (min-width: 768px) {
  .case-study-article {
    flex-direction: row;
    gap: var(--space-12);
    align-items: flex-start;
  }

  .case-study-cover {
    flex: 0 0 300px;
    height: 220px;
  }

  .case-study-body {
    flex: 1;
  }
}

/* =============================================
   CONTACT PAGE
   ============================================= */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
}

.contact-form-section h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

.contact-form-section > p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
}

.contact-info h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

.contact-info > p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.contact-info-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.contact-info-item h3 {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.contact-info-item a,
.contact-info-item p {
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--text-base);
}

.contact-info-item a:hover {
  color: var(--color-accent);
}

.booking-card {
  background: var(--color-accent-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  margin-bottom: var(--space-8);
}

.booking-card h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

.booking-card p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
  .contact-layout {
    grid-template-columns: 3fr 2fr;
    gap: var(--space-16);
  }
}

/* =============================================
   CONTACT FORM
   ============================================= */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text);
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  width: 100%;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

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

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a6478' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-12);
}

.form-required {
  color: var(--color-danger);
  margin-left: var(--space-1);
}

.form-submit {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.form-submit .btn-primary {
  width: 100%;
  text-align: center;
}

@media (min-width: 768px) {
  .form-submit .btn-primary {
    width: auto;
    align-self: flex-start;
  }
}

.form-success {
  display: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-success);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}

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

.form-success p {
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

.form-success strong {
  color: var(--color-success);
}

.form-error {
  font-size: var(--text-sm);
  color: var(--color-danger);
  margin-top: var(--space-2);
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.field-error {
  display: none;
  font-size: var(--text-sm);
  color: var(--color-danger);
  margin-top: var(--space-2);
}

.form-group.has-error .field-error {
  display: block;
}

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

.form-group.has-error input:focus,
.form-group.has-error select:focus,
.form-group.has-error textarea:focus {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

/* =============================================
   POLICY PAGE
   ============================================= */

.policy-body {
  max-width: var(--content-width);
}

.policy-body h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
}

.policy-body h2:first-child {
  margin-top: 0;
}

.policy-body h3 {
  font-size: var(--text-lg);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.policy-body p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.policy-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.policy-list li {
  padding-left: var(--space-6);
  position: relative;
}

.policy-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
}

.policy-table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--space-4);
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.policy-table th,
.policy-table td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
}

.policy-table th {
  background: var(--color-surface);
  font-weight: var(--weight-medium);
  color: var(--color-text);
}

.policy-table td {
  color: var(--color-text-muted);
}

/* =============================================
   COOKIE BANNER
   ============================================= */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--color-text);
  border-top: 3px solid var(--color-accent);
  padding: var(--space-6);
}

.cookie-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.cookie-banner p {
  color: #ffffff;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  margin: 0;
}

.cookie-banner a {
  color: var(--color-accent-light);
  text-decoration: underline;
}

.cookie-banner a:hover {
  color: #ffffff;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.btn-secondary-inverted {
  background: transparent;
  color: #ffffff;
  border: 1.5px solid #ffffff;
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary-inverted:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-secondary-inverted:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.cookie-banner.is-hidden {
  display: none;
}

@media (min-width: 768px) {
  .cookie-banner-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
  }

  .cookie-banner p {
    flex: 1;
  }

  .cookie-banner-actions {
    flex-shrink: 0;
  }
}

/* =============================================
   CHAT WIDGET
   ============================================= */

.chat-widget {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-3);
}

.chat-toggle {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(26, 78, 216, 0.3);
}

.chat-toggle:hover {
  background: var(--color-accent-hover);
}

.chat-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.chat-panel {
  display: none;
  flex-direction: column;
  width: 300px;
  height: 420px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(26, 31, 46, 0.12);
}

.chat-panel.is-open {
  display: flex;
}

.chat-panel-header {
  background: var(--color-accent);
  color: #ffffff;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.chat-panel-header h3 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: #ffffff;
  margin: 0;
}

.chat-panel-subtitle {
  font-size: var(--text-xs);
  color: #ffffff;
  opacity: 0.8;
  margin: var(--space-1) 0 0;
}

.chat-close {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: var(--space-1);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  border-radius: var(--radius-sm);
}

.chat-close:hover {
  opacity: 1;
}

.chat-close:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.chat-message {
  max-width: 85%;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  padding: var(--space-3) var(--space-4);
}

.chat-message.assistant {
  align-self: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) var(--radius-sm);
  color: var(--color-text);
}

.chat-message.user {
  align-self: flex-end;
  background: var(--color-accent);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-sm) var(--radius-md);
  color: #ffffff;
}

.chat-message.thinking {
  align-self: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) var(--radius-sm);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  letter-spacing: 0.1em;
}

.chat-prefill-bar {
  display: none;
  padding: var(--space-3) var(--space-4);
  background: var(--color-accent-light);
  border-top: 1px solid rgba(26, 78, 216, 0.15);
  flex-shrink: 0;
}

.chat-prefill-bar.is-visible {
  display: block;
}

.chat-prefill-bar p {
  font-size: var(--text-xs);
  color: var(--color-accent);
  margin: 0 0 var(--space-2);
}

.chat-prefill-btn {
  width: 100%;
  background: var(--color-accent);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
}

.chat-prefill-btn:hover {
  background: var(--color-accent-hover);
}

.chat-prefill-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.chat-input-area {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-bg);
}

.chat-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

.chat-send {
  background: var(--color-accent);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-send:hover {
  background: var(--color-accent-hover);
}

.chat-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.chat-send:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .chat-widget {
    bottom: var(--space-4);
    left: var(--space-4);
    right: var(--space-4);
  }

  .chat-panel {
    width: 100%;
    height: 65vh;
    max-height: 480px;
    min-height: 320px;
  }
}
