/* ========================================
   THREE HEARTS BAKERY — STYLE SYSTEM
   Mobile-first responsive design
   ======================================== */

/* --- LOCAL FONTS --- */
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/cormorant-garamond-variable.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/cormorant-garamond-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('fonts/montserrat-variable.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --rose: #BC8F8F;
  --rose-dark: #a07070;
  --blush: #F4E4E4;
  --chocolate: #5D4037;
  --chocolate-light: #795548;
  --cream: #FFF9F5;
  --white: #ffffff;
  --text: #3E2723;
  --text-light: #6D5D58;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(93, 64, 55, 0.1);
  --shadow-lg: 0 12px 40px rgba(93, 64, 55, 0.15);
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Montserrat', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
}

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

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

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- SECTION TITLES --- */
.section-title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: var(--chocolate);
  text-align: center;
  margin-bottom: 12px;
}

.section-title--left {
  text-align: left;
}

.section-sub {
  text-align: center;
  color: var(--text-light);
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto 48px;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--rose);
  background: var(--rose);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn:hover {
  background: var(--rose-dark);
  border-color: var(--rose-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn--lg {
  padding: 18px 40px;
  font-size: 1.05rem;
}

.btn--sm {
  padding: 10px 22px;
  font-size: 0.85rem;
}

.btn--outline {
  background: transparent;
  color: var(--rose);
}

.btn--outline:hover {
  background: var(--rose);
  color: var(--white);
}

/* --- HEADER --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition);
}

.header--scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(93, 64, 55, 0.08);
  padding: 10px 0;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  transition: color var(--transition);
}

.header--scrolled .header__logo {
  color: var(--chocolate);
}

.header__nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(93, 64, 55, 0.97);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  z-index: 999;
}

.header__nav--open {
  display: flex;
}

.header__link {
  font-size: 1.3rem;
  color: var(--white);
  font-weight: 500;
  transition: opacity var(--transition);
}

.header__link:hover {
  opacity: 0.7;
}

.header__cta {
  display: none;
}

.header__toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 4px;
}

.header__toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

.header--scrolled .header__toggle span {
  background: var(--chocolate);
}

.header__toggle--active span {
  background: var(--white) !important;
}

.header__toggle--active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.header__toggle--active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- MOBILE BOTTOM BAR --- */
.mobile-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  background: var(--white);
  box-shadow: 0 -4px 20px rgba(93, 64, 55, 0.12);
  padding: 8px;
  gap: 8px;
}

.mobile-bar__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition);
}

.mobile-bar__btn--call {
  background: var(--rose);
  color: var(--white);
}

.mobile-bar__btn--call:hover {
  background: var(--rose-dark);
}

.mobile-bar__btn--text {
  background: var(--blush);
  color: var(--chocolate);
}

.mobile-bar__btn--text:hover {
  background: var(--rose);
  color: var(--white);
}

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('images/hero.jpg') center/cover no-repeat;
  padding: 100px 20px 120px;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(62, 39, 35, 0.55) 0%,
    rgba(62, 39, 35, 0.4) 50%,
    rgba(62, 39, 35, 0.65) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 680px;
}

.hero__title {
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: 0.01em;
}

.hero__sub {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 36px;
  font-weight: 400;
}

.hero__cta-group {
  margin-bottom: 16px;
}

.hero__micro {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

/* --- SERVICES --- */
.services {
  padding: 80px 0;
  background: var(--cream);
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 28px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(30px);
}

.service-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.service-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--blush);
  color: var(--rose);
  margin-bottom: 20px;
}

.service-card__title {
  font-size: 1.4rem;
  color: var(--chocolate);
  margin-bottom: 10px;
}

.service-card__desc {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- GALLERY --- */
.gallery {
  padding: 80px 0;
}

.gallery__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.gallery__item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  opacity: 0;
  transform: translateY(20px);
}

.gallery__item.revealed {
  opacity: 1;
  transform: translateY(0);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery__item:hover img {
  transform: scale(1.05);
}

.gallery__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 16px 12px;
  background: linear-gradient(transparent, rgba(62, 39, 35, 0.7));
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- PROCESS TIMELINE --- */
.process {
  padding: 80px 0;
  background: var(--blush);
}

.process__timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.process__step {
  text-align: center;
  max-width: 320px;
  padding: 24px 0;
  opacity: 0;
  transform: translateY(20px);
}

.process__step.revealed {
  opacity: 1;
  transform: translateY(0);
}

.process__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--rose);
  color: var(--white);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.process__step-title {
  font-size: 1.3rem;
  color: var(--chocolate);
  margin-bottom: 8px;
}

.process__step-desc {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.7;
}

.process__connector {
  width: 2px;
  height: 40px;
  background: var(--rose);
  opacity: 0.3;
}

/* --- ABOUT --- */
.about {
  padding: 80px 0;
}

.about__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
}

.about__inner.revealed {
  opacity: 1;
  transform: translateY(0);
}

.about__image {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
}

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

.about__text p {
  color: var(--text-light);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.about__text .section-title {
  margin-bottom: 20px;
}

.about__area {
  font-weight: 600;
  color: var(--rose) !important;
  font-style: italic;
}

/* --- INQUIRY FORM --- */
.inquire {
  padding: 80px 0;
  background: var(--cream);
}

.inquiry-form {
  max-width: 640px;
  margin: 0 auto;
}

.inquiry-form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.inquiry-form__field {
  display: flex;
  flex-direction: column;
}

.inquiry-form__field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--chocolate);
  margin-bottom: 6px;
}

