/* Dokein Studio — minimal parallax theme */
:root {
  --ink: #000;
  --muted: #555;
  --line: #e6e6e6;
  --tile: #f2f2f2;
  --foot: #f8f9fa;
  --head: "Dosis", sans-serif;
  --body: "Source Sans 3", sans-serif;
  --gap: 8px;
  --header-h: 108px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 300 15px/25px var(--body);
  color: var(--ink);
  background: var(--foot);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1.25em; line-height: 1.75; }
h1, h2, h3, h4, h5 { margin: 0; font-family: var(--head); text-transform: uppercase; letter-spacing: 2px; }

.container { width: 100%; max-width: 1328px; margin: 0 auto; padding: 0 15px; }

/* ---------- reveal-on-hover text (nav, buttons, socials) ---------- */
.btn-reveal { position: relative; display: inline-block; overflow: hidden; height: 25px; vertical-align: top; }
.btn-reveal span { display: block; transition: transform .35s cubic-bezier(.6, 0, .3, 1); }
.btn-reveal .reveal { position: absolute; left: 0; top: 100%; }
a:hover .btn-reveal span, button:hover .btn-reveal span { transform: translateY(-100%); }

/* ---------- header ---------- */
.site-header { position: absolute; inset: 0 0 auto; z-index: 50; height: var(--header-h); }
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 71px; max-width: none; }
.logo img { display: block; height: 46px; width: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 33px; }
.nav a { font: 400 12px/25px var(--head); letter-spacing: 2px; text-transform: uppercase; }
.nav a.active { font-weight: 600; }
.menu-toggle {
  /* icon only (client asked to drop the "Menu" word); aria-label keeps it named for screen readers */
  display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px;
  border: 0; padding: 0; cursor: pointer; background: none;
}
.menu-toggle i, .menu-toggle i::before, .menu-toggle i::after { display: block; width: 24px; height: 2px; background: var(--ink); position: relative; transition: .3s; }
.menu-toggle i::before, .menu-toggle i::after { content: ""; position: absolute; left: 0; }
.menu-toggle i::before { top: -7px; }
.menu-toggle i::after { top: 7px; }
.menu-open .menu-toggle i { background: transparent; }
.menu-open .menu-toggle i::before { top: 0; transform: rotate(45deg); }
.menu-open .menu-toggle i::after { top: 0; transform: rotate(-45deg); }

/* ---------- parallax hero ---------- */
.hero { position: relative; height: 630px; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; background: #ebebeb; }
.hero-img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .72); }
/* client banners have their headline baked in: no wash, keep the left-hand text in view */
.hero--banner::after { display: none; }
.hero--banner { height: min(46.15vw, 100vh); background: #fff; }  /* 46.15vw = banner ratio 2625/5688: whole banner shown */
.hero--banner .hero-img { object-position: center top; }  /* centred composition; any crop comes off the sides/bottom, never the tagline */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero--soft .hero-img { filter: blur(10px); transform: scale(1.1); }
.hero h1 { position: relative; z-index: 1; font: 400 36px/1.2 var(--head); letter-spacing: .4em; margin-right: -.4em; padding: 0 20px; }

/* ---------- page body (sits above the fixed footer) ---------- */
main { position: relative; z-index: 1; background: #fff; }
.section { padding: 70px 0 140px; }

/* ---------- portfolio grid ---------- */
.filters { list-style: none; margin: 0 0 39px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 34px; }
.filters button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); font: 400 12px/25px var(--head); letter-spacing: 2px; text-transform: uppercase; }
.filters button.active::before { content: "[ "; }
.filters button.active::after { content: " ]"; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); grid-auto-flow: dense; }
.tile { position: relative; overflow: hidden; background: var(--tile); aspect-ratio: 1; opacity: 0; transform: translateY(30px); transition: opacity .7s, transform .7s; }
.tile.big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.tile.wide { grid-column: span 2; aspect-ratio: 2 / 1; }
.tile.full { grid-column: 1 / -1; aspect-ratio: 4 / 1; }
.tile.in { opacity: 1; transform: none; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s; }
.tile .overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: rgba(255, 255, 255, .88); opacity: 0; transition: opacity .4s;
}
.tile h2 { font: 600 15px/1.2 var(--head); letter-spacing: 2px; transform: translateY(10px); transition: transform .4s; padding: 0 12px; text-align: center; }
.tile .cat { font: 400 11px/1 var(--head); letter-spacing: 2px; text-transform: uppercase; color: var(--muted); transform: translateY(10px); transition: transform .4s .05s; }
.tile:hover .overlay { opacity: 1; }
.tile:hover h2, .tile:hover .cat { transform: none; }
.tile:hover img { transform: scale(1.04); }

