/* ==========================================================
   Fatma's Creations — Stylesheet
   1. Variables  2. Base  3. Layout  4. Buttons  5. Navbar
   6. Hero  7. Sections & cards  8. Craft & gallery
   9. Forms  10. Footer  11. Floating WhatsApp
   12. Animations  13. Responsive
   ========================================================== */

/* 1. VARIABLES ------------------------------------------- */
:root {
  --cream: #FFF3E4;
  --beige: #EAD8C0;
  --green: #29452D;
  --rose: #D77D83;
  --brown: #76533C;
  --sun: #E5A92F;
  --ink: #3a2c22;
  --white: #fffaf3;

  --font-head: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-script: 'Dancing Script', cursive;
  --font-body: 'Poppins', system-ui, sans-serif;

  --radius: 22px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(118, 83, 60, .14);
  --shadow-lg: 0 20px 50px rgba(41, 69, 45, .22);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --nav-h: 78px;
}

/* 2. BASE ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 10px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--cream);
  /* subtle paper texture made from tiny dots */
  background-image: radial-gradient(rgba(118, 83, 60, .07) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
  opacity: 0;
  animation: pageIn .6s var(--ease) forwards;
}
body.page-leaving { animation: pageOut .3s ease forwards; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--green); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1.1em; }
.script { font-family: var(--font-script); color: var(--rose); font-size: 1.7rem; line-height: 1.2; }
.eyebrow { font-size: .78rem; letter-spacing: .28em; text-transform: uppercase; color: var(--brown); font-weight: 500; margin-bottom: 1rem; display: block; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--green); color: var(--cream); padding: .6rem 1rem; border-radius: 8px; z-index: 200; }
.skip-link:focus { left: 8px; }

/* 3. LAYOUT ---------------------------------------------- */
.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.section { padding: clamp(4rem, 8vw, 7rem) 0; position: relative; }
.section--beige { background: var(--beige); }
.section--green { background: var(--green); color: var(--cream); }
.section--green h2, .section--green h3 { color: var(--cream); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3.2rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split--reverse > :first-child { order: 2; }

/* Delicate divider with a heart */
.divider { display: flex; align-items: center; justify-content: center; gap: .9rem; color: var(--rose); margin: 1.2rem auto; max-width: 260px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--rose)); }
.divider::after { transform: scaleX(-1); }
.divider svg { width: 18px; height: 18px; }

