:root {
  color-scheme: light;

  /* Colors */
  --bg: #f8f4ef;
  --bg-alt: #fffaf5;
  --primary: #c5796d;
  --primary-dark: #8c4a43;
  --accent: #d1b7a3;
  --text: #1a1614; /* Improved contrast for WCAG AA */
  --muted: #5a4c49; /* Improved contrast for WCAG AA */
  --card: rgba(255, 255, 255, 0.75);
  --shadow: 0 20px 60px rgba(149, 109, 93, 0.15);

  /* Spacing Scale (8px base) - FAZA 2 */
  --space-xs: 0.5rem;   /* 8px */
  --space-sm: 1rem;     /* 16px */
  --space-md: 1.5rem;   /* 24px */
  --space-lg: 2rem;     /* 32px */
  --space-xl: 3rem;     /* 48px */
  --space-2xl: 4rem;    /* 64px */
  --space-3xl: 6rem;    /* 96px */

  /* Typography Scale - FAZA 2 */
  --text-xs: 0.75rem;   /* 12px */
  --text-sm: 0.875rem;  /* 14px */
  --text-base: 1rem;    /* 16px */
  --text-lg: 1.125rem;  /* 18px */
  --text-xl: 1.25rem;   /* 20px */
  --text-2xl: 1.5rem;   /* 24px */
  --text-3xl: 2rem;     /* 32px */

  /* Radius */
  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 8px;

  /* Layout */
  --max-width: 1100px;
  --transition: 220ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, #fbeee2, var(--bg));
  line-height: 1.7;
  min-height: 100vh;
}

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

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--primary-dark);
}

h1,
h2,
h3,
h4 {
  font-family: 'Playfair Display', 'Times New Roman', serif;
  margin-top: 0;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 4vw, 3.75rem);
}

h2 {
  font-size: clamp(2rem, 3vw, 2.6rem);
  text-transform: capitalize;
}

h3 {
  font-size: 1.6rem;
}

.section {
  padding: clamp(4rem, 8vw, 6rem) 0;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
}

.narrow {
  max-width: 720px;
  margin-inline: auto;
}

.split {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4rem;
  }
}

/* About section - parallax background */
.about__left {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.about__background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.15;
  will-change: transform;
}

.about__background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.about__content {
  position: relative;
  z-index: 1;
  padding: var(--space-lg);
}

.hero {
  padding-top: clamp(2rem, 5vw, 3rem);
  padding-bottom: clamp(5rem, 12vw, 8rem);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 10% auto auto 55%;
  width: 40vw;
  max-width: 460px;
  height: 40vw;
  max-height: 460px;
  background: radial-gradient(circle, rgba(197, 121, 109, 0.15), transparent 60%);
  filter: blur(4px);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) 380px;
  }
}

.eyebrow {
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  box-shadow: 0 12px 30px rgba(197, 121, 109, 0.25);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  background: var(--primary-dark);
}

.btn--ghost {
  background: transparent;
  color: var(--primary);
  box-shadow: inset 0 0 0 2px rgba(197, 121, 109, 0.2);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  box-shadow: inset 0 0 0 2px var(--primary);
  color: var(--primary-dark);
  background: rgba(197, 121, 109, 0.08);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin: 2rem 0 0;
}

.metrics dt {
  font-size: 2.25rem;
  font-family: 'Playfair Display', serif;
}

.metrics dd {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.hero__visual {
  position: relative;
  min-height: 320px;
}

.hero-photo {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: clamp(280px, 40vw, 420px);
}

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

.hero-card {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(26, 22, 20, 0.85) 0%,
    rgba(26, 22, 20, 0.65) 50%,
    transparent 100%
  );
  padding: 2rem 1.5rem 1.5rem;
  z-index: 2;
  color: white;
}

.hero-card p {
  margin: 0;
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.halo {
  position: absolute;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.6;
}

.halo--one {
  width: 240px;
  height: 240px;
  background: rgba(197, 121, 109, 0.4);
  inset: -30px auto auto -50px;
}

.halo--two {
  width: 180px;
  height: 180px;
  background: rgba(242, 208, 186, 0.8);
  inset: auto 10px -30px auto;
}

.about blockquote {
  font-size: 1.4rem;
  color: var(--primary-dark);
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
  margin: 2rem 0 0;
}

.story {
  background: var(--card);
  padding: 1.6rem;
  border-radius: var(--radius-md);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.05);
}

