/* ==========================================================================
   Caldern LLC — Design System
   Color palette: #C1B098, #E9D2F4, #9B9B93, #39393A, #63B0CD
   ========================================================================== */

/* --------------------------------------------------------------------------
   Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Palette */
  --tan: #C1B098;
  --tan-light: #d4c7b3;
  --tan-dark: #a89a7f;
  --lavender: #E9D2F4;
  --lavender-light: #f3e6f9;
  --gray: #9B9B93;
  --charcoal: #39393A;
  --blue: #63B0CD;
  --blue-dark: #4a9ab8;

  /* Semantic */
  --bg: #FDFCFA;
  --bg-alt: #F7F5F2;
  --text: #2D2D2D;
  --text-muted: #6B6B66;
  --accent: var(--blue);
  --accent-hover: var(--blue-dark);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  --space-2xl: 12rem;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

::selection {
  background: var(--lavender);
  color: var(--charcoal);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* --------------------------------------------------------------------------
   Decorative Elements
   -------------------------------------------------------------------------- */
.grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
}

.blob-1 {
  width: 600px;
  height: 600px;
  background: var(--lavender);
  top: -200px;
  right: -100px;
  animation: float 20s ease-in-out infinite;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: var(--tan-light);
  bottom: 20%;
  left: -150px;
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3 {
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--charcoal);
}

em {
  font-family: var(--font-serif);
  font-style: italic;
}

p {
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 3rem;
  background: rgba(253, 252, 250, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.nav-logo {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--charcoal);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9375rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--charcoal);
}

.nav-cta {
  padding: 0.625rem 1.25rem;
  background: var(--charcoal);
  color: #fff !important;
  border-radius: 100px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-cta:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 176, 205, 0.3);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-xl) 3rem var(--space-lg);
  max-width: 1600px;
  margin: 0 auto;
}

.hero-content {
  max-width: 620px;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.95;
  margin-bottom: 1.5rem;
}

.hero h1 em {
  color: var(--accent);
}

.hero-sub {
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.55;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--charcoal);
  padding: 0.875rem 1.5rem;
  border: 1px solid var(--tan);
  border-radius: 100px;
  transition: all 0.3s ease;
}

.hero-cta:hover {
  background: var(--tan);
  border-color: var(--tan);
  transform: translateY(-2px);
}

.hero-cta svg {
  transition: transform 0.3s ease;
}

.hero-cta:hover svg {
  transform: translate(3px, -3px);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image-wrap {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4/5;
  border-radius: 300px 300px 20px 20px;
  overflow: hidden;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.02),
    0 12px 24px rgba(0, 0, 0, 0.04),
    0 24px 48px rgba(0, 0, 0, 0.06);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 8s ease;
}

.hero-image-wrap:hover .hero-image {
  transform: scale(1.05);
}


/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
  padding: var(--space-xl) 3rem;
  max-width: 1600px;
  margin: 0 auto;
}

.section-alt {
  background: var(--bg-alt);
  max-width: none;
  padding: var(--space-xl) 0;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 3rem;
}

.section-header {
  margin-bottom: var(--space-lg);
}

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray);
  margin-bottom: var(--space-sm);
}

.section-label-light {
  color: rgba(255, 255, 255, 0.5);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--charcoal);
}

/* --------------------------------------------------------------------------
   Work Grid
   -------------------------------------------------------------------------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem;
  background: var(--bg-alt);
  border-radius: 16px;
  min-height: 340px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.work-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.work-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.04),
    0 24px 48px rgba(0, 0, 0, 0.08);
}

.work-card:hover::before {
  border-color: var(--tan);
}

.work-card-accent {
  background: linear-gradient(135deg, var(--lavender-light) 0%, var(--bg-alt) 100%);
}

.work-card-inner {
  flex: 1;
}

.work-type {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: rgba(99, 176, 205, 0.1);
  padding: 0.375rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.work-card h3 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 0.875rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.work-card p {
  font-size: 0.9375rem;
  line-height: 1.5;
}

.work-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--bg);
  border-radius: 50%;
  color: var(--charcoal);
  transition: all 0.3s ease;
  margin-top: 1.5rem;
}

.work-card:hover .work-arrow {
  background: var(--charcoal);
  color: #fff;
  transform: translate(4px, -4px);
}

/* --------------------------------------------------------------------------
   Services List
   -------------------------------------------------------------------------- */
.services-list {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.service {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: default;
}

.service:hover {
  padding-left: 1.5rem;
  background: linear-gradient(90deg, rgba(233, 210, 244, 0.12) 0%, transparent 100%);
}

.service-number {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tan-dark);
  font-variant-numeric: tabular-nums;
  min-width: 2rem;
  padding-top: 0.25rem;
}

