/* site.css
 * Shared header, menu, "on this page" chapter bar and layout helpers for
 * the public pages (index, how-it-works, more-than-a-story, keepsakes,
 * gifts, products, contact). Loaded AFTER each page's own <style>, so a
 * rule here wins over the page's rule of the same strength.
 * Goes with site.js. Added 26 Nov 2026.
 *
 * What it does
 *  1. The header stays on screen as you scroll. On phones it tucks away
 *     while you scroll down and slides back as soon as you scroll up.
 *     "Create a story" is always in it, phones included.
 *  2. Wide screens (1180px+): logo, menu and buttons on one slim row.
 *     Each menu item opens a small list of that page's sections.
 *  3. Long pages get a chapter bar ("On this page") that sticks under the
 *     header, shows where you are, and jumps to a section when tapped.
 *  4. Layout helpers: .split (heading on one side, content on the other,
 *     desktop only) and .swipe (a row you swipe through, phones only).
 */

:root{--head-h:76px;--ch-h:0px}

/* ---------- 1. sticky header ---------- */
.site-head{position:sticky;top:0;z-index:60;background:rgba(248,241,230,.96);
  -webkit-backdrop-filter:saturate(1.2) blur(8px);backdrop-filter:saturate(1.2) blur(8px);
  transition:transform .28s ease,box-shadow .28s ease}
.site-head.scrolled{box-shadow:0 10px 26px -20px rgba(87,74,99,.55);border-bottom:1px solid rgba(110,90,130,.08)}
.site-head.tucked{transform:translateY(-100%)}
.site-head nav{transition:padding .25s ease}
@media (prefers-reduced-motion:reduce){.site-head,.site-head nav{transition:none}}

/* ---------- 2. menu: one slim row on wide screens ---------- */
@media (min-width:1180px){
  .site-head nav{max-width:1320px;display:flex;align-items:center;gap:28px;padding:16px 28px}
  .site-head .nav-row-top{display:contents}
  .site-head .nav-brand{order:1}
  .site-head .nav-row-links{order:2;flex:1;margin:0;padding:0;border:0;gap:4px;flex-wrap:nowrap}
  .site-head .nav-primary{order:3}
  .site-head.scrolled nav{padding-top:11px;padding-bottom:11px}
}
/* 1180 to 1299px: same single row, a little more compact */
@media (min-width:1180px) and (max-width:1299px){
  .site-head nav{gap:18px;padding-left:24px;padding-right:24px}
  .site-head .nav-brand{font-size:1.05rem}
  .site-head .nav-row-links .nav-item > a{font-size:.8rem;padding:7px 7px;gap:5px}
  .site-head nav .btn{padding:10px 15px;font-size:.86rem;letter-spacing:1.2px}
}
/* in-between widths keep the two rows, a little tighter once scrolled */
@media (min-width:1081px) and (max-width:1179px){
  .site-head.scrolled nav{padding-top:12px;padding-bottom:10px}
  .site-head.scrolled .nav-row-links{margin-top:10px;padding-top:9px}
}

/* menu items and their section lists */
@media (min-width:1081px){.site-head .nav-row-links{gap:6px}}
.nav-row-links .nav-item{position:relative;display:inline-flex}
.nav-row-links .nav-item > a,.nav-row-links > a{padding:8px 10px;border-radius:8px;display:inline-flex;align-items:center;gap:6px}
.nav-row-links .nav-item > a::after{content:"";width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;
  transform:translateY(-2px) rotate(45deg);opacity:.55;transition:transform .2s ease}
.nav-row-links .nav-item:hover > a::after,.nav-row-links .nav-item:focus-within > a::after{transform:translateY(1px) rotate(225deg)}
.nav-drop{position:absolute;top:100%;left:50%;transform:translate(-50%,6px);padding-top:8px;min-width:250px;
  opacity:0;visibility:hidden;transition:opacity .16s ease,transform .16s ease,visibility 0s .16s;z-index:70}