.about__gallery {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}

.about__gallery figure {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08);
}

.about__gallery img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.for-who {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  margin: 0 1rem;
}

.for-who p {
  color: #1f2937;
}

.checklist ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  gap: 0.5rem;
}

.program {
  background: #fff;
}

.timeline {
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  border-left: 2px solid rgba(197, 121, 109, 0.2);
}

.timeline li {
  position: relative;
  padding: 0 0 2rem 2rem;
}

.timeline li::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  position: absolute;
  left: -8px;
  top: 0.3rem;
  box-shadow: 0 0 0 6px rgba(197, 121, 109, 0.15);
}

.timeline li:last-child {
  padding-bottom: 0;
}

.testimonials {
  background: var(--bg);
}

.testimonial-grid {
  display: grid;
  gap: 1.5rem;
}

.testimonial-grid figure {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow);
}

/* Testimonial with avatar */
.testimonial {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.testimonial__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 1.5rem;
  border: 3px solid var(--bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

.deep-invite {
  background: linear-gradient(135deg, #f5d7c9, #fbeee2 65%, #fff);
  border-radius: var(--radius-lg);
  margin: 0 1rem;
}

.cta__layout {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 860px) {
  .cta__layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cta__copy {
  max-width: 540px;
  margin: 0 auto;
}

.cta__copy h2,
.cta__copy p {
  text-align: left;
}

.cta__copy .btn {
  margin-top: 1rem;
}

.cta__image {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.cta__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.cta__layout:nth-child(odd) .cta__image {
  align-self: stretch;
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.faq details {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.2rem 1.5rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.04);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

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

.contact .grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .contact .grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

form {
  display: grid;
  gap: 0.85rem;
}

label {
  font-weight: 600;
  display: grid;
  gap: 0.4rem;
}

input,
select,
textarea {
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  font: inherit;
  background: #fff;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(197, 121, 109, 0.6);
  outline-offset: 2px;
}

.checkbox {
  font-weight: 400;
  align-items: flex-start;
  grid-template-columns: auto 1fr;
}

.checkbox input {
  margin-top: 0.25rem;
}

.contact-card {
  background: #fff;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.contact-card h3 {
  margin: 0 0 0.75rem;
}

.contact-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.contact-card .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.4rem;
  border-radius: 14px;
}

.microcopy {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

@media (min-width: 720px) {
  .contact-card {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
    gap: 1.4rem;
  }

  .contact-card ul {
    margin: 0;
  }
}

.footer {
  background: #1f1a17;
  color: #fef9f4;
  padding: 3rem 0;
}

.footer__grid {
  display: grid;
  gap: 2rem;
}

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

.footer a {
  color: #f8d5c3;
}

.socials {
  display: flex;
  gap: 1rem;
}

.newsletter {
  display: flex;
  gap: 0.5rem;
}

.newsletter input {
  flex: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(248, 244, 239, 0.8);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.brand {
  display: flex;
  flex-direction: column;
  font-family: 'Playfair Display', serif;
}

.brand__title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand__subtitle {
  font-size: 1rem;
  color: var(--primary);
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.navigation {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.navigation a {
  font-weight: 500;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--text);
  display: block;
}

@media (max-width: 800px) {
  .navigation {
    position: fixed;
    inset: 70px 1rem auto;
    background: rgba(255, 255, 255, 0.95);
    flex-direction: column;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity var(--transition), transform var(--transition);
  }

  .navigation.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-toggle {
    display: flex;
  }
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -40px;
  background: #000;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  z-index: 20;
}

.skip-link:focus {
  top: 10px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-feedback {
  min-height: 1.4rem;
  font-weight: 600;
}

[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 600ms ease, transform 600ms ease;
}

[data-animate].visible {
  opacity: 1;
  transform: none;
}

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

  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==========================================
   FAZA 1: REFACTOR - Story Cards with Images
   ========================================== */

.story {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
  background: var(--card);
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.story__content {
  flex: 1;
  min-width: min(100%, 300px);
}

.story__image {
  flex: 0 0 280px;
  min-width: 250px;
  margin: 0;
  position: relative;
}

.story__image img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: transform var(--transition), box-shadow var(--transition);
  aspect-ratio: 3/4;
}

.story__image img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

/* Reverse layout for alternating stories */
.story--reverse {
  flex-direction: row-reverse;
}

/* Typography improvements */
.story h4 {
  color: var(--primary-dark);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
  display: inline-block;
}

/* Mobile optimization */
@media (max-width: 768px) {
  .story,
  .story--reverse {
    flex-direction: column;
    gap: 1.5rem;
  }

  .story__image {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
  }

  .story__image img {
    height: 280px;
  }
}

/* ==========================================
   FAZA 1: Hero Section Improvements
   ========================================== */

.hero-photo {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: clamp(380px, 45vw, 520px);
  position: relative;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  aspect-ratio: 3/4;
}

/* Gradient overlay for better integration */
.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(197, 121, 109, 0.08) 0%,
    transparent 40%,
    transparent 100%
  );
  pointer-events: none;
  border-radius: var(--radius-lg);
}

/* ==========================================
   FAZA 2: WCAG Accessibility - Focus States
   ========================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
img:focus-visible,
.story__image:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Better keyboard navigation */
.story__image {
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), outline var(--transition);
}

.story__image:focus {
  outline: none;
}

.story__image:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

/* ==========================================
   FAZA 2: Responsive Breakpoints (Mobile-First)
   ========================================== */

/* Extra Small Devices (phones, 375px and down) */
@media (max-width: 375px) {
  .hero__content h1 {
    font-size: var(--text-3xl);
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .story {
    padding: var(--space-md);
  }

  .story__image img {
    height: 240px;
  }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
  .story__image {
    flex: 0 0 300px;
  }

  .hero-photo {
    height: clamp(400px, 50vw, 480px);
  }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) {
  .hero__grid {
    grid-template-columns: 1fr 400px;
  }

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

  /* Story cards stay as flex on tablet */
  .story {
    padding: var(--space-lg);
  }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) 450px;
  }

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

  /* Larger gap on desktop */
  .story {
    gap: var(--space-xl);
  }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .hero-photo {
    height: clamp(480px, 45vw, 580px);
  }

  .story__image {
    flex: 0 0 320px;
  }

  .story__image img {
    height: 400px;
  }
}

/* ==========================================
   FAZA 3: Animations & Micro-interactions
   ========================================== */

/* Smooth scroll reveal animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.story,
.hero-photo,
.testimonial-grid figure {
  animation: fadeInUp 0.8s ease-out backwards;
}

.story:nth-child(1) { animation-delay: 0.1s; }
.story:nth-child(2) { animation-delay: 0.2s; }
.story:nth-child(3) { animation-delay: 0.3s; }

/* Image hover effects with gradient overlay */
.story__image {
  position: relative;
  overflow: hidden;
}

.story__image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(197, 121, 109, 0.15),
    rgba(209, 183, 163, 0.15)
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  border-radius: 12px;
}

.story__image:hover::before {
  opacity: 1;
}

/* Smooth hover scale on story images */
.story__image img {
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
  filter: saturate(0.95) brightness(1.02) contrast(1.05);
}

.story__image:hover img {
  transform: scale(1.03);
  filter: saturate(1) brightness(1) contrast(1);
}

/* Hero photo subtle zoom on page load */
.hero-photo img {
  animation: subtleZoom 0.6s ease-out;
}

@keyframes subtleZoom {
  from {
    transform: scale(1.05);
  }
  to {
    transform: scale(1);
  }
}

/* Button hover micro-interactions */
.btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover::before {
  opacity: 1;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(197, 121, 109, 0.3);
}

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

/* ==========================================
   FAZA 3: Additional Optimizations
   ========================================== */

/* Better text readability - optimal line length */
.story__content p {
  max-width: 65ch;
  hyphens: manual;
}

/* Subtle filter for image consistency */
.story__image img,
.hero-photo img {
  filter: saturate(0.95) brightness(1.02) contrast(1.05);
}

.story__image:hover img,
.hero-photo:hover img {
  filter: saturate(1) brightness(1) contrast(1);
}

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

.story h4 {
  letter-spacing: -0.01em;
}

/* Smooth transitions for prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .story,
  .hero-photo,
  .story__image,
  .btn {
    animation: none !important;
    transition: none !important;
  }

  .story__image::before {
    transition: none !important;
  }
}
