/* -------------------------------------------------------------
 * Cozy Bloom - Custom Styling Sheet
 * Rooted in the "Slow Made" movement: warm, tactile, and cozy.
 * ------------------------------------------------------------- */

/* Custom Properties and Tokens */
:root {
  /* Colors */
  --primary: #894d4e;             /* Dusty Rose */
  --primary-rgb: 137, 77, 78;
  --on-primary: #ffffff;
  --primary-container: #d68e8e;
  --on-primary-container: #5b2829;
  
  --secondary: #566342;           /* Sage Green */
  --secondary-rgb: 86, 99, 66;
  --on-secondary: #ffffff;
  --secondary-container: #d7e5bb;
  --on-secondary-container: #5a6745;
  
  --tertiary: #77574a;            /* Warm Brown */
  --tertiary-container: #c0998a;
  
  --bg: #fef9f2;                  /* Warm Cream Background */
  --surface: #fef9f2;
  --surface-dim: #ded9d3;
  --surface-bright: #fef9f2;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f8f3ec;
  --surface-container: #f2ede6;
  --surface-container-high: #ece7e1;
  --surface-container-highest: #e6e2db;
  
  --on-surface: #1d1c18;          /* Charcoal Black */
  --on-surface-variant: #524343;  /* Warm Gray */
  --outline: #857372;
  --outline-variant: #d7c2c1;
  --shadow-color: #7D5C4F;        /* Warm Brown Shadow tint */
  
  /* Typography Variables */
  --font-serif: 'Literata', serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  
  /* Corners (The Loop Shape Language) */
  --rounded-sm: 0.25rem;
  --rounded: 0.5rem;
  --rounded-md: 0.75rem;
  --rounded-lg: 1rem;
  --rounded-xl: 1.5rem;
  --rounded-full: 9999px;
  
  /* Spacing */
  --gutter: 24px;
  --margin-mobile: 20px;
  --margin-desktop: 64px;
  --section-gap: 80px;
}

/* Base resets & Smoothness */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--on-surface);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Felt Grain Overlay */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("https://www.transparenttextures.com/patterns/felt.png");
}

/* Typography Utilities */
.text-serif {
  font-family: var(--font-serif);
}

.text-accent {
  color: var(--primary);
}

.label-caps {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--on-surface);
  line-height: 1.25;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.title-divider {
  width: 48px;
  height: 2px;
  background-color: var(--tertiary-container);
  margin-bottom: 2rem;
  border-radius: var(--rounded-full);
}

/* Ambient Diffused Shadows */
.soft-shadow {
  box-shadow: 0 10px 30px -8px rgba(125, 92, 79, 0.06), 
              0 4px 12px -4px rgba(125, 92, 79, 0.04);
}

.deep-shadow {
  box-shadow: 0 20px 40px -15px rgba(125, 92, 79, 0.12),
              0 8px 20px -6px rgba(125, 92, 79, 0.08);
}

/* Buttons System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--rounded-full);
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-decoration: none;
  outline: none;
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1rem;
}

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

.btn-primary:hover {
  background-color: #723c3d;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px rgba(137, 77, 78, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

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

.btn-secondary:hover {
  background-color: #c7d8a6;
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background-color: rgba(86, 99, 66, 0.05);
  transform: translateY(-2px);
}

/* Icon Buttons */
.icon-btn {
  background: transparent;
  border: none;
  color: var(--on-surface-variant);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: var(--rounded-full);
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background-color: var(--surface-container);
  color: var(--primary);
}

/* Helpers */
.w-full { width: 100%; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.ml-4 { margin-left: 1rem; }
.font-semibold { font-weight: 600; }
.text-center { text-align: center; }
.block { display: block; }
.text-secondary { color: var(--secondary); }
.text-primary { color: var(--primary); }
.hide-mobile { display: inline-flex; }

/* -------------------------------------------------------------
 * Layout Sections
 * ------------------------------------------------------------- */
.section-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--section-gap) var(--margin-desktop);
}

.max-w-form {
  max-width: 800px;
}

@media (max-width: 768px) {
  .section-container {
    padding: 60px var(--margin-mobile);
  }
  .hide-mobile {
    display: none !important;
  }
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background-color: rgba(254, 249, 242, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(125, 92, 79, 0.05);
}

.header.scrolled {
  height: 64px;
  box-shadow: 0 4px 20px -8px rgba(125, 92, 79, 0.08);
  border-bottom: 1px solid rgba(125, 92, 79, 0.1);
}

.header-container {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--margin-desktop);
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 var(--margin-mobile);
  }
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--primary);
}

