/* Priima — one page. Charcoal ground, bone type, ochre and clay as the only
   accents. Big images, slow motion, few words. */

:root {
  --charcoal: #1E1F1C;
  --charcoal-2: #262824;
  --moss: #34402F;
  --olive: #6E7556;
  --fjord: #1E4446;
  --clay: #B2552E;
  --ochre: #D4A03A;
  --bone: #F7F3EA;
  --bone-60: rgba(247, 243, 234, .6);
  --bone-30: rgba(247, 243, 234, .3);
  --bone-12: rgba(247, 243, 234, .12);
  --bone-6: rgba(247, 243, 234, .06);
  --gutter: clamp(20px, 6vw, 96px);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--charcoal);
  color: var(--bone);
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
h2 { font-size: clamp(34px, 4.6vw, 64px); max-width: 14em; }
h3 { font-size: clamp(20px, 1.6vw, 24px); line-height: 1.25; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ochre); margin-bottom: 18px;
}
.section__head { margin-bottom: clamp(40px, 6vw, 80px); }

/* ---- reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: .01em;
  transition: transform .5s var(--ease), background .35s, color .35s, border-color .35s, box-shadow .5s;
  will-change: transform;
}
.btn--primary { background: var(--bone); color: var(--charcoal); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -10px rgba(212, 160, 58, .55); background: #fff; }
.btn--ghost { border: 1px solid var(--bone-30); color: var(--bone); }
.btn--ghost:hover { border-color: var(--bone); transform: translateY(-2px); }

/* ---- nav ---- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
  transition: background .5s, padding .5s var(--ease), backdrop-filter .5s;
}
.nav.is-scrolled { background: rgba(30, 31, 28, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-block: 14px; }
.nav__brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .14em; font-size: 17px; }
.nav__brand img { transition: transform .6s var(--ease); }
.nav__brand:hover img { transform: rotate(-8deg) scale(1.06); }
.nav__links { display: flex; align-items: center; gap: 30px; font-size: 15px; font-weight: 500; }
.nav__links a:not(.nav__cta) { position: relative; opacity: .8; transition: opacity .3s; }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--ochre);
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.nav__links a:not(.nav__cta):hover { opacity: 1; }
.nav__links a:not(.nav__cta):hover::after { transform: scaleX(1); }
.nav__cta { padding: 10px 18px; border: 1px solid var(--bone-30); border-radius: 999px; transition: background .35s, color .35s, border-color .35s; }
.nav__cta:hover { background: var(--bone); color: var(--charcoal); border-color: var(--bone); }
@media (max-width: 820px) { .nav__links a:not(.nav__cta) { display: none; } }

/* ---- hero ---- */
/* One screen tall; the page scrolls normally. Scrolling with the cursor over
   the house pulls it apart instead (hero.js), so the text side never traps
   the wheel. */
.hero { position: relative; height: 100vh; height: 100svh; }
.hero__stage {
  position: relative; height: 100%; overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 30%, rgba(30, 68, 70, .55) 0%, rgba(30, 68, 70, 0) 60%),
    radial-gradient(90% 70% at 10% 90%, rgba(52, 64, 47, .6) 0%, rgba(52, 64, 47, 0) 60%),
    linear-gradient(180deg, #1b1d1a 0%, var(--charcoal) 100%);
}
.hero__stage::after {   /* grain */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.hero__copy {
  position: absolute; left: var(--gutter); bottom: clamp(60px, 12vh, 120px); z-index: 2;
  max-width: 640px;
  pointer-events: none;
}
.hero__copy .btn { pointer-events: auto; }
/* the headline rises on load, on its own clock (no scroll observer involved) */
.rise { animation: rise 1.2s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; } }
.hero__eyebrow { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--bone-60); margin-bottom: 26px; animation-delay: .4s; }
.hero__title { font-size: clamp(50px, 7.6vw, 112px); font-weight: 800; letter-spacing: -0.035em; line-height: .96; animation-delay: .55s; }
.hero__title em { font-style: normal; color: var(--ochre); }
.hero__lead { margin-top: 28px; max-width: 460px; font-size: clamp(16px, 1.25vw, 19px); color: var(--bone-60); animation-delay: .8s; }
.hero__actions { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; animation-delay: 1s; }

.hero__labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
/* labels sit to the LEFT of their anchor point, in the empty half of the screen */
.hero__label {
  position: absolute; left: 0; top: 0; opacity: 0;
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--bone);
  padding-right: 54px; margin-top: -8px; white-space: nowrap;
}
.hero__label::before { content: ""; position: absolute; right: 0; top: 8px; width: 40px; height: 1px; background: var(--bone-60); }
.hero__label::after { content: ""; position: absolute; right: -3px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--ochre); }
.hero__clash {
  position: absolute; left: 0; top: 0; opacity: 0;
  margin: 18px 12px 0 0; padding: 10px 16px 10px 32px;
  background: rgba(30, 31, 28, .96); border: 1px solid rgba(178, 85, 46, .7); border-radius: 8px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .8);
  font-size: 13px; font-weight: 500; white-space: nowrap; backdrop-filter: blur(6px);
}
.hero__clash i { position: absolute; left: 12px; top: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--clay); box-shadow: 0 0 0 0 rgba(178, 85, 46, .7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(178, 85, 46, 0); } 100% { box-shadow: 0 0 0 0 rgba(178, 85, 46, 0); } }
/* On a phone the house fills the width, so the layer labels go and the
   clash note becomes a strip under it. */
