/* Loom & Legacy - Custom CSS Design System
   Based on DESIGN.md (Luxury Industrialism & Tactile Minimalism) */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=Hanken+Grotesk:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

/* --- Design Tokens --- */
:root {
  /* Colors */
  --color-background: #fbf9f4;
  --color-surface: #fbf9f4;
  --color-surface-dim: #dbdad5;
  --color-surface-bright: #fbf9f4;
  --color-surface-container-lowest: #ffffff;
  --color-surface-container-low: #f5f3ee;
  --color-surface-container: #f0eee9;
  --color-surface-container-high: #eae8e3;
  --color-surface-container-highest: #e4e2dd;
  
  --color-on-surface: #1b1c19;
  --color-on-surface-variant: #44474d;
  --color-inverse-surface: #30312e;
  --color-inverse-on-surface: #f2f1ec;
  --color-outline: #75777e;
  --color-outline-variant: #c5c6ce;
  
  /* Brand Specific Anchors */
  --color-primary: #0a1d37;       /* Deep Royal Blue */
  --color-on-primary: #ffffff;
  --color-primary-container: #0a1d37;
  --color-on-primary-container: #7586a5;
  
  --color-secondary: #189f95;     /* Industrial Teal */
  --color-on-secondary: #ffffff;
  --color-secondary-container: #81f2e7;
  --color-on-secondary-container: #006f67;
  
  --color-tertiary: #c5a059;      /* Artisan Gold */
  --color-on-tertiary: #ffffff;
  --color-tertiary-container: #291b00;
  --color-on-tertiary-container: #a2803c;
  
  --color-accent: #ff6b35;        /* Warm Orange (Action Alerts) */
  --color-error: #ba1a1a;
  
  /* Typography Settings */
  --font-family-headings: 'Sora', sans-serif;
  --font-family-body: 'Hanken Grotesk', sans-serif;

  /* Spacing */
  --unit: 8px;
  --container-max: 1440px;
  --gutter: 32px;
  --margin-desktop: 80px;
  --margin-mobile: 20px;
  --section-gap: 160px;
  
  /* Borders & Radius */
  --radius-sm: 0.125rem;          /* 2px */
  --radius-default: 0.25rem;     /* 4px (Soft) */
  --radius-md: 0.375rem;          /* 6px */
  --radius-lg: 0.5rem;            /* 8px (Creative Content) */
  --radius-xl: 0.75rem;           /* 12px */
  --radius-full: 9999px;
  
  /* Elevation */
  --shadow-plinth: 0px 20px 40px rgba(0, 0, 0, 0.04);
}

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

html {
  font-family: var(--font-family-body);
  font-size: 16px;
  color: var(--color-on-surface);
  background-color: var(--color-background);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-headings);
  color: var(--color-primary);
  font-weight: 700;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Material Symbols Integration */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* --- Typography Classes --- */
.display-hero {
  font-family: var(--font-family-headings);
  font-size: 84px;
  font-weight: 700;
  line-height: 92px;
  letter-spacing: -0.04em;
}

.headline-lg {
  font-family: var(--font-family-headings);
  font-size: 48px;
  font-weight: 600;
  line-height: 56px;
  letter-spacing: -0.02em;
}

.headline-md {
  font-family: var(--font-family-headings);
  font-size: 32px;
  font-weight: 500;
  line-height: 40px;
  letter-spacing: -0.01em;
}

.body-lg {
  font-family: var(--font-family-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 32px;
  color: var(--color-on-surface-variant);
}

.body-md {
  font-family: var(--font-family-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 28px;
  color: var(--color-on-surface-variant);
}

.label-caps {
  font-family: var(--font-family-body);
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* --- Layout Grid System --- */
.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--margin-desktop);
  padding-right: var(--margin-desktop);
  width: 100%;
}

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

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
  row-gap: var(--gutter);
}

