/* Lucky Cactus Studio: one-page landing ("Landing 4").
   Desktop/tablet: each panel is the 1253×576 design canvas, scaled by --u
   (1 design px; exactly 1px at a 1440×900 window). Phone: stacked flow. */

@font-face{font-family:"Bebas Neue";src:url("../fonts/BebasNeue-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Work Sans";src:url("../fonts/WorkSans-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Work Sans";src:url("../fonts/WorkSans-600.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:"Figtree";src:url("../fonts/Figtree-Variable.ttf") format("truetype");font-weight:300 900;font-style:normal;font-display:swap}
@font-face{font-family:"Grandstander";src:url("../fonts/Grandstander-Variable.ttf") format("truetype");font-weight:100 900;font-style:normal;font-display:swap}

:root{
  --panel:#F5F6F6;
  --ink:#111111;
  --page:#2b2a33;
  --display:"Bebas Neue", "Arial Narrow", sans-serif;
  --sans:"Work Sans", system-ui, -apple-system, sans-serif;
  --serif:Times, "Times New Roman", serif;
  --treasure-display:"Grandstander", system-ui, sans-serif;
  --treasure-sans:"Figtree", system-ui, sans-serif;
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--page);color:var(--ink);font-family:var(--sans);-webkit-font-smoothing:antialiased;overflow-x:hidden}
img{display:block;max-width:none}
a{color:inherit}
a:focus-visible{outline:2px solid var(--ink);outline-offset:4px}
blockquote,address,h1,h2,p{margin:0;font-style:normal}

/* Fixed sky painting: a fixed layer, not background-attachment (iOS ignores it). */
body::before{
  content:"";position:fixed;inset:0;z-index:-1;
  background-image:url("../img/background/sky-painting.jpg");
  background-image:image-set(url("../img/background/sky-painting.webp") type("image/webp"), url("../img/background/sky-painting.jpg") type("image/jpeg"));
  background-position:center top;background-size:cover;background-repeat:no-repeat;
}

.visually-hidden{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ---------- Header (on the painting, scrolls away with Home) ---------- */
.site-header{position:absolute;top:0;left:0;right:0;z-index:5;pointer-events:none}
.site-header a{pointer-events:auto}
.logo{position:absolute;left:5.5%;top:22px;display:block}
.logo img{height:clamp(80px, 8.4vw, 120px);width:auto}
.site-nav{position:absolute;right:7.4%;top:34px;display:flex;flex-direction:column;align-items:flex-end;gap:15px}
.site-nav a{font-family:var(--display);font-size:clamp(30px, 2.8vw, 40px);line-height:1;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}
.site-nav a:hover{text-decoration-thickness:4px}

/* ---------- Sections and panels ---------- */
.section{min-height:100vh;min-height:100svh;display:flex;align-items:center;justify-content:center;padding:0 16px}

/* assets/js/scroll.js eases wheel scrolling itself when it is active. */
html.slow-scroll{scroll-behavior:auto}
.panel{
  position:relative;overflow:hidden;width:89%;
  height:clamp(380px, min(64svh, 100svh - 320px), 1400px);
  background:var(--panel);box-shadow:0 10px 40px rgba(0,0,0,.25);
  container-type:size;
  --u:min(calc(100cqw / 1253), calc(100cqh / 576));
}

/* Collages: % positions from the design, widths in design px. */
.collage img{position:absolute;left:var(--x);top:var(--y);width:calc(var(--w) * var(--u));height:auto}
.collage img.r{left:auto;right:0}

/* Home quote: three staggered rows, anchored near design (607, 440). The serif
   accents sit inline on the same baseline, so the two fonts never collide.
   Its own unit has a floor so the words stay legible on smaller panels. */
.quote{--q:max(0.82px, var(--u));position:absolute;left:48.4%;top:76.4%;z-index:1;font-family:var(--sans);font-weight:600;font-size:calc(14 * var(--q));line-height:calc(24 * var(--q))}
.quote__row{display:block;white-space:nowrap;padding-left:calc(var(--i) * var(--q))}
.quote em{font-family:var(--serif);font-style:italic;font-weight:300;font-size:calc(20 * var(--q));line-height:0}

/* Projects: the design canvas, scaled to fit and centred. */
.stage{position:absolute;left:50%;top:50%;width:calc(1253 * var(--u));height:calc(576 * var(--u));transform:translate(-50%, -50%)}
.treasure > *{position:absolute;margin:0}
.treasure__icon{display:block;left:calc(64 * var(--u));top:calc(64 * var(--u));width:calc(96 * var(--u));height:calc(96 * var(--u));border-radius:calc(22 * var(--u));overflow:hidden;box-shadow:0 8px 20px rgba(229,87,74,.28);transition:transform .25s ease, box-shadow .25s ease}
.treasure__icon img{width:100%;height:100%}
.treasure__icon:hover{transform:translateY(-3px);box-shadow:0 12px 26px rgba(229,87,74,.34)}
.treasure__wordmark{left:calc(56 * var(--u));top:calc(178 * var(--u));line-height:0}
.treasure__wordmark a{display:block;border-radius:8px}
.treasure__wordmark img{width:calc(380 * var(--u));height:auto;transition:transform .35s cubic-bezier(.2,.7,.2,1)}
.treasure__wordmark a:hover img{transform:translateY(-2px) rotate(-1deg)}
.treasure__tagline{left:calc(66 * var(--u));top:calc(286 * var(--u));font-family:var(--treasure-sans);font-weight:500;font-size:max(10px, calc(13 * var(--u)));line-height:1.2;letter-spacing:.26em;text-transform:uppercase;color:rgba(40,28,22,.68)}
.swatches{--s:calc(52 * var(--u));--g:calc(10 * var(--u));left:calc(64 * var(--u));top:calc(372 * var(--u));display:grid;grid-template-columns:repeat(7, var(--s));gap:var(--g)}
.swatches img{width:var(--s);height:var(--s);border-radius:calc(var(--s) * .23)}
.swatches img:nth-child(n+8){transform:translateX(calc(50% + var(--g) / 2))}
.swatches img.hairline{box-shadow:inset 0 0 0 1px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.08)}
.policies{left:calc(64 * var(--u));top:calc(516 * var(--u));display:flex;flex-wrap:wrap;gap:6px calc(22 * var(--u));font-family:var(--treasure-sans);font-weight:500;font-size:max(11px, calc(12 * var(--u)));line-height:1}
.policies a{color:var(--ink);text-decoration:underline;text-underline-offset:3px}
.policies a:hover{color:#E5574A}

.fan{position:absolute;left:calc(536 * var(--u));top:calc(112 * var(--u));width:calc(658 * var(--u));height:calc(432 * var(--u))}
.fan img{position:absolute;left:calc(var(--x) * var(--u));top:calc(var(--y) * var(--u));width:calc(168 * var(--u));height:auto;border-radius:calc(14 * var(--u));box-shadow:0 10px 28px rgba(60,20,20,.22);transform:rotate(var(--r));transition:transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease}
.fan img:hover{transform:translateY(calc(-16 * var(--u))) rotate(var(--r));box-shadow:0 18px 36px rgba(60,20,20,.3)}

/* Contact */
.email{position:absolute;left:17.3%;top:8.2%;z-index:2;font-family:var(--display);font-size:max(22px, calc(40 * var(--u)));line-height:1;text-transform:uppercase;text-decoration:none;white-space:nowrap}
.email:hover{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
.company{position:absolute;right:19.9%;top:45%;z-index:2;display:flex;flex-direction:column;align-items:flex-end;gap:calc(12 * var(--u));font-size:max(11px, calc(14 * var(--u)));line-height:1;text-align:right}

/* ---------- Phone and portrait tablet: stacked panels, loose collages ---------- */
@media (max-width: 899px){
  .logo{left:16px;top:16px}
  .logo img{height:72px}
  .site-nav{right:16px;top:20px;gap:8px}
  .site-nav a{font-size:26px}

  .section{min-height:0;padding:20px 16px}
  #home{padding-top:112px}
  #contact{padding-bottom:40px}
  .panel{width:100%;max-width:640px;height:auto;container-type:normal;--u:1px;padding:28px 20px}
  .quote{--q:1px}

  .collage{display:grid;grid-template-columns:1fr 1fr;gap:16px 18px;align-items:start}
  .collage img{position:static;width:78%;height:auto}
  .collage img:nth-child(even){margin-top:32px;width:70%;justify-self:end}
  .collage img:nth-child(3n){width:62%;justify-self:center}
  .collage img:nth-child(4n+1){justify-self:start;width:84%}

  .quote{position:static;align-self:flex-end;margin:32px 4px 0 0}
  .panel--home{display:flex;flex-direction:column}

  .stage{position:static;width:auto;height:auto;transform:none}
  .treasure{display:flex;flex-direction:column;align-items:flex-start}
  .treasure > *{position:static}
  .treasure__icon{width:80px;height:80px;border-radius:18px}
  .treasure__wordmark{margin-top:14px}
  .treasure__wordmark img{width:min(300px, 70vw)}
  .treasure__tagline{margin-top:10px;font-size:12px}
  .swatches{--s:min(40px, calc((100vw - 72px - 6 * 8px) / 7.5));--g:8px;margin-top:28px}
  .policies{order:5;margin-top:28px;gap:10px 18px;font-size:13px}

  .fan{position:relative;left:auto;top:auto;width:auto;height:auto;margin:28px -20px 0;padding:12px 20px 20px;display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .fan::-webkit-scrollbar{display:none}
  .fan img{position:static;flex:0 0 auto;width:62vw;max-width:240px;border-radius:14px;scroll-snap-align:center;transform:rotate(calc(var(--r) / 4))}
  .fan img:hover{transform:rotate(calc(var(--r) / 4))}
  .panel--projects{display:flex;flex-direction:column}
  .panel--projects .stage{display:flex;flex-direction:column}
  .panel--projects .treasure{display:contents}
  .panel--projects .fan{order:4}

  .panel--contact{display:flex;flex-direction:column}
  .email{position:static;font-size:min(40px, 7.4vw);white-space:nowrap}
  .company{position:static;align-items:flex-start;text-align:left;gap:10px;margin:20px 0 28px;font-size:14px}
}

@media (min-width: 600px) and (max-width: 899px){
  .collage{grid-template-columns:repeat(3, 1fr)}
  .collage img:nth-child(even){margin-top:40px}
}

/* Hover: collage pieces lift off the panel a touch; the logo gives a little wobble. */
.collage img{transition:transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s ease}
.logo img{transform-origin:50% 85%;transition:transform .5s cubic-bezier(.34,1.56,.64,1)}
@media (hover: hover){
  .collage img:hover{z-index:3;transform:translateY(-4px) scale(1.035);box-shadow:0 14px 28px rgba(0,0,0,.18)}
  .logo:hover img{transform:rotate(-4deg) scale(1.04)}
}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  .fan img,.collage img,.logo img{transition:none}
  .collage img:hover,.logo:hover img{transform:none}
}
