/* ============================================================
   LOOSE DESIGN — gallery rebuild
   Warm grey canvas · vivid orange accent · typographic hero
   Space Grotesk (display) + Inter (body/utility)
   ============================================================ */

/* ---- Tokens ---- */
:root {
  --canvas:  #E8E6E1;   /* warm gallery grey ground */
  --panel:   #F2F0EC;   /* lifted alternating surface */
  --ink:     #1A1816;   /* primary warm near-black */
  --dim:     #6B6660;   /* secondary warm grey */
  --hair:    #CFCBC4;   /* hairline dividers */
  --orange:  #FF5A1F;   /* vivid accent — spend it sparingly */

  --display: 'Poppins', system-ui, sans-serif;
  --body:    'Inter', system-ui, sans-serif;

  --nav-h:   100px;
  --edge:    clamp(20px, 5vw, 72px);   /* page side padding */
  --maxw:    1320px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--orange); color: var(--canvas); }

/* ---- Full-screen jumbled-logo watermark ---- */
.page-watermark {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url('../images/loose-jumbled-watermark.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  opacity: 0.20;
}
/* Keep all real content above the watermark */
.nav, .drawer, main, .footer, .cursor { position: relative; z-index: 1; }
.nav { z-index: 1000; }

/* ---- Custom cursor (pointer devices only) ---- */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 9px; height: 9px;
  background: var(--orange); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .18s ease, height .18s ease, background .18s ease;
  mix-blend-mode: multiply;
}
.cursor.big { width: 42px; height: 42px; background: rgba(255,90,31,.18); }
@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 32px;
  padding: 0 var(--edge);
  background: rgba(232,230,225,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-stamp { width: 80px; height: 80px; object-fit: contain; filter: invert(1); }
.nav-word {
  font-family: var(--display);
  font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em;
}
.dot { color: var(--orange); }
.nav-links { margin-left: auto; display: flex; gap: 30px; }
.nav-links a {
  font-family: var(--display);
  font-size: .82rem; font-weight: 500;
  letter-spacing: .02em;
  color: var(--dim);
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-loc {
  font-family: var(--display);
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--dim);
}
.nav-burger { display: none; }

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 990;
  background: var(--canvas);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 40px;
  opacity: 0; visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
}
.drawer.open { opacity: 1; visibility: visible; }
.drawer-nav { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.drawer-link {
  font-family: var(--display);
  font-weight: 600; font-size: 2.4rem; letter-spacing: -.02em;
  color: var(--ink);
  transition: color .2s ease;
}
.drawer-link:active, .drawer-link:hover { color: var(--orange); }
.drawer-loc {
  font-family: var(--display);
  font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--dim);
}

/* ============================================================
   HERO — the thesis (big typographic statement)
   ============================================================ */
.hero {
  min-height: 100vh;
  padding: calc(var(--nav-h) + 6vh) var(--edge) 10vh;
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-eyebrow {
  font-family: var(--display);
  font-size: .78rem; font-weight: 500;
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 30px;
  display: inline-flex; align-items: center; gap: 12px;
}
.hero-eyebrow::before {
  content: ''; width: 8px; height: 8px;
  background: var(--orange); border-radius: 50%;
}
.hero-head {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3rem, 11vw, 9.5rem);
  line-height: 0.94;
  letter-spacing: -.04em;
  color: var(--ink);
  margin-bottom: 40px;
}
.hero-head .line { display: block; }
.hero-head em {
  font-style: normal;
  color: var(--orange);
}