/* Helper layout utilities */
.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.col-span-5 { grid-column: span 5; }
.col-span-6 { grid-column: span 6; }
.col-span-7 { grid-column: span 7; }
.col-span-8 { grid-column: span 8; }
.col-span-9 { grid-column: span 9; }
.col-span-10 { grid-column: span 10; }
.col-span-11 { grid-column: span 11; }
.col-span-12 { grid-column: span 12; }

/* Flex utilities */
.flex-between-center {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- Navigation Header --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: rgba(251, 249, 244, 0.85); /* background/80 */
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(197, 198, 206, 0.3); /* outline-variant/30 */
  transition: background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background-color: var(--color-background);
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.03);
}

.navbar-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 24px var(--margin-desktop);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: padding 0.3s ease;
}

.navbar.scrolled .navbar-container {
  padding: 16px var(--margin-desktop);
}

.logo {
  font-family: var(--font-family-headings);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-menu {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-family: var(--font-family-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-on-surface-variant);
  opacity: 0.8;
  position: relative;
  padding-bottom: 4px;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-primary);
  opacity: 1;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--color-secondary);
  transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-icon-btn {
  background: none;
  border: none;
  color: var(--color-on-surface-variant);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-full);
  transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-icon-btn:hover {
  color: var(--color-primary);
  background-color: rgba(27, 28, 25, 0.05);
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-primary);
}

/* --- Hero Section with Video Background --- */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-primary);
}

.hero-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 1; /* Full opacity */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent; /* No color overlay */
  z-index: 2;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--margin-desktop);
  color: var(--color-on-primary);
}

.hero-tagline {
  color: var(--color-tertiary); /* Gold */
  margin-bottom: 24px;
  opacity: 0.9;
  display: inline-block;
}

.hero-title {
  color: var(--color-on-primary);
  font-size: 84px;
  line-height: 92px;
  max-width: 850px;
  margin-bottom: 48px;
}

.hero-buttons {
  display: flex;
  gap: 20px;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: var(--margin-desktop);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-family: var(--font-family-body);
}

.hero-scroll-line {
  width: 1px;
  height: 48px;
  background-color: rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.hero-scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background-color: var(--color-tertiary);
  animation: scroll-draw 2s infinite ease-in-out;
}

@keyframes scroll-draw {
  0% { transform: translateY(-100%); }
  50% { transform: translateY(100%); }
  100% { transform: translateY(200%); }
}

/* --- Buttons --- */
.btn {
  font-family: var(--font-family-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 18px 36px;
  border-radius: var(--radius-default);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-on-primary);
  border: 1px solid var(--color-primary);
}

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

.btn-primary-white {
  background-color: var(--color-on-primary);
  color: var(--color-primary);
  border: 1px solid var(--color-on-primary);
}

.btn-primary-white:hover {
  background-color: transparent;
  color: var(--color-on-primary);
}

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

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

.btn-secondary-white {
  background-color: transparent;
  color: var(--color-on-primary);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

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

/* Luxury Action Button */
.btn-luxury {
  background: none;
  border: none;
  font-family: var(--font-family-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-primary);
  padding: 8px 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
  transition: gap 0.3s ease;
}

.btn-luxury::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-tertiary);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.btn-luxury:hover {
  gap: 18px;
}

.btn-luxury:hover::after {
  transform: scaleX(1.1);
}

/* --- Card Styles --- */
.plinth-shadow {
  box-shadow: var(--shadow-plinth);
}

.card-industrial {
  background-color: var(--color-surface-container-lowest);
  border: 1px solid rgba(197, 198, 206, 0.3); /* outline-variant/30 */
  border-radius: var(--radius-default);
  padding: 48px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card-industrial:hover {
  transform: translateY(-8px);
  box-shadow: 0px 30px 60px rgba(0, 0, 0, 0.08);
  border-color: var(--color-secondary);
}

.card-icon {
  font-size: 48px;
  color: var(--color-secondary);
  margin-bottom: 32px;
}

.card-title {
  margin-bottom: 16px;
}

.card-bg-icon {
  position: absolute;
  right: -30px;
  bottom: -30px;
  font-size: 200px;
  opacity: 0.03;
  color: var(--color-on-surface);
  transition: transform 0.5s ease;
  pointer-events: none;
}

.card-industrial:hover .card-bg-icon {
  transform: rotate(15deg) scale(1.1);
}

/* --- Inner Page Banners --- */
.page-banner {
  position: relative;
  background-color: var(--color-primary);
  padding-top: 180px;
  padding-bottom: 80px;
  color: var(--color-on-primary);
  overflow: hidden;
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(24, 159, 149, 0.2) 0%, rgba(10, 29, 55, 0.8) 100%);
  z-index: 1;
}

