/* Pearl Stitch Studio — additions on top of the exported design. */

/* The raw design template is never shown; the runtime replaces it. The pre-rendered copy (#ssr)
   is for crawlers and visitors without JavaScript, and is removed once the live page mounts. */
x-dc { display: none; }
.js #ssr { display: none; }

/* ---------- mobile menu ---------- */
#ps-menu-btn { display: none; }
@media (max-width: 899.98px) {
  #ps-menu-btn {
    display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    flex-shrink: 0; width: 46px; height: 46px; margin-left: 10px; padding: 0;
    background: rgba(255, 251, 248, .85); border: 1px solid #C9A596; border-radius: 50%;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  #ps-menu-btn span { display: block; width: 18px; height: 1.5px; background: #4B2C20; border-radius: 1px; }
  #ps-menu-btn:focus-visible { outline: 2px solid #9E6F60; outline-offset: 2px; }
}
#ps-menu {
  position: fixed; inset: 0; z-index: 9000; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
  padding: 80px 24px 48px; background: #FBF5F0;
}
#ps-menu[hidden] { display: none; }
#ps-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
#ps-menu a {
  display: inline-block; padding: 6px 4px; color: #4B2C20; text-decoration: none;
  font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 30px; letter-spacing: .03em;
}
#ps-menu a[aria-current="page"] { color: #9E6F60; font-style: italic; }
#ps-menu .ps-menu-wa {
  font-size: 15px; letter-spacing: .3em; text-transform: uppercase; color: #FFF8F4;
  background: #B58676; border-radius: 999px; padding: 15px 30px;
}
.ps-menu-close {
  position: absolute; top: 14px; right: 14px; width: 48px; height: 48px; padding: 0;
  background: none; border: 0; color: #4B2C20; font-size: 36px; line-height: 1; cursor: pointer;
}
html.ps-menu-open { overflow: hidden; }

/* Header WhatsApp pill becomes a round icon on phones so the menu button fits beside it.
   The text stays in the DOM (font-size:0), so it is still the link's accessible name. */
@media (max-width: 599.98px) {
  #dc-root header a[href^="https://wa.me"] {
    display: inline-flex !important; flex-shrink: 0; width: 46px; height: 46px; padding: 0 !important;
    font-size: 0 !important; letter-spacing: 0 !important;
    background: #B58676 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFF8F4' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z'/%3E%3C/svg%3E") center / 22px 22px no-repeat !important;
  }
}

/* ---------- home hero on phones: photo on top, copy below on cream ----------
   The photo starts below the header (logo + buttons) so nothing sits over her face; its top edge
   fades in softly. Face is at ~74% across the source image, so object-position keeps it in frame.
   Applies up to 900px (where the full nav collapses): on tablets the side-by-side layout put the copy over her face. */
