/* dezarcha — site styles */
:root {
  --bg: #f5f4f7;
  --surface: #ffffff;
  --ink: #17161b;
  --muted: #5f5c6b;
  --line: #dddae4;
  --accent: #6f68a8;
  --accent-soft: #e7e4f3;
  --dark: #000000;
  --dark-ink: #ecebf2;
  --dark-muted: #9a97a8;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 4.4rem); font-weight: 300; letter-spacing: .02em; text-transform: uppercase; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 400; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.hero-grid > *, .split > *, .p-info > *, .contact-grid > *, .projects > *, .products > * { min-width: 0; }
body { overflow-x: hidden; }
.eyebrow {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9em;
}
.muted { color: var(--muted); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 244, 247, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { text-decoration: none; font-weight: 600; letter-spacing: .28em; font-size: .95rem; }
.nav { display: flex; gap: 28px; }
.nav a {
  text-decoration: none; font-size: .78rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; font: inherit; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; color: var(--ink); padding: 8px 0; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
}

/* Language switcher */
.site-header .logo { margin-right: auto; }
.lang-switch { display: flex; align-items: center; margin-left: 24px; font-size: .72rem; font-weight: 600; letter-spacing: .12em; }
.lang-switch button { background: none; border: 0; font: inherit; letter-spacing: inherit; color: var(--muted); padding: 8px 6px; cursor: pointer; }
.lang-switch button:hover, .lang-switch button[aria-pressed="true"] { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { text-decoration: underline; text-underline-offset: 5px; }
.lang-more { position: relative; display: flex; align-items: center; gap: 4px; padding: 8px 6px; color: var(--muted); cursor: pointer; }
.lang-more:hover, .lang-more.on { color: var(--ink); }
.lang-more svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.lang-more select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.lang-float { position: fixed; top: 12px; right: 12px; z-index: 60; margin: 0; padding: 0 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
@media (max-width: 760px) { .lang-switch { margin: 0 12px 0 0; } }
/* Hide Google Translate's own bar and tooltips */
.skiptranslate iframe, #goog-gt-tt, .goog-te-balloon-frame, .VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf { display: none !important; }
body { top: 0 !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* Buttons */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font: inherit; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  padding: 14px 24px; border: 1px solid var(--ink); background: var(--ink); color: #fff;
  transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
section { padding: clamp(56px, 9vw, 120px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }

/* Hero */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-bottom: .25em; }
.hero .lead { font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--muted); max-width: 34em; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 32px; }
.badge { font-size: .72rem; font-weight: 500; letter-spacing: .06em; padding: 6px 12px; background: var(--accent-soft); color: var(--accent); }
.hero-img { aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-img { aspect-ratio: 16 / 11; } }

/* Project cards */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 40px); }
.card { text-decoration: none; display: block; }
.card .thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .thumb img { transform: scale(1.03); }
/* Card image toned to the site palette; the original colours fade in on hover */
.thumb.swap { position: relative; }
.thumb.swap .hover { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease, transform .6s ease; }
.card:hover .thumb.swap .hover, .card:focus-visible .thumb.swap .hover { opacity: 1; }
.card .meta { display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; }
.card h3 { margin: 0; font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; }
.card .num { font-size: .78rem; color: var(--muted); }
.card p { font-size: .9rem; color: var(--muted); margin: 4px 0 0; }
@media (max-width: 700px) { .projects { grid-template-columns: 1fr; } }

/* Portfolio book strip */
.book { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.book figure { margin: 0; }
.book img { cursor: zoom-in; }
.book figcaption { font-size: .78rem; color: var(--muted); padding-top: 6px; }
@media (max-width: 700px) { .book { grid-template-columns: repeat(2, 1fr); } }

/* Split / about */
.split { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 96px); }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.facts { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.facts li { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.facts li span:first-child { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
@media (max-width: 480px) { .facts li { grid-template-columns: 1fr; gap: 2px; } }

/* Shop */
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 40px); }
@media (max-width: 760px) { .products { grid-template-columns: 1fr; } }
.product { background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.product .pimg { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--line); }
.product .pimg img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; background: #fff; cursor: zoom-in; }
.product .pbody { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.product h3 { font-size: 1.05rem; letter-spacing: .04em; margin-bottom: .4em; }
.product .price { font-size: 1.35rem; font-weight: 600; margin: 4px 0 12px; }
.product ul { padding-left: 18px; margin: 0 0 20px; font-size: .9rem; color: var(--muted); }
.product .btn { margin-top: auto; text-align: center; }
.tag { display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }

.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 28px 0; margin-bottom: 56px; }
.strip div { font-size: .88rem; color: var(--muted); }
.strip strong { display: block; color: var(--ink); font-size: .95rem; margin-bottom: 2px; }
@media (max-width: 760px) { .strip { grid-template-columns: 1fr 1fr; } }

.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 400; font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--muted); }

/* Project page */
.p-hero { padding-top: clamp(40px, 7vw, 88px); padding-bottom: 32px; }
.p-hero .sub { font-size: clamp(1rem, 1.8vw, 1.2rem); color: var(--muted); margin: 0; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 16px; }
.tools small { font-size: .66rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.tools span { font-size: .72rem; letter-spacing: .03em; padding: 4px 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.award { display: inline-block; margin-top: 20px; padding: 8px 14px; font-size: .78rem; font-weight: 600; letter-spacing: .06em; background: var(--ink); color: #fff; }
.p-cover { background: var(--surface); }
.p-cover img { width: 100%; height: min(78vh, 56vw); object-fit: cover; cursor: zoom-in; }

/* Hero with a square cover beside the title (for lower-resolution renders) */
.p-hero-split { display: grid; grid-template-columns: 1fr minmax(280px, 520px); gap: clamp(32px, 5vw, 72px); align-items: center; }
.p-hero-split > * { min-width: 0; }
.p-cover-side { margin: 0; }
.p-cover-side img { width: 100%; aspect-ratio: 1; object-fit: cover; cursor: zoom-in; }
@media (max-width: 800px) { .p-hero-split { grid-template-columns: 1fr; } }

.p-video { display: block; width: 100%; max-height: 80vh; background: #000; }

/* Compact row of small images, side by side */
.g-row { display: flex; gap: clamp(12px, 2vw, 24px); align-items: flex-end; }
.g-row figure { flex: 1 1 0; margin: 0; min-width: 0; }
.g-row img { width: 100%; height: var(--row-h, clamp(120px, 16vw, 210px)); object-fit: contain; cursor: zoom-in; }
.g-row figcaption { font-size: .75rem; color: var(--muted); padding-top: 8px; }
.g-row + .g-grid, .g-grid + .g-row { margin-top: clamp(24px, 3vw, 40px); }
@media (max-width: 700px) {
  .g-row { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .g-row figure { flex: 0 0 62%; scroll-snap-align: start; }
}
.p-info { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 96px); }
@media (max-width: 800px) { .p-info { grid-template-columns: 1fr; } }
.p-text p { font-size: 1.05rem; }

.gallery { background: var(--surface); color: var(--ink); padding: clamp(48px, 7vw, 96px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.g-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(16px, 2.4vw, 32px); align-items: start; }
.g-grid figure { margin: 0; grid-column: span 6; }
.g-grid figure.wide { grid-column: span 12; }
.g-grid figure.third { grid-column: span 4; }
.g-grid img { width: 100%; cursor: zoom-in; }
.g-grid figcaption { font-size: .78rem; color: var(--muted); padding-top: 10px; letter-spacing: .02em; }
@media (max-width: 700px) { .g-grid figure, .g-grid figure.third { grid-column: span 12; } }

/* Project process chapters */
.process { background: var(--surface); border-top: 1px solid var(--line); }
.chapter { padding: clamp(48px, 7vw, 96px) 0; border-bottom: 1px solid var(--line); }
.chapter-head { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(16px, 4vw, 64px); margin-bottom: clamp(28px, 4vw, 48px); }
.chapter-head > * { min-width: 0; }
.chapter-num { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 300; color: var(--accent); line-height: 1; }
.chapter-num small { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: 12px; }
.chapter-head h2 { margin-bottom: .4em; }
.chapter-head p { color: var(--muted); max-width: 40em; margin: 0; }
@media (max-width: 700px) { .chapter-head { grid-template-columns: 1fr; } }

.p-next { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.p-next a.next-link { text-decoration: none; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 300; letter-spacing: .06em; text-transform: uppercase; }
.p-next a.next-link:hover { color: var(--accent); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 96px); }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
form label { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
form .field { margin-bottom: 18px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); padding: 12px 14px; border-radius: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
textarea { min-height: 140px; resize: vertical; }
.hidden { display: none; }

/* Links page */
.links { max-width: 480px; margin: 0 auto; padding: 56px var(--gutter) 80px; text-align: center; }
.links .avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; background: var(--line); }
.links a.lk {
  display: block; text-decoration: none; padding: 16px; margin-bottom: 12px;
  border: 1px solid var(--ink); font-size: .85rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}
.links a.lk:hover, .links a.lk.primary { background: var(--ink); color: #fff; }
.links a.lk.primary:hover { background: transparent; color: var(--ink); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; font-size: .85rem; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; margin-right: 20px; }
.site-footer a:hover { color: var(--ink); }

/* Intro (home) */
.intro { background: #fff; padding: clamp(32px, 5vw, 64px) 0 clamp(48px, 7vw, 96px); }
.wordmark {
  font-size: clamp(44px, 15.2vw, 182px); font-weight: 600; letter-spacing: -.02em; line-height: .9;
  text-transform: none; margin: 0 0 clamp(28px, 4vw, 56px); display: flex; overflow: hidden; padding-bottom: .04em;
}
.wordmark span { display: inline-block; transform: translateY(105%); animation: rise .9s cubic-bezier(.2, .7, .1, 1) forwards; }
.wordmark .ac { color: var(--accent); }
.sr-only, .wordmark .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; animation: none; transform: none; }
@keyframes rise { to { transform: none; } }
.intro-grid { display: grid; grid-template-columns: 1fr minmax(260px, 440px); gap: clamp(32px, 6vw, 96px); align-items: end; }
.intro-grid > * { min-width: 0; }
.intro-grid .lead { font-size: clamp(1rem, 1.5vw, 1.12rem); color: var(--muted); max-width: 32em; }
.intro-name { font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 400; margin: 0 0 .4em; }
.portrait { margin: 0; opacity: 0; animation: fade 1.2s .5s ease forwards; }
.portrait img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.intro-text { opacity: 0; animation: fade 1s .7s ease forwards; }
@keyframes fade { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) { .intro-grid { grid-template-columns: 1fr; } .portrait { order: -1; max-width: 360px; } }

.home .site-header .logo { opacity: 0; transition: opacity .3s; }
.home.scrolled .site-header .logo { opacity: 1; }
.home .site-header { background: rgba(255, 255, 255, .92); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Flipbook */
.flip-section { position: relative; background: var(--bg); }
.flip-sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding-top: 64px; }
.flip-sticky > .wrap { width: 100%; }
.flip-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: clamp(20px, 4vh, 40px); }
.flip-head h2 { margin: 0; }
.flip-stage { display: flex; justify-content: center; perspective: 2600px; }
.book3d {
  --pw: min(44vw, 520px, 64vh);
  position: relative; width: calc(var(--pw) * 2); height: calc(var(--pw) * .7075);
  transform-style: preserve-3d; will-change: transform;
}
.leaf {
  position: absolute; left: 50%; top: 0; width: 50%; height: 100%;
  transform-origin: left center; transform-style: preserve-3d; will-change: transform;
}
.face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: #fff; overflow: hidden; outline: 1px solid rgba(23, 22, 27, .06);
}
.face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.face.back { transform: rotateY(180deg); }
.face::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.face.front::after { background: linear-gradient(to right, rgba(0, 0, 0, .12), rgba(0, 0, 0, 0) 7%); }
.face.back::after { background: linear-gradient(to left, rgba(0, 0, 0, .12), rgba(0, 0, 0, 0) 7%); }
.face.intro-page { display: flex; align-items: center; gap: 6%; padding: 6%; background: #f1eff6; }
.intro-page img { width: 42%; height: auto; aspect-ratio: 1; object-fit: cover; }
.intro-page div { font-size: calc(var(--pw) * .026); line-height: 1.5; color: var(--muted); }
.intro-page strong { display: block; font-size: 1.9em; font-weight: 400; color: var(--ink); letter-spacing: .08em; margin-bottom: .4em; }
.flip-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: clamp(20px, 4vh, 36px); font-size: .82rem; color: var(--muted); }
.flip-progress { flex: 1; max-width: 320px; height: 2px; background: var(--line); position: relative; }
.flip-progress i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); }
.flip-label { font-weight: 500; color: var(--ink); min-width: 10em; }

@media (prefers-reduced-motion: reduce) {
  .wordmark span, .portrait, .intro-text { animation: none; transform: none; opacity: 1; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .94);
  display: none; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
