/* Font for the "bits of dreams" text in the header */
@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@300&display=swap");

/* =====================================================================
   BITS OF DREAMS — MODERN STYLE
   Change the colors and fonts here to restyle every page that uses it.
   ===================================================================== */
:root {
  --bg: #faf8f6;          /* page background */
  --tint: #f1ebe5;        /* soft beige sections */
  --ink: #1f1c1b;         /* main text (matches the black line-art logo) */
  --muted: #6f6762;       /* secondary text */
  --accent: #8a6f5e;      /* warm taupe for buttons & highlights */
  --accent-dark: #6b5345;
  --line: #e5ddd6;        /* thin borders */
  --card: #ffffff;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.75 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--accent-dark); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; margin: 0 0 .5em; }
h1 { font-size: clamp(2.5rem, 5.5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 2.6rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1.1em; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ---------------- Shared header ---------------- */
#header-placeholder { position: sticky; top: 0; z-index: 1000; min-height: 104px; }
.headermenu { background: rgba(250, 248, 246, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.header { max-width: 1160px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 24px; position: relative; }
.headerbodydivider { height: 1px; background: var(--line); }
.brand-link { display: flex; align-items: center; gap: 14px; text-decoration: none; }
img.logo { height: 84px; width: auto; transition: height .25s; }
img.title { height: 62px; width: auto; transition: height .25s; }
.sticky img.logo { height: 56px; }
.sticky img.title { height: 42px; }

/* ---- Title text next to the logo (replaces title.png) ---- */
.brand-text { font-family: "Oswald", var(--sans); font-weight: 300; font-size: 15px; line-height: 1.2; letter-spacing: .42em; text-transform: lowercase; color: var(--ink); transition: font-size .25s; }
.sticky .brand-text { font-size: 12px; }
@media (max-width: 600px) { .brand-text, .sticky .brand-text { font-size: 11px; letter-spacing: .36em; } }

.hamburger { display: none; margin-left: auto; background: none; border: 0; font-size: 28px; line-height: 1; color: var(--ink); cursor: pointer; padding: 6px 8px; }

.horizontalmenu { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.horizontalmenu .menu, .horizontalmenu > a {
  font: 500 13px/1 var(--sans); letter-spacing: .14em; color: var(--ink); text-decoration: none;
  padding: 10px 0; cursor: pointer; border-bottom: 1px solid transparent; user-select: none; white-space: nowrap;
}
.horizontalmenu .menu:hover, .horizontalmenu .menu.current, .horizontalmenu .menu.open { color: var(--accent-dark); border-color: var(--accent); }
.gallery-toggle::after, .order-toggle::after { content: "▾"; font-size: 10px; margin-left: 6px; opacity: .6; }

.menu-group { position: relative; }
.submenu {
  display: none; position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  min-width: 170px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(31, 28, 27, .08); flex-direction: column;
}
.submenu::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; } /* hover bridge */
.submenu.active { display: flex; }
@media (hover: hover) and (min-width: 901px) { .menu-group:hover .submenu { display: flex; } }
.submenu a { font: 400 13px/1 var(--sans); letter-spacing: .1em; color: var(--ink); text-decoration: none; padding: 11px 14px; border-radius: 8px; }
.submenu a:hover, .submenu a.current { background: var(--tint); color: var(--accent-dark); }

.iconmenu { display: flex; gap: 14px; align-items: center; }
.iconmenu img { width: 20px; height: 20px; }   /* safety net for old icon images */
.header-left { display: flex; align-items: center; gap: 14px; }
.iconmenu a { color: var(--ink); display: flex; }
.iconmenu a:hover { color: var(--accent); }

/* ---------------- Home: hero + slideshow ---------------- */
.hero { padding: 56px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.eyebrow { color: var(--accent-dark); text-transform: uppercase; letter-spacing: .2em; font-size: .78rem; font-weight: 500; margin-bottom: 1.2em; }
.lead { color: var(--muted); font-size: 1.12rem; max-width: 30em; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-block; background: var(--ink); color: #fff; text-decoration: none; padding: 14px 28px; border-radius: 999px; font-size: .88rem; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--ink); transition: background .2s, color .2s; }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }

.slider { position: relative; aspect-ratio: 1 / 1; background: linear-gradient(160deg, #fff, var(--tint)); border-radius: 28px; overflow: hidden; border: 1px solid var(--line); }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1s ease; }
.slide.on { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: contain; padding: 5%; }
.slide figcaption { position: absolute; bottom: 46px; left: 0; right: 0; text-align: center; font-family: var(--serif); font-size: 1.25rem; }
.arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.85); color: var(--ink); cursor: pointer; font-size: .9rem; transition: background .2s; }
.arrow:hover { background: #fff; }
.arrow.back { left: 14px; } .arrow.fwd { right: 14px; }
.dots { position: absolute; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: rgba(31,28,27,.2); cursor: pointer; transition: width .3s; }
.dots button.on { background: var(--ink); width: 22px; border-radius: 4px; }

/* ---------------- Text sections ---------------- */
.block { padding: 88px 0; }
.block.tint { background: var(--tint); }
.block h2 { text-align: center; }
.block h2::after { content: ""; display: block; width: 44px; height: 1px; background: var(--accent); margin: 20px auto 0; }
.cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 40px; }
.cards .card { flex: 0 1 calc((100% - 32px) / 3); } /* 3 per row, extra row centered */
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(31,28,27,.07); }
.card p { color: var(--muted); font-size: .94rem; line-height: 1.6; margin: 0; }

/* ---------------- Gallery page ---------------- */
.page-head { padding: 64px 0 24px; text-align: center; }
.page-head .lead { margin: 0 auto; }
.gallery-section { padding: 24px 0 96px; }
.gallery-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; } /* leftover tiles sit centered */
.gallery-card { display: block; text-decoration: none; color: var(--ink); flex: 0 1 calc((100% - 72px) / 4); } /* 4 per row */
.gallery-img {
  aspect-ratio: 5 / 7; border-radius: 20px; /* matches the 500x700 thumbnails */ overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(110deg, var(--tint) 30%, #f8f4f0 50%, var(--tint) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite; /* soft placeholder while the photo loads */
}
.gallery-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s, transform .6s ease; }
.gallery-img img.loaded { opacity: 1; }
.gallery-img:has(img.loaded) { animation: none; background: var(--tint); } /* stop the loading shimmer once the picture is in (shows behind see-through thumbnails) */
.gallery-card:hover .gallery-img img { transform: scale(1.04); }
.gallery-label { padding: 14px 4px 0; text-align: center; }
.gallery-label h2 { font-size: 1.6rem; margin: 0; text-align: center; transition: color .2s; }
.gallery-card:hover .gallery-label h2 { color: var(--accent-dark); }
.gallery-label h2::after { display: none; }
@keyframes shimmer { to { background-position: -300% 0; } }
@media (prefers-reduced-motion: reduce) { .gallery-img { animation: none; } }

/* ---------------- Doll photo pages ---------------- */
.page-head .lead a { color: var(--accent-dark); }
.photo-count { margin: 14px 0 0; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.photo-tile {
  display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  aspect-ratio: 5 / 7; cursor: zoom-in;
  background: linear-gradient(110deg, var(--tint) 30%, #f8f4f0 50%, var(--tint) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
.photo-tile img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .5s, transform .5s ease; }
.photo-tile img.loaded { opacity: 1; }
.photo-tile:hover img { transform: scale(1.04); }
.photo-tile:hover img { transform: scale(1.04); }
.photo-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .photo-tile { animation: none; } }

.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(20, 18, 17, .94); display: flex; align-items: center; justify-content: center; padding: 56px 72px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; }
.lightbox img { max-width: 100%; max-height: calc(100% - 36px); object-fit: contain; border-radius: 6px; opacity: 0; transition: opacity .3s; }
.lightbox img.loaded { opacity: 1; }
.lb-count { color: rgba(255,255,255,.7); font-size: .85rem; letter-spacing: .12em; margin-top: 14px; }
.lb-close { position: absolute; top: 14px; right: 18px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 18px; cursor: pointer; transition: background .2s; }
.lb-close:hover, .lb-arrow:hover { background: rgba(255,255,255,.22); }
.lb-prev { left: 14px; } .lb-next { right: 14px; }

/* ---------------- Photo gallery pages (thumbnail grid) ---------------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.photo-tile { aspect-ratio: 1 / 1; padding: 0; cursor: zoom-in; border-radius: 14px; display: block; width: 100%; } /* 500x500 thumbnails */
.photo-tile:hover img { transform: scale(1.04); }
.photo-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.page-head .lead a { color: var(--accent-dark); }

/* ---------------- Full-size photo viewer ---------------- */
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(20, 18, 17, .94); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lb-stage { margin: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 56px 72px; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; opacity: 0; transition: opacity .3s; }
.lb-stage img.ready { opacity: 1; }
.lb-spinner { position: absolute; width: 34px; height: 34px; border: 2px solid rgba(255,255,255,.2); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; display: none; }
.lightbox.loading .lb-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.lb-close { position: absolute; top: 14px; right: 18px; z-index: 2; background: none; border: 0; color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; padding: 6px 10px; opacity: .85; }
.lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-size: 1rem; cursor: pointer; transition: background .2s; }
.lb-arrow:hover, .lb-close:hover { background: rgba(255,255,255,.18); opacity: 1; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.7); font-size: .85rem; letter-spacing: .12em; }

/* ---------------- Info pages (order, preorder) ---------------- */
.info-wrap { max-width: 960px; margin: 0 auto; padding: 0 clamp(28px, 6vw, 64px) 72px; } /* space from the window edge */
.status { display: flex; align-items: center; justify-content: center; gap: 10px; max-width: 560px; margin: 0 auto 40px; padding: 14px 20px; border-radius: 14px; font-weight: 500; text-align: center; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status.closed { background: #f6e7e4; color: #8a3b30; }
.status.open { background: #e4efe5; color: #2f6a3a; }
.info-section { padding: 36px 0; border-top: 1px solid var(--line); }
.info-section h2 { font-size: clamp(1.7rem, 3vw, 2.1rem); margin-bottom: 14px; }
.info-section > p { margin: 0 0 14px; }
.info-list { list-style: none; margin: 0 0 8px; padding: 0; }
.info-list li { position: relative; padding: 0 0 10px 22px; }
.info-list li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.info-section a { color: var(--accent-dark); }
.note { background: var(--tint); border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; padding: 14px 18px; margin: 16px 0; font-size: .96rem; }
.face-group { margin: 0 0 18px; }
.face-group h3 { font-family: var(--sans); font-size: .8rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-size: .92rem; }
.info-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 18px 0 6px; }
.info-images.small { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); max-width: 640px; }
.info-images:has(> :only-child) { max-width: 560px; } /* a single picture doesn't stretch full width */
.info-images figure { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.info-images .zoom { font: inherit; padding: 0; width: 100%; text-align: inherit; color: inherit; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #fff; cursor: zoom-in; display: block; }
.info-images .zoom:hover img { transform: scale(1.02); }
.info-images a { text-decoration: none; display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #fff; cursor: zoom-in; }
.info-images img { width: 100%; height: auto; transition: transform .4s; }
.info-images a:hover img { transform: scale(1.02); }
.info-images figcaption { font-size: .85rem; color: var(--muted); text-align: center; padding: 8px; }

/* ---------------- Shared footer ---------------- */
.footer { border-top: 1px solid var(--line); padding: 48px 24px 36px; text-align: center; color: var(--muted); font-size: .88rem; }
.footer-logo { height: 70px; width: auto; margin: 0 auto 14px; opacity: .85; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 22px; margin-bottom: 14px; }
.footer-links a { color: var(--ink); text-decoration: none; letter-spacing: .08em; }
.footer-links a:hover { color: var(--accent); }
.footerwords { margin: 0; }

/* ---------------- Tablets & phones ---------------- */
@media (max-width: 900px) {
  .gallery-card { flex-basis: calc((100% - 48px) / 3); } /* 3 per row on tablets */
  .hamburger { display: block; }
  .horizontalmenu {
    display: none; position: absolute; top: 100%; right: 16px; width: 260px;
    flex-direction: column; align-items: stretch; gap: 0; padding: 12px;
    background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(31,28,27,.12);
  }
  .horizontalmenu.active { display: flex; }
  .horizontalmenu .menu, .horizontalmenu > a { padding: 13px 10px; border: 0; }
  .submenu { position: static; transform: none; box-shadow: none; border: 0; padding: 0 0 6px 12px; min-width: 0; background: none; }
  .submenu::before { display: none; }
  .iconmenu { justify-content: center; padding-top: 12px; margin-top: 6px; border-top: 1px solid var(--line); }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-text { text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .btns { justify-content: center; }
}
@media (max-width: 600px) {
  #header-placeholder { min-height: 70px; }
  img.logo, .sticky img.logo { height: 52px; }
  img.title, .sticky img.title { height: 38px; }
  .hero { padding: 28px 0 56px; }
  .block { padding: 60px 0; }
  body { font-size: 16px; }
  .cards .card { flex-basis: calc((100% - 16px) / 2); } /* 2 per row on phones */
  .gallery-grid { gap: 14px; }
  .gallery-card { flex-basis: calc((100% - 14px) / 2); } /* 2 per row on phones */
  .gallery-label h2 { font-size: 1.25rem; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } /* 3 per row on phones */
  .photo-tile { border-radius: 10px; }
  .lightbox { padding: 56px 8px 24px; }
  .lb-arrow { top: auto; bottom: 16px; transform: none; }
  .page-head { padding: 40px 0 12px; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; } /* 3 per row on phones */
  .photo-tile { border-radius: 8px; }
  .lb-stage { padding: 56px 8px; }
  .lb-arrow { width: 40px; height: 40px; top: auto; bottom: 8px; transform: none; }
  .lb-prev { left: 12px; } .lb-next { right: 12px; }
}
