/* 
  Rowan Knots Style Sheet
  Designed for utility, legibility, and technical precision.
  Follows a modern, responsive slate-blue color palette.
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@300;400;500;600;700&display=swap');

/* CSS Custom Properties & Design Tokens */
:root {
  /* Colors - Light Theme */
  --bg-color: #F7F9FA;
  --bg-card: #FFFFFF;
  --text-color: #2C3A3F;
  --text-muted: #5F747D;
  --primary-color: #3F6C7E;
  --primary-hover: #2E505E;
  --accent-color: #D4AF37;
  --accent-hover: #B49226;
  --border-color: #D9E2E5;
  --shadow-sm: 0 1px 3px rgba(44, 58, 63, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(44, 58, 63, 0.08), 0 2px 4px -1px rgba(44, 58, 63, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(44, 58, 63, 0.1), 0 4px 6px -2px rgba(44, 58, 63, 0.05);

  /* Hero weave stroke colour */
  --hero-weave: rgba(63, 108, 126, 0.07);

  /* Pattern band surface. Sits a step darker than both the page and the card
     colour so cards resting on a band keep a visible edge. */
  --band-bg: #EDF2F4;
  --band-weave: rgba(63, 108, 126, 0.10);
  --band-card-border: #C8D6DB;

  /* Typography */
  --font-headings: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Layout */
  --max-width: 1100px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --bg-color: #121A1E;
  --bg-card: #182226;
  --text-color: #E2E8F0;
  --text-muted: #8E9EA5;
  --primary-color: #55879B;
  --primary-hover: #6CA1B7;
  --border-color: #25333B;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --hero-weave: rgba(133, 176, 194, 0.06);
  --band-bg: #0D1417;
  --band-weave: rgba(133, 176, 194, 0.09);
  --band-card-border: #2E3F48;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Headings */
h1, h2, h3, h4 {
  font-family: var(--font-headings);
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.25;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.875rem;
  letter-spacing: -0.01em;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-top: 2.5rem;
}

h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
}

p {
  margin-bottom: 1.25rem;
  font-weight: 400;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Layout Utilities */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  border: none;
  padding: 0;
  margin: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.text-center {
  text-align: center;
}

.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }

/* Header & Navigation */
header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none !important;
}

.logo-svg {
  height: 40px;
  width: auto;
}

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

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* Nav Dropdown ("More" submenu)
   Keeps the top-level bar short by parking secondary pages one level down.
   Opens on hover and on keyboard focus; JS toggles .open for touch/click. */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.5rem 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.nav-dropdown-toggle svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  transition: transform var(--transition-fast);
}

.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown.open .nav-dropdown-toggle,
.nav-dropdown-toggle:focus-visible,
.nav-dropdown-toggle.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.nav-dropdown:hover .nav-dropdown-toggle svg,
.nav-dropdown.open .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  min-width: 180px;
  list-style: none;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition-fast), visibility var(--transition-fast), transform var(--transition-fast);
}

/* A transparent bridge across the gap keeps hover alive while the pointer
   travels from the toggle down to the menu. */
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -0.75rem;
  left: 0;
  right: 0;
  height: 0.75rem;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu li {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  border-bottom: none;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  background-color: var(--bg-color);
  color: var(--primary-color);
  border-bottom: none;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.theme-toggle-btn:hover {
  background-color: var(--bg-color);
  border-color: var(--primary-color);
}

.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.theme-toggle-btn .sun-icon { display: none; }
.theme-toggle-btn .moon-icon { display: block; }

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

/* Mobile Menu Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-headings);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
}

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

.btn-primary {
  background-color: var(--primary-color);
  color: #FFFFFF !important;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  text-decoration: none;
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-color) !important;
}

.btn-secondary:hover {
  background-color: var(--bg-card);
  border-color: var(--primary-color);
  text-decoration: none;
}

.btn-accent {
  background-color: var(--accent-color);
  color: #121A1E !important;
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  text-decoration: none;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* Card Component */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-normal), border-color var(--transition-normal);
}

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

