/* ========================================
   Sugar Bending Sisters — Design System
   ======================================== */

:root {
  /* Backgrounds */
  --bg: #faf7f4;
  --bg-dark: #1a1412;
  --bg-warm: #f3ece6;

  /* Surfaces */
  --surface: #ffffff;
  --surface-muted: #f7f3ef;

  /* Text */
  --text: #1a1412;
  --text-inverse: #faf7f4;
  --muted: #7a6b63;
  --caption: #a69890;

  /* Accent */
  --accent: #c4785c;
  --accent-hover: #a85e42;

  /* Gold */
  --gold: #c9a96e;
  --gold-subtle: rgba(201, 169, 110, 0.15);

  /* Lines */
  --line: rgba(26, 20, 18, 0.08);
  --line-light: rgba(26, 20, 18, 0.04);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 8rem;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* ========================================
   Reset & Base
   ======================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", sans-serif;
  font-weight: 300;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ========================================
   Typography
   ======================================== */

.brand,
h1,
h2,
h3 {
  font-family: "Fraunces", serif;
}

h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.eyebrow {
  font-family: "Manrope", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.eyebrow--light {
  color: var(--gold);
}

/* ========================================
   Layout
   ======================================== */

.page-shell {
  width: min(1280px, calc(100% - 4rem));
  margin: 0 auto;
}

.full-bleed {
  width: 100%;
}

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

.section-header--centered {
  text-align: center;
}

/* ========================================
   Navigation
   ======================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.site-header.scrolled {
  background: rgba(250, 247, 244, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}

.site-header.scrolled .brand,
.site-header.scrolled .site-nav a,
.site-header.scrolled .nav-cta {
  color: var(--text);
}

.site-header.scrolled .nav-cta {
  border-color: var(--text);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1280px, calc(100% - 4rem));
  margin: 0 auto;
  padding: 1.25rem 0;
}

.brand {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  transition: color 0.4s ease;
}

.site-nav {
  display: flex;
  gap: 2rem;
}

.site-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.8);
  position: relative;
  transition: color 0.3s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-header.scrolled .site-nav a {
  color: var(--muted);
}

.site-header.scrolled .site-nav a:hover {
  color: var(--text);
}

.nav-cta {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.nav-cta:hover {
  background: rgba(255, 255, 255, 0.12);
}

.site-header.scrolled .nav-cta:hover {
  background: var(--text);
  color: var(--text-inverse);
  border-color: var(--text);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.4s ease;
}

.site-header.scrolled .menu-bar {
  background: var(--text);
}

.menu-toggle[aria-expanded="true"] .menu-bar:first-child {
  transform: translateY(4px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-bar:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* ========================================
   Hero
   ======================================== */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

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

.hero-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: linear-gradient(
    to right,
    rgba(26, 20, 18, 0.75) 0%,
    rgba(26, 20, 18, 0.4) 50%,
    rgba(26, 20, 18, 0.1) 100%
  );
  padding: var(--space-2xl) 0;
}

.hero-content {
  width: min(1280px, calc(100% - 4rem));
  margin: 0 auto;
  max-width: 600px;
  margin-right: auto;
  margin-left: max(2rem, calc((100% - 1280px) / 2));
}

.hero-content .eyebrow {
  color: var(--gold);
  animation: fadeUp 0.8s ease both;
  animation-delay: 0.2s;
}

.hero-content h1 {
  color: #fff;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.8s ease both;
  animation-delay: 0.4s;
}

.hero-sub {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 48ch;
  margin-bottom: var(--space-md);
  animation: fadeUp 0.8s ease both;
  animation-delay: 0.6s;
}

.button-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.875rem 2rem;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  border: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
  animation: fadeUp 0.8s ease both;
  animation-delay: 0.8s;
}

.button-hero:hover {
  transform: translateY(-2px);
  background: var(--bg);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   Intro Band
   ======================================== */

.intro-band {
  padding: var(--space-xl) 0;
  text-align: center;
}

.intro-text {
  max-width: 680px;
  margin: 0 auto var(--space-md);
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--muted);
}

.decorative-rule {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto;
}

/* ========================================
   Gallery
   ======================================== */

.gallery {
  padding-bottom: var(--space-xl);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
  gap: 1rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.gallery-item--tall {
  grid-row: span 2;
}

.gallery-item--wide {
  grid-column: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0, 0.15, 1);
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 1.25rem 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-item:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   About
   ======================================== */

.about {
  padding: var(--space-xl) 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.about-content {
  padding-right: var(--space-md);
}

.about-content h2 {
  margin-bottom: 1.5rem;
}

.about-content p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

/* ========================================
   Services
   ======================================== */

.services {
  padding: var(--space-xl) 0;
  background: var(--surface-muted);
}

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

.service-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 16px 40px rgba(0, 0, 0, 0.1);
}

.service-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0, 0.15, 1);
}

.service-card:hover .service-image img {
  transform: scale(1.04);
}

.service-body {
  padding: 1.75rem;
}

.service-body h3 {
  margin-bottom: 0.75rem;
}

.service-body p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* ========================================
   Process
   ======================================== */

.process {
  padding: var(--space-xl) 0;
}

.process-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
  position: relative;
}

.process-timeline::before {
  content: "";
  position: absolute;
  top: 28px;
  left: calc(16.67% + 28px);
  right: calc(16.67% + 28px);
  height: 1px;
  background: var(--line);
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: "Fraunces", serif;
  font-size: 1.125rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  background: var(--bg);
  position: relative;
  z-index: 1;
}