/* Random letter fly-in */
.hero-head .ltr {
  display: inline-block;
  opacity: 0;
  transform: translate(var(--dx, 0), var(--dy, 40px)) rotate(var(--rot, 0deg)) scale(var(--scl, 1));
  transition: opacity 1.6s ease, transform 2.4s cubic-bezier(.16, 1, .3, 1);
  will-change: transform, opacity;
}
.hero-head.letters-in .ltr {
  opacity: 1;
  transform: translate(0, 0) rotate(0deg) scale(1);
}
/* Reduced motion: show instantly, no scatter */
@media (prefers-reduced-motion: reduce) {
  .hero-head .ltr { opacity: 1; transform: none; transition: none; }
}
.hero-sub {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.55;
  color: var(--dim);
  max-width: 30ch;
  margin-bottom: 48px;
}
.hero-meta { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.hero-cta {
  font-family: var(--display);
  font-weight: 600; font-size: .92rem;
  letter-spacing: .02em;
  padding: 15px 32px;
  background: var(--orange); color: var(--canvas);
  border-radius: 100px;
  transition: transform .2s ease, background .2s ease;
}
.hero-cta:hover { transform: translateY(-2px); background: var(--ink); }
.hero-since {
  font-family: var(--display);
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--dim);
}

/* ============================================================
   SECTION WATERMARK — faint stamp, top-right of each section
   ============================================================ */
.studio, .work, .cases, .reach, .bio, .contact { position: relative; }
.studio::after, .work::after, .cases::after, .reach::after, .bio::after, .contact::after {
  content: '';
  position: absolute;
  top: clamp(40px, 8vh, 90px);
  right: var(--edge);
  width: clamp(70px, 9vw, 120px);
  aspect-ratio: 340 / 290;          /* preserve stamp ratio — no distortion */
  background: url('../images/stamp-white.png') center / contain no-repeat;
  filter: invert(1);                 /* white stamp -> dark for light ground */
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}
/* Keep section content above the watermark */
.studio > *, .work > *, .cases > *, .reach > *, .bio > *, .contact > * { position: relative; z-index: 1; }

/* ============================================================
   SHARED section bits
   ============================================================ */
.eyebrow {
  font-family: var(--display);
  font-size: .72rem; font-weight: 500;
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--dim);
  display: inline-flex; align-items: center; gap: 11px;
}
.eyebrow::before {
  content: ''; width: 7px; height: 7px;
  background: var(--orange); border-radius: 50%; flex: none;
}

/* ============================================================
   STUDIO
   ============================================================ */
.studio {
  background: var(--panel);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: clamp(80px, 12vh, 160px) var(--edge);
}
.studio-grid {
  max-width: var(--maxw); margin: 28px auto 0;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 7vw, 110px);
  align-items: start;
}
.studio-head {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.6vw, 3.3rem);
  line-height: 1.04; letter-spacing: -.025em;
  color: var(--ink);
}
.studio-body p { color: var(--dim); margin-bottom: 20px; max-width: 46ch; }
.studio-list {
  list-style: none; margin-top: 32px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.studio-list li {
  font-family: var(--display);
  font-weight: 500; font-size: .95rem;
  color: var(--ink);
  padding: 14px 0;
  border-top: 1px solid var(--hair);
}

/* ============================================================
   WORK / SHOWCASE
   ============================================================ */
.work { padding: clamp(80px, 12vh, 160px) var(--edge); max-width: var(--maxw); margin: 0 auto; }
.work-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 48px; gap: 20px; }
.work-head {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 5rem);
  letter-spacing: -.03em; color: var(--ink); line-height: 1;
}
.grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
}
.tile {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  background: var(--ink);
}
.tile img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(100%) contrast(1.03);
  transition: filter .5s ease, transform .65s ease;
}
.tile:hover img { filter: grayscale(0%); transform: scale(1.04); }
.tile--specimen img { object-fit: contain; padding: 12%; background: var(--ink); }
.tile-cap {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px;
  background: linear-gradient(to top, rgba(26,24,22,.9) 0%, rgba(26,24,22,.1) 55%, transparent 100%);
  opacity: 0; transition: opacity .35s ease;
}
.tile:hover .tile-cap { opacity: 1; }
.tile-name {
  font-family: var(--display);
  font-weight: 600; font-size: 1.05rem; color: var(--canvas);
}
.tile-cat {
  font-family: var(--display);
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--orange); margin-top: 4px;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  border-top: 1px solid var(--hair);
  padding: clamp(80px, 12vh, 160px) var(--edge);
}
.contact > .eyebrow { display: flex; max-width: var(--maxw); margin: 0 auto; }
.contact-head {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 4.6rem);
  line-height: 1; letter-spacing: -.03em;
  color: var(--ink);
  max-width: var(--maxw); margin: 24px auto 56px;
}
.contact-form { max-width: 640px; margin: 0 auto 0 0; }
.field { margin-bottom: 30px; }
.field label {
  display: block;
  font-family: var(--display);
  font-size: .74rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 10px;
}
.field input, .field textarea {
  width: 100%;
  background: transparent;
  border: none; border-bottom: 1px solid var(--hair);
  padding: 12px 0;
  font-family: var(--body); font-size: 1rem; color: var(--ink);
  transition: border-color .25s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--orange); }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); opacity: .6; }