@media (max-width: 899.98px) {
  #top { --ps-hero-h: 52vh; }                      /* home: portrait band */
  #top[data-screen-label] { --ps-hero-h: 46vh; }   /* about / fitting / journey */
  .ps-hero-img {
    top: 88px !important; left: 0 !important; right: 0 !important; bottom: auto !important;
    width: 100% !important; max-width: none !important; height: var(--ps-hero-h) !important;
    object-fit: cover !important; object-position: 94% 0 !important;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 56px);
            mask-image: linear-gradient(to bottom, transparent 0, #000 56px);
  }
  #top[data-screen-label="About hero"] .ps-hero-img { object-position: 30% 20% !important; }
  #top[data-screen-label="Fitting guide hero"] .ps-hero-img { object-position: 100% 25% !important; }
  #top[data-screen-label="Journey guide hero"] .ps-hero-img { object-position: 85% 30% !important; }
  .ps-hero-shade {
    background: linear-gradient(to bottom, rgba(251,245,240,0) 0, rgba(251,245,240,0) calc(88px + var(--ps-hero-h) - 22vh),
      rgba(251,245,240,.88) calc(88px + var(--ps-hero-h) - 7vh), #FBF5F0 calc(88px + var(--ps-hero-h)), #FBF5F0 100%) !important;
  }
  .ps-hero-copy { justify-content: flex-end !important; padding-top: calc(var(--ps-hero-h) - 14vh) !important; max-width: 100% !important; }
  /* Journey: step-labels artwork fits the screen instead of being forced to 820px and clipped. */
  .ps-steps-img { width: 100% !important; margin-left: 0 !important; }
  /* Pricing hero has no photo on small screens; drop the full-height minimum that left a blank band. */
  #top[data-screen-label="Pricing hero"] { min-height: 0 !important; }
}

/* Small laptops / landscape tablets: the copy column reaches ~560px, so keep her face to the right of it (home). */
@media (min-width: 900px) and (max-width: 1099.98px) {
  #top:not([data-screen-label]) .ps-hero-img { object-position: 64% 30% !important; }
}

/* ---------- section rhythm: a little more breathing room between sections ---------- */
#dc-root section:not(#top) { padding-block: clamp(20px, 2.6vw, 30px); }

/* ---------- layouts that broke on phones / small tablets ---------- */
.ps-steps-list { display: none; }
@media (max-width: 399.98px) {
  /* Very narrow phones: pill buttons may wrap, and the hero headline steps down a touch. */
  #dc-root a[style*="border-radius: 999px"][style*="white-space: nowrap"] { white-space: normal !important; text-align: center; }
  .ps-hero-copy h1 { font-size: 36px !important; }
  /* Journey SOS 2 × 2: tighter icon gap + tracking so the labels fit. */
  #sos [style*="repeat(2, minmax(0px, 1fr))"] > div { gap: 8px !important; padding-inline: 6px !important; }
  #sos [style*="repeat(2, minmax(0px, 1fr))"] > div span { letter-spacing: .08em !important; font-size: 13px !important; }
}
@media (max-width: 699.98px) {
  /* Journey hero: text steps instead of the (unreadably small) artwork. */
  .ps-steps-img { display: none !important; }
  .ps-steps-list {
    display: flex; flex-wrap: wrap; align-items: center; row-gap: 12px; margin: 8px 0 0; padding: 0; list-style: none;
    font: 500 13px/1.4 'Cormorant Garamond', serif; letter-spacing: .24em; text-transform: uppercase; color: #6E4535;
  }
  .ps-steps-list li + li::before {
    content: ''; display: inline-block; width: 20px; height: 1px; margin: 0 10px; vertical-align: middle; background: #C9A596;
  }
  /* Contact: "We value your time" band was very tight. */
  .ps-care > div { padding-top: 44px !important; padding-bottom: 44px !important; }
}
@media (max-width: 699.98px) {
  /* About: "Experience in numbers" stacks; vertical dividers become short horizontal rules. */
  .ps-num-row { flex-direction: column !important; align-items: center !important; gap: 30px !important; }
  .ps-num-row > div[style*="width: 1px"] { width: 140px !important; height: 1px !important; align-self: center !important; margin: 0 !important; }
  /* About hero: three pillars sit in one even row under the copy. */
  .ps-pillars-wrap { padding-top: 32px !important; }
  .ps-pillars { flex: 1; display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start !important; }
  .ps-pillars > span { display: none !important; }
  .ps-pillars > div { padding: 0 4px !important; }
  .ps-pillars img { height: 58px !important; }
  .ps-pillars > div > span { font-size: 12.5px !important; letter-spacing: .14em !important; text-align: center; }
  /* Fitting: 12 — 8 — 4 stays on one line; labels may wrap. */
  .ps-timeline { flex-wrap: nowrap !important; justify-content: space-between; gap: 8px !important; }
  .ps-timeline > div:not([style*="flex: 1"]) { margin-left: 0 !important; flex-shrink: 1 !important; min-width: 0; }
  .ps-timeline > div > span:first-child { font-size: 54px !important; }
  .ps-timeline > div > span:last-child { white-space: normal !important; text-align: center; font-size: 17px !important; line-height: 1.25; }
  .ps-timeline > div[style*="flex: 1"] { min-width: 14px !important; margin-bottom: 52px !important; }
  /* Journey: decorative swirl crossed the "2 weeks" text. */
  .ps-swirl { opacity: .3 !important; }
  /* Footer: lace artwork faded so the address and links stay readable. */
  .ps-footer-lace { opacity: .28 !important; }
}
@media (max-width: 599.98px) {
  /* Fitting hero: "Bring with you" items in a tidy 2 × 2. */
  .ps-chips { display: grid !important; grid-template-columns: repeat(2, max-content); gap: 8px 26px !important; }
  .ps-chips > span[style*="width: 1px"] { display: none !important; }
}
@media (max-width: 559.98px) {
  /* Home: "Last minute change?" / "SOS" cards stack text above the image. */
  .ps-help-card { grid-template-columns: minmax(0, 1fr) !important; }
  .ps-help-card h3 { min-height: 0 !important; }
}
@media (max-width: 899.98px) {
  /* Contact: "We value your time" — heading and paragraph share one left edge. */
  .ps-care > div { justify-content: flex-start !important; }
  .ps-care > div > div { flex: 1 1 100% !important; max-width: none !important; }
}

/* ---------- subtle motion ---------- */
.ps-motion .ps-reveal {
  opacity: 0; transform: translate3d(0, 22px, 0);
  transition: opacity .9s cubic-bezier(.22, .61, .36, 1) var(--ps-d, 0ms),
              transform 1.1s cubic-bezier(.22, .61, .36, 1) var(--ps-d, 0ms);
}
.ps-motion .ps-reveal.ps-fade { transform: none; }
.ps-motion .ps-reveal.ps-notr { transition: none !important; }
.ps-motion .ps-reveal.ps-in { opacity: 1; transform: none; }
/* Hero photo settles in with a very slow, slight zoom-out (opacity untouched, so it paints at once). */
.ps-motion .ps-hero-img { animation: ps-settle 2.4s cubic-bezier(.2, .6, .2, 1) both; }
@keyframes ps-settle { from { transform: scale(1.06); } to { transform: scale(1); } }
/* Soften the design's hover colour changes (low specificity so it never overrides the reveal). */
:where(#dc-root) :where(a, button) {
  transition: color .35s ease, background-color .35s ease, border-color .35s ease, opacity .35s ease, box-shadow .35s ease;
}
#ps-menu:not([hidden]) { animation: ps-fade-in .35s ease both; }
#ps-menu:not([hidden]) li, #ps-menu:not([hidden]) .ps-menu-wa { animation: ps-up .55s cubic-bezier(.22, .61, .36, 1) both; }
#ps-menu li:nth-child(2) { animation-delay: .04s; } #ps-menu li:nth-child(3) { animation-delay: .08s; }
#ps-menu li:nth-child(4) { animation-delay: .12s; } #ps-menu li:nth-child(5) { animation-delay: .16s; }
#ps-menu li:nth-child(6) { animation-delay: .2s; }  #ps-menu li:nth-child(7) { animation-delay: .24s; }
#ps-menu .ps-menu-wa { animation-delay: .3s; }
@keyframes ps-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ps-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
#ps-sending { animation: ps-fade-in .3s ease both; }

@media (prefers-reduced-motion: reduce) {
  .ps-motion .ps-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .ps-hero-img, #ps-menu, #ps-menu li, #ps-menu .ps-menu-wa, #ps-sending { animation: none !important; }
  html { scroll-behavior: auto !important; }
}

/* ---------- email panel (computers) ---------- */
#ps-mail {
  position: fixed; inset: 0; z-index: 9500; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(75, 44, 32, .28); animation: ps-fade-in .25s ease both;
}
.ps-mail-card {
  position: relative; width: min(440px, 100%); padding: 36px 32px 30px; text-align: center;
  background: #FDF9F6; border: 1px solid #E8D9CF; box-shadow: 0 30px 60px -30px rgba(75, 44, 32, .45);
  font-family: 'Cormorant Garamond', serif; color: #4B2C20; animation: ps-up .35s cubic-bezier(.22, .61, .36, 1) both;
}
.ps-mail-x { position: absolute; top: 8px; right: 10px; width: 40px; height: 40px; border: 0; background: none; font-size: 28px; color: #4B2C20; cursor: pointer; }
.ps-mail-eyebrow { font-size: 14px; letter-spacing: .36em; color: #9E6F60; }
.ps-mail-addr { margin: 10px 0 22px; font-size: 24px; word-break: break-all; }
.ps-mail-actions { display: flex; flex-direction: column; gap: 10px; }
.ps-mail-btn {
  display: block; padding: 13px 20px; border: 1px solid #9E6F60; border-radius: 999px; background: #FFF9F5; cursor: pointer;
  font: 500 14px 'Cormorant Garamond', serif; letter-spacing: .26em; text-transform: uppercase; color: #4B2C20; text-decoration: none;
  transition: background-color .3s ease, color .3s ease;
}
.ps-mail-btn:hover { background: #F3DFD6; color: #4B2C20; }
.ps-mail-primary { background: #B58676; border-color: #B58676; color: #FFF8F4; }
.ps-mail-primary:hover { background: #9E6F60; color: #FFF8F4; }

/* ---------- form sending toast ---------- */
#ps-sending {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 10000;
  padding: 12px 24px; border-radius: 999px; background: #4B2C20; color: #FFF8F4;
  font: 400 17px/1.3 'Cormorant Garamond', serif; letter-spacing: .05em;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .45);
}
