/* ==========================================================================
   Ursus Moon — Main Stylesheet
   ========================================================================== */

/* --- Custom Properties --- */
:root {
  --color-text: #1a1a2e;
  --color-accent: #1a7a6d;
  --color-accent-hover: #145f55;
  --color-bg: #fafaf8;
  --color-bg-alt: #f0efed;
  --color-muted: #6b6b7b;
  --color-border: #e0e0dc;
  --color-white: #ffffff;

  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-base: 18px;
  --line-height-base: 1.6;
  --letter-spacing-heading: -0.02em;

  --max-width: 1140px;
  --section-padding: 100px;
  --section-padding-mobile: 60px;
  --content-padding: 40px;
  --content-padding-mobile: 24px;

  --header-height: 80px;
}

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

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-weight: 400;
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

ul,
ol {
  list-style: none;
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 1000;
  padding: 8px 16px;
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: 0 0 4px 4px;
  font-size: 0.875rem;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  color: var(--color-white);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: var(--letter-spacing-heading);
  line-height: 1.2;
  color: var(--color-text);
}

h1 {
  font-size: 3rem;
  font-weight: 700;
}

h2 {
  font-size: 2.25rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.125rem;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

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

.text-large {
  font-size: 1.25rem;
  line-height: 1.7;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

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

.section--alt {
  background-color: var(--color-bg-alt);
}

.section--dark {
  background-color: var(--color-text);
  color: var(--color-white);
}

.section--dark h2,
.section--dark h3,
.section--dark p {
  color: var(--color-white);
}

.section--dark .text-muted {
  color: #a0a0b0;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-logo svg,
.site-logo img {
  height: 44px;
  width: auto;
}

/* --- Navigation --- */
.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav-list a {
  color: var(--color-text);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 8px 0;
  position: relative;
  transition: color 0.2s ease;
}

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

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

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

/* Nav CTA button overrides */
.nav-list .btn {
  color: var(--color-white);
  padding: 10px 24px;
}

.nav-list .btn::after {
  display: none;
}

.nav-list .btn:hover {
  color: var(--color-white);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 200;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 6px auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

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

.btn--secondary {
  background-color: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

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

.btn--large {
  padding: 18px 40px;
  font-size: 1.0625rem;
}

.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Decorative Shapes --- */
.decor {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.decor--circle {
  border-radius: 50%;
  opacity: 0.07;
}

.decor--ring {
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  opacity: 0.12;
}

.decor--arc {
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  opacity: 0.1;
}

.decor--dots {
  opacity: 0.08;
}

/* --- Hero --- */
.hero {
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 720px;
  margin-bottom: 24px;
}

.hero .subheadline {
  max-width: 640px;
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--color-muted);
  margin-bottom: 40px;
}

/* Hero decorative elements */
.hero .decor--circle-lg {
  width: 500px;
  height: 500px;
  background: var(--color-accent);
  top: -180px;
  right: -120px;
}

.hero .decor--ring-sm {
  width: 80px;
  height: 80px;
  bottom: 60px;
  right: 15%;
}

.hero .decor--ring-md {
  width: 180px;
  height: 180px;
  top: 20px;
  right: 8%;
  opacity: 0.06;
  border-width: 3px;
}

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 36px;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.card__icon {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 122, 109, 0.08);
  border-radius: 12px;
}

.card__icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin-bottom: 12px;
}

.card p {
  color: var(--color-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* --- Credibility Logos --- */
.logo-bar {
  padding: 60px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.logo-bar .container {
  text-align: center;
}

.logo-bar p {
  font-size: 0.875rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-bottom: 32px;
}

.logo-bar__logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
}

.logo-bar__logos svg {
  height: 28px;
  width: auto;
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

.logo-bar__logos svg:hover {
  opacity: 0.7;
}

.logo-text {
  display: inline-block;
  font-family: var(--font-family);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #999;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.logo-text:hover {
  color: #666;
}

/* --- Section Decorations --- */
.section--decorated {
  position: relative;
  overflow: hidden;
}

.section--decorated .container {
  position: relative;
  z-index: 1;
}

/* Dot grid pattern */
.decor-dots {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

/* --- Bottom CTA --- */
.cta-section {
  text-align: center;
  padding: var(--section-padding) 0;
  position: relative;
  overflow: hidden;
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  margin-bottom: 16px;
}

.cta-section p {
  color: var(--color-muted);
  font-size: 1.125rem;
  margin-bottom: 32px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Section Headers --- */
.section__header {
  max-width: 640px;
  margin-bottom: 56px;
}

.section__header h2 {
  margin-bottom: 16px;
}

.section__header p {
  color: var(--color-muted);
  font-size: 1.125rem;
}

.section__header--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* --- About Page — Prose --- */
.about-section {
  position: relative;
  overflow: hidden;
}

.about-section .container {
  position: relative;
  z-index: 1;
}

.prose {
  max-width: 680px;
}

.prose h1 {
  margin-bottom: 32px;
}

.prose h2 {
  font-size: 1.75rem;
  margin-top: 48px;
  margin-bottom: 16px;
}

.prose p {
  margin-bottom: 1.25rem;
  font-size: 1.0625rem;
}

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

.pullquote {
  border-left: 3px solid var(--color-accent);
  padding-left: 24px;
  margin: 48px 0;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--color-text);
}

/* --- Services Page --- */
.service-block {
  padding: 40px 0;
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.service-block + .service-block {
  border-top: 1px solid var(--color-border);
}

.service-block__icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 122, 109, 0.08);
  border-radius: 12px;
  margin-top: 4px;
}

.service-block__icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-block__content h3 {
  margin-bottom: 12px;
}

.service-block__content p {
  color: var(--color-muted);
  max-width: 640px;
}

.engagement-types {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 32px;
}

.engagement-type {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 36px;
}

.engagement-type__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 122, 109, 0.08);
  border-radius: 10px;
  margin-bottom: 16px;
}

.engagement-type__icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.engagement-type h3 {
  margin-bottom: 12px;
}

.engagement-type p {
  color: var(--color-muted);
  font-size: 1rem;
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.contact-info .text-large {
  margin-bottom: 40px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--color-text);
}

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

.contact-links svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: var(--color-muted);
}

.cal-embed-wrapper {
  min-height: 500px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}

/* --- Footer --- */
.site-footer {
  background-color: var(--color-text);
  color: #a0a0b0;
  padding: 60px 0 40px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: #a0a0b0;
  font-size: 0.9375rem;
  max-width: 320px;
  margin-top: 16px;
}

.footer-brand .site-logo svg,
.footer-brand .site-logo img {
  height: 36px;
}

.footer-links {
  display: flex;
  gap: 60px;
}

.footer-links h4 {
  color: var(--color-white);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  font-size: 0.8125rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.875rem;
  }

  .card-grid {
    gap: 24px;
  }
}

@media (max-width: 768px) {
  :root {
    --content-padding: var(--content-padding-mobile);
    --section-padding: var(--section-padding-mobile);
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.625rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  /* Mobile nav */
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-white);
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
  }

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

  .nav-list {
    flex-direction: column;
    gap: 24px;
  }

  .nav-list a {
    font-size: 1.125rem;
  }

  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99;
  }

  .nav-overlay.active {
    display: block;
  }

  /* Cards stack on mobile */
  .card-grid {
    grid-template-columns: 1fr;
  }

  /* Hero */
  .hero {
    padding: 48px 0 60px;
  }

  .hero .subheadline {
    font-size: 1.125rem;
  }

  /* Hide large decorative shapes on mobile */
  .hero .decor,
  .decor-dots,
  .about-section .decor,
  .cta-section .decor {
    display: none;
  }

  /* Service blocks stack icon above on mobile */
  .service-block {
    flex-direction: column;
    gap: 16px;
  }

  /* Logo bar */
  .logo-bar__logos {
    gap: 28px 40px;
  }

  .logo-bar__logos svg {
    height: 22px;
  }

  .logo-text {
    font-size: 1.0625rem;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Engagement types */
  .engagement-types {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
  }

  .footer-links {
    flex-direction: column;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .btn-group {
    flex-direction: column;
  }

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

  .logo-bar__logos {
    gap: 32px;
  }
}
