/*
Theme Name:   Rebecca Wang (Flatsome Child)
Theme URI:    https://www.rebeccawangentertainment.com
Description:  Child theme recreating the Rebecca Wang Squarespace design in Flatsome.
Author:       Grapeseed Digital Design
Template:     flatsome
Version:      1.0.0
Text Domain:  rw-child
*/

/* =====================================================
   Contents
   1  Design tokens (change colours / sizes here)
   2  Global type
   3  Headings (site-wide look: capitals, wide spacing, short line)
   4  Home: hero
   5  Home: feature sections (image + text)
   6  Buttons / read-more links
   7  Mobile menu (Flatsome off-canvas)
   8  Gallery page spacing
   ===================================================== */


/* ---------- 1. Design tokens ---------- */
:root {
  --rw-font: 'Raleway', system-ui, sans-serif;
  --rw-text: #3a3632;          /* body text */
  --rw-head: #1d1a17;          /* headings */
  --rw-line: #b9b1a4;          /* short line under headings */
  --rw-bg: #ffffff;

  --rw-h1-size: 26px;
  --rw-h2-size: 21px;
  --rw-h3-size: 18px;
  --rw-body-size: 17px;
  --rw-body-leading: 1.85;
}
@media (max-width: 800px) {
  :root {
    --rw-h1-size: 20px;
    --rw-h2-size: 18px;
    --rw-h3-size: 16px;
    --rw-body-size: 16px;
  }
}


/* ---------- 2. Global type ---------- */
body {
  font-family: var(--rw-font);
  font-weight: 300;
  font-size: var(--rw-body-size);
  line-height: var(--rw-body-leading);
  color: var(--rw-text);
  background: var(--rw-bg);
}
a,
a:hover {
  text-decoration: none !important;
}
#main p {
  font-weight: 300;
}


/* ---------- 3. Headings ----------
   Matches the Squarespace "new look": Raleway, capitals, wide letter spacing,
   short line under H1. Only affects page content (#main), not header/footer. */
#main h1,
#main .entry-title,
#main .page-title {
  font-family: var(--rw-font) !important;
  font-size: var(--rw-h1-size) !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: var(--rw-head) !important;
}
#main h1 {
  margin-bottom: 30px;
}
#main h1::after,
.rw-feature__title::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  background: var(--rw-line);
  margin-top: 22px;
}
/* Centred headings get a centred line */
#main .text-center h1::after,
#main h1.text-center::after {
  margin-left: auto;
  margin-right: auto;
}
#main h2,
#main h3,
#main h4,
#main .post-title,
#main .post-title a {
  font-family: var(--rw-font) !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: var(--rw-head) !important;
}
#main h2 { font-size: var(--rw-h2-size) !important; }
#main h3,
#main h4,
#main .post-title,
#main .post-title a { font-size: var(--rw-h3-size) !important; }


/* ---------- 4. Home: hero ---------- */
.rw-hero__image {
  display: block;
  width: 100%;
  height: min(88vh, 900px);
  object-fit: cover;
  object-position: center 30%;
}
.rw-hero__body {
  max-width: 820px;
  margin: 0 auto;
  padding: 70px 24px 40px;
  text-align: center;
}
.rw-hero__wordmark {
  display: block;
  width: min(520px, 80%);
  height: auto;
  margin: 0 auto 36px;
}
/* The wordmark sits inside an H1 for SEO; hide the H1's line here */
#main .rw-hero h1 { margin: 0; }
#main .rw-hero h1::after { display: none; }
.rw-hero__intro p {
  margin: 0;
}
@media (max-width: 767px) {
  .rw-hero__image { height: 62vh; }
  .rw-hero__body { padding: 44px 20px 24px; }
  .rw-hero__wordmark { margin-bottom: 26px; }
}


/* ---------- 5. Home: feature sections ---------- */
.rw-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}
.rw-feature__media {
  height: 100%;
  min-height: 560px;
}
.rw-feature__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rw-feature__text {
  padding: 60px clamp(30px, 6vw, 90px);
}
#main .rw-feature__title {
  font-size: var(--rw-h2-size) !important;
  letter-spacing: 0.14em !important;
  margin: 0 0 30px;
}
.rw-feature__text p:last-child { margin-bottom: 0; }
/* Image on the right */
.rw-feature--reverse .rw-feature__media { order: 2; }