.inquiry-form__field input,
.inquiry-form__field select,
.inquiry-form__field textarea {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  padding: 14px 16px;
  border: 1px solid #e0d5d0;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  transition: border-color var(--transition);
  outline: none;
  width: 100%;
}

.inquiry-form__field input:focus,
.inquiry-form__field select:focus,
.inquiry-form__field textarea:focus {
  border-color: var(--rose);
}

.inquiry-form__field textarea {
  resize: vertical;
  min-height: 100px;
}

.inquiry-form__field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%235D4037' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.inquiry-form__submit {
  width: 100%;
  margin-top: 8px;
}

.inquiry-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.inquiry-form__status {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 24px;
}

.inquiry-form__status--success {
  color: #4CAF50;
}

.inquiry-form__status--error {
  color: #e53935;
}

/* --- FINAL CTA --- */
.final-cta {
  padding: 80px 0;
  background: var(--chocolate);
  text-align: center;
}

.final-cta__title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: var(--white);
  margin-bottom: 12px;
}

.final-cta__sub {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  margin-bottom: 36px;
}

.final-cta__buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.final-cta .btn {
  width: 100%;
  max-width: 320px;
}

.final-cta .btn--outline {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
}

.final-cta .btn--outline:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--chocolate);
}

/* --- FOOTER --- */
.footer {
  padding: 40px 0 100px; /* extra bottom padding for mobile bar */
  background: #3E2723;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer__name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
}

.footer__area {
  font-size: 0.85rem;
}

.footer__social {
  display: flex;
  gap: 16px;
  margin: 8px 0;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--transition);
}

.footer__social-link:hover {
  background: var(--rose);
  color: var(--white);
}

.footer__copy {
  font-size: 0.8rem;
}

/* --- SCROLL REVEAL TRANSITIONS --- */
.service-card,
.process__step,
.gallery__item,
.about__inner {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.2s; }

.gallery__item:nth-child(2) { transition-delay: 0.05s; }
.gallery__item:nth-child(3) { transition-delay: 0.1s; }
.gallery__item:nth-child(4) { transition-delay: 0.15s; }
.gallery__item:nth-child(5) { transition-delay: 0.05s; }
.gallery__item:nth-child(6) { transition-delay: 0.1s; }
.gallery__item:nth-child(7) { transition-delay: 0.05s; }
.gallery__item:nth-child(8) { transition-delay: 0.1s; }
.gallery__item:nth-child(9) { transition-delay: 0.05s; }
.gallery__item:nth-child(10) { transition-delay: 0.1s; }
.gallery__item:nth-child(11) { transition-delay: 0.05s; }
.gallery__item:nth-child(12) { transition-delay: 0.1s; }

.process__step:nth-child(3) { transition-delay: 0.1s; }
.process__step:nth-child(5) { transition-delay: 0.2s; }
.process__step:nth-child(7) { transition-delay: 0.3s; }

/* ========================================
   TABLET — 640px+
   ======================================== */
@media (min-width: 640px) {
  .services__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .gallery__item--tall {
    grid-row: span 2;
    aspect-ratio: auto;
  }

  .gallery__item--wide {
    grid-column: span 2;
    aspect-ratio: 16/9;
  }

  .inquiry-form__row {
    grid-template-columns: 1fr 1fr;
  }

  .final-cta__buttons {
    flex-direction: row;
    justify-content: center;
  }

  .final-cta .btn {
    width: auto;
  }
}

/* ========================================
   DESKTOP — 900px+
   ======================================== */
@media (min-width: 900px) {
  .container {
    padding: 0 40px;
  }

  /* Header */
  .header__nav {
    display: flex;
    position: static;
    background: none;
    flex-direction: row;
    gap: 32px;
  }

  .header__link {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
  }

  .header--scrolled .header__link {
    color: var(--text);
  }

  .header__link:hover {
    opacity: 0.6;
  }

  .header__cta {
    display: inline-flex;
  }

  .header__toggle {
    display: none;
  }

  /* Hide mobile bar on desktop */
  .mobile-bar {
    display: none;
  }

  /* Footer doesn't need extra bottom padding */
  .footer {
    padding-bottom: 40px;
  }

  /* Sections */
  .services,
  .gallery,
  .process,
  .about,
  .inquire,
  .final-cta {
    padding: 100px 0;
  }

  /* About 2-column */
  .about__inner {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }

  .about__image {
    aspect-ratio: 3/4;
  }

  /* Process horizontal */
  .process__timeline {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
  }

  .process__connector {
    width: 60px;
    height: 2px;
    margin-top: 50px;
  }

  .process__step {
    max-width: 220px;
  }

  /* Gallery */
  .gallery__grid {
    gap: 20px;
  }

  .gallery__caption {
    font-size: 0.85rem;
  }
}

/* ========================================
   LARGE DESKTOP — 1200px+
   ======================================== */
@media (min-width: 1200px) {
  .hero__title {
    font-size: 4.2rem;
  }

  .process__connector {
    width: 80px;
  }
}