.logo-icon {
  flex-shrink: 0;
  transition: transform 0.5s ease;
}

.logo-group:hover .logo-icon {
  transform: rotate(30deg);
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-family: var(--font-sans);
  text-decoration: none;
  color: var(--on-surface-variant);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: inline-flex;
  }
}

/* -------------------------------------------------------------
 * Interactive Hero Section
 * ------------------------------------------------------------- */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--surface-bright);
  padding: 100px var(--margin-desktop) 80px;
  text-align: center;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.radial-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(137, 77, 78, 0.06) 0%, rgba(254, 249, 242, 0) 70%);
  pointer-events: none;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 600px;
}

.logo-container {
  margin-bottom: 2rem;
}

.hero-logo {
  height: 110px;
  width: auto;
  object-contain: fit;
  filter: drop-shadow(0 8px 16px rgba(125, 92, 79, 0.05));
  animation: logoBreath 6s ease-in-out infinite;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--on-surface-variant);
  max-width: 440px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .hero-section {
    padding: 90px var(--margin-mobile) 60px;
    min-height: 80vh;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-actions {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-actions .btn {
    width: 100%;
    margin: 0 !important;
  }
}

/* Keyframe Animations */
@keyframes logoBreath {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.animate-spin-slow {
  animation: spinSlow 30s linear infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Entrance Animations */
.animate-fade-in-down {
  animation: fadeInDown 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.animate-needle-stitch {
  animation: needleStitch 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes needleStitch {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
    letter-spacing: -0.05em;
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    letter-spacing: -0.01em;
  }
}

/* -------------------------------------------------------------
 * Story Section
 * ------------------------------------------------------------- */
.story-section {
  background-color: var(--surface-container-low);
  border-top: 1px solid rgba(125, 92, 79, 0.03);
}

.max-w-lg {
  max-width: 800px;
  text-align: center;
}

.story-text {
  font-size: 1.1rem;
  color: var(--on-surface-variant);
  line-height: 1.8;
  margin-bottom: 3.5rem;
}

.story-features {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-top: 2rem;
}

.feature-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  border-radius: var(--rounded-lg);
  background-color: var(--surface-container-lowest);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px -5px rgba(125, 92, 79, 0.04);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px -10px rgba(125, 92, 79, 0.08);
}

.feature-icon {
  margin-bottom: 1rem;
  color: var(--secondary);
}

.feature-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--tertiary);
}

.feature-desc {
  font-size: 0.85rem;
  color: var(--on-surface-variant);
  max-width: 240px;
}

.feature-divider {
  width: 1px;
  height: 100px;
  background-color: var(--outline-variant);
  align-self: center;
  opacity: 0.5;
}

@media (max-width: 768px) {
  .story-features {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  .feature-divider {
    display: none;
  }
}

/* -------------------------------------------------------------
 * How it Works - Progress Stepper
 * ------------------------------------------------------------- */
.process-section {
  background-color: var(--bg);
}

.horizontal-stepper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  margin-top: 3.5rem;
  gap: 1.5rem;
}

/* Stepper connection line representing thread */
.horizontal-stepper::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 10%;
  right: 10%;
  height: 2px;
  border-top: 2.5px dashed var(--tertiary-container);
  z-index: 1;
}

.step-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
}

.step-icon-container {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--surface-container-highest);
  color: var(--tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface-container-highest);
  box-shadow: 0 4px 10px rgba(125, 92, 79, 0.05);
  margin-bottom: 1.25rem;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.step-item.active .step-icon-container {
  background-color: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
  box-shadow: 0 8px 16px rgba(137, 77, 78, 0.2);
  transform: scale(1.15);
}

/* Once step is fully hovered / completed, turn Sage Green */
.step-item:hover .step-icon-container {
  background-color: var(--secondary);
  color: var(--on-secondary);
  border-color: var(--secondary);
  box-shadow: 0 8px 16px rgba(86, 99, 66, 0.2);
}

.step-title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--tertiary);
}

