/* Haven Creative: single stylesheet
   Replaces app2.css, apps2.css, popup.css, normalize.css.
   Panel images are expected at ../img/{grass,harris,lens,camera,chair}.jpg */

:root {
  --mint: #97D8B6;
  --mint-hover: #66D199;
  --mint-light: #DFF2DF;
  --teal: #4D8275;
  --ink: #545454;
  --ink-soft: #707173;
  --bar: 34px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 400 16px/1.6 'Raleway', 'Myriad Pro', Arial, sans-serif;
  background: #ddd;
  color: #545452;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; }
figure { margin: 0; }
p { margin: 1em 0; }

/* ---------- Sliding panels (pure CSS, driven by radio buttons) ---------- */
.st-container { position: fixed; inset: 0; overflow: hidden; }

.st-scroll {
  position: relative; width: 100%; height: 100%;
  transition: transform .6s ease-in-out;
  transform: translate3d(0, 0, 0);
}
#st-control-1:checked ~ .st-scroll { transform: translateY(0); }
#st-control-2:checked ~ .st-scroll { transform: translateY(-100%); }
#st-control-3:checked ~ .st-scroll { transform: translateY(-200%); }
#st-control-4:checked ~ .st-scroll { transform: translateY(-300%); }
#st-control-5:checked ~ .st-scroll { transform: translateY(-400%); }

.st-panel {
  position: relative; width: 100%; height: 100%;
  overflow: hidden;
  background: #fff center center / cover no-repeat;
}
#st-panel-1 { background-image: url(../img/grass.jpg); }
#st-panel-2 { background-image: url(../img/harris.jpg); }
#st-panel-3 { background-image: url(../img/lens.jpg); }
#st-panel-4 { background-image: url(../img/camera.jpg); }
#st-panel-5 { background-image: url(../img/chair.jpg); }

/* ---------- Bottom navigation ---------- */
.st-container::before {
  content: ''; position: fixed; left: 0; right: 0; bottom: 0;
  height: var(--bar); background: var(--mint-light); z-index: 9;
}
.st-container > input,
.st-container > label {
  position: fixed; bottom: 0; width: 20%;
  height: var(--bar); line-height: var(--bar);
  font-size: 16px; cursor: pointer;
}
.st-container > input { opacity: 0; z-index: 1000; margin: 0; }
.st-container > label {
  z-index: 10; font-weight: 700; text-align: center; color: #fff;
  background: var(--mint);
  text-shadow: 1px 1px 1px rgba(105, 76, 63, .2);
}
#st-control-1, #st-control-1 + label { left: 0; }
#st-control-2, #st-control-2 + label { left: 20%; }
#st-control-3, #st-control-3 + label { left: 40%; }
#st-control-4, #st-control-4 + label { left: 60%; }
#st-control-5, #st-control-5 + label { left: 80%; }

.st-container > input:hover + label { background: var(--mint-hover); }
.st-container > input:checked + label,
.st-container > input:checked:hover + label { background: var(--teal); }
.st-container > input:focus-visible + label { outline: 2px solid #fff; outline-offset: -4px; }

/* little triangle above the selected tab */
.st-container > input:checked + label::after,
.st-container > input:hover + label::after {
  content: ''; position: absolute; bottom: 100%; left: 50%; margin-left: -20px;
  border: 20px solid transparent; border-bottom-color: var(--mint-hover);
  pointer-events: none;
}
.st-container > input:checked + label::after { border-bottom-color: var(--teal); }

/* ---------- Decoration: diamond + icon at the top of each panel ---------- */
.st-deco {
  position: absolute; top: -80px; left: 50%;
  width: 200px; height: 200px; margin-left: -100px;
  background: var(--mint);
  transform: translateY(-50%) rotate(45deg);
}
.st-icon {
  position: absolute; left: 50%; top: 14px;
  width: 28px; height: 28px; margin-left: -14px;
  color: #fff; z-index: 2; pointer-events: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.home-panel .st-deco { top: 0; }
.home-panel .st-icon { top: 52px; width: 44px; height: 44px; margin-left: -22px; }
.st-color .st-deco { background: #fff; }
.st-color .st-icon { color: var(--mint); }

/* ---------- Headings and plates ---------- */
.page-heading {
  color: var(--ink); font-size: 50px; line-height: 1.2; font-weight: 400;
  white-space: nowrap; margin: 0 0 .2em;
}
.inner .page-heading {
  position: absolute; top: 10%; left: 0; right: 0; text-align: center;
}
.plate {
  position: absolute; left: 0; right: 0; margin: 0 auto; top: 30%;
  width: 440px; max-width: 90%;
  padding: 20px; background: rgba(255, 255, 255, .6); color: #000;
  overflow: hidden;
}
.page-content {
  height: 100%; overflow: auto; padding: 0 10px;
  color: #545452; text-align: left;
}
.page-content p:first-child { margin-top: 0; }

/* Home */
.home {
  position: absolute; top: 34%; left: 0; right: 0;
  padding: 0 5%; text-align: center;
}
.home .page-heading { font-size: clamp(30px, 4vw, 56px); margin: 0; }
.home .page-sub-heading {
  color: var(--ink-soft); font-size: clamp(16px, 2.2vw, 32px);
  line-height: 1.3; text-transform: uppercase; letter-spacing: .02em;
}
.home-tag {
  margin: 1.2em auto 0; max-width: 560px;
  color: var(--ink-soft); font-size: clamp(14px, 1.3vw, 17px); line-height: 1.5;
}

/* Clients */
.clients .plate { width: 640px; top: 30%; }
.clients .page-content { height: auto; text-align: center; }
.nw { white-space: nowrap; }

/* Contact */
.logistics .plate { width: 350px; top: 30%; }

/* Work */
.work .plate { width: 1000px; max-width: 92%; top: 22%; bottom: calc(var(--bar) + 20px); }
.work .page-content { font-size: 12px; line-height: 1.3; }
.work-intro { margin-bottom: 14px; }
.work-skills { font-weight: 700; font-size: 11px; letter-spacing: .04em; }
.work-note { font-size: 11px; opacity: .7; }
.work-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px 16px; align-items: start;
}
.work-item video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.w-title { font-weight: 700; font-size: 12px; margin-top: 6px; }
.w-org { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }
.w-desc { margin: 1px 0 0; font-size: 12px; }
.w-credit { font-size: 11px; opacity: .7; margin: 2px 0 0; }

/* ---------- Entrance animations ---------- */
@keyframes moveDown { from { transform: translateY(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes moveUp   { from { transform: translateY(40px);  opacity: 0; } to { transform: none; opacity: 1; } }

#st-control-1:checked ~ .st-scroll #st-panel-1 .home,
#st-control-2:checked ~ .st-scroll #st-panel-2 .page-heading,
#st-control-3:checked ~ .st-scroll #st-panel-3 .page-heading,
#st-control-4:checked ~ .st-scroll #st-panel-4 .page-heading,
#st-control-5:checked ~ .st-scroll #st-panel-5 .page-heading { animation: moveDown 1s ease-in-out .2s backwards; }

#st-control-2:checked ~ .st-scroll #st-panel-2 .plate,
#st-control-3:checked ~ .st-scroll #st-panel-3 .plate,
#st-control-4:checked ~ .st-scroll #st-panel-4 .plate,
#st-control-5:checked ~ .st-scroll #st-panel-5 .plate { animation: moveUp .6s ease-in-out .2s backwards; }

@media (prefers-reduced-motion: reduce) {
  .st-scroll { transition: none; }
  .st-panel *, .st-panel { animation: none !important; }
}

/* ---------- Small screens ---------- */
@media (max-width: 750px) {
  .page-heading { font-size: 34px; }
  .home .page-heading { font-size: 30px; }
  .work .plate { top: 20%; }
}
@media (max-width: 520px) {
  .st-container > label { font-size: 13px; }
}
@media (max-width: 360px) {
  .st-container > label { font-size: 10px; }
  .st-deco { width: 120px; height: 120px; margin-left: -60px; }
}