.field textarea { resize: vertical; min-height: 120px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.submit {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 8px;
  font-family: var(--display); font-weight: 600; font-size: .92rem;
  letter-spacing: .02em;
  padding: 15px 34px;
  background: var(--orange); color: var(--canvas);
  border: 1px solid var(--orange); border-radius: 100px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.submit:hover { background: transparent; color: var(--orange); transform: translateY(-2px); }
.submit:disabled { opacity: .5; cursor: wait; }
.submit-arrow { transition: transform .2s ease; }
.submit:hover .submit-arrow { transform: translateX(4px); }
.form-status { margin-top: 22px; font-size: .9rem; min-height: 1.2em; }
.form-status.ok  { color: var(--orange); }
.form-status.err { color: #C0392B; }

/* ============================================================
   CASE STUDIES
   ============================================================ */
.cases {
  background: var(--panel);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: clamp(80px, 12vh, 160px) var(--edge);
}
.cases-top { display: flex; align-items: baseline; justify-content: space-between; margin: 0 auto 64px; max-width: var(--maxw); gap: 20px; }
.cases .case { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.cases-head {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 5rem);
  letter-spacing: -.03em; color: var(--ink); line-height: 1;
}
.case {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 4vw, 64px);
  padding-top: 48px;
  border-top: 1px solid var(--hair);
}
.case-index {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -.02em;
  color: var(--orange);
  line-height: 1;
}
.case-body {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.case-visual {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
  display: flex; align-items: flex-start; justify-content: center;
}
.case-visual img {
  width: 100%; max-width: 360px; height: auto; display: block;
  transition: transform .7s ease;
}
.case-visual:hover img { transform: scale(1.03); }
.case-client {
  font-family: var(--display);
  font-size: .8rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 18px;
}
.case-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 3rem);
  line-height: 1.05; letter-spacing: -.025em;
  color: var(--ink);
  margin-bottom: 28px;
  max-width: 20ch;
}
.case-summary { color: var(--dim); margin-bottom: 18px; max-width: 60ch; }
.case-detail {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  margin: 44px 0 36px;
  padding-top: 36px;
  border-top: 1px solid var(--hair);
}
.case-detail-lbl {
  display: block;
  font-family: var(--display);
  font-size: .68rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 16px;
}
.case-tags { list-style: none; }
.case-tags li {
  font-family: var(--display); font-weight: 500; font-size: .92rem;
  color: var(--ink); padding: 5px 0;
}
.case-detail-val { font-size: .92rem; color: var(--ink); line-height: 1.6; }
.case-detail-val strong { font-weight: 600; }
.case-swatches { display: flex; gap: 8px; }
.sw {
  width: 36px; height: 36px; border-radius: 4px; display: block;
}
.sw--line { border: 1px solid var(--hair); }
.case-link {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600; font-size: .92rem;
  color: var(--ink);
  border-bottom: 2px solid var(--orange);
  padding-bottom: 3px;
  transition: color .2s ease;
}
.case-link:hover { color: var(--orange); }

/* ============================================================
   REACH — stats statement
   ============================================================ */
.reach {
  padding: clamp(80px, 12vh, 160px) var(--edge);
  max-width: var(--maxw); margin: 0 auto;
}
.reach-head {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 5vw, 4rem);
  line-height: 1.02; letter-spacing: -.03em;
  color: var(--ink);
  margin: 22px 0 64px;
  max-width: 18ch;
}
.reach-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hair);
}
.stat {
  padding: 36px 28px 36px 0;
  border-right: 1px solid var(--hair);
}
.stat:last-child { border-right: none; }
.stat-num {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3rem, 6vw, 5.2rem);
  line-height: 1; letter-spacing: -.04em;
  color: var(--orange);
}
.stat-plus { font-size: .55em; vertical-align: super; }
.stat-lbl {
  display: block; margin-top: 14px;
  font-family: var(--display);
  font-size: .78rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--dim);
}