.nav-item:hover .nav-drop,.nav-item:focus-within .nav-drop{opacity:1;visibility:visible;transform:translate(-50%,0);transition:opacity .16s ease,transform .16s ease}
.nav-drop-inner{background:#fff;border-radius:14px;border:1px solid rgba(110,90,130,.12);box-shadow:0 20px 44px -20px rgba(87,74,99,.5);padding:8px}
.nav-drop a{display:block;padding:9px 12px;border-radius:9px;color:var(--plum-deep) !important;font-weight:600;font-size:.88rem;text-decoration:none;white-space:nowrap}
.nav-drop a:hover,.nav-drop a:focus{background:var(--paper-warm);color:var(--coral) !important;outline:none}
.nav-drop a small{display:block;font-weight:500;font-size:.76rem;color:var(--ink-soft);white-space:normal;margin-top:1px}
.nav-drop a.nav-drop-all{border-top:1px solid rgba(110,90,130,.1);border-radius:0 0 9px 9px;margin-top:4px;padding-top:11px;color:var(--plum) !important;font-size:.82rem}

/* ---------- phones and tablets: button in the header, menu with sections ---------- */
@media (max-width:1080px){
  .site-head .nav-row-top{flex-wrap:nowrap}
  .site-head .nav-primary{display:flex;margin-left:auto;margin-right:14px}
  .site-head .nav-primary .nav-signin,.site-head .nav-primary [data-account-nav]{display:none}
  .site-head nav .nav-primary .btn{padding:9px 14px;font-size:.74rem;letter-spacing:1px;white-space:nowrap}
  .site-head .nav-toggle{flex-shrink:0}
  .site-head .mobile-menu{max-height:0}
  .site-head .mobile-menu.open{max-height:calc(100vh - 70px);max-height:calc(100dvh - 70px);overflow-y:auto}

  .mm-group{border-top:1px solid rgba(110,90,130,.08)}
  .mm-group:first-child{border-top:none}
  .mm-row{display:flex;align-items:stretch}
  .mobile-menu .mm-row > a{flex:1;border-top:none !important}
  .mm-more{flex:0 0 54px;background:none;border:none;border-left:1px solid rgba(110,90,130,.08);cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--plum)}
  .mm-more::before{content:"";width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform .2s ease}
  .mm-more[aria-expanded="true"]::before{transform:translateY(2px) rotate(225deg)}
  .mm-sub{display:none;background:var(--paper-warm);padding:4px 0 8px}
  .mm-sub.open{display:block}
  .mobile-menu .mm-sub a{padding:10px 20px 10px 34px !important;font-size:.92rem !important;font-weight:600;color:var(--ink-soft) !important;border-top:none !important}
  .mobile-menu .mm-sub a:hover{color:var(--coral) !important}
  .mobile-menu > a:not(.btn):not([data-account-nav]){border-top:1px solid rgba(110,90,130,.08)}
}
@media (max-width:430px){
  .site-head nav .nav-brand{font-size:.9rem}
  .site-head .nav-primary{margin-right:10px}
  .site-head nav .nav-primary .btn{padding:8px 11px;font-size:.68rem;letter-spacing:.6px}
}
@media (max-width:350px){.site-head .nav-primary{display:none}}

/* ---------- 3. chapter bar ---------- */
.chapters{position:sticky;top:var(--head-h);z-index:55;background:rgba(252,247,238,.97);
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  border-top:1px solid rgba(110,90,130,.08);border-bottom:1px solid rgba(110,90,130,.1);
  transition:top .28s ease,box-shadow .28s ease}