.process-step h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.process-step p {
  color: var(--muted);
  max-width: 30ch;
  font-size: 0.9375rem;
}

/* ========================================
   Testimonials
   ======================================== */

.testimonials {
  padding: var(--space-xl) 0;
  background: var(--bg-warm);
}

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

.testimonial {
  position: relative;
  padding-top: 2rem;
}

.testimonial::before {
  content: "\201C";
  position: absolute;
  top: -0.5rem;
  left: 0;
  font-family: "Fraunces", serif;
  font-size: 4rem;
  line-height: 1;
  color: var(--gold);
  opacity: 0.5;
}

.testimonial p {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.testimonial cite {
  font-family: "Manrope", sans-serif;
  font-style: normal;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--caption);
  letter-spacing: 0.04em;
}

/* ========================================
   Contact / CTA
   ======================================== */

.contact {
  background: var(--bg-dark);
  color: var(--text-inverse);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  width: min(1280px, calc(100% - 4rem));
  margin: 0 auto;
  padding: var(--space-2xl) 0;
}

.contact-content h2 {
  color: var(--text-inverse);
  margin-bottom: 1rem;
}

.contact-content p {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: var(--space-md);
  max-width: 45ch;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.button-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.875rem 1.75rem;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  border: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.button-light:hover {
  transform: translateY(-2px);
  background: var(--bg);
}

.button-outline-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.875rem 1.75rem;
  background: transparent;
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.button-outline-light:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

.contact-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.contact-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

/* ========================================
   Footer
   ======================================== */

.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1280px, calc(100% - 4rem));
  margin: 0 auto;
  padding: 2rem 0;
}

.footer-brand .brand {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.25rem;
}

.footer-tagline {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.35);
}

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

.footer-nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: rgba(255, 255, 255, 0.85);
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
}

/* ========================================
   Scroll-Driven Animations (Progressive Enhancement)
   ======================================== */

@supports (animation-timeline: view()) {
  .gallery-item,
  .service-card,
  .process-step,
  .testimonial,
  .about-grid {
    animation: fadeUp 0.6s linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
}

/* ========================================
   Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================================
   Responsive — Tablet (max-width: 1024px)
   ======================================== */

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

  .services-grid .service-card:last-child {
    grid-column: span 2;
  }

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

  .testimonial-grid .testimonial:last-child {
    grid-column: span 2;
    max-width: 500px;
  }
}

/* ========================================
   Responsive — Tablet Portrait (max-width: 768px)
   ======================================== */

@media (max-width: 768px) {
  .page-shell {
    width: calc(100% - 2.5rem);
  }

  .header-inner {
    width: calc(100% - 2.5rem);
  }

  /* Mobile nav */
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: center;
    gap: 0;
    background: rgba(250, 247, 244, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .site-nav.is-open {
    max-height: 320px;
  }

  .site-nav a {
    display: block;
    padding: 1rem;
    color: var(--text);
    font-size: 1rem;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a::after {
    display: none;
  }

  .site-nav a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
  }

  .nav-cta {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  /* Hero */
  .hero-content {
    margin-left: 1.25rem;
    margin-right: 1.25rem;
    text-align: center;
    max-width: none;
  }

  .hero-overlay {
    background: linear-gradient(
      to top,
      rgba(26, 20, 18, 0.8) 0%,
      rgba(26, 20, 18, 0.4) 60%,
      rgba(26, 20, 18, 0.2) 100%
    );
    align-items: flex-end;
    padding-bottom: var(--space-lg);
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 220px;
  }

  .gallery-item--tall {
    grid-row: span 2;
  }

  .gallery-item--wide {
    grid-column: span 2;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .about-content {
    padding-right: 0;
    order: 2;
  }

  .about-image {
    order: 1;
  }

  .about-image img {
    height: 360px;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }

  .services-grid .service-card:last-child {
    grid-column: auto;
  }

  /* Process */
  .process-timeline {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    text-align: left;
  }

  .process-timeline::before {
    top: 0;
    bottom: 0;
    left: 27px;
    right: auto;
    width: 1px;
    height: auto;
  }

  .process-step {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.5rem;
    text-align: left;
  }

  .step-number {
    flex-shrink: 0;
  }

  /* Testimonials */
  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .testimonial-grid .testimonial:last-child {
    grid-column: auto;
    max-width: none;
  }

  /* Contact */
  .contact-inner {
    grid-template-columns: 1fr;
    padding: var(--space-xl) 0;
    width: calc(100% - 2.5rem);
  }

  .contact-image {
    display: none;
  }

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

  .contact-content p {
    max-width: none;
  }

  .contact-actions {
    justify-content: center;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    width: calc(100% - 2.5rem);
  }

  .footer-nav {
    gap: 1rem;
  }
}

/* ========================================
   Responsive — Mobile (max-width: 480px)
   ======================================== */

@media (max-width: 480px) {
  .page-shell,
  .header-inner,
  .contact-inner,
  .footer-inner {
    width: calc(100% - 1.5rem);
  }

  h1 {
    font-size: clamp(2.25rem, 10vw, 3rem);
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
  }

  .gallery-item--tall {
    grid-row: auto;
  }

  .gallery-item--wide {
    grid-column: auto;
  }

  .contact-actions {
    flex-direction: column;
    width: 100%;
  }

  .button-light,
  .button-outline-light,
  .button-hero {
    width: 100%;
    text-align: center;
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ========================================
   Focus States (Accessibility)
   ======================================== */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.button-hero:focus-visible,
.button-light:focus-visible,
.button-outline-light:focus-visible {
  outline-color: var(--gold);
}