@media (max-width: 820px) {
  .hero__label { display: none; }
  .hero__clash { transform: none !important; left: var(--gutter); right: var(--gutter); top: auto; bottom: 34%; margin: 0; white-space: normal; text-align: center; }
}

.hero__scroll {
  position: absolute; right: var(--gutter); bottom: 40px; z-index: 2;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--bone-60);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
/* the one-line hint under the house; goes once they've used it */
.hero__hint {
  position: absolute; z-index: 2; left: 0; top: 0; pointer-events: none;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--bone-60);
  padding: 8px 14px; border: 1px solid var(--bone-12); border-radius: 999px; background: rgba(30, 31, 28, .6);
  white-space: nowrap; transform: translate(-50%, 0);
  transition: opacity .8s var(--ease);
}
.hero__hint.is-done { opacity: 0; }
.hero__scroll span { width: 1px; height: 48px; background: var(--bone-30); position: relative; overflow: hidden; }
.hero__scroll span::after { content: ""; position: absolute; left: 0; top: -50%; width: 100%; height: 50%; background: var(--ochre); animation: drop 2.2s var(--ease) infinite; }
@keyframes drop { to { top: 110%; } }
@media (prefers-reduced-motion: reduce) { .hero__scroll span::after, .hero__clash i { animation: none; } }

@media (max-width: 820px) {
  .hero__copy { bottom: 56px; right: var(--gutter); }
  .hero__title { font-size: clamp(44px, 13vw, 64px); }
  .hero__scroll { display: none; }
}

/* ---- intro ---- */
.intro { padding: clamp(100px, 16vh, 200px) var(--gutter); position: relative; z-index: 1; background: var(--charcoal); }
.intro__text { font-size: clamp(24px, 3vw, 44px); font-weight: 500; line-height: 1.3; letter-spacing: -0.02em; max-width: 24em; color: var(--bone); }

/* ---- services ---- */
.services { padding: 0 var(--gutter) clamp(80px, 12vh, 160px); position: relative; z-index: 1; background: var(--charcoal); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--bone-12); border: 1px solid var(--bone-12); border-radius: 18px; overflow: hidden; }
.card {
  position: relative; background: var(--charcoal); padding: clamp(28px, 3vw, 44px); min-height: 360px;
  display: flex; flex-direction: column; gap: 16px; isolation: isolate; overflow: hidden;
  transition: transform 1s var(--ease);
}
.card::before {      /* the warm glow that follows the cursor (main.js sets --mx/--my) */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .6s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(212, 160, 58, .16), transparent 60%);
}
.card:hover::before { opacity: 1; }
.card:hover .card__icon { transform: translate(-6px, -6px) scale(1.08); stroke: var(--ochre); opacity: 1; }
.card:hover h3 { transform: translateX(4px); }
.card__num { font-size: 13px; letter-spacing: .18em; color: var(--ochre); font-weight: 600; }
.card h3 { transition: transform .7s var(--ease); }
.card p { color: var(--bone-60); font-size: 15.5px; }
.card__icon {
  margin-top: auto; align-self: flex-end; width: 64px; height: 64px;
  fill: none; stroke: var(--bone); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: .55;
  transition: transform .8s var(--ease), stroke .5s, opacity .5s;
}
.card:nth-child(2) { transition-delay: .1s; } .card:nth-child(3) { transition-delay: .2s; } .card:nth-child(4) { transition-delay: .3s; }
@media (max-width: 1180px) { .cards { grid-template-columns: repeat(2, 1fr); } .card { min-height: 320px; } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } .card { min-height: 0; } .card__icon { width: 48px; height: 48px; margin-top: 8px; } }

/* ---- process ---- */
.process { padding: clamp(80px, 12vh, 160px) var(--gutter); position: relative; z-index: 1; background: var(--moss); color: var(--bone); }
.process .eyebrow { color: var(--ochre); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(32px, 4vw, 64px); counter-reset: s; }
.step { position: relative; padding-top: 28px; border-top: 1px solid rgba(247, 243, 234, .22); transition-property: opacity, transform, border-color; }
.step::before { content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 0; background: var(--ochre); transition: width 1.2s var(--ease) .3s; }
.step.is-in::before { width: 100%; }
.step__num { display: block; font-size: 48px; font-weight: 800; letter-spacing: -0.04em; color: var(--ochre); line-height: 1; margin-bottom: 20px; }
.step h3 { margin-bottom: 12px; }
.step p { color: rgba(247, 243, 234, .7); font-size: 15.5px; }
.step:nth-child(2) { transition-delay: .15s; } .step:nth-child(3) { transition-delay: .3s; }