@media (min-width: 768px) and (max-width: 1280px) {
  .rw-feature__media { min-height: 480px; }
  .rw-feature__text { padding: 45px; }
}
@media (max-width: 767px) {
  .rw-feature { grid-template-columns: 1fr; }
  .rw-feature--reverse .rw-feature__media { order: 0; }   /* image always on top on phones */
  .rw-feature__media { min-height: 0; height: 500px; }
  .rw-feature__text { padding: 40px 30px; }
}

/* Closing full-width image */
.rw-full-image img {
  display: block;
  width: 100%;
  height: min(80vh, 820px);
  object-fit: cover;
}
@media (max-width: 767px) {
  .rw-full-image img { height: 560px; }
}


/* ---------- 6. Buttons / read-more links ---------- */
.rw-btn,
#main .more-link,
#main .button.is-outline {
  display: inline-block;
  min-width: 150px;
  padding: 0.5rem 1rem;
  border: 1px solid #000 !important;
  border-radius: 0 !important;
  background: transparent;
  color: #000 !important;
  font-family: var(--rw-font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  transition: background 0.25s, color 0.25s;
}
.rw-btn:hover,
#main .more-link:hover,
#main .button.is-outline:hover {
  background: #000;
  color: #fff !important;
}


/* ---------- 7. Mobile menu (Flatsome off-canvas) ----------
   Phones only. Left-aligned, no lines, light capitals, gentle fade-up. */
@media (max-width: 849px) {
  .off-canvas .nav-sidebar {
    padding-top: 0;
  }
  .off-canvas .nav-sidebar > li {
    border: 0 !important;
    margin: 0;
  }
  .off-canvas .nav-sidebar > li > a {
    display: flex;
    align-items: center;
    min-height: 64px;
    padding: 20px 24px !important;
    font-family: var(--rw-font) !important;
    font-size: 21px !important;
    font-weight: 300 !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase;
    color: var(--rw-head) !important;
    opacity: 0.62;
    transition: opacity 0.3s ease;
  }
  .off-canvas .nav-sidebar > li.current-menu-item > a,
  .off-canvas .nav-sidebar > li > a:focus-visible {
    opacity: 1;
    font-weight: 500 !important;
  }
  /* Hide Flatsome's dividers and social icons inside the mobile menu */
  .off-canvas .nav-sidebar > li.header-divider,
  .off-canvas .nav-sidebar > li.html.header-social-icons {
    display: none;
  }

  .mfp-ready .off-canvas .nav-sidebar > li {
    animation: rwMenuIn 0.6s ease both;
  }
  .mfp-ready .off-canvas .nav-sidebar > li:nth-child(1) { animation-delay: 0.05s; }
  .mfp-ready .off-canvas .nav-sidebar > li:nth-child(2) { animation-delay: 0.12s; }
  .mfp-ready .off-canvas .nav-sidebar > li:nth-child(3) { animation-delay: 0.19s; }
  .mfp-ready .off-canvas .nav-sidebar > li:nth-child(4) { animation-delay: 0.26s; }
  .mfp-ready .off-canvas .nav-sidebar > li:nth-child(5) { animation-delay: 0.33s; }
  .mfp-ready .off-canvas .nav-sidebar > li:nth-child(6) { animation-delay: 0.40s; }
  .mfp-ready .off-canvas .nav-sidebar > li:nth-child(7) { animation-delay: 0.47s; }
}
@keyframes rwMenuIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mfp-ready .off-canvas .nav-sidebar > li { animation: none; }
}


/* ---------- 8. Gallery page spacing ----------
   Wrap the Gallery page heading/intro in a row with class "rw-gallery-intro". */
.rw-gallery-intro {
  padding-top: 16px !important;
  padding-bottom: 12px !important;
}
@media (max-width: 620px) {
  .rw-gallery-intro { padding-top: 12px !important; }
}
.rw-gallery .gallery-caption,
.rw-gallery figcaption {
  text-align: center;
}