.center { text-align: center; }
.btn {
  display: inline-block; border: 0; cursor: pointer; background: var(--ink); color: #fff;
  padding: 9px 28px; font: 400 11px/25px var(--head); letter-spacing: 2px; text-transform: uppercase;
}
.load-more { margin-top: 70px; }
.load-more[hidden] { display: none; }

/* ---------- about ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; padding: 140px 0 120px; }
.stat svg { width: 26px; height: 26px; margin: 0 auto 14px; }
.stat h4 { font: 600 12px/1.2 var(--head); letter-spacing: 2px; }
.stat .sep { margin: 14px 0 6px; font-size: 13px; }
.stat .num { font-size: 15px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 34px; }
.bio h3 { font: 600 13px/1.2 var(--head); letter-spacing: 2px; margin: 34px 0 14px; }
.bio ul { margin: 0 0 1.25em; padding-left: 18px; line-height: 1.75; }
.signature { margin-top: 28px; font-style: italic; line-height: 26px; }
.signature .sig { font: 400 46px/1 "Mrs Saint Delafield", cursive; font-style: normal; margin-bottom: 4px; }

.skill { margin-bottom: 34px; }
.skill-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.skill h5 { font: 500 12px/1 var(--head); letter-spacing: 2px; }
.skill-head span { font-size: 13px; line-height: 1; }
.bar { height: 2px; background: var(--line); }
.bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width 1.4s cubic-bezier(.6, 0, .3, 1); }

/* ---------- contact ---------- */
.contact { padding: 140px 0 140px; }
.contact h4 { font: 600 22.5px/1.2 var(--head); letter-spacing: 2px; margin-bottom: 4px; }
.info-item { margin-top: 18px; line-height: 26px; }
.info-item strong { display: block; font-weight: 400; }
.form { display: grid; gap: 20px; padding-top: 27px; }
.form input, .form textarea {
  width: 100%; border: 1px solid #e3e3e3; border-radius: 0; padding: 7px 15px; background: #fff;
  font: 400 14px/25px var(--body); color: var(--ink); outline: none; transition: border-color .3s;
}
.form textarea { height: 182px; padding-top: 14px; resize: vertical; }
.form input:focus, .form textarea:focus { border-color: var(--ink); }
.form .btn { justify-self: start; margin-top: 3px; padding: 9px 28px; }
.form-note { font-size: 14px; color: var(--muted); }

/* ---------- project detail ---------- */
.project-intro { padding: 100px 0 70px; }
.project-intro h2 { font: 600 22.5px/1.2 var(--head); margin-bottom: 18px; }
.meta { list-style: none; margin: 0; padding: 0; }
.meta li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.meta li span:first-child { font: 500 12px/25px var(--head); letter-spacing: 2px; text-transform: uppercase; }
.gallery { display: grid; gap: var(--gap); }
.gallery img { width: 100%; background: var(--tile); }
.project-nav { display: flex; justify-content: space-between; align-items: center; padding: 70px 0 0; font: 400 12px/25px var(--head); letter-spacing: 2px; text-transform: uppercase; }

