/* Glass House — site styles
   Desktop: pages are laid out on a 1026px canvas that scales to the window
   width (the same way Readymag does). Phones: content re-flows into one column. */

:root {
  --z: 1;                       /* canvas scale, set by a script in <head> */
  --bg: #f9f9f8;
  --ink: #211f1f;
  --serif: Georgia, Gelasio, "Times New Roman", serif;
  --display: "Dhurjati", "Helvetica Neue", Arial, sans-serif;
  --script: "Ballet", "Pinyon Script", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  overflow-x: hidden;
}
p, ul, li { margin: 0; padding: 0; }
li { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; }
button { font: inherit; color: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--ink); color: var(--bg); padding: 8px 12px; font-size: 14px;
}
.skip:focus { left: 8px; top: 8px; }

:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

/* ------------------------------------------------------------ header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: calc(112px * var(--z));
  background: rgba(249, 249, 248, 0.5);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  animation: fadeIn 1.6s ease-out both;
}
.hdr { position: relative; width: 1026px; height: 112px; zoom: var(--z); }
.wordmark {
  position: absolute; left: 0; top: -32px; width: 1026px; height: 151px;
  line-height: 151px; text-align: center; white-space: nowrap;
  font-family: var(--serif); font-style: italic; font-size: 116px;
  letter-spacing: 20px; padding-left: 20px; color: var(--ink);
}
.site-header nav {
  position: absolute; left: 0; top: 88px; width: 1026px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  animation: fadeIn 1.6s ease-out 0.5s both;
}
.site-header nav a {
  display: block; text-align: center; font-size: 16px; line-height: 16px;
  font-variant-numeric: lining-nums; transition: opacity .15s ease-out;
}
.site-header nav a:hover { opacity: .55; }
.site-header nav a[aria-current="page"] { font-style: italic; }

/* ------------------------------------------------------------ canvas */
.canvas { position: relative; width: 1026px; zoom: var(--z); }
.item { position: absolute; }
.item.text { overflow: visible; }
.item.text a { transition: opacity .15s ease-out; }
.item.text a:hover { opacity: .55; }
.item.img { overflow: hidden; }
.item.img img { position: absolute; max-width: none; }
.item.img a { display: block; position: absolute; inset: 0; }
.home .canvas { min-height: 100vh; }

.fade { animation: fadeIn var(--d, .3s) ease-out var(--dl, 0s) both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .fade, .site-header, .site-header nav { animation: none; }
}

/* ------------------------------------------------------------ text styles */
.about-copy { font-family: var(--serif); font-size: 14px; letter-spacing: .8px; text-transform: uppercase; }
.about-copy.faded { color: rgba(33, 31, 31, .1); }
.script { font-family: var(--script); font-size: 46px; letter-spacing: 2.9px; }
.svc-title { font-family: var(--serif); font-size: 13px; font-weight: 700; }
.svc-quote { font-family: var(--serif); font-size: 12px; font-style: italic; }
.shop-label { font-family: var(--serif); font-size: 30px; font-style: italic; letter-spacing: 2.9px; color: #000; text-shadow: 0 4px 4px rgba(0, 0, 0, .25); }
.coming-soon { font-family: var(--serif); font-size: 76px; -webkit-text-stroke: 1px var(--ink); }
.pt-big { font-family: var(--display); font-size: 46px; color: #000; }
.pt-small { font-family: var(--display); font-size: 20px; color: #000; }
.proj-name { font-family: var(--display); }

/* ------------------------------------------------------------ buttons */
.item.btn {
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--bg);
  font-family: var(--serif); font-size: 9px; letter-spacing: 0;
  transition: background .2s, color .2s;
}
.item.btn:hover { background: rgba(249, 249, 248, .8); color: var(--ink); }

/* ------------------------------------------------------------ slideshows */
.slides { cursor: pointer; }
.ss-track { position: absolute; inset: 0; overflow: hidden; }
.ss-track img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .5s ease;
}
.slides.fit .ss-track img { object-fit: contain; }
.ss-track img.on { opacity: 1; }
.ss-btn {
  position: absolute; top: 50%; width: 40px; height: 40px; margin-top: -20px;
  border: 0; background: none; padding: 8px; cursor: pointer;
  opacity: 0; transition: opacity .2s; z-index: 2;
}
.ss-btn svg { width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 1.5; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .45)); }
.ss-prev { left: 4px; }
.ss-next { right: 4px; }
.slides:hover .ss-btn, .ss-btn:focus-visible { opacity: 1; }
@media (hover: none) { .ss-btn { opacity: .85; } }

