/* 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);
}

/* Pricing: itemised price list (tools/build.py PRICE_LIST) */
.ps-price-list{max-width:900px;width:100%;margin:0 auto;display:flex;flex-direction:column;gap:12px}
.ps-price-group{background:#FDF9F6;border:1px solid #EAD9CE;border-radius:14px;padding:0 clamp(18px,2.6vw,36px);
  box-shadow:0 18px 40px -34px rgba(75,44,32,.35);transition:border-color .2s}
.ps-price-group[open]{border-color:#C9A596}
.ps-price-group>summary{list-style:none;display:flex;align-items:center;gap:clamp(12px,2vw,28px);
  padding:clamp(18px,1.8vw,26px) 0;cursor:pointer}
.ps-price-group>summary::-webkit-details-marker{display:none}
.ps-price-group>summary:focus-visible{outline:2px solid #B58676;outline-offset:4px;border-radius:6px}
.ps-price-title{margin:0;flex:1 1 auto;min-width:0;font-family:'Cormorant Garamond',serif;font-weight:400;
  font-size:clamp(22px,1.9vw,28px);line-height:1.2;color:#4B2C20}
.ps-price-from{flex:0 0 auto;font-family:'Cormorant Garamond',serif;font-size:clamp(19px,1.5vw,23px);color:#9E6F60;white-space:nowrap}
.ps-price-from small{font-size:.58em;letter-spacing:.24em;margin-right:4px}
.ps-price-toggle{position:relative;flex:0 0 auto;width:34px;height:34px;border:1px solid #C9A596;border-radius:50%;
  transition:background .2s}
.ps-price-toggle::before,.ps-price-toggle::after{content:"";position:absolute;left:50%;top:50%;width:12px;height:1px;
  background:#6E4535;transform:translate(-50%,-50%);transition:transform .25s}
.ps-price-toggle::after{transform:translate(-50%,-50%) rotate(90deg)}
.ps-price-group[open] .ps-price-toggle::after{transform:translate(-50%,-50%) rotate(0deg)}
.ps-price-group>summary:hover .ps-price-toggle{background:#F3E4DC}
.ps-price-group[open]>summary{border-bottom:1px solid #EAD6CB}
@media (max-width:480px){.ps-price-from small{letter-spacing:.1em;margin-right:2px}.ps-price-toggle{width:30px;height:30px}
  .ps-price-group>summary{gap:10px}}
.ps-price-row{display:flex;align-items:baseline;gap:10px;padding:9px 0;border-bottom:1px solid #EAD6CB;
  font-family:'Cormorant Garamond',serif;font-size:clamp(18px,1.3vw,21px);line-height:1.35;color:#4B2C20}
.ps-price-row>span:first-child{min-width:0}
.ps-price-dots{flex:1 1 12px;min-width:12px;border-bottom:1px dotted #C9A596;transform:translateY(-5px)}

/* Home: Elfsight Instagram feed. Built-in photos show until the widget has rendered, then hide.
   (Don't hide the empty widget box: Elfsight only starts once its box is visible.) */
.ps-ig-wrap:has(.ps-elfsight [class*="eapps"], .ps-elfsight iframe, .ps-elfsight > div > *) .ps-ig-static{display:none !important}

/* Pricing: estimate calculator. Desktop: panel on the right, sticky. Below 1100px: bar fixed at the bottom. */
.ps-calc-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:clamp(24px,3vw,44px);align-items:start;max-width:1280px;width:100%;margin:0 auto}
.ps-calc-layout .ps-price-list{max-width:none;margin:0}
.ps-price-row .ps-add{flex:0 0 auto;position:relative;width:28px;height:28px;margin-left:4px;border:1px solid #C9A596;border-radius:50%;
  background:transparent;cursor:pointer;align-self:center;transition:background .2s,border-color .2s}
.ps-price-row .ps-add::before,.ps-price-row .ps-add::after{content:"";position:absolute;left:50%;top:50%;width:11px;height:1px;background:#6E4535;transform:translate(-50%,-50%)}
.ps-price-row .ps-add::after{transform:translate(-50%,-50%) rotate(90deg)}
.ps-price-row .ps-add:hover{background:#F3E4DC}
.ps-price-row .ps-add[aria-pressed="true"]{background:#9E6F60;border-color:#9E6F60}
.ps-price-row .ps-add[aria-pressed="true"]::before{width:5px;background:#FFF8F4;transform:translate(-5px,0) rotate(45deg)}
.ps-price-row .ps-add[aria-pressed="true"]::after{width:10px;background:#FFF8F4;transform:translate(-2px,-1px) rotate(-50deg)}
.ps-price-row .ps-add:focus-visible{outline:2px solid #B58676;outline-offset:2px}
.ps-add-hint{display:inline-flex;align-items:center;justify-content:center;width:1.2em;height:1.2em;border:1px solid #C9A596;border-radius:50%;font-style:normal;font-size:.9em;line-height:1}
.ps-calc{position:sticky;top:100px;background:#FDF9F6;border:1px solid #C9A596;border-radius:14px;padding:22px 22px 18px;
  box-shadow:0 24px 50px -36px rgba(75,44,32,.45);font-family:'Cormorant Garamond',serif;color:#4B2C20;font-variant-numeric:lining-nums}
.ps-calc-bar{display:none}
.ps-calc-kicker{margin:0 0 12px;font-weight:600;font-size:14px;letter-spacing:.3em;color:#6E4535}
.ps-calc-empty{margin:0 0 14px;font-style:italic;font-size:18px;line-height:1.45;color:#6E4535}
.ps-calc-list{list-style:none;margin:0 0 6px;padding:0;max-height:46vh;overflow:auto}
.ps-calc-list li{display:grid;grid-template-columns:minmax(0,1fr) auto 22px;gap:8px;align-items:start;padding:9px 0;border-bottom:1px solid #EAD6CB;font-size:17px;line-height:1.3}
.ps-calc-name{display:flex;flex-direction:column;gap:4px}
.ps-calc-amt{color:#9E6F60;white-space:nowrap}
.ps-calc small{font-size:.75em;font-style:italic}
.ps-calc-x{border:0;background:none;color:#9E6F60;font-size:20px;line-height:1;cursor:pointer;padding:0}
.ps-calc-qty{display:inline-flex;align-items:center;gap:8px;font-size:15px;color:#6E4535}
.ps-calc-qty button{width:24px;height:24px;border:1px solid #C9A596;border-radius:50%;background:none;color:#6E4535;cursor:pointer;line-height:1;font-size:15px}
.ps-calc-fee{display:flex;align-items:center;gap:8px;padding:10px 0;border-bottom:1px solid #EAD6CB;font-size:17px;cursor:pointer}
.ps-calc-fee span{margin-left:auto;color:#9E6F60}
.ps-calc-fee input{accent-color:#9E6F60;width:16px;height:16px}
.ps-calc-total{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:14px 0 6px;font-size:18px}
.ps-calc-total strong{font-weight:400;font-size:34px;color:#9E6F60}
.ps-calc-note{margin:0 0 14px;font-style:italic;font-size:15px;line-height:1.4;color:#6E4535}
.ps-calc-send{display:block;text-align:center;padding:13px 18px;border-radius:999px;background:#B58676;color:#FFF8F4;font-size:15px;letter-spacing:.16em;text-transform:uppercase;text-decoration:none}
.ps-calc-send:hover{background:#9E6F60}
.ps-calc-clear{display:block;margin:10px auto 0;border:0;background:none;color:#9E6F60;font:inherit;font-size:15px;text-decoration:underline;cursor:pointer}
@media (max-width:1099px){
  .ps-calc-layout{grid-template-columns:minmax(0,1fr)}
  .ps-calc-layout .ps-price-list{max-width:900px;margin:0 auto}
  .ps-calc{position:fixed;z-index:900;left:12px;right:12px;bottom:12px;top:auto;padding:0;max-width:560px;margin:0 auto;display:none}
  .ps-calc.ps-calc--has{display:block}
  .ps-calc.ps-calc--away:not(.ps-calc--open){display:none}
  .ps-calc-bar{display:flex;width:100%;align-items:center;gap:12px;padding:14px 18px;border:0;background:none;font:inherit;font-size:18px;color:#4B2C20;cursor:pointer;text-align:left}
  .ps-calc-bar strong{margin-left:auto;font-weight:400;font-size:24px;color:#9E6F60}
  .ps-calc-chev{width:9px;height:9px;border-right:1px solid #6E4535;border-bottom:1px solid #6E4535;transform:rotate(-135deg);margin:4px 2px 0}
  .ps-calc--open .ps-calc-chev{transform:rotate(45deg);margin-top:-4px}
  .ps-calc-body{display:none;padding:0 18px 16px;max-height:70vh;overflow:auto}
  .ps-calc--open .ps-calc-body{display:block}
  .ps-calc-list{max-height:none}
}