.page-banner-content {
  position: relative;
  z-index: 2;
}

.page-banner-title {
  color: var(--color-on-primary);
  font-size: 56px;
  margin-bottom: 16px;
}

.page-banner-breadcrumbs {
  font-family: var(--font-family-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-on-primary-container);
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-banner-breadcrumbs a {
  color: var(--color-on-primary-container);
}

.page-banner-breadcrumbs a:hover {
  color: var(--color-on-primary);
}

/* --- Components & Interactive Elements --- */

/* Textile Swatch (Zoom component) */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gutter);
}

.swatch-card {
  background-color: var(--color-surface-container-lowest);
  border: 1px solid var(--color-outline-variant);
  padding: 16px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.swatch-image-container {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  border-radius: var(--radius-default);
  margin-bottom: 16px;
}

.swatch-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.swatch-card:hover .swatch-image {
  transform: scale(1.15);
}

.swatch-zoom-indicator {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: rgba(251, 249, 244, 0.9);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 18px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
}

.swatch-card:hover .swatch-zoom-indicator {
  opacity: 1;
  transform: scale(1);
}

.swatch-details {
  padding: 0 4px;
}

.swatch-type {
  color: var(--color-secondary);
  font-size: 11px;
  margin-bottom: 4px;
}

.swatch-name {
  font-size: 18px;
  margin-bottom: 8px;
}

/* Lightbox/Zoom View Modal */
.swatch-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 29, 55, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  padding: 24px;
}

.swatch-modal.active {
  opacity: 1;
  pointer-events: all;
}

.swatch-modal-container {
  display: flex;
  flex-direction: row;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  background-color: var(--color-background);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0px 40px 80px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.swatch-modal.active .swatch-modal-container {
  transform: scale(1);
}

.swatch-modal-image-wrap {
  flex: 1;
  width: 100%;
  min-height: 300px;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0b1525;
}

.swatch-modal-image {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.swatch-modal-info {
  flex: 1;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
}

.swatch-modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: var(--color-on-primary);
  font-size: 32px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.swatch-modal-close:hover {
  transform: rotate(90deg);
}

/* Timeline Stepper */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--color-surface-container-highest);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 100%;
  margin-bottom: 80px;
  display: flex;
  justify-content: flex-end;
}

.timeline-item:nth-child(even) {
  justify-content: flex-start;
}

.timeline-badge {
  position: absolute;
  left: 50%;
  top: 20px;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background-color: var(--color-background);
  border: 4px solid var(--color-tertiary); /* Gold outline */
  transform: translateX(-50%);
  z-index: 5;
  transition: background-color 0.3s ease;
}

.timeline-item:hover .timeline-badge {
  background-color: var(--color-secondary);
}

.timeline-content {
  width: 45%;
  background-color: var(--color-surface-container-lowest);
  border: 1px solid var(--color-outline-variant);
  border-radius: var(--radius-default);
  padding: 32px;
  position: relative;
  box-shadow: var(--shadow-plinth);
}

.timeline-year {
  font-family: var(--font-family-headings);
  font-size: 40px;
  color: var(--color-outline-variant);
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1;
}

.timeline-item:hover .timeline-year {
  color: var(--color-primary);
}

/* Metric Tiles */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
}

.metric-tile {
  background-color: var(--color-surface-container-low);
  padding: 40px 32px;
  border-radius: var(--radius-default);
  border-left: 4px solid var(--color-secondary);
  transition: all 0.3s ease;
}

