/* GALICKAS STD. — rebuilt from the Readymag layout.
   Readymag scales the whole design with the window width, so every size here
   is written in "design pixels" × --u:
   desktop: 1 design px = 100vw / 1080
   phone:   1 design px = 100vw / 320                                          */

:root {
  --u: calc(100vw / 1080);
  --serif: "EB Garamond", "Adobe Garamond Pro", Garamond, "Times New Roman", serif;
  --times: "Times New Roman", Times, serif;
  --fg: #fff;
  --bg: #000;
  --accent: #e8000b;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-snap-type: y mandatory;
  background: var(--bg);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: calc(12 * var(--u));
  line-height: calc(15 * var(--u));
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover, a:focus-visible { color: var(--accent); }
a:focus-visible { outline: 1px solid currentColor; outline-offset: 2px; }
img { display: block; }
ul { list-style: none; margin: 0; padding: 0; }
p { margin: 0; }
em { font-style: italic; }

/* ---------- Fixed header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  pointer-events: none;
}
.site-header a { pointer-events: auto; }
.nav a {
  position: absolute;
  top: calc(17 * var(--u));
  white-space: nowrap;
}
.nav .n1 { left: calc(22 * var(--u)); font-size: calc(11 * var(--u)); }
.nav .n2 { left: calc(133 * var(--u)); }
.nav .n3 { left: calc(230 * var(--u)); }
.nav .n4 { left: calc(302 * var(--u)); }
.nav .is-active { color: var(--accent); }
.intro {
  position: absolute;
  left: calc(22 * var(--u));
  top: calc(41 * var(--u));
  width: calc(1024 * var(--u));
  font-family: var(--times);
  font-size: calc(10 * var(--u));
  line-height: calc(12 * var(--u));
  pointer-events: auto;
}

/* ---------- Fixed footer ---------- */
.site-footer {
  position: fixed;
  z-index: 10;
  left: calc(27 * var(--u));
  bottom: calc(9 * var(--u));
  font-family: var(--times);
  font-size: calc(8 * var(--u));
  line-height: calc(16 * var(--u));
  pointer-events: none;
}

/* ---------- Projects: one full screen per project ---------- */
.project {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #eaeaea;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.slideshow, .slide { position: absolute; inset: 0; }
.slide {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--fade, 1.5s) ease-in-out var(--fade, 1.5s);
}
.slide.is-on { opacity: 1; z-index: 1; transition-delay: 0s; }
.project-info {
  position: absolute;
  z-index: 2;
  left: calc(27 * var(--u));
  top: calc(272 * var(--u));
  display: flex;
  flex-direction: column;
}
.project-info .pname { margin-bottom: calc(15 * var(--u)); }
.project-info .cats {
  display: flex;
  flex-direction: column;
  font-family: var(--times);
  font-size: calc(10 * var(--u));
  line-height: calc(16 * var(--u));
}

/* ---------- Index grid ---------- */
.index {
  background: var(--bg);
  padding: calc(100 * var(--u)) calc(22 * var(--u)) calc(66 * var(--u));
  scroll-snap-align: start;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, calc(320 * var(--u)));
  column-gap: calc(32 * var(--u));
  row-gap: calc(54 * var(--u));
}
.grid a, .grid li > div { display: block; }
.thumb {
  display: block;
  width: 100%;
  height: calc(230 * var(--u));
  overflow: hidden;
  border-radius: calc(5 * var(--u));
  background: #111;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cap {
  display: flex;
  flex-direction: column;
  margin-top: calc(10 * var(--u));
}
.cap small {
  font-family: var(--times);
  font-size: calc(10 * var(--u));
  line-height: calc(16 * var(--u));
}

/* ---------- Contact ---------- */
.contact {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  padding: calc(139 * var(--u)) calc(22 * var(--u)) calc(60 * var(--u));
  scroll-snap-align: start;
}
.contact-body p { margin-bottom: calc(15 * var(--u)); }

/* ---------- Phone (Readymag phone layout, 320 design px wide) ---------- */
@media (max-width: 767px) {
  :root { --u: calc(100vw / 320); }
  .nav a { top: calc(8 * var(--u)); }
  .nav .n1 { left: calc(12 * var(--u)); font-size: calc(12 * var(--u)); }
  .nav .n2 { left: calc(126 * var(--u)); }
  .nav .n3 { left: calc(194 * var(--u)); }
  .nav .n4 { left: calc(246 * var(--u)); }
  .intro {
    left: calc(12 * var(--u));
    top: calc(33 * var(--u));
    width: calc(298 * var(--u));
    font-size: calc(9 * var(--u));
    line-height: calc(11 * var(--u));
  }
  .intro br { display: none; }
  .site-footer {
    left: 0; right: 0;
    bottom: calc(6 * var(--u) + env(safe-area-inset-bottom));
    text-align: center;
  }
  .project-info {
    left: calc(12 * var(--u));
    top: auto;
    bottom: calc(32 * var(--u) + env(safe-area-inset-bottom));
  }
  .index { padding: calc(102 * var(--u)) calc(12 * var(--u)) calc(60 * var(--u)); }
  .grid {
    grid-template-columns: calc(296 * var(--u));
    row-gap: calc(50 * var(--u));
  }
  .thumb { height: calc(200 * var(--u)); }
  .cap { margin-top: calc(5 * var(--u)); }
  .contact { padding: calc(160 * var(--u)) calc(12 * var(--u)) calc(60 * var(--u)); }
}