.card-img-wrapper {
  margin: -2rem -2rem 1.5rem -2rem;
  aspect-ratio: 4/3;
  overflow: hidden;
  background-color: #E2E8F0;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

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

/* Placeholders (Missing photographic assets) */
.img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e4ebed 25%, #d1dee2 25%, #d1dee2 50%, #e4ebed 50%, #e4ebed 75%, #d1dee2 75%, #d1dee2 100%);
  background-size: 40px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #5F747D;
  font-family: var(--font-headings);
  font-weight: 500;
  padding: 2rem;
  text-align: center;
}

[data-theme="dark"] .img-placeholder {
  background: linear-gradient(135deg, #1b262b 25%, #223036 25%, #223036 50%, #1b262b 50%, #1b262b 75%, #223036 75%, #223036 100%);
  background-size: 40px 40px;
  color: #8E9EA5;
}

.img-placeholder svg {
  width: 32px;
  height: 32px;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

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

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-color);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-color);
  font-family: var(--font-body);
  font-size: 1rem;
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(63, 108, 126, 0.15);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6C7E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.2em;
  padding-right: 2.5rem;
}

/* Accordion FAQs using details/summary */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item summary {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-headings);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6C7E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform var(--transition-fast);
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-item[open] {
  border-color: var(--primary-color);
}