.service-content {
  flex: 1;
}

.service-name {
  display: block;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--charcoal);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.service-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 600px;
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-xl);
}

.about-headline {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.25;
  margin-bottom: 1.5rem;
}

.about-headline em {
  color: var(--accent);
}

.about-main > p {
  font-size: 1.125rem;
  line-height: 1.65;
}

.about-details {
  padding-top: 0.5rem;
}

.about-bio h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray);
  margin-bottom: 1.25rem;
}

.about-bio p {
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.about-bio strong {
  color: var(--charcoal);
  font-weight: 600;
}

.about-bio a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(99, 176, 205, 0.4);
  transition: text-decoration-color 0.2s ease;
}

.about-bio a:hover {
  text-decoration-color: var(--accent);
}

.about-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.about-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--charcoal);
  transition: color 0.2s ease;
}

.about-link:hover {
  color: var(--accent);
}

.about-link svg {
  transition: transform 0.2s ease;
}

.about-link:hover svg {
  transform: translate(2px, -2px);
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.section-dark {
  background: var(--charcoal);
  max-width: none;
  position: relative;
  overflow: hidden;
}

.contact-content {
  position: relative;
  z-index: 2;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 3rem;
}

.contact-content h2 {
  font-size: clamp(3rem, 8vw, 5rem);
  color: #fff;
  margin: 1rem 0 1.5rem;
  line-height: 1;
}

.contact-content h2 em {
  color: var(--accent);
}

.contact-content > p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2.5rem;
  max-width: 400px;
}

.contact-actions {
  display: flex;
  gap: 1rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.125rem;
  font-weight: 500;
  color: #fff;
  padding: 1rem 1.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  transition: all 0.3s ease;
}

.contact-email:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 176, 205, 0.3);
}

.contact-email svg {
  transition: transform 0.3s ease;
}

.contact-email:hover svg {
  transform: translate(3px, -3px);
}

.contact-shape {
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--lavender) 0%, transparent 70%);
  opacity: 0.08;
  right: -300px;
  top: -300px;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  padding: 2rem 3rem;
  background: var(--bg);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer-content {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-logo {
  font-weight: 600;
  color: var(--charcoal);
  letter-spacing: -0.02em;
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--gray);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links svg {
  display: block;
}

/* --------------------------------------------------------------------------
   Responsive — Tablet
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    padding-top: 8rem;
    min-height: auto;
  }

  .hero-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-visual {
    order: -1;
  }

  .hero-image-wrap {
    max-width: 320px;
    aspect-ratio: 1;
    border-radius: 50%;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .work-card {
    min-height: auto;
    padding: 2rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .blob-1 {
    width: 400px;
    height: 400px;
    right: -150px;
    top: -150px;
  }

  .blob-2 {
    width: 350px;
    height: 350px;
  }
}

/* --------------------------------------------------------------------------
   Responsive — Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  :root {
    --space-xl: 5rem;
    --space-lg: 3rem;
  }

  .nav {
    padding: 1rem 1.5rem;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .nav-cta {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .hero {
    padding: 6rem 1.5rem var(--space-lg);
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-image-wrap {
    max-width: 240px;
  }

  .hero-cta {
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
  }

  .section {
    padding: var(--space-xl) 1.5rem;
  }

  .section-alt {
    padding: var(--space-xl) 0;
  }

  .container {
    padding: 0 1.5rem;
  }

  .section-header {
    margin-bottom: var(--space-md);
  }

  .work-card {
    padding: 1.5rem;
  }

  .work-card h3 {
    font-size: 1.25rem;
  }

  .service {
    padding: 1.5rem 0;
    gap: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .service-number {
    font-size: 0.6875rem;
    color: var(--accent);
  }

  .service-name {
    font-size: 1.0625rem;
  }

  .service-desc {
    font-size: 0.875rem;
  }

  .service:hover {
    padding-left: 0;
  }

  .about-headline {
    font-size: 1.5rem;
  }

  .contact-content {
    padding: 0 1.5rem;
  }

  .contact-content h2 {
    font-size: 2.5rem;
  }

  .contact-email {
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
  }

  .footer {
    padding: 1.5rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
  }

  .footer-brand {
    flex-direction: column;
    gap: 0.5rem;
  }

  .blob-1, .blob-2 {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Scroll & Utilities
   -------------------------------------------------------------------------- */
:target {
  scroll-margin-top: 100px;
}

/* Smooth reveal animation */
@media (prefers-reduced-motion: no-preference) {
  .section {
    animation: fadeUp 0.6s ease-out;
  }

  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