/* ============================================================
   BIO — designer
   ============================================================ */
.bio {
  background: var(--panel);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: clamp(80px, 12vh, 160px) var(--edge);
}
.bio-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.bio-portrait {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--ink);
}
.bio-portrait img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(100%) contrast(1.04);
  transition: filter .6s ease, transform .8s ease;
}
.bio-portrait:hover img { filter: grayscale(0%); transform: scale(1.03); }
.bio-head {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  letter-spacing: -.03em; color: var(--ink);
  margin: 18px 0 4px;
}
.bio-role {
  font-family: var(--display);
  font-size: .82rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 28px;
}
.bio-body p:not(.eyebrow):not(.bio-role) { color: var(--dim); margin-bottom: 18px; max-width: 48ch; }
.bio-link {
  display: inline-block; margin-top: 14px;
  font-family: var(--display);
  font-weight: 600; font-size: .92rem;
  color: var(--ink);
  border-bottom: 2px solid var(--orange);
  padding-bottom: 3px;
  transition: color .2s ease, gap .2s ease;
}
.bio-link:hover { color: var(--orange); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  padding: 40px var(--edge);
  max-width: var(--maxw); margin: 0 auto;
}
.footer-word { font-family: var(--display); font-weight: 600; font-size: 1.1rem; }
.footer-meta { font-family: var(--display); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.footer-mail { font-size: .9rem; color: var(--dim); transition: color .2s ease; }
.footer-mail:hover { color: var(--orange); }

/* ============================================================
   REVEAL animation
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .cursor { display: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .studio-grid { grid-template-columns: 1fr; gap: 40px; }
  .reach-stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--hair); }
  .bio-grid { grid-template-columns: 1fr; gap: 40px; }
  .bio-portrait { max-width: 360px; }
  .case-detail { grid-template-columns: 1fr; gap: 28px; }
  .case-body { grid-template-columns: 1fr; gap: 32px; }
  .case-visual {
    position: static;
    order: -1;            /* logo above the text when stacked */
    justify-content: flex-start;
  }
  .case-visual img { max-width: 240px; }
}
@media (max-width: 760px) {
  .nav-links, .nav-loc { display: none; }
  .nav-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    margin-left: auto;
    width: 40px; height: 40px;
    background: transparent; border: 0; cursor: pointer; z-index: 1001; position: relative;
  }
  .nav-burger span { display: block; width: 24px; height: 2px; background: var(--ink); transition: transform .3s ease, opacity .3s ease; }
  .nav-burger.open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
  .nav-burger.open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
  .work-top { flex-direction: column; gap: 14px; }
  .nav-stamp { width: 60px; height: 60px; }
  .cases-top { flex-direction: column; gap: 14px; }
  .case { grid-template-columns: 1fr; gap: 16px; }
  /* 16px inputs stop iOS auto-zoom */
  .field input, .field textarea { font-size: 16px; }
  .submit { width: 100%; justify-content: center; }
  .studio-list { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .grid { grid-template-columns: 1fr; }
  .reach-stats { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--hair); padding: 28px 0; }
  .stat:nth-child(2) { border-bottom: 1px solid var(--hair); }
  .case-visual img { max-width: 180px; }
}