/* ---------- intro ---------- */
html.intro { overflow: hidden; }
html.intro body { visibility: hidden; }
.preloader { position: fixed; inset: 0; z-index: 200; background: #fff; display: flex; align-items: center; justify-content: flex-start;  /* left-aligned (client); padding-left set in main.js */ visibility: visible; transition: opacity .7s, visibility .7s; }
.preloader.done { opacity: 0; visibility: hidden; }
.pre-inner { width: min(360px, 76vw); }
/* 1) logo wipes in from the left, 2) words + bullets appear one by one, 3) hold, then main.js fades the intro out */
.pre-logo { display: block; width: 100%; height: auto; animation: preWipe 1s cubic-bezier(.65, 0, .35, 1) both; }
/* left 27.4% = where "dokein" starts inside logo.svg, so the line spans the wordmark like a tagline */
.pre-words { display: flex; justify-content: space-between; margin: 14px 0 0; padding: 0 .3% 0 27.4%; font: 400 clamp(10px, 2.6vw, 13px)/1.2 var(--head); letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.pre-words span { animation: preIn .5s ease-out both; }
.pre-words span:nth-child(1) { animation-delay: .9s; }
.pre-words span:nth-child(2) { animation-delay: 1.15s; }
.pre-words span:nth-child(3) { animation-delay: 1.35s; }
.pre-words span:nth-child(4) { animation-delay: 1.6s; }
.pre-words span:nth-child(5) { animation-delay: 1.8s; }
@keyframes preWipe { from { clip-path: inset(0 100% 0 0); opacity: .4; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
@keyframes preIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------- single project (image slider left, text right) ---------- */
.single { padding: calc(var(--header-h) + 50px) 0 100px; }
.single .two-col { align-items: start; }
.slider { position: sticky; top: 30px; background: var(--tile); }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; cursor: grab; user-select: none; }
.slides.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: 0 0 100%; width: 100%; aspect-ratio: 1; object-fit: contain; scroll-snap-align: start; -webkit-user-drag: none; }

/* ---------- lightbox (project images) ---------- */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(10, 10, 10, .94); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; touch-action: pan-y; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: calc(100vw - 160px); max-height: calc(100vh - 80px); width: auto; height: auto; object-fit: contain; user-select: none; }
.lb-btn { position: absolute; width: 52px; height: 52px; border: 0; background: none; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; opacity: .75; transition: opacity .2s; }
.lb-btn:hover, .lb-btn:focus-visible { opacity: 1; }
.lb-close { top: 14px; right: 14px; font-size: 30px; }
.lb-prev { left: 14px; top: 50%; margin-top: -26px; }
.lb-next { right: 14px; top: 50%; margin-top: -26px; }
.lightbox.solo .lb-prev, .lightbox.solo .lb-next { display: none; }
body.lb-open { overflow: hidden; }
.single h2 { font: 600 22.5px/1.2 var(--head); margin-bottom: 18px; }
.single h4 { font: 600 16px/1.2 var(--head); letter-spacing: 2px; margin: 36px 0 16px; }
.single ul.delivered { margin: 0 0 1.25em; padding-left: 18px; line-height: 1.75; }
.outcome { font-style: italic; }
.details { display: grid; gap: 14px; }
.details h5 { font: 600 12px/1.6 var(--head); letter-spacing: 2px; }
.details p { margin: 0; }

/* ---------- sticky footer (revealed from beneath main) ---------- */
.site-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 0; background: var(--foot); padding: 90px 0 80px; text-align: center; }
.socials { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 30px; }
.socials a { font: 400 12px/25px var(--head); letter-spacing: 2px; text-transform: uppercase; }
.copy { margin: 0; color: #333; }

/* ---------- responsive ---------- */
@media (max-width: 1199px) {
  .site-header .container { padding: 0 30px; }
}
@media (max-width: 991px) {
  :root { --header-h: 108px; }
  .site-header .container { padding: 0 12px; }
  .logo img { height: 36px; }
  .menu-toggle { display: inline-flex; }
  .nav { position: fixed; inset: 0; z-index: -1; background: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
  .nav ul { flex-direction: column; align-items: center; gap: 18px; }
  .nav a { font-size: 20px; line-height: 30px; }
  .nav .btn-reveal { height: 30px; }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .menu-open { overflow: hidden; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .tile.big { grid-row: auto; aspect-ratio: 1; }
  .tile.full { aspect-ratio: 2 / 1; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 60px; padding: 90px 0 80px; }
  .two-col { grid-template-columns: 1fr; gap: 50px; }
  .contact { padding: 90px 0; }
  .slider { position: relative; top: auto; }
  /* tablet/phone: banner starts below the header (white strip) so the centred tagline clears the logo + menu */
  .hero--banner { height: calc(46.15vw + 88px); }
  .hero--banner .hero-img { top: 88px; height: calc(100% - 88px); }
}
@media (max-width: 575px) {
  .hero { height: 480px; }
  .hero--banner { height: 488px; }
  .lightbox img { max-width: 100vw; max-height: calc(100vh - 140px); }
  .lb-prev, .lb-next { top: auto; bottom: 14px; margin-top: 0; }
  .hero h1 { font-size: 26px; letter-spacing: .3em; margin-right: -.3em; }
  .section { padding: 50px 0 90px; }
  .filters { gap: 4px 20px; }
  .grid { grid-template-columns: 1fr; }
  .tile.big, .tile.wide, .tile.full { grid-column: auto; grid-row: auto; aspect-ratio: 1; }
  .project-intro { padding: 60px 0 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .tile { opacity: 1; transform: none; }
}