.step-desc {
  font-size: 0.85rem;
  color: var(--on-surface-variant);
  max-width: 180px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .horizontal-stepper {
    flex-direction: column;
    align-items: flex-start;
    gap: 2.5rem;
    padding-left: 2rem;
  }
  
  .horizontal-stepper::before {
    left: 44px;
    top: 24px;
    bottom: 24px;
    width: 2px;
    height: auto;
    border-top: none;
    border-left: 2.5px dashed var(--tertiary-container);
  }
  
  .step-item {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 1.5rem;
  }
  
  .step-icon-container {
    margin-bottom: 0;
  }
  
  .step-desc {
    max-width: 100%;
  }
}

/* -------------------------------------------------------------
 * Central Dedicated Custom Order Section (Inline Stepper Card)
 * ------------------------------------------------------------- */
.custom-order-section {
  background-color: var(--surface-container-low);
  border-top: 1px solid rgba(125, 92, 79, 0.03);
  border-bottom: 1px solid rgba(125, 92, 79, 0.03);
}

.order-section-intro {
  max-width: 520px;
  color: var(--on-surface-variant);
  margin: 0 auto 3rem;
  font-size: 1.05rem;
  line-height: 1.6;
}

.order-container {
  width: 100%;
  background-color: var(--surface);
  border-radius: var(--rounded-xl);
  border: 1px solid rgba(125, 92, 79, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Stepper Progress Bar inside form card */
.modal-stepper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem;
  background-color: var(--surface-container-low);
  position: relative;
}

.stepper-progress-line {
  position: absolute;
  top: 50%;
  left: 3.5rem;
  right: 3.5rem;
  height: 3px;
  background-color: var(--surface-container-highest);
  transform: translateY(-50%);
  z-index: 1;
  border-radius: var(--rounded-full);
}

.stepper-progress-fill {
  width: 0%;
  height: 100%;
  background-color: var(--secondary);
  transition: width 0.4s ease;
  border-radius: var(--rounded-full);
}

.modal-step-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.node-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--surface-container-highest);
  border: 2.5px solid var(--surface-container-low);
  box-shadow: 0 0 0 2px var(--surface-container-highest);
  transition: all 0.3s ease;
}

.modal-step-node.active .node-circle {
  background-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary);
}

.modal-step-node.completed .node-circle {
  background-color: var(--secondary);
  box-shadow: 0 0 0 3px var(--secondary);
}

.node-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--on-surface-variant);
  transition: color 0.3s ease;
}

.modal-step-node.active .node-label {
  color: var(--primary);
}

.modal-step-node.completed .node-label {
  color: var(--secondary);
}

@media (max-width: 480px) {
  .modal-stepper {
    padding: 1.5rem 1rem;
  }
  .stepper-progress-line {
    left: 1.5rem;
    right: 1.5rem;
  }
  .node-label {
    display: none; /* Hide labels on tiny screens */
  }
}

/* Stepper Form Fields container */
.modal-form {
  padding: 2.5rem 3rem;
  background-color: var(--surface);
}

@media (max-width: 580px) {
  .modal-form {
    padding: 1.5rem;
  }
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: formStepSlide 0.4s ease forwards;
}

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

.form-step-title {
  font-size: 1.25rem;
  color: var(--tertiary);
  margin-bottom: 0.5rem;
}

.form-step-desc {
  font-size: 0.85rem;
  color: var(--on-surface-variant);
  margin-bottom: 1.5rem;
}

/* Style cards grid (Step 1) */
.style-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 480px) {
  .style-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.style-card {
  cursor: pointer;
}

.hidden-radio {
  display: none;
}

.style-card-content {
  border: 1.5px solid var(--outline-variant);
  border-radius: var(--rounded-lg);
  padding: 1.25rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  background-color: var(--surface-container-lowest);
  height: 100%;
}

.style-card-icon {
  color: var(--tertiary);
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
}

.style-card-title {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--on-surface);
}

.style-card-desc {
  font-size: 0.75rem;
  color: var(--on-surface-variant);
  line-height: 1.4;
}

.style-card input:checked + .style-card-content {
  border-color: var(--secondary);
  background-color: rgba(86, 99, 66, 0.04);
  box-shadow: 0 8px 20px -8px rgba(86, 99, 66, 0.15);
}

.style-card input:checked + .style-card-content .style-card-icon {
  color: var(--secondary);
}