/* 4. BUTTONS --------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .95rem 1.8rem; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-body); font-size: .95rem; font-weight: 500; cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s, color .3s;
  text-align: center;
}
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--green); color: var(--cream); }
.btn-primary:hover { background: #1e3522; }
.btn-outline { border-color: var(--green); color: var(--green); background: transparent; }
.btn-outline:hover { background: var(--green); color: var(--cream); }
.btn-whatsapp { background: var(--rose); color: #fff; }
.btn-whatsapp:hover { background: #c46a70; }
.btn-light { background: var(--cream); color: var(--green); }
.btn-light:hover { background: #fff; }
.btn-lg { padding: 1.1rem 2.2rem; font-size: 1.02rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.8rem; }

/* 5. NAVBAR ---------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  background: rgba(255, 243, 228, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(118, 83, 60, .15);
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 6px 22px rgba(118, 83, 60, .14); }
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand img { width: 54px; height: 54px; }
.brand-text { font-family: var(--font-script); font-size: 1.7rem; color: var(--green); line-height: 1; font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 1.8rem; list-style: none; margin: 0; padding: 0; }
.nav-links a:not(.btn) { position: relative; font-size: .92rem; font-weight: 500; color: var(--brown); padding: .3rem 0; transition: color .3s; }
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 2px;
  background: var(--rose); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav-links a:not(.btn):hover, .nav-links a[aria-current="page"] { color: var(--green); }
.nav-links a:not(.btn):hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links .btn { padding: .65rem 1.3rem; font-size: .88rem; }
.nav-toggle { display: none; background: none; border: 0; width: 46px; height: 46px; cursor: pointer; padding: 0; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--green); border-radius: 2px; transition: transform .35s var(--ease), opacity .2s, top .35s var(--ease); }
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 29px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* 6. HERO ------------------------------------------------ */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem); overflow: hidden; position: relative; }
.hero h1 em { font-style: italic; color: var(--rose); }
.hero p.lead { font-size: 1.05rem; color: var(--brown); max-width: 34rem; }
.hero-art { position: relative; min-height: 540px; }
.collage-img {
  position: absolute; border-radius: var(--radius); overflow: hidden;
  border: 8px solid var(--white); box-shadow: var(--shadow-lg);
  transition: transform .5s var(--ease);
}
.collage-img img { width: 100%; height: 100%; object-fit: cover; }
.collage-img.a { width: 62%; height: 70%; top: 0; left: 4%; transform: rotate(-3deg); z-index: 2; }
.collage-img.b { width: 52%; height: 52%; right: 0; bottom: 4%; transform: rotate(4deg); z-index: 3; }
.collage-img.c { width: 36%; height: 34%; left: 0; bottom: 0; transform: rotate(-6deg); z-index: 1; }
.collage-img:hover { transform: rotate(0) scale(1.03); z-index: 5; }
.deco { position: absolute; pointer-events: none; z-index: 4; }
.deco svg { width: 100%; height: 100%; }
.deco.flower1 { width: 84px; height: 84px; top: -14px; right: 8%; animation: float 7s ease-in-out infinite; }
.deco.flower2 { width: 64px; height: 64px; bottom: 36%; left: -10px; animation: float 8s ease-in-out infinite reverse; }
.deco.heart1 { width: 34px; height: 34px; top: 46%; right: 6%; animation: float 6s ease-in-out infinite; }
.section-deco { position: absolute; width: 120px; opacity: .18; pointer-events: none; }

