/* =========================================================
   Advertising Architect — Design System
   Pure HTML/CSS/JS website
   ========================================================= */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Source+Sans+3:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* CSS Variables */
:root {
  /* Colors */
  --background: #fafaf9;
  --foreground: #44403c;
  --card: #ffffff;
  --card-foreground: #44403c;
  --muted: #d6d3d1;
  --muted-foreground: #78716c;
  --primary: #44403c;
  --primary-foreground: #fafaf9;
  --accent: #78716c;
  --accent-foreground: #fafaf9;
  --border: #d6d3d1;
  --ring: #a8a29e;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(68 64 60 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(68 64 60 / 0.07), 0 2px 4px -2px rgb(68 64 60 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(68 64 60 / 0.08), 0 4px 6px -4px rgb(68 64 60 / 0.08);

  /* Container */
  --container-max: 1200px;
  --container-narrow: 760px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--foreground);
  background-color: var(--background);
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--foreground);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: var(--space-4);
}

.lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  font-weight: 300;
}

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

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

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.container-narrow {
  max-width: var(--container-narrow);
}

/* Section */
.section {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
}

.section-muted {
  background-color: #f5f5f4;
}

.section-header {
  max-width: 640px;
  margin-bottom: var(--space-12);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  margin-bottom: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(250, 250, 249, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.logo-mark {
  width: 40px;
  height: 40px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1;
}

.logo-text span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-top: 0.15rem;
}

/* Navigation */
.main-nav {
  display: none;
}

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

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--foreground);
  position: relative;
  padding: var(--space-2) 0;
  transition: color 0.2s ease;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: var(--accent);
  transition: width 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent);
}

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

.main-nav a.btn-primary,
.main-nav a.btn-secondary {
  color: var(--primary-foreground);
}

.main-nav a.btn-secondary {
  color: var(--foreground);
}

.main-nav a.btn-primary::after,
.main-nav a.btn-secondary::after {
  display: none;
}

/* Mobile menu toggle */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  z-index: 110;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background-color: var(--foreground);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: 80px 0 0 0;
  background-color: var(--background);
  padding: var(--space-8) var(--space-6);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 105;
}

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

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--foreground);
  display: block;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}

.mobile-nav a.active {
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: #292524;
  box-shadow: var(--shadow-md);
}

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

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

.btn-accent {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.btn-accent:hover {
  background-color: #57534e;
}

/* Hero */
.hero {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 45%;
  height: 80%;
  background: radial-gradient(circle at 70% 30%, rgba(168, 162, 158, 0.12), transparent 60%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  gap: var(--space-12);
  align-items: center;
}

.hero-content {
  max-width: 640px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-5);
}

.hero-eyebrow::before {
  content: '';
  width: 24px;
  height: 1.5px;
  background-color: var(--accent);
}

.hero h1 {
  margin-bottom: var(--space-6);
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: var(--space-2);
}

.hero-visual {
  position: relative;
  display: none;
}

.hero-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #e7e5e4 0%, #d6d3d1 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-image svg {
  width: 60%;
  height: 60%;
  opacity: 0.4;
}

/* Cards */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-icon {
  width: 48px;
  height: 48px;
  background-color: #f5f5f4;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  color: var(--accent);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  margin-bottom: var(--space-3);
}

.card p {
  margin-bottom: 0;
  color: var(--muted-foreground);
  font-size: 0.975rem;
}

/* Grid layouts */
.grid-2 {
  display: grid;
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  gap: var(--space-6);
}

.grid-4 {
  display: grid;
  gap: var(--space-6);
}

/* Services section */
.services-grid {
  display: grid;
  gap: var(--space-6);
}

/* About page */
.about-intro {
  display: grid;
  gap: var(--space-12);
  align-items: center;
}