/* ---- work ---- */
.work { padding: clamp(80px, 12vh, 160px) var(--gutter); position: relative; z-index: 1; background: var(--charcoal); }
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(14px, 2vw, 28px); }
.tile { margin: 0; grid-column: span 4; cursor: pointer; }
.tile--wide { grid-column: span 8; }
@media (max-width: 820px) { .tile, .tile--wide { grid-column: span 12; } }
.tile .ph, .tile img { aspect-ratio: 8 / 5; width: 100%; object-fit: cover; border-radius: 14px; }
.tile:not(.tile--wide) .ph, .tile:not(.tile--wide) img { aspect-ratio: 4 / 5; }
.tile > div, .tile > img { transition: transform 1.2s var(--ease), filter 1.2s var(--ease); }
.tile { overflow: visible; }
.tile .ph, .tile img { will-change: transform; }
.tile:hover .ph, .tile:hover img { transform: scale(1.025); filter: brightness(1.08); }
.tile figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 4px 0; font-size: 14px; }
.tile figcaption b { font-weight: 600; }
.tile figcaption span { color: var(--bone-60); }

/* placeholder slots, until the real photos go in */
.ph {
  display: grid; place-items: center; text-align: center;
  background:
    linear-gradient(135deg, rgba(110, 117, 86, .35), rgba(30, 68, 70, .45)),
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(247, 243, 234, .035) 14px 15px);
  border: 1px dashed var(--bone-30);
  color: var(--bone-60); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.7;
}

/* ---- about ---- */
.about { padding: clamp(80px, 12vh, 160px) var(--gutter); display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 110px); align-items: center; position: relative; z-index: 1; background: var(--charcoal-2); }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }
.ph--portrait { aspect-ratio: 4 / 5; border-radius: 16px; max-width: 480px; }
.about__text p:not(.eyebrow) { color: var(--bone-60); max-width: 36em; margin-top: 22px; font-size: clamp(16px, 1.2vw, 18px); }
.about__text h2 + p { margin-top: 28px; }
.about__facts { list-style: none; padding: 0; margin: 44px 0 0; display: flex; gap: clamp(28px, 4vw, 60px); flex-wrap: wrap; }
.about__facts li { display: flex; flex-direction: column; gap: 4px; }
.about__facts b { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; color: var(--ochre); line-height: 1; }
.about__facts span { font-size: 13px; color: var(--bone-60); letter-spacing: .06em; text-transform: uppercase; }

/* ---- contact ---- */
.contact { padding: clamp(80px, 14vh, 180px) var(--gutter); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 110px); position: relative; z-index: 1; background: var(--charcoal); }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }
.contact__intro > p:not(.eyebrow) { color: var(--bone-60); margin-top: 22px; max-width: 28em; }
.contact__email {
  display: inline-block; margin-top: 36px; font-size: clamp(20px, 2.2vw, 30px); font-weight: 600; letter-spacing: -0.01em;
  background: linear-gradient(var(--ochre), var(--ochre)) no-repeat left bottom / 0 2px; transition: background-size .6s var(--ease); padding-bottom: 4px;
}
.contact__email:hover { background-size: 100% 2px; }
.form { display: grid; gap: 18px; }
.form label { display: grid; gap: 8px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--bone-60); }
.form input, .form textarea {
  font: inherit; font-size: 16px; color: var(--bone); background: var(--bone-6);
  border: 1px solid var(--bone-12); border-radius: 10px; padding: 14px 16px; width: 100%; resize: vertical;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--ochre); background: rgba(247, 243, 234, .08); box-shadow: 0 0 0 4px rgba(212, 160, 58, .15); }
.form textarea::placeholder { color: var(--bone-30); }
.form__hp { position: absolute; left: -9999px; }
.form .btn { justify-self: start; margin-top: 6px; }
.form__note { font-size: 14px; color: var(--bone-60); min-height: 1.4em; }
.form__note.is-ok { color: var(--ochre); }
.form__note.is-err { color: #e08a67; }
.form.is-sent label, .form.is-sent .btn { opacity: .4; pointer-events: none; }

/* ---- footer ---- */
.footer { padding: 40px var(--gutter) 48px; border-top: 1px solid var(--bone-12); display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; font-size: 14px; color: var(--bone-60); position: relative; z-index: 1; background: var(--charcoal); }
.footer__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .14em; color: var(--bone); }
.footer__links { display: flex; gap: 24px; }
.footer__links a { transition: color .3s; }
.footer__links a:hover { color: var(--bone); }