/* image placeholder when a photo is missing (set by main.js) */
.img-missing {
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.5) 0 8%, transparent 9%),
    repeating-linear-gradient(45deg, var(--beige) 0 10px, #f2e3cf 10px 20px);
  min-height: 100%; width: 100%; position: relative;
}
.photo.is-missing, .collage-img.is-missing, .gallery-item.is-missing { background: repeating-linear-gradient(45deg, var(--beige) 0 10px, #f2e3cf 10px 20px); }
.photo.is-missing::after, .collage-img.is-missing::after, .gallery-item.is-missing::after {
  content: "♡"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 3rem; color: var(--rose); opacity: .7;
}
.img-missing { opacity: 0; } /* hide the broken-image icon; parent shows the pattern */

/* 7. SECTIONS & CARDS ------------------------------------ */
.photo { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); border: 8px solid var(--white); aspect-ratio: 4 / 5; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.photo:hover img { transform: scale(1.05); }
.photo.wide { aspect-ratio: 5 / 4; }
.intro { text-align: center; max-width: 780px; margin-inline: auto; }
.intro p { font-size: 1.1rem; color: var(--brown); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 2.4rem 2rem; text-align: center;
  border: 1px solid rgba(118, 83, 60, .14); box-shadow: var(--shadow); position: relative;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.card::before { content: ""; position: absolute; inset: 8px; border: 1px dashed rgba(215, 125, 131, .45); border-radius: calc(var(--radius) - 8px); pointer-events: none; }
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.card .icon { width: 68px; height: 68px; margin: 0 auto 1.2rem; display: grid; place-items: center; border-radius: 50%; background: var(--cream); color: var(--rose); }
.card .icon svg { width: 34px; height: 34px; }
.card p { margin: 0; color: var(--brown); font-size: .96rem; }

.journey-list { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 1rem; }
.journey-list li { display: flex; gap: 1rem; align-items: flex-start; }
.journey-list .dot { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--rose); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; }

.cta-band { text-align: center; padding: clamp(4rem, 8vw, 6.5rem) 0; }
.cta-band p { max-width: 520px; margin: 0 auto 1.6rem; color: var(--beige); font-size: 1.1rem; }

.page-banner { text-align: center; padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(2rem, 4vw, 3rem); }
.page-banner p { max-width: 640px; margin: 0 auto; color: var(--brown); font-size: 1.08rem; }

.story p { font-size: 1.05rem; color: var(--ink); }
.story p:first-of-type::first-letter { font-family: var(--font-head); font-size: 4rem; float: left; line-height: .8; padding: .35rem .6rem 0 0; color: var(--rose); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
.quote { font-family: var(--font-head); font-style: italic; font-size: clamp(1.6rem, 3.4vw, 2.4rem); text-align: center; max-width: 820px; margin: 0 auto; color: var(--green); }

/* 8. CRAFT & GALLERY ------------------------------------- */
.craft-block { margin-bottom: clamp(3rem, 6vw, 5rem); }
.craft-block .num { font-family: var(--font-script); font-size: 3.4rem; color: var(--sun); line-height: 1; display: block; }
.craft-art {
  aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--white); border: 8px solid var(--white);
  box-shadow: var(--shadow-lg); display: grid; place-items: center; color: var(--rose); position: relative; overflow: hidden;
  background-image: radial-gradient(var(--beige) 2px, transparent 2px); background-size: 18px 18px;
}
.craft-art svg { width: 46%; height: auto; }
.gallery { columns: 3 260px; column-gap: 1.2rem; }
.gallery-item { break-inside: avoid; margin: 0 0 1.2rem; border-radius: var(--radius); overflow: hidden; position: relative; box-shadow: var(--shadow); border: 6px solid var(--white); min-height: 180px; }
.gallery-item img { width: 100%; transition: transform .7s var(--ease), filter .5s; }
.gallery-item:hover img { transform: scale(1.06); filter: saturate(1.1); }
.gallery-item.tall img { aspect-ratio: 3 / 4; object-fit: cover; }
.gallery-item.square img { aspect-ratio: 1; object-fit: cover; }
.gallery-item.land img { aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-note { text-align: center; font-size: .85rem; color: var(--brown); margin-top: 1.4rem; font-style: italic; }

/* 9. FORMS ----------------------------------------------- */
.form-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.4rem; align-items: start; }
.form-card { background: var(--white); border-radius: var(--radius); padding: clamp(1.6rem, 4vw, 2.8rem); box-shadow: var(--shadow-lg); border: 1px solid rgba(118, 83, 60, .14); }
.field { margin-bottom: 1.3rem; }
.field label { display: block; font-weight: 500; font-size: .9rem; color: var(--green); margin-bottom: .4rem; }
.field .opt { color: var(--brown); font-weight: 400; font-size: .8rem; }
.field input, .field textarea {
  width: 100%; padding: .9rem 1.05rem; font: inherit; font-size: 16px; /* 16px prevents iOS zoom */
  color: var(--ink); background: var(--cream); border: 1.5px solid var(--beige); border-radius: var(--radius-sm);
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 4px rgba(215, 125, 131, .2); background: #fff; }
.field.invalid input, .field.invalid textarea { border-color: #b3372f; background: #fff5f4; }
.error-msg { display: none; color: #b3372f; font-size: .82rem; margin-top: .35rem; }
.field.invalid .error-msg { display: block; }
.form-note { font-size: .85rem; color: var(--brown); margin: 1rem 0 0; text-align: center; }
.side-card { background: var(--green); color: var(--cream); border-radius: var(--radius); padding: 2.2rem; position: sticky; top: calc(var(--nav-h) + 20px); }
.side-card h3 { color: var(--cream); }
.side-card p { color: var(--beige); font-size: .95rem; }
.side-card .btn { width: 100%; }

.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.info-card { background: var(--white); border-radius: var(--radius); padding: 1.8rem; border: 1px solid rgba(118, 83, 60, .14); box-shadow: var(--shadow); display: flex; gap: 1.1rem; align-items: flex-start; }
.info-card .icon { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--cream); color: var(--rose); display: grid; place-items: center; }
.info-card .icon svg { width: 26px; height: 26px; }
.info-card h3 { font-size: 1.25rem; margin-bottom: .2rem; }
.info-card p { margin: 0; color: var(--brown); font-size: .95rem; }
.social-row { display: flex; justify-content: center; gap: .8rem; margin-top: 1rem; }
.social-ph { width: 46px; height: 46px; border-radius: 50%; border: 1.5px dashed var(--brown); display: grid; place-items: center; color: var(--brown); opacity: .65; }
.social-ph svg { width: 22px; height: 22px; }

/* 10. FOOTER --------------------------------------------- */
.site-footer { background: var(--green); color: var(--cream); padding: 4.5rem 0 1.6rem; position: relative; overflow: hidden; }
.site-footer::before { /* crochet-style scalloped top edge */
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 14px;
  background: radial-gradient(circle at 10px 0, var(--cream) 10px, transparent 11px) 0 0 / 20px 14px repeat-x;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 3rem; }
.footer-brand img { width: 92px; height: 92px; margin-bottom: .8rem; }
.footer-brand .brand-text { color: var(--cream); font-size: 2rem; display: block; }
.footer-tag { font-family: var(--font-head); font-style: italic; font-size: 1.2rem; color: var(--sun); margin: .4rem 0 .8rem; }
.site-footer p { color: var(--beige); font-size: .93rem; }
.site-footer h4 { color: var(--cream); font-size: 1.3rem; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer-links a { color: var(--beige); font-size: .93rem; transition: color .25s, padding .25s; }
.footer-links a:hover { color: #fff; padding-left: 6px; }
.footer-bottom { border-top: 1px solid rgba(234, 216, 192, .22); margin-top: 3rem; padding-top: 1.4rem; text-align: center; font-size: .82rem; color: var(--beige); }
.footer-bottom svg { width: 13px; height: 13px; color: var(--rose); display: inline; vertical-align: -1px; }

/* 11. FLOATING WHATSAPP ---------------------------------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 150; width: 60px; height: 60px; border-radius: 50%;
  background: #25D366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25); transition: transform .3s var(--ease);
}
.wa-float svg { width: 32px; height: 32px; }
.wa-float:hover { transform: scale(1.1) rotate(-6deg); }
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25D366; animation: ping 2.6s ease-out infinite; }

/* 12. ANIMATIONS ----------------------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .12s; }
.reveal[data-delay="2"] { transition-delay: .24s; }
.reveal[data-delay="3"] { transition-delay: .36s; }
@keyframes pageIn { to { opacity: 1; } }
@keyframes pageOut { to { opacity: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(6deg); } }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  body { opacity: 1; }
}

/* 13. RESPONSIVE ----------------------------------------- */
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); padding: 1rem 1.5rem 1.8rem; border-bottom: 1px solid var(--beige); box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: transform .35s var(--ease), opacity .3s, visibility .3s;
  }
  .nav-links.open { transform: none; opacity: 1; visibility: visible; }
  .nav-links li { border-bottom: 1px solid rgba(118, 83, 60, .12); }
  .nav-links li:last-child { border: 0; padding-top: 1rem; }
  .nav-links a:not(.btn) { display: block; padding: .95rem 0; font-size: 1rem; }
  .split, .form-wrap { grid-template-columns: 1fr; }
  .split--reverse > :first-child { order: 0; }
  .hero-art { min-height: 460px; max-width: 560px; margin: 1rem auto 0; width: 100%; }
  .cards, .pillars { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .side-card { position: static; }
}
@media (max-width: 600px) {
  :root { --nav-h: 68px; }
  .brand img { width: 44px; height: 44px; }
  .brand-text { font-size: 1.4rem; }
  .hero-art { min-height: 380px; }
  .btn-row .btn { width: 100%; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .wa-float { width: 54px; height: 54px; right: 14px; bottom: 14px; }
  .gallery { columns: 2 140px; column-gap: .8rem; }
  .gallery-item { margin-bottom: .8rem; border-width: 4px; }
  .photo, .collage-img { border-width: 5px; }
}