.metric-tile:hover {
  background-color: var(--color-surface-container-lowest);
  box-shadow: var(--shadow-plinth);
}

.metric-number {
  font-family: var(--font-family-headings);
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.metric-label {
  font-family: var(--font-family-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-on-surface-variant);
}

/* --- Product Pages --- */
.collections-tabs {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.tab-btn {
  font-family: var(--font-family-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 24px;
  border: 1px solid var(--color-outline-variant);
  background: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover, .tab-btn.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-on-primary);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--gutter);
}

.product-card {
  background-color: var(--color-surface-container-lowest);
  border: 1px solid rgba(197, 198, 206, 0.3);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-plinth);
  display: flex;
  flex-direction: column;
}

.product-image-box {
  height: 350px;
  overflow: hidden;
  position: relative;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.product-card:hover .product-image {
  transform: scale(1.08);
}

.product-info {
  padding: 32px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  color: var(--color-secondary);
  margin-bottom: 8px;
}

.product-title {
  margin-bottom: 16px;
}

.product-desc {
  margin-bottom: 24px;
  flex-grow: 1;
}

/* Specs Table */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.specs-table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-surface-container);
  font-size: 14px;
}

.specs-table td:first-child {
  font-weight: 700;
  color: var(--color-primary);
  width: 40%;
}

.specs-table td:last-child {
  color: var(--color-on-surface-variant);
  text-align: right;
}

/* --- Sustainability Credentials --- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
}

.cert-card {
  background-color: var(--color-surface-container-lowest);
  border: 1px solid rgba(197, 198, 206, 0.3);
  border-radius: var(--radius-default);
  padding: 40px 24px;
  text-align: center;
  box-shadow: var(--shadow-plinth);
  transition: all 0.3s ease;
}

.cert-card:hover {
  border-color: var(--color-secondary);
  transform: translateY(-4px);
}

.cert-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  margin: 0 auto 24px;
  transition: transform 0.3s ease;
  filter: grayscale(1);
}

.cert-card:hover .cert-logo {
  filter: grayscale(0);
  transform: scale(1.05);
}

.cert-title {
  font-size: 16px;
  margin-bottom: 8px;
}

.cert-desc {
  font-size: 14px;
  color: var(--color-on-surface-variant);
}

/* --- Forms & Controls --- */
.form-card {
  background-color: var(--color-surface-container-lowest);
  border: 1px solid rgba(197, 198, 206, 0.3);
  border-radius: var(--radius-default);
  padding: 48px;
  box-shadow: var(--shadow-plinth);
}

.form-group {
  margin-bottom: 32px;
  position: relative;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--color-on-surface-variant);
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background-color: transparent;
  border: none;
  border-bottom: 2px solid var(--color-outline-variant);
  padding: 12px 0;
  font-family: var(--font-family-body);
  font-size: 16px;
  color: var(--color-on-surface);
  transition: border-color 0.3s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--color-secondary);
}

.form-textarea {
  resize: vertical;
}