/* Yarn swatches grid (Step 2) */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 480px) {
  .swatch-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.swatch-card {
  cursor: pointer;
}

.swatch-card-content {
  border: 1.5px solid var(--outline-variant);
  border-radius: var(--rounded-lg);
  padding: 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--surface-container-lowest);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.swatch-card input:checked + .swatch-card-content {
  border-color: var(--secondary);
  background-color: rgba(86, 99, 66, 0.04);
  box-shadow: 0 8px 20px -8px rgba(86, 99, 66, 0.15);
}

/* Large circles for swatches with soft inner glow */
.swatch-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.15), 
              0 4px 10px -2px rgba(125, 92, 79, 0.1);
  overflow: hidden;
  border: 2px solid white;
}

.swatch-inner-glow {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.18);
  border-radius: 50%;
  pointer-events: none;
}

/* Swatch Colors */
.color-rose { background-color: var(--primary); }
.color-sage { background-color: var(--secondary); }
.color-cream { background-color: #f5f0e6; }
.color-brown { background-color: var(--tertiary); }
.color-indigo { background-color: #2c3e50; }
.color-mustard { background-color: #d9a05b; }

.swatch-details {
  display: flex;
  flex-direction: column;
}

.swatch-name {
  font-size: 0.95rem;
  color: var(--on-surface);
}

.swatch-meta {
  font-size: 0.75rem;
  color: var(--on-surface-variant);
}

/* Inputs and Forms (Step 3) */
.form-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 480px) {
  .form-group-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.form-input-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--tertiary);
}

.form-input-text {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--rounded-md);
  background-color: var(--surface-container-lowest);
  color: var(--on-surface);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  outline: none;
  /* 20% warm brown border */
  border: 1.5px solid rgba(119, 87, 74, 0.2);
}

.form-input-text::placeholder {
  color: var(--outline-variant);
}

/* Form input transitions to Dusty Rose with soft outer glow */
.form-input-text:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(137, 77, 78, 0.15);
  background-color: var(--surface-container-lowest);
}

select.form-input-text {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='%2377574a' d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem;
}

textarea.form-input-text {
  resize: vertical;
}

/* Summary Receipt Layout (Step 4) */
.summary-receipt {
  background-color: var(--surface-container-low);
  border-radius: var(--rounded-lg);
  padding: 1.5rem 2rem;
  box-shadow: inset 0 2px 10px rgba(125, 92, 79, 0.03);
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1.5px dashed var(--outline-variant);
  font-size: 0.95rem;
}

.receipt-label {
  color: var(--on-surface-variant);
  font-weight: 500;
}

.receipt-value {
  color: var(--tertiary);
  font-weight: 700;
  text-align: right;
}

.receipt-divider {
  height: 12px;
}

/* Success screen state */
.form-step-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}