.values-list {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.value-item {
  display: flex;
  gap: var(--space-4);
}

.value-number {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.value-content h4 {
  margin-bottom: var(--space-2);
}

.value-content p {
  margin-bottom: 0;
  color: var(--muted-foreground);
  font-size: 0.975rem;
}

/* Page banner */
.page-banner {
  padding-top: var(--space-20);
  padding-bottom: var(--space-16);
  background: linear-gradient(180deg, #f5f5f4 0%, var(--background) 100%);
  border-bottom: 1px solid var(--border);
}

.page-banner h1 {
  margin-bottom: var(--space-4);
}

.page-banner p {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--muted-foreground);
}

/* Process / timeline */
.process-list {
  display: grid;
  gap: var(--space-8);
  margin-top: var(--space-10);
}

.process-item {
  display: flex;
  gap: var(--space-5);
}

.process-step {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--primary-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.process-content h4 {
  margin-bottom: var(--space-2);
}

.process-content p {
  margin-bottom: 0;
  color: var(--muted-foreground);
}

/* Policy / document pages */
.document-content {
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.document-section {
  margin-bottom: var(--space-10);
}

.document-section h2 {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}

.document-section h3 {
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

.document-section ul {
  list-style: disc;
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.document-section li {
  margin-bottom: var(--space-2);
  color: var(--muted-foreground);
}

.document-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
}

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

.document-table th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--foreground);
  background-color: #f5f5f4;
}

.document-table td {
  color: var(--muted-foreground);
}

.print-button {
  margin-bottom: var(--space-8);
}

/* Contact page */
.contact-grid {
  display: grid;
  gap: var(--space-12);
}

.contact-info-card {
  background-color: #f5f5f4;
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

.contact-info-item {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.contact-info-item:last-child {
  margin-bottom: 0;
}

.contact-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background-color: var(--background);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.contact-icon svg {
  width: 22px;
  height: 22px;
}

.contact-detail h4 {
  margin-bottom: var(--space-1);
}

.contact-detail p {
  margin-bottom: 0;
  color: var(--muted-foreground);
  font-size: 0.95rem;
}

/* Form */
.form-group {
  margin-bottom: var(--space-5);
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--foreground);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--foreground);
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.form-group input.error,
.form-group textarea.error {
  border-color: #dc2626;
}

.error-message {
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: var(--space-2);
}

.form-status {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  margin-top: var(--space-5);
  display: none;
}

.form-status.success {
  display: block;
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.form-status.error {
  display: block;
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Careers */
.job-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.job-meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

/* CTA section */
.cta-section {
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
  text-align: center;
}

.cta-section h2 {
  color: var(--primary-foreground);
  margin-bottom: var(--space-4);
}

.cta-section p {
  color: rgba(250, 250, 249, 0.75);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-8);
}

.cta-section .btn-secondary {
  color: var(--primary-foreground);
  border-color: rgba(250, 250, 249, 0.3);
}

.cta-section .btn-secondary:hover {
  background-color: rgba(250, 250, 249, 0.1);
}

/* Footer */
.site-footer {
  background-color: #292524;
  color: #d6d3d1;
  padding-top: var(--space-16);
  padding-bottom: var(--space-8);
}

.footer-grid {
  display: grid;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

.footer-brand .logo-text {
  color: #fafaf9;
  margin-bottom: var(--space-4);
}

.footer-brand p {
  color: #a8a29e;
  font-size: 0.95rem;
  margin-bottom: 0;
}

.footer-links h4 {
  color: #fafaf9;
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-5);
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  color: #a8a29e;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fafaf9;
}

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid rgba(250, 250, 249, 0.1);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-align: center;
}

.footer-bottom p {
  color: #78716c;
  font-size: 0.875rem;
  margin-bottom: 0;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

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

  .menu-toggle {
    display: none;
  }

  .mobile-nav {
    display: none;
  }

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

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-inner {
    grid-template-columns: 1fr 1fr;
  }

  .hero-visual {
    display: block;
  }

  .about-intro {
    grid-template-columns: 1fr 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

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

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

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

  .values-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Print styles for policy pages */
@media print {
  .site-header,
  .site-footer,
  .menu-toggle,
  .print-button,
  .hero-actions,
  .cta-section {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  .section {
    padding: 1rem 0;
  }

  .document-section {
    page-break-inside: avoid;
  }
}