.faq-content {
  padding: 0 1.5rem 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
  animation: slideDown var(--transition-normal);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Background Pattern
   A full-bleed band sitting behind the top section of each page.
   Layers a soft primary-tinted glow over a woven rope lattice, then
   fades out at the bottom so it blends into the page background. */
.hero-bg {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--bg-card);
  background-image:
    /* warm accent glow, upper right */
    radial-gradient(ellipse 60% 70% at 85% 10%, rgba(212, 175, 55, 0.10), transparent 70%),
    /* primary glow, upper left */
    radial-gradient(ellipse 70% 80% at 10% 0%, rgba(63, 108, 126, 0.14), transparent 70%),
    /* rope lattice: two opposing diagonals form the weave */
    repeating-linear-gradient(45deg, var(--hero-weave) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(-45deg, var(--hero-weave) 0 1px, transparent 1px 14px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  border-bottom: 1px solid transparent;
  pointer-events: none;
}

[data-theme="dark"] .hero-bg::before {
  background-image:
    radial-gradient(ellipse 60% 70% at 85% 10%, rgba(212, 175, 55, 0.07), transparent 70%),
    radial-gradient(ellipse 70% 80% at 10% 0%, rgba(85, 135, 155, 0.18), transparent 70%),
    repeating-linear-gradient(45deg, var(--hero-weave) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(-45deg, var(--hero-weave) 0 1px, transparent 1px 14px);
}

/* Hero content sits above the pattern layer */
.hero-bg > * {
  position: relative;
}

/* The band already carries generous padding, so trim the top padding of the
   content section that immediately follows it. */
.hero-bg + .container.section,
.hero-bg + .section {
  padding-top: 1.5rem;
}

/* Alternating Pattern Bands
   Full-bleed tinted sections that reuse the hero's woven rope lattice so the
   contrast between sections reads as part of the same system. Unlike .hero-bg
   the weave runs edge to edge instead of fading out, because these bands sit
   between two content sections rather than under a page title. */
.section-alt {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--band-bg);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-alt::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    /* primary glow, upper left */
    radial-gradient(ellipse 70% 90% at 5% 0%, rgba(63, 108, 126, 0.10), transparent 70%),
    /* warm accent glow, lower right */
    radial-gradient(ellipse 60% 80% at 95% 100%, rgba(212, 175, 55, 0.08), transparent 70%),
    /* rope lattice: two opposing diagonals form the weave */
    repeating-linear-gradient(45deg, var(--band-weave) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(-45deg, var(--band-weave) 0 1px, transparent 1px 14px);
  pointer-events: none;
}

[data-theme="dark"] .section-alt::before {
  background-image:
    radial-gradient(ellipse 70% 90% at 5% 0%, rgba(85, 135, 155, 0.16), transparent 70%),
    radial-gradient(ellipse 60% 80% at 95% 100%, rgba(212, 175, 55, 0.06), transparent 70%),
    repeating-linear-gradient(45deg, var(--band-weave) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(-45deg, var(--band-weave) 0 1px, transparent 1px 14px);
}

/* Mirrored variant. Flips the glows to the opposite corners so two bands on the
   same page read as a pair rather than a repeat. */
.section-alt-mirror::before {
  background-image:
    radial-gradient(ellipse 70% 90% at 95% 0%, rgba(63, 108, 126, 0.10), transparent 70%),
    radial-gradient(ellipse 60% 80% at 5% 100%, rgba(212, 175, 55, 0.08), transparent 70%),
    repeating-linear-gradient(45deg, var(--band-weave) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(-45deg, var(--band-weave) 0 1px, transparent 1px 14px);
}

[data-theme="dark"] .section-alt-mirror::before {
  background-image:
    radial-gradient(ellipse 70% 90% at 95% 0%, rgba(85, 135, 155, 0.16), transparent 70%),
    radial-gradient(ellipse 60% 80% at 5% 100%, rgba(212, 175, 55, 0.06), transparent 70%),
    repeating-linear-gradient(45deg, var(--band-weave) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(-45deg, var(--band-weave) 0 1px, transparent 1px 14px);
}

/* Band content sits above the pattern layer */
.section-alt > * {
  position: relative;
}

/* Cards inside a band sit on the card colour as usual; the band tint behind them
   is what separates them, so they only need a slightly firmer border to keep
   their edges from dissolving into the weave. */
.section-alt .card,
.section-alt .testimonial-card,
.section-alt .faq-item,
.section-alt .banner {
  background-color: var(--bg-card);
  border-color: var(--band-card-border);
}

/* Home-Specific Hero Grid Layout */
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-img-wrapper {
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16/9;
  border: 1px solid var(--border-color);
}

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

/* Banner Sections */
.banner {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 3rem 2rem;
  border-radius: var(--radius-sm);
  text-align: center;
  box-shadow: var(--shadow-sm);
  margin-top: 3rem;
}

.banner h3 {
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
}

/* Newsletter Bar */
.newsletter-card {
  max-width: 600px;
  margin: 0 auto;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.newsletter-form input {
  flex: 1;
}

/* Testimonial Block */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.testimonial-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  font-style: italic;
}

.testimonial-card p {
  margin-bottom: 1rem;
}

.testimonial-author {
  font-family: var(--font-headings);
  font-style: normal;
  font-weight: 600;
  color: var(--primary-color);
  display: block;
}

/* Alert Boxes (GitHub style) */
.alert {
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--primary-color);
  background-color: var(--bg-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1.5rem;
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.alert-warning {
  border-left-color: var(--accent-color);
}

.alert-title {
  font-family: var(--font-headings);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* Style Guide Specific Blocks */
.color-swatch {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.color-swatch-display {
  height: 80px;
}

.color-swatch-info {
  padding: 0.75rem 0.5rem;
  background-color: var(--bg-card);
}

.color-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.color-hex {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Back to Top with Scroll Progress */
.back-to-top {
  position: fixed;
  bottom: 2.5rem;
  right: 2.5rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition-normal), visibility var(--transition-normal), transform var(--transition-normal), background-color var(--transition-fast), border-color var(--transition-fast);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.back-to-top svg.progress-ring {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 46px;
  height: 46px;
  transform: rotate(-90deg);
}

.back-to-top svg.progress-ring circle {
  fill: none;
  stroke: var(--primary-color);
  stroke-width: 2.5;
  stroke-dasharray: 138.23; /* 2 * PI * r = 2 * 3.14159 * 22 = 138.23 */
  stroke-dashoffset: 138.23;
  transition: stroke-dashoffset 0.05s linear;
}

.back-to-top .arrow-icon {
  width: 18px;
  height: 18px;
  stroke: var(--text-color);
  fill: none;
  z-index: 2;
}

/* Footer styling
   No top margin: the last section on every page already ends with its own
   padding, and the footer's border plus 4rem of top padding separate it. An
   extra margin here just stacked into a band of dead space. */
footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 1rem;
  color: var(--text-color);
  margin-bottom: 1.25rem;
  font-family: var(--font-headings);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-col ul li a:hover {
  color: var(--primary-color);
}

.footer-social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.social-link:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
  background-color: var(--bg-color);
}

.social-link svg {
  width: 18px;
  height: 18px;
}

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

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

.footer-legal-links a {
  color: var(--text-muted);
}

.footer-legal-links a:hover {
  color: var(--primary-color);
}

/* Success Modal Notification */
.notification {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  background-color: var(--primary-color);
  color: #FFFFFF;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-headings);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(100px);
  opacity: 0;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
  z-index: 1000;
}

.notification.active {
  transform: translateY(0);
  opacity: 1;
}

.notification svg {
  width: 20px;
  height: 20px;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-img-wrapper {
    order: -1;
  }

  .mobile-nav-toggle {
    display: block;
  }

  nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-color);
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem;
    gap: 2.5rem;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    z-index: 90;
    border-top: 1px solid var(--border-color);
  }

  nav.open {
    transform: translateX(0);
  }

  .nav-links {
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    align-items: center;
  }

  .nav-links a {
    font-size: 1.25rem;
  }

  /* In the mobile drawer there is room to show the submenu inline, so drop the
     floating panel and render it as an indented group under its heading. */
  .nav-dropdown {
    width: 100%;
    text-align: center;
  }

  .nav-dropdown-toggle {
    font-size: 1.25rem;
    justify-content: center;
    width: 100%;
    cursor: default;
  }

  .nav-dropdown-toggle svg {
    display: none;
  }

  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    background: none;
    border: none;
    box-shadow: none;
    padding: 1rem 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .nav-dropdown-menu::before {
    display: none;
  }

  .nav-dropdown-menu a {
    padding: 0;
    font-size: 1.05rem;
    color: var(--text-muted);
  }

  .nav-dropdown-menu a:hover,
  .nav-dropdown-menu a.active {
    background: none;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-legal-links {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
  
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
  }
}
/* ==========================================================================
   Demo banner — portfolio layer, not part of the mockup's own design.
   Sticks above the site header so the demo context stays visible on scroll.
   ========================================================================== */
.demo-banner {
  position: sticky;
  top: 0;
  z-index: 200; /* above the site header (z-index 100) */
  background: #1F2937;
  color: #F9FAFB;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.875rem;
  line-height: 1.4;
  border-bottom: 1px solid rgba(249, 250, 251, 0.15);
}
.demo-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.625rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.875rem;
  text-align: center;
}
.demo-banner__label {
  flex-shrink: 0;
  background: #F9FAFB;
  color: #1F2937;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.1875rem 0.5rem;
  border-radius: 0.25rem;
}
.demo-banner__text { color: #E5E7EB; }
.demo-banner__cta {
  flex-shrink: 0;
  color: #FFFFFF;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  border-radius: 0.25rem;
}
.demo-banner__cta:hover { color: #FCD34D; }
.demo-banner__cta:focus-visible {
  outline: 2px solid #FCD34D;
  outline-offset: 2px;
}
/* Site header sticks below the banner rather than under it */
.demo-banner ~ header { top: var(--demo-banner-h, 2.75rem); }

/* Long/short copy pairs: full sentence on desktop, terse on mobile. */
.demo-banner__short,
.demo-banner__cta-short { display: none; }

@media (max-width: 640px) {
  .demo-banner__inner {
    padding: 0.375rem 0.75rem;
    gap: 0.375rem;
    font-size: 0.75rem;
    flex-wrap: nowrap;       /* stay on one line */
    justify-content: space-between;
  }
  .demo-banner__label {
    font-size: 0.5625rem;
    padding: 0.125rem 0.375rem;
  }
  .demo-banner__text {
    min-width: 0;            /* allow ellipsis inside a flex item */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .demo-banner__long,
  .demo-banner__cta-long { display: none; }
  .demo-banner__short,
  .demo-banner__cta-short { display: inline; }
  .demo-banner__cta { font-size: 0.75rem; }
}

/* Very narrow phones: the label alone carries the "demo" signal. */
@media (max-width: 380px) {
  .demo-banner__text { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .demo-banner__cta { transition: color 0.2s ease; }
}