/* ------------------------------------------------------------ projects dropdown */
.project-menu {
  position: fixed; left: 0; top: 100px; z-index: 400;
  width: 400px; max-height: calc((100vh - 120px) / var(--z)); overflow-y: auto; scrollbar-width: none;
  padding: 20px 12px; zoom: var(--z);
  font-family: var(--display); font-weight: 700; color: #111;
}
.project-menu::-webkit-scrollbar { width: 0; }
.pm-title {
  display: flex; align-items: center; gap: 12px; width: 100%;
  margin: 0; padding: 7px 0; border: 0; background: none; cursor: pointer;
  font-family: var(--display); font-weight: 700; font-size: 18px;
  letter-spacing: .3px; text-align: left; color: #111;
}
.pm-mark { font-weight: 400; font-size: 14px; }
.pm-content {
  overflow: hidden; max-height: 0; transition: max-height .25s ease-out;
  padding-left: 34px; display: flex; flex-direction: column;
}
.pm-item {
  position: relative; padding: 5px 0; font-size: 14px; text-transform: uppercase;
  color: #111; transition: opacity .15s ease-out;
}
.pm-item:hover { opacity: .55; }
.pm-item::before {
  content: "\00ab"; position: absolute; left: -34px; opacity: 0; color: #999;
  transition: opacity .15s ease-out;
}
.pm-item:hover::before { opacity: 1; }
.proj-title { scroll-margin-top: calc(130px * var(--z)); padding-right: 10px; }

/* ============================================================ phones */
@media (max-width: 699px) {
  .site-header { height: calc(9vw + 26px); }
  .hdr { width: 100%; height: 100%; zoom: 1; }
  .wordmark {
    width: 100%; top: -3.1vw; height: 14.7vw; line-height: 14.7vw;
    font-size: 11.3vw; letter-spacing: 1.95vw; padding-left: 1.95vw;
  }
  .site-header nav { width: 100%; top: calc(9vw + 4px); }
  .site-header nav a { font-size: 14px; line-height: 18px; padding: 0 0 4px; }

  /* Re-flow pages into a single column */
  .canvas.flow {
    zoom: 1; width: auto; height: auto !important;
    display: flex; flex-direction: column; gap: 20px;
    padding: calc(9vw + 56px) 16px 72px;
  }
  .canvas.flow .item {
    position: relative; left: auto !important; top: auto !important;
    width: auto !important; height: auto !important;
  }
  .canvas.flow .item.img, .canvas.flow .item.slides { aspect-ratio: var(--ar); }
  .canvas.flow .row { display: flex; gap: 8px; align-items: flex-start; }
  .canvas.flow .row > .item { flex: var(--w) 1 0px; min-width: 0; }
  .canvas.flow .item.box, .canvas.flow .desk-only { display: none; }
  .canvas.flow .item.text p[style*="text-align:right"] { text-align: left !important; }
  .canvas.flow .item.btn {
    align-self: center; padding: 8px 18px; font-size: 11px; letter-spacing: .5px; margin-bottom: 16px;
  }
  .canvas.flow .item.decor { margin-bottom: 8px; }

  /* Scaled pages (shop placeholder) keep the desktop composition */
  .canvas.scale { margin-top: calc(9vw + 26px - 94px * var(--z)); }

  /* Projects list: dropdown sits above the list instead of floating */
  .project-menu {
    position: relative; top: auto; zoom: 1; width: auto; max-height: none;
    margin-top: calc(9vw + 44px); padding: 8px 16px 0;
  }
  .projects-page .canvas.flow { padding-top: 24px; gap: 14px; }
  .projects-page .proj-title { margin-top: 24px; scroll-margin-top: calc(9vw + 40px); }
  .projects-page .proj-title p { line-height: 1.3 !important; }

  .project-page .canvas.flow { gap: 8px; }
  .project-page .project-title { margin: 16px 0 28px; }
  .pt-big { font-size: min(46px, 9.4vw); }
  .project-title p:first-child { line-height: 1.15 !important; }
  .about-copy { font-size: 13px; }
}