/* --- Footer --- */
.footer {
  background-color: var(--color-primary);
  color: var(--color-on-primary);
  padding-top: var(--section-gap);
  padding-bottom: 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-logo {
  color: var(--color-on-primary);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.footer-desc {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 32px;
  max-width: 300px;
}

.footer-title {
  color: var(--color-tertiary);
  margin-bottom: 32px;
  position: relative;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 16px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
}

.footer-links a:hover {
  color: var(--color-on-primary);
  padding-left: 6px;
}

.footer-bottom {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-copy {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.footer-socials {
  display: flex;
  gap: 24px;
}

.footer-social-link {
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.footer-social-link:hover {
  color: var(--color-secondary);
}

/* Portfolio download strip at the very bottom */
.portfolio-download-bar {
  background-color: var(--color-tertiary);
  color: var(--color-primary);
  padding: 24px 0;
  text-align: center;
  position: relative;
  z-index: 10;
}

.portfolio-download-bar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--margin-desktop);
  flex-wrap: wrap;
  gap: 16px;
}

.portfolio-text {
  font-family: var(--font-family-headings);
  font-weight: 600;
  font-size: 18px;
}

.portfolio-btn {
  background-color: var(--color-primary);
  color: var(--color-on-primary);
  padding: 12px 24px;
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 700;
  border-radius: var(--radius-default);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.portfolio-btn:hover {
  background-color: #1a2f4c;
  transform: translateY(-2px);
}

/* --- Responsive Adaptations --- */

/* Tablet Rules */
@media (max-width: 1024px) {
  :root {
    --margin-desktop: 40px;
    --section-gap: 100px;
  }
  
  .display-hero {
    font-size: 56px;
    line-height: 64px;
  }
  
  .hero-title {
    font-size: 56px;
    line-height: 64px;
    max-width: 600px;
  }
  
  .col-span-1, .col-span-2, .col-span-3, .col-span-4, .col-span-5, .col-span-6, .col-span-7, .col-span-8, .col-span-9, .col-span-10, .col-span-11 {
    grid-column: span 12;
  }
  
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-item {
    justify-content: flex-end;
  }
  
  .timeline-badge {
    left: 20px;
  }
  
  .timeline-content {
    width: calc(100% - 60px);
    margin-left: 60px;
  }
  
  .swatch-modal-container {
    flex-direction: column;
    overflow-y: auto;
  }
  
  .swatch-modal-image-wrap {
    max-height: 50vh;
    min-height: 250px;
  }
  
  .swatch-modal-image {
    max-height: 50vh;
  }
  
  .swatch-modal-info {
    padding: 32px;
  }
}

/* Mobile Rules */
@media (max-width: 768px) {
  :root {
    --margin-desktop: 20px;
    --section-gap: 80px;
  }
  
  .navbar-container {
    padding: 16px var(--margin-desktop);
  }
  
  .nav-menu {
    position: fixed;
    top: 76px;
    left: 0;
    width: 100%;
    background-color: var(--color-background);
    flex-direction: column;
    padding: 32px var(--margin-desktop);
    gap: 24px;
    border-bottom: 1px solid var(--color-outline-variant);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  }
  
  .nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .nav-actions {
    display: none; /* Hide for simplicity on mobile, or move inside menu */
  }
  
  .display-hero {
    font-size: 40px;
    line-height: 48px;
  }
  
  .hero-title {
    font-size: 40px;
    line-height: 48px;
    margin-bottom: 32px;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 16px;
  }
  
  .btn {
    width: 100%;
  }
  
  .col-span-1, .col-span-2, .col-span-3, .col-span-4, .col-span-5, .col-span-6, .col-span-7, .col-span-8, .col-span-9, .col-span-10, .col-span-11, .col-span-12 {
    grid-column: span 12;
  }
  
  .metrics-grid, .cert-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .form-card {
    padding: 24px 16px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .portfolio-download-bar-container {
    flex-direction: column;
    text-align: center;
  }
  
  .portfolio-btn {
    width: 100%;
  }
}

/* --- Slide Viewer Component --- */
.slides-viewer {
  position: relative;
  background-color: #0b1525;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-plinth);
  margin-top: 40px;
}

.slides-viewport {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 3508 / 2480; /* A4 aspect ratio */
  display: flex;
}

.slides-container {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-item {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.slide-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.slide-img:hover {
  transform: scale(1.02);
}

.slide-control-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(251, 249, 244, 0.9);
  color: var(--color-primary);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: var(--shadow-plinth);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.slide-control-btn:hover {
  background-color: var(--color-primary);
  color: var(--color-on-primary);
}

.slide-prev { left: 24px; }
.slide-next { right: 24px; }

.slide-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(10, 29, 55, 0.7);
  color: #fff;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 14px;
  z-index: 10;
}

/* Vertical Spacing Helper */
.space-y-8 > * + * {
  margin-top: 24px;
}