.chapters.stuck{box-shadow:0 10px 24px -20px rgba(87,74,99,.5)}
html.head-tucked .chapters{top:0}
.ch-inner{max-width:1080px;margin:0 auto;padding:10px 28px;display:flex;align-items:center;gap:8px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.ch-inner::-webkit-scrollbar{display:none}
.ch-label{font-size:.68rem;letter-spacing:2px;text-transform:uppercase;font-weight:700;color:var(--ink-soft);opacity:.75;margin-right:8px;white-space:nowrap;flex-shrink:0}
.chapters a{flex-shrink:0;font-family:'Fraunces',serif;font-weight:600;font-size:.9rem;color:var(--plum-deep);text-decoration:none;
  padding:7px 15px;border-radius:20px;border:1.5px solid rgba(110,90,130,.16);background:#fff;white-space:nowrap;transition:all .2s ease}
.chapters a:hover{border-color:var(--plum);color:var(--plum)}
.chapters a.on{background:var(--plum);border-color:var(--plum);color:#fff}
@media (max-width:760px){
  .ch-inner{padding:9px 20px;gap:7px}
  .ch-label{display:none}
  .chapters a{font-size:.84rem;padding:6px 13px}
}
@media (prefers-reduced-motion:reduce){.chapters{transition:none}}

/* jumps land below the header and chapter bar */
[id]{scroll-margin-top:calc(var(--head-h) + var(--ch-h) + 14px)}

/* ---------- 4a. desktop: use the width ---------- */
@media (min-width:1081px){
  section{padding-top:72px;padding-bottom:72px}
  .sec-head{margin-bottom:40px}
  .page-hero{padding-top:44px;padding-bottom:56px}

  /* heading on the left, the content beside it */
  .split{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);column-gap:64px;row-gap:0;align-items:center}
  .split > .split-head{grid-column:1;grid-row:1 / span 8;align-self:center;text-align:left !important;margin:0 !important;max-width:none !important}
  .split > .split-head p,.split > .split-head .lead{margin-left:0;margin-right:0}
  .split > .split-aside{grid-column:2;margin-left:0;margin-right:0;max-width:none;width:100%}
  .split > .split-aside + .split-aside{margin-top:22px}
  .split > :not(.split-head):not(.split-aside){grid-column:1 / -1}
  .split > .memory-pillars.split-aside{grid-template-columns:1fr;gap:16px;margin-bottom:0}
  .split.flip{grid-template-columns:minmax(0,7fr) minmax(0,5fr)}
  .split.flip > .split-head{grid-column:2}
  .split.flip > .split-aside{grid-column:1}
}

/* five steps running across the page on wide screens (how-it-works, keepsakes) */
@media (min-width:1001px){
  .timeline.across{max-width:none;display:grid;grid-template-columns:repeat(5,1fr);gap:16px;align-items:start}
  .timeline.across::before{left:10%;right:10%;top:27px;bottom:auto;width:auto;height:2px;background:linear-gradient(90deg,var(--gold-soft),var(--lilac))}
  .timeline.across .tstep{flex-direction:column;align-items:center;padding:0;gap:16px}
  .timeline.across .tstep .dot{flex:0 0 auto;width:56px;height:56px}
  .timeline.across .tbody{width:100%;padding:18px 18px 20px}
  .timeline.across h3{font-size:1.1rem}
  .timeline.across p{font-size:.93rem;line-height:1.55}
  .timeline.across .chips{gap:6px}
  .timeline.across .chips span{font-size:.76rem;padding:4px 10px}
}

@media (min-width:1200px){.timeline.across{width:calc(100% + 120px);margin-left:-60px}}

/* ---------- 4b. phones: swipe through a row of cards ---------- */
@media (max-width:760px){
  .swipe.swipe{display:flex !important;grid-template-columns:none !important;flex-wrap:nowrap;overflow-x:auto;scroll-snap-type:x mandatory;
    gap:14px;max-width:none !important;margin-left:-20px !important;margin-right:-20px !important;padding:6px 20px 20px !important;
    scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  .swipe.swipe::-webkit-scrollbar{display:none}
  .swipe.swipe > *{flex:0 0 84%;max-width:84%;scroll-snap-align:center;margin-top:0 !important;margin-bottom:0 !important}
  .swipe.swipe.narrow > *{flex-basis:72%;max-width:72%}
  .swipe-dots{display:flex;justify-content:center;align-items:center;gap:7px;margin:-6px 0 8px}
  .swipe-dots button{width:7px;height:7px;border-radius:50%;border:none;padding:0;background:rgba(110,90,130,.25);cursor:pointer;transition:all .2s ease}
  .swipe-dots button.on{background:var(--plum);width:20px;border-radius:4px}
  .swipe-dots .sd-hint{font-size:.74rem;color:var(--ink-soft);font-style:italic;margin-left:8px}
}
@media (min-width:761px){.swipe-dots{display:none}}

/* longer bullet lists fold on phones (products) */
@media (max-width:760px){
  ul.fold:not(.unfolded) > li.fold-hide{display:none}
  .fold-btn{background:none;border:none;padding:4px 0 0 18px;font:inherit;font-size:.86rem;font-weight:700;color:var(--plum);cursor:pointer;text-decoration:underline;text-decoration-color:var(--gold-soft);text-underline-offset:3px}
}
@media (min-width:761px){.fold-btn{display:none}}

/* small "read more about it" link used across pages */
.page-link{display:inline-block;margin-top:10px;color:var(--plum);font-weight:700;font-size:.92rem;text-decoration:none;border-bottom:1.5px solid var(--gold-soft)}
.page-link:hover{color:var(--coral)}