.form-step-success.active {
  display: flex;
  animation: successScaleUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes successScaleUp {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

/* Yarn success illustration animation */
.success-yarn-animation {
  width: 120px;
  height: 120px;
  margin-bottom: 1.5rem;
}

.success-yarn-svg {
  width: 100%;
  height: 100%;
}

.yarn-circle-back {
  stroke-dasharray: 6 4;
  animation: yarnRolling 8s linear infinite;
  transform-origin: center;
}

@keyframes yarnRolling {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.success-leaf {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: strokeDraw 1.5s ease-out 0.4s forwards;
}

.success-flower-petal {
  transform: scale(0);
  transform-origin: 60px 60px;
  animation: petalGrow 1s cubic-bezier(0.34, 1.56, 0.64, 1) 1.2s forwards;
}

.petal-2 {
  animation-delay: 1.4s;
}

.petal-3 {
  animation-delay: 1.6s;
}

@keyframes strokeDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes petalGrow {
  to { transform: scale(1); }
}

/* Form Action Buttons Panel */
.modal-footer {
  padding: 1.5rem 3rem;
  background-color: var(--surface-container-low);
  border-top: 1px solid var(--surface-container-high);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 580px) {
  .modal-footer {
    padding: 1.5rem;
  }
}

/* -------------------------------------------------------------
 * Mobile Responsive Menu Drawer
 * ------------------------------------------------------------- */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100%;
  background-color: var(--surface);
  z-index: 1000;
  box-shadow: 10px 0 40px rgba(125, 92, 79, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.drawer-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--surface-container-high);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  gap: 1.5rem;
}

.drawer-link {
  font-family: var(--font-sans);
  text-decoration: none;
  color: var(--on-surface);
  font-size: 1.1rem;
  font-weight: 600;
  padding-bottom: 0.5rem;
  border-bottom: 1.5px solid transparent;
  transition: all 0.2s ease;
}

.drawer-link:hover {
  color: var(--primary);
  border-bottom-color: var(--primary-container);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(125, 92, 79, 0.4);
  z-index: 990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(4px);
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* -------------------------------------------------------------
 * Artisanal Gallery Section (Filterable & Lightbox)
 * ------------------------------------------------------------- */
.gallery-section {
  background-color: var(--bg);
}

.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: var(--font-sans);
  background-color: var(--surface-container-low);
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: var(--rounded-full);
  font-weight: 600;
  color: var(--on-surface-variant);
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-btn:hover, .filter-btn.active {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 10px rgba(137, 77, 78, 0.2);
}

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

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.gallery-item {
  position: relative;
  border-radius: var(--rounded-xl);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  background-color: var(--surface-container);
  box-shadow: 0 8px 25px -10px rgba(125, 92, 79, 0.06);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gallery-item:nth-child(2), .gallery-item:nth-child(3) {
  aspect-ratio: 1/1;
}

.gallery-item.hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.gallery-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.gallery-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.gallery-hover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(125, 92, 79, 0.85) 0%, rgba(125, 92, 79, 0.2) 60%, rgba(125, 92, 79, 0) 100%);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 1.5rem;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.gallery-item:hover .gallery-hover-overlay {
  opacity: 1;
}

.gallery-zoom-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(254, 249, 242, 0.9);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-zoom-icon {
  transform: translate(-50%, -50%) scale(1.1);
}

.gallery-item-title {
  color: white;
  font-size: 1.15rem;
  font-weight: 500;
  transform: translateY(10px);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-title {
  transform: translateY(0);
}

/* -------------------------------------------------------------
 * Final CTA Section
 * ------------------------------------------------------------- */
.cta-section {
  background-color: rgba(214, 142, 142, 0.12);
  border-top: 1px solid rgba(125, 92, 79, 0.02);
}

.max-w-sm {
  max-width: 600px;
}

.cta-text {
  font-size: 1.1rem;
  color: var(--on-primary-container);
  line-height: 1.7;
  margin-bottom: 2.25rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 768px) {
  .cta-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  .cta-buttons .btn {
    width: 100%;
    margin: 0 !important;
  }
}

/* -------------------------------------------------------------
 * Footer Elements
 * ------------------------------------------------------------- */
.footer {
  background-color: var(--surface-container-low);
  padding: 80px var(--margin-desktop) 40px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
}

.footer-brand {
  max-width: 320px;
}

.footer-quote {
  font-size: 0.9rem;
  color: var(--on-surface-variant);
  margin-top: 1rem;
  line-height: 1.6;
}

.footer-nav-title {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tertiary);
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.footer-nav, .footer-contact {
  display: flex;
  flex-direction: column;
}

.footer-link {
  font-size: 0.9rem;
  color: var(--on-surface-variant);
  text-decoration: none;
  margin-bottom: 0.75rem;
  transition: color 0.2s ease;
  width: fit-content;
}

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

.footer-text {
  font-size: 0.9rem;
  color: var(--on-surface-variant);
  margin-bottom: 0.5rem;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background-color: var(--outline-variant);
  opacity: 0.3;
  margin: 3.5rem 0 2rem;
}

.copyright-text {
  font-size: 0.8rem;
  color: var(--on-surface-variant);
  text-align: center;
}

@media (max-width: 768px) {
  .footer {
    padding: 60px var(--margin-mobile) 30px;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* -------------------------------------------------------------
 * Lightbox Modal for Gallery
 * ------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  background-color: rgba(29, 28, 24, 0.9);
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-container {
  max-width: 900px;
  width: 90%;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox.open .lightbox-container {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: -3.5rem;
  right: 0;
  font-size: 3rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  transition: color 0.2s ease;
}

.lightbox-close:hover {
  color: var(--primary-container);
}

.lightbox-content {
  background-color: var(--surface);
  border-radius: var(--rounded-xl);
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.lightbox-img {
  width: 100%;
  max-height: 65vh;
  object-fit: cover;
  display: block;
}

.lightbox-caption {
  padding: 1.5rem 2rem;
  background-color: var(--surface-container-low);
}

.lightbox-title {
  font-size: 1.25rem;
  color: var(--tertiary);
  margin-bottom: 0.5rem;
}

.lightbox-desc {
  font-size: 0.9rem;
  color: var(--on-surface-variant);
  line-height: 1.6;
}
