/*
 * Ahmad Junaid Sketchbook — design system.
 * Mobile first: phones by default, then tablets (640px+), wide tablets (900px+) and desktop (1100px+).
 * © Ahmad Junaid. All rights reserved.
 */

/* ---------- Fonts (hosted on the site) ---------- */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/cormorant-garamond-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/cormorant-garamond-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/cormorant-garamond-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url(../fonts/cormorant-garamond-latin-500-italic.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 600; font-display: swap; src: url(../fonts/cormorant-garamond-latin-600-italic.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/ibm-plex-mono-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "La Belle Aurore"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/la-belle-aurore-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Noto Nastaliq Urdu"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/noto-nastaliq-urdu-arabic-400-normal.woff2) format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --ink: #1E1B18;
  --ink-2: #2E2822;
  --ink-soft: #3E3831;
  --blue: #1F3F78;
  --red: #A8122A;
  --red-pen: #C4182C;
  --amber: #E9B949;
  --paper: #F3EDE2;
  --paper-2: #FBF8F1;
  --desk: #E6DDCB;
  --foot: #E9E0CF;
  --muted: #5C5348;
  --quiet: #8A7F70;
  --line: #B5A994;
  --tape: rgba(222, 210, 180, 0.8);

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --hand: "La Belle Aurore", "Bradley Hand", "Segoe Print", cursive;
  --urdu: "Noto Nastaliq Urdu", "Noto Naskh Arabic", serif;

  --gutter: clamp(18px, 4vw, 56px);
  --rule: 2px solid var(--ink-2);
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* The plugins' form styles read these. */
  --aj-ink: var(--ink); --aj-blue: var(--blue); --aj-red: var(--red); --aj-paper: var(--paper);
  --aj-muted: var(--muted); --aj-line: var(--line); --aj-serif: var(--serif); --aj-mono: var(--mono); --aj-hand: var(--hand);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--desk); color: var(--ink); font-family: var(--mono); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px dashed var(--red); outline-offset: 3px; }
h1, h2, h3, h4 { text-wrap: balance; }
p { margin: 0; }
button { font: inherit; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; font-weight: 600; }
.skip-link:focus { top: 12px; color: var(--paper); }

/* ---------- The sheet on the desk ---------- */
.desk { padding: 0; }
.sheet {
  position: relative; overflow: hidden; max-width: 1400px; margin: 0 auto;
  background-color: var(--paper);
  background-image: linear-gradient(rgba(90,80,70,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(90,80,70,.06) 1px, transparent 1px);
  background-size: 28px 28px;
}
.ink-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: url(../img/paper-ink-sm.webp) center top / 900px auto repeat-y; opacity: .7; }
.sheet > :not(.ink-bg) { position: relative; z-index: 1; }
.sheet > .site-header { z-index: 30; }

@media (min-width: 900px) {
  .desk { padding: 28px 2%; }
  .sheet { border: 3px solid var(--ink-2); box-shadow: 0 20px 50px rgba(30,20,10,.25); }
  .ink-bg { background-image: url(../img/paper-ink.webp); background-size: 1400px auto; opacity: .85; }
}

/* ---------- Type ---------- */
.display, .title, .card__title, .brand__name { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; margin: 0; }
.display { font-size: clamp(56px, 13vw, 124px); line-height: .92; }
.display--md { font-size: clamp(46px, 9vw, 84px); line-height: 1; }
.title { font-size: clamp(40px, 8vw, 56px); line-height: 1; }
.title--lg { font-size: clamp(40px, 7.4vw, 70px); }
.dot { color: var(--red); }
.hand { font-family: var(--hand); line-height: 1.2; }
.hand--sm { font-size: 19px; }
.hand--md { font-size: clamp(20px, 4.6vw, 24px); }
.hand--lg { font-size: clamp(23px, 5.4vw, 30px); line-height: 1.15; }
.mono { font-family: var(--mono); }
.label { margin: 0 0 8px; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.label a { color: inherit; text-decoration: none; }
.label--quiet { font-weight: 400; letter-spacing: .14em; color: var(--muted); }
.label--ink { color: var(--ink); }
.blue { color: var(--blue); } .muted { color: var(--muted); } .red { color: var(--red); } .amber { color: var(--amber); }
.prose-sm { max-width: 520px; font-size: 15px; line-height: 1.8; color: var(--ink-soft); }
.prose-serif { max-width: 540px; font-family: var(--serif); font-size: clamp(19px, 4vw, 21px); line-height: 1.6; color: var(--ink-soft); }
.link-hand { text-decoration: none; }
.link-hand:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 13px 20px; border: 2px solid var(--ink); font-family: var(--mono); font-size: 13px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--red); border-color: var(--red); color: var(--paper); }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn--blue { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn--blue:hover { background: var(--blue); color: var(--paper); }
.btn--small { min-height: 42px; padding: 10px 15px; }
.btn--block { display: flex; width: 100%; }
.btn.is-static { cursor: default; opacity: .9; }
.btn.is-static:hover { background: var(--ink); border-color: var(--ink); }

/* ---------- Header ---------- */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px var(--gutter) 14px; border-bottom: var(--rule); padding-top: max(16px, env(safe-area-inset-top)); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand:hover { color: var(--ink); }
.brand__sig { height: 40px; width: auto; flex: none; }
.brand__name { display: block; font-style: normal; font-weight: 600; font-size: 21px; letter-spacing: .04em; white-space: nowrap; }
.brand .scribble { width: 100%; max-width: 250px; height: 8px; color: var(--ink); }

.nav-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; background: none; border: 2px solid var(--ink); color: var(--ink); font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.nav-toggle__lines { display: grid; gap: 4px; width: 18px; }
.nav-toggle__lines span { display: block; height: 2px; background: currentColor; transition: transform .3s var(--ease), opacity .2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle__lines span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__lines span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__lines span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.site-nav a.is-app { color: var(--blue); }
.site-nav a.is-current { border-bottom: 2px solid currentColor; }
.site-nav a.btn { color: var(--paper); }

/* Phones & small tablets: the menu drops down as a torn sheet. */
@media (max-width: 899px) {
  .js .site-nav { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--paper-2); border-bottom: var(--rule); box-shadow: 0 14px 24px rgba(30,20,10,.18); clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .45s var(--ease), visibility 0s .45s; }
  .js .site-nav.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .45s var(--ease); }
  .site-header { position: relative; }
  .site-nav ul { display: grid; padding: 8px var(--gutter) 22px; }
  .site-nav li { border-bottom: 1px dashed var(--line); }
  .site-nav li:last-child { border: 0; padding-top: 16px; }
  .site-nav a:not(.btn) { display: flex; align-items: center; min-height: 54px; font-size: 15px; }
  .site-nav a.is-current { border: 0; color: var(--red); }
  .site-nav a.btn { width: 100%; min-height: 50px; }
  .no-js .nav-toggle { display: none; }
  .no-js .site-header { flex-wrap: wrap; }
  .no-js .site-nav ul { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; }
  .no-js .site-nav li { border: 0; }
}
@media (min-width: 900px) {
  .site-header { padding: 26px var(--gutter) 18px; flex-wrap: wrap; }
  .brand { gap: 16px; }
  .brand__sig { height: 54px; }
  .brand__name { font-size: 30px; }
  .nav-toggle { display: none; }
  .site-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
}
@media (max-width: 380px) {
  .brand__sig { display: none; }
  .nav-toggle__label { display: none; }
}

/* ---------- Sections ---------- */
.section { padding: 56px var(--gutter) 64px; border-top: var(--rule); }
.section--first { border-top: 0; }
.section--tight { border-top: 0; padding-top: 0; }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 18px 24px; margin-bottom: 36px; }
.section__head > div { min-width: 0; }
.section__aside { max-width: 360px; }
.section__sketch { margin: 0; display: flex; align-items: flex-end; gap: 12px; }
.section__sketch img, img.section__sketch { width: min(240px, 60vw); transform: rotate(-3deg); }
.split-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; margin-top: 10px; }
.more { margin-top: 28px; }

.two-col { display: grid; gap: 40px; align-items: center; }
.two-col__words { display: grid; gap: 18px; justify-items: start; min-width: 0; }
.two-col__words .label { margin: 0; }
.two-col__art { margin: 0; min-width: 0; display: flex; justify-content: center; }

@media (min-width: 900px) {
  .section { padding: 80px var(--gutter) 96px; }
  .section--tight { padding-top: 0; }
  .section__head { margin-bottom: 50px; }
  .two-col { grid-template-columns: 1fr 1fr; gap: 60px; }
  .section__sketch img, img.section__sketch { width: 280px; }
}

/* ---------- Taped prints ---------- */
.print { position: relative; margin: 0; background: #fff; padding: 10px 10px 44px; border: 1px solid #D6CCBA; box-shadow: 0 6px 18px rgba(40,30,20,.18); transform: rotate(var(--r, 0deg)); transition: transform .5s var(--ease); }
.print__frame { position: relative; overflow: hidden; aspect-ratio: var(--ar, 4 / 5); background: #EEE7DA; }
.print__frame > img:not(.print__sketch) { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.08); transition: filter .9s ease; }
.print__sketch { width: 100%; height: 100%; object-fit: contain; padding: 8%; mix-blend-mode: multiply; background: var(--paper-2); }
.print__placeholder { display: flex; align-items: center; justify-content: center; height: 100%; padding: 20px; margin: 0; border: 2px dashed var(--line); text-align: center; font-size: 24px; color: var(--quiet); background: var(--paper-2); }
.print__caption { position: absolute; left: 12px; right: 12px; bottom: 6px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 20px; line-height: 1.5; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.print .spiral { position: absolute; inset: 0; width: 100%; height: 100%; transform: scaleX(-1); pointer-events: none; }
.print .spiral > * { stroke-dasharray: 3200; stroke-dashoffset: 3200; }
.print.is-seen .spiral > *, .print:hover .spiral > * { animation: draw 4s .3s ease forwards; }
.print--flat { --r: 0deg; }

.tape { position: absolute; z-index: 3; height: 24px; width: 100px; background: var(--tape); box-shadow: 0 1px 3px rgba(0,0,0,.12); border-left: 2px dashed rgba(150,135,110,.45); border-right: 2px dashed rgba(150,135,110,.45); left: 38%; top: -12px; transform: rotate(-4deg); }
.tape--2 { left: auto; right: -22px; top: -6px; transform: rotate(30deg); }

/* Colour bloom: hover on a mouse, scroll into view on touch screens. */
@media (hover: hover) {
  .print:hover { transform: rotate(0deg) scale(1.02); }
  .print:hover .print__frame > img { filter: grayscale(0) contrast(1); }
  .only-touch { display: none; }
}
@media (hover: none) {
  .print.is-seen .print__frame > img { filter: grayscale(0) contrast(1); }
  .only-hover { display: none; }
}

/* ---------- Opening ---------- */
.opening { position: relative; display: grid; gap: 44px; padding: 36px var(--gutter) 64px; }
.opening__words { display: grid; gap: 24px; justify-items: start; min-width: 0; }
.opening__words .label { margin: 0; }
.opening__note { max-width: 360px; color: var(--blue); }
.opening__obscura { margin: 6px 0 0; max-width: 300px; }
.opening__obscura figcaption { margin-top: 4px; font-size: 20px; color: var(--muted); }
.opening__trail { display: none; }

.collage { position: relative; display: grid; gap: 34px; padding: 10px 6px 0; }
.collage__a { --r: -2deg; --ar: 4 / 5; }
.collage__b { --r: 1.6deg; --ar: 16 / 10; }
.collage__c { --r: -1.2deg; --ar: 16 / 10; }
.collage__a .tape--1 { left: -18px; top: -8px; transform: rotate(-32deg); }
.collage__a .tape--2 { right: -18px; }
.collage__arrow { display: none; }
.collage__hint { order: -1; font-size: 22px; color: var(--blue); transform: rotate(-2deg); }

@media (min-width: 640px) {
  .collage { grid-template-columns: 1.1fr 1fr; align-items: start; gap: 36px 28px; }
  .collage__a { grid-row: span 2; }
  .collage__c { margin-top: 6px; }
  .collage__hint { order: 0; grid-column: 1 / -1; justify-self: center; }
}
@media (min-width: 1100px) {
  .opening { grid-template-columns: minmax(300px, 1fr) 2fr; gap: 50px; padding: 50px var(--gutter) 90px; align-items: start; }
  .opening__words { padding-top: 20px; gap: 32px; }
  .opening__trail { display: block; position: absolute; right: 10px; top: 50%; margin: 0; writing-mode: vertical-rl; font-size: 11px; letter-spacing: .22em; color: var(--quiet); }
  .collage { display: block; min-height: 760px; padding: 0; }
  .collage .print { position: absolute; margin: 0; }
  .collage__a { left: 4%; top: 0; width: 44%; --ar: auto; }
  .collage__a .print__frame { height: 540px; aspect-ratio: auto; }
  .collage__b { right: 2%; top: 30px; width: 46%; }
  .collage__b .print__frame { height: 290px; aspect-ratio: auto; }
  .collage__c { left: auto; right: 8%; top: 400px; width: 40%; margin: 0; }
  .collage__c .print__frame { height: 270px; aspect-ratio: auto; }
  .collage__arrow { display: block; position: absolute; left: 47%; top: 590px; width: 150px; height: 90px; color: var(--blue); }
  .collage__hint { position: absolute; left: 8%; top: 610px; max-width: 300px; font-size: 26px; line-height: 1.1; }
}

/* ---------- Lens diagram ---------- */
.lens { padding-top: 40px; padding-bottom: 40px; }
.lens__scroll { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.lens__scroll::-webkit-scrollbar { display: none; }
.lens__img { width: 100%; min-width: 640px; }
@media (min-width: 900px) { .lens__img { min-width: 0; } }

/* ---------- Rooms ---------- */
.rooms__grid { display: grid; gap: 44px 30px; grid-template-columns: 1fr; }
.room { display: block; color: var(--ink); text-decoration: none; }
.room:hover { color: var(--ink); }
.room:nth-child(1) .print { --r: -2deg; } .room:nth-child(2) .print { --r: 1.5deg; }
.room:nth-child(3) .print { --r: -1deg; }  .room:nth-child(4) .print { --r: 2deg; }
.room__print .print__frame { --ar: 4 / 5; }
/* Room names can be long ("weddings & events"): the Urdu name drops to a second line instead of being cut off. */
.print.room__print { padding-bottom: 8px; }
.room__print .print__caption { position: static; flex-wrap: wrap; column-gap: 10px; row-gap: 0; white-space: normal; overflow: visible; padding: 6px 2px 0; }
.room__print .room__ur { margin-left: auto; }
.room__en { font-size: 24px; font-weight: 700; }
.room__ur { font-family: var(--urdu); font-size: 15px; line-height: 2.2; color: var(--red); }
.room__note { margin: 16px 6px 0; color: var(--blue); }
@media (min-width: 640px) { .rooms__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 640px) and (max-width: 899px) { .rooms__grid > .room:nth-child(3):last-child { grid-column: 1 / -1; justify-self: center; width: calc(50% - 15px); } }
@media (min-width: 900px) { .rooms__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 40px; } }
@media (min-width: 1100px) { .rooms__grid { gap: 40px 56px; } }

/* ---------- About teaser ---------- */
.about-teaser__vit { width: 100%; max-width: 560px; }
.tilt { transition: transform 1.2s var(--ease); }
.tilt:hover { transform: rotate(-3deg) scale(1.02); }
@media (max-width: 899px) { .about-teaser .two-col__art { max-width: 420px; margin: 0 auto; } }

/* ---------- Old masters ---------- */
.masters__grid { display: grid; gap: 48px; grid-template-columns: 1fr; align-items: end; }
.study { margin: 0; display: grid; gap: 14px; justify-items: center; text-align: center; }
.study__img { width: 100%; max-width: 360px; }
.study__img--3 { max-width: 420px; }
.study figcaption { display: grid; gap: 4px; }
.study .label { margin: 0; }
@media (min-width: 640px) { .masters__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .study:last-child { grid-column: 1 / -1; } }
@media (min-width: 1100px) { .masters__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .study:last-child { grid-column: auto; } .study { justify-items: start; text-align: left; } }

/* ---------- Contact sheet ---------- */
.contact-sheet { background: var(--ink); color: var(--paper); padding-top: 48px; padding-bottom: 54px; }
.contact-sheet .label--quiet { color: var(--line); }
.contact-sheet__head { margin: 0 0 22px; }
.contact-sheet__strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
.frame { position: relative; }
.frame__n { margin: 0 0 6px; font-size: 11px; color: var(--amber); }
.frame img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 25%; filter: grayscale(1); transition: filter .6s; }
.frame--pick img, .frame:hover img { filter: grayscale(0); }
.frame__circle { position: absolute; left: -10px; top: 10px; width: calc(100% + 20px); height: calc(100% - 4px); pointer-events: none; }
@media (min-width: 640px) { .contact-sheet__strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .contact-sheet__strip { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); } }

/* ---------- Data & AI ---------- */
.data-ai__diagram { position: relative; display: block; width: 100%; max-width: 560px; justify-self: center; }
.data-ai__diagram svg { width: 100%; height: auto; }
.diagram-note { position: absolute; font-size: clamp(15px, 3.4vw, 20px); color: var(--muted); }
.diagram-note.red { color: var(--red); }
@media (max-width: 899px) { .data-ai .two-col__art { order: 2; } }

/* ---------- Kallos One ---------- */
.app-title { display: flex; align-items: center; gap: 18px; }
.app-title__icon { width: 76px; height: 76px; filter: drop-shadow(0 6px 12px rgba(30,20,10,.3)); }
.ticks { list-style: none; margin: 0; padding: 0; line-height: 1.5; }
.ticks li::before { content: "✓ "; color: var(--blue); }
.devices { position: relative; width: 100%; min-height: 360px; display: block; }
.devices__wash { position: absolute; inset: 14px 0 0 40px; background: rgba(120,160,210,.18); transform: rotate(-2deg); }
.devices__mac { position: absolute; left: 50px; right: 0; top: 24px; min-height: 230px; border: 2.5px solid var(--blue); background: rgba(255,255,255,.55); padding: 14px; overflow: visible; }
.devices__mac > img { width: 100%; height: 100%; object-fit: cover; object-position: top; position: absolute; inset: 0; }
.devices__mac .tape { z-index: 4; }
.devices__phone { position: absolute; left: 0; top: 130px; width: 120px; height: 230px; border: 2.5px solid var(--blue); border-radius: 22px; background: var(--paper); padding: 18px 10px; overflow: hidden; }
.devices__phone > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wire { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.wire i { display: block; height: 52px; border: 1.5px solid var(--blue); }
.wire .wire__grid { grid-column: span 2; height: 100px; background-image: linear-gradient(rgba(31,63,120,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(31,63,120,.35) 1px, transparent 1px); background-size: 24px 22px; }
.wire .wire__tall { height: 100px; }
.wire--phone { grid-template-columns: 1fr; gap: 7px; }
.wire--phone i { height: 26px; }
.wire--phone .wire__tall { height: 56px; }
@media (min-width: 900px) {
  .app-title__icon { width: 96px; height: 96px; }
  .devices { min-height: 470px; }
  .devices__wash { inset: 20px 0 0 70px; }
  .devices__mac { left: 90px; right: 10px; top: 40px; min-height: 320px; padding: 16px; }
  .wire i { height: 70px; } .wire .wire__grid, .wire .wire__tall { height: 130px; }
  .devices__phone { top: 180px; width: 150px; height: 290px; border-radius: 26px; padding: 22px 12px; }
  .wire--phone i { height: 30px; } .wire--phone .wire__tall { height: 60px; }
}

/* ---------- Journal cards ---------- */
.cards { display: grid; gap: 34px; grid-template-columns: 1fr; }
.card { position: relative; display: grid; gap: 12px; align-content: start; color: var(--ink); text-decoration: none; background: var(--paper-2); border: 2px solid var(--ink-2); padding: 26px 22px 22px; box-shadow: 0 4px 12px rgba(40,30,20,.12); transform: rotate(var(--r, -1deg)); transition: transform .4s var(--ease), box-shadow .4s; }
.card:nth-child(2n) { --r: 1deg; } .card:nth-child(3n) { --r: -.5deg; }
.card:hover { color: var(--ink); transform: rotate(0) translateY(-4px); box-shadow: 0 10px 22px rgba(40,30,20,.18); }
.card .tape { width: 86px; }
.card .label { margin: 0; }
.card__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; filter: grayscale(1); transition: filter .8s; }
.card:hover .card__img { filter: none; }
.card__title { font-size: 26px; line-height: 1.2; }
.journal-teaser__room { transform: rotate(2deg); }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; } }

.filters { display: flex; flex-wrap: nowrap; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin: -10px calc(var(--gutter) * -1) 0; padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1.5px solid var(--ink-2); color: var(--ink); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; background: var(--paper-2); }
.chip.is-on, .chip:hover { background: var(--ink); color: var(--paper); }
@media (min-width: 900px) { .filters { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; } }

.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 44px; }
.page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 0 12px; border: 1.5px solid var(--ink-2); color: var(--ink); text-decoration: none; font-weight: 600; }
.page-numbers.current { background: var(--ink); color: var(--paper); }

/* ---------- Book docket ---------- */
.book-teaser { display: grid; gap: 40px; align-items: center; }
.book-teaser__words { display: grid; gap: 16px; }
.book-teaser__words .label { margin: 0; }
.docket { position: relative; background: var(--paper-2); border: 2px solid var(--ink-2); padding: 30px 24px 24px; transform: rotate(1.2deg); box-shadow: 0 6px 16px rgba(40,30,20,.15); max-width: 440px; width: 100%; }
.docket__boxes { list-style: none; margin: 10px 0 20px; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: 4px 18px; justify-content: start; }
.docket__boxes li::before { content: "□ "; }
.docket__alt { display: block; margin-top: 14px; text-align: center; }
@media (min-width: 900px) { .book-teaser { grid-template-columns: 1fr auto; gap: 50px; } .docket { width: 420px; padding: 30px; } }

/* ---------- Client teaser ---------- */
.client-teaser__cryptex { width: 100%; max-width: 620px; transform: rotate(-4deg); }

/* ---------- Footer ---------- */
.site-footer { border-top: var(--rule); background: var(--foot); padding: 44px var(--gutter) max(36px, env(safe-area-inset-bottom)); display: grid; gap: 28px; }
.site-footer__sig { display: grid; gap: 6px; justify-items: start; }
.site-footer__sig img { height: 96px; width: auto; }
.site-footer__note { font-size: 24px; color: var(--blue); }
.site-footer__contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.site-footer__contact li { display: grid; gap: 2px; }
.site-footer__contact .label { margin: 0; font-size: 11px; }
.site-footer__contact a, .site-footer__contact span:not(.label) { font-size: 15px; color: var(--ink); word-break: break-word; }
.site-footer__contact a { text-decoration: underline; text-decoration-color: var(--line); }
.site-footer__end { display: grid; gap: 14px; }
.site-footer__social { list-style: none; margin: 0 0 0 -9px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.site-footer__social a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); border-radius: 50%; transition: color .2s, transform .2s; }
.site-footer__social a:hover, .site-footer__social a:focus-visible { color: var(--red); transform: rotate(-6deg); }
.site-footer__social .icon { width: 24px; height: 24px; }
.site-footer__copy { font-size: 12px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
@media (min-width: 900px) {
  .site-footer { grid-template-columns: auto 1fr; align-items: center; gap: 24px 50px; padding: 50px var(--gutter); }
  .site-footer__note, .site-footer__copy { white-space: nowrap; }
  .site-footer__end { grid-column: 1 / -1; grid-template-columns: auto auto; justify-content: space-between; align-items: center; border-top: 1px dashed var(--line); padding-top: 16px; }
  .site-footer__sig img { height: 120px; }
  .site-footer__contact { grid-template-columns: repeat(2, max-content); justify-content: center; gap: 18px 44px; }
  .site-footer__contact a, .site-footer__contact span:not(.label) { white-space: nowrap; word-break: normal; }
  .site-footer__end { justify-items: end; text-align: right; }
  .site-footer__social { margin: 0 -9px 0 0; justify-content: flex-end; }
}

/* ---------- Posts & pages ---------- */
.post__head { display: grid; gap: 14px; max-width: 880px; margin: 0 auto; padding-bottom: 36px; }
.post__head .label { margin: 0; }
.post__hero { --r: 0deg; max-width: 1040px; margin: 0 var(--gutter) 48px; }
.post__hero .print__frame { aspect-ratio: auto; }
.post__hero .print__frame > img { height: auto; }
@media (min-width: 1100px) { .post__hero { margin: 0 auto 64px; } }

.entry { max-width: 760px; margin: 0 auto; font-family: var(--serif); font-size: clamp(19px, 4.4vw, 21px); line-height: 1.7; color: var(--ink-soft); }
.entry > * + * { margin-top: 1.1em; }
.entry h2, .entry h3, .entry h4 { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--ink); line-height: 1.1; margin-top: 1.8em; }
.entry h2 { font-size: clamp(32px, 6vw, 42px); }
.entry h3 { font-size: clamp(26px, 5vw, 32px); }
.entry h4 { font-family: var(--mono); font-style: normal; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.entry a { color: var(--blue); }
.entry strong { color: var(--ink); }
.entry blockquote { margin-left: 0; margin-right: 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--red); font-style: italic; font-size: 1.15em; color: var(--ink); }
.entry blockquote cite { display: block; margin-top: 8px; font-family: var(--hand); font-style: normal; font-size: 20px; color: var(--muted); }
.entry img { height: auto; }
.entry figure { margin-left: 0; margin-right: 0; }
.entry figcaption, .entry .wp-element-caption { font-family: var(--hand); font-size: 20px; color: var(--muted); text-align: center; margin-top: 8px; }
.entry .alignwide { margin-left: calc(var(--gutter) * -0.5); margin-right: calc(var(--gutter) * -0.5); }
@media (min-width: 1100px) { .entry .alignwide { margin-left: -140px; margin-right: -140px; } }
.entry .alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }
@media (min-width: 900px) { .entry .alignfull { margin-left: calc(-1 * (min(1400px, 96vw) - 760px) / 2); margin-right: calc(-1 * (min(1400px, 96vw) - 760px) / 2); } }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry pre, .entry code { font-family: var(--mono); font-size: 14px; }
.entry pre { overflow-x: auto; padding: 18px; background: var(--ink); color: var(--paper); }
.entry :not(pre) > code { background: rgba(31,63,120,.08); padding: 1px 6px; }
.entry hr { border: 0; height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 250 10'%3E%3Cpath d='M2 6 C 70 2, 160 9, 246 4' stroke='%23B5A994' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / 200px 10px no-repeat; margin: 2.4em 0; }
.entry table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 14px; }
.entry .table-scroll { overflow-x: auto; }
.entry th, .entry td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.entry th { background: rgba(31,63,120,.06); color: var(--ink); }
.entry td p, .entry th p { margin: 0; }
.entry .wp-block-image img, .entry .wp-block-gallery img { box-shadow: 0 6px 18px rgba(40,30,20,.14); }
.entry .wp-block-embed iframe { max-width: 100%; }
.entry .wp-block-file { font-family: var(--mono); font-size: 14px; padding: 14px; border: 1.5px dashed var(--line); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.entry .wp-block-file__button { background: var(--ink); color: var(--paper); padding: 10px 14px; text-decoration: none; border-radius: 0; }
.entry .wp-block-button__link { background: var(--ink); color: var(--paper); border-radius: 0; font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; padding: 14px 20px; }
.entry .wp-block-pullquote { border-top: var(--rule); border-bottom: var(--rule); padding: 1.4em 0; text-align: center; font-style: italic; }

.post__foot { max-width: 760px; margin: 0 auto; display: grid; gap: 24px; padding-bottom: 72px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; padding: 6px 10px; border: 1.5px solid var(--line); color: var(--ink); }
.post__sign img { width: 110px; height: auto; }
.post__nav { display: grid; gap: 14px; border-top: var(--rule); padding-top: 24px; }
.post__nav a { display: grid; gap: 4px; text-decoration: none; color: var(--ink); }
.post__nav .card__title { font-size: 22px; }
.post__next { text-align: right; }
@media (min-width: 640px) { .post__nav { grid-template-columns: 1fr 1fr; } .post__next { grid-column: 2; } }

.page-plain > header { display: grid; gap: 14px; max-width: 880px; margin: 0 auto; padding-bottom: 36px; }
.page-plain > header .label { margin: 0; }

.not-found .two-col__art img { max-width: 420px; }

.search { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; max-width: 520px; }
.search input { flex: 1 1 220px; min-height: 46px; padding: 10px 14px; border: 2px solid var(--ink-2); background: var(--paper-2); font: 16px var(--mono); color: var(--ink); border-radius: 0; }

/* Comments (journal) */
.comment-list { list-style: none; padding: 0; }
.comment-body { border-top: 1px dashed var(--line); padding: 16px 0; }
.comment-form input, .comment-form textarea { width: 100%; padding: 10px 12px; border: 2px solid var(--ink-2); background: var(--paper-2); font: 16px var(--mono); border-radius: 0; }
.comment-form .submit { background: var(--ink); color: var(--paper); border: 0; padding: 14px 20px; font: 600 13px var(--mono); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }

/* ---------- Drawing in ---------- */
.draw { stroke-dasharray: 900; stroke-dashoffset: 900; }
.is-drawn .draw, .site-header .draw { animation: draw 2.4s ease forwards; }
.is-drawn .draw--late { animation-delay: .8s; }
.no-js .draw { stroke-dashoffset: 0; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Gentle reveal for sections as they scroll in (only when JS runs). */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  .draw, .print .spiral > * { stroke-dashoffset: 0 !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .desk { padding: 0; } .sheet { border: 0; box-shadow: none; } .ink-bg, .nav-toggle, .site-nav { display: none; }
  .print__frame > img { filter: none !important; }
}

@media (min-width: 640px) { .swipe-hint { display: none; } }

/* ---------- Phone refinements: swipeable strips instead of very long stacks ---------- */
.cards { align-items: start; }
@media (max-width: 639px) {
  .rooms__grid, .contact-sheet__strip {
    display: grid; grid-auto-flow: column; grid-template-columns: none; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1);
    padding: 18px var(--gutter) 14px; scroll-padding-left: var(--gutter);
  }
  .rooms__grid::-webkit-scrollbar, .contact-sheet__strip::-webkit-scrollbar { display: none; }
  .rooms__grid { grid-auto-columns: 78%; gap: 22px; }
  .contact-sheet__strip { grid-auto-columns: 42%; gap: 12px; padding-top: 4px; }
  .room, .frame { scroll-snap-align: start; }
  .study__img { max-width: 280px; }
  .study__img--3 { max-width: 320px; }
}
.swipe-hint { margin-top: 6px; font-size: 19px; color: var(--muted); }
.contact-sheet .swipe-hint { color: var(--line); }

/* ---------- Blocks written in the Studio editor ---------- */
.entry .aj-photo { margin-top: 1.6em; margin-bottom: 1.6em; }
.entry .aj-photo img { width: 100%; height: auto; box-shadow: 0 6px 18px rgba(40,30,20,.14); }
.entry .aj-photo figcaption:empty { display: none; }
.entry .aj-photo.alignwide { margin-left: calc(var(--gutter) * -0.5); margin-right: calc(var(--gutter) * -0.5); }
@media (min-width: 1100px) { .entry .aj-photo.alignwide { margin-left: -140px; margin-right: -140px; } }
.entry .aj-photo.alignfull { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); }
.entry .aj-photo.alignfull img { box-shadow: none; }
@media (min-width: 900px) { .entry .aj-photo.alignfull { margin-left: calc(-1 * (min(1400px, 96vw) - 760px) / 2); margin-right: calc(-1 * (min(1400px, 96vw) - 760px) / 2); } }
.entry .aj-gallery { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.entry .aj-gallery[data-count="1"] { grid-template-columns: 1fr; }
@media (min-width: 640px) { .entry .aj-gallery:not([data-count="1"]):not([data-count="2"]):not([data-count="4"]) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.entry .aj-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: grayscale(1); transition: filter .8s; }
.entry .aj-gallery img:hover, .entry .aj-gallery img.is-seen { filter: none; }
.entry .aj-callout { padding: 16px 20px; border: 2px solid var(--blue); background: rgba(31,63,120,.07); }
.entry .aj-callout--red { border-color: var(--red); background: rgba(168,18,42,.06); }
.entry .aj-callout--sepia { border-color: #7A5A3A; background: rgba(122,90,58,.08); }
.entry .aj-callout > :first-child { margin-top: 0; }
.entry .aj-linkcard { display: flex; flex-direction: column; border: 2px solid var(--ink-2); background: var(--paper-2); color: var(--ink); text-decoration: none; box-shadow: 0 4px 12px rgba(40,30,20,.1); transition: transform .3s; }
.entry .aj-linkcard:hover { transform: translateY(-2px); color: var(--ink); }
.entry .aj-linkcard img { width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; }
.entry .aj-linkcard__text { display: grid; gap: 4px; padding: 14px 16px; min-width: 0; }
.entry .aj-linkcard__site { font: 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.entry .aj-linkcard__title { font-style: italic; font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
.entry .aj-linkcard__desc { font-size: 17px; line-height: 1.45; color: var(--muted); }
.entry .aj-linkcard__desc:empty { display: none; }
@media (min-width: 640px) { .entry .aj-linkcard { flex-direction: row; } .entry .aj-linkcard img { width: 200px; aspect-ratio: auto; flex: none; } }
.entry .aj-file { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 14px 16px; border: 2px dashed var(--line); background: var(--paper-2); font: 14px var(--mono); }
.entry .aj-file__name { flex: 1 1 200px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.entry .aj-file__size { color: var(--muted); }
.entry .aj-file__btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; background: var(--ink); color: var(--paper) !important; text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.entry mark { background: rgba(233,185,73,.45); color: inherit; padding: 0 2px; }
.entry ul[data-type="taskList"] { list-style: none; padding-left: 0; }
.entry ul[data-type="taskList"] li { display: flex; gap: 10px; align-items: flex-start; }
.entry ul[data-type="taskList"] input { margin-top: .5em; accent-color: var(--ink); }
.entry div[data-youtube-video] iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }

/* ---------- Series (basic) ---------- */
.series__head { display: grid; gap: 14px; }
.series__head .label { margin: 0; }
.series__story { max-width: 640px; }
.series__grid { display: grid; gap: 40px 30px; grid-template-columns: 1fr; padding-top: 10px; }
.series__print .print__frame { aspect-ratio: auto; }
.series__item { min-width: 0; }
.exif.series__exif { margin: 14px 6px 0; }
.exif.post__exif { max-width: 1040px; margin: -34px var(--gutter) 40px; padding: 0 6px; }
@media (min-width: 1100px) { .exif.post__exif { margin: -50px auto 52px; } }
.series__print .print__frame > img { height: auto; }
@media (min-width: 640px) { .series__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
@media (min-width: 1100px) { .series__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Rates ---------- */
.rates-note { margin-top: 10px; }
.rate-cards { display: grid; gap: 40px 30px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 760px) { .rate-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .rate-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rate { position: relative; display: grid; gap: 16px; background: var(--paper-2); border: 2px solid var(--ink-2); padding: 30px 22px 22px; box-shadow: 0 6px 16px rgba(40,30,20,.12); transform: rotate(var(--r, -.6deg)); }
.rate:nth-child(2n) { --r: .7deg; }
.rate__name { margin: 0; font: italic 500 clamp(30px, 6vw, 38px)/1.05 var(--serif); }
.rate__desc { font-family: var(--serif); font-size: 19px; line-height: 1.5; color: var(--ink-soft); }
.rate__slider { display: grid; gap: 6px; }
.rate__slider .label { margin: 0; }
.rate input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; background: transparent; cursor: pointer; --fill: 0%; }
.rate input[type=range]::-webkit-slider-runnable-track { height: 4px; background: linear-gradient(90deg, var(--red) var(--fill), var(--line) var(--fill)); }
.rate input[type=range]::-moz-range-track { height: 4px; background: var(--line); }
.rate input[type=range]::-moz-range-progress { height: 4px; background: var(--red); }
.rate input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -11px; border-radius: 50%; background: var(--paper-2); border: 3px solid var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.rate input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--paper-2); border: 3px solid var(--ink); }
.rate input[type=range]:focus-visible { outline: 2px dashed var(--red); outline-offset: 4px; }
.rate__len { color: var(--blue); }
.rate__addons { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; }
.rate__addons legend { margin-bottom: 6px; padding: 0; }
.rate__addon { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 44px; padding: 4px 0; border-top: 1px dashed var(--line); font-family: var(--serif); font-size: 19px; cursor: pointer; }
.rate__addon input { width: 20px; height: 20px; accent-color: var(--ink); }
.rate__addon-price { font-size: 13px; color: var(--muted); white-space: nowrap; }
.rate__total { display: grid; gap: 6px; padding-top: 14px; border-top: 2px solid var(--ink-2); }
.rate__total .label { margin: 0; }
.rate__price { margin: 0; font: italic 500 46px/1 var(--serif); font-variant-numeric: tabular-nums; }
.rate__ask { margin-top: 8px; }
.rates-small { margin-top: 30px; }
.rates-empty { margin: 0 auto; }
.book-context { max-width: 760px; margin: 0 auto 28px; padding: 16px 20px; border: 2px dashed var(--blue); background: rgba(31,63,120,.05); }
.book-context p { margin: 0; }

/* ---------- Work ---------- */
.work-head__sketch { width: min(260px, 60vw); }
.work-head .rooms__grid { margin-top: 10px; }
.room__count { display: inline; margin: 0 0 0 6px; font-size: 11px; }
.work-room__ur { font-family: var(--urdu); font-style: normal; font-size: .45em; color: var(--red); vertical-align: middle; margin-left: 10px; }
.work-room__empty { margin: 0; }
.sheets { display: grid; gap: 34px 28px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .sheets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .sheets { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sheet-card { position: relative; display: grid; gap: 10px; color: var(--ink); text-decoration: none; background: var(--ink); padding: 14px 14px 18px; box-shadow: 0 6px 16px rgba(40,30,20,.2); transform: rotate(var(--r, -.6deg)); transition: transform .4s var(--ease); }
.sheet-card:nth-child(2n) { --r: .8deg; }
.sheet-card:hover { transform: rotate(0) translateY(-4px); color: var(--ink); }
.sheet-card .label { color: var(--amber); margin: 0; }
.sheet-card .card__title { color: var(--paper); }
.sheet-card .hand { color: #9DB4DB; }
.sheet-card__strip { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; aspect-ratio: 3 / 2; }
.sheet-card__strip img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter .8s; }
.sheet-card__strip img:first-child { grid-row: span 2; }
.sheet-card__strip img:only-child { grid-column: span 2; }
.sheet-card:hover .sheet-card__strip img, .sheet-card.is-seen .sheet-card__strip img { filter: none; }
.work-prints__sketch { width: 100%; max-width: 420px; }

/* ---------- About ---------- */
.about-hero { align-items: start; }
.about-hero__print { width: 100%; max-width: 460px; --r: -1.5deg; justify-self: center; }
.about-hero__print .print__frame { --ar: 4 / 5; }
.about-copy { display: grid; gap: .9em; }
.about-hero__sig { width: 160px; height: auto; margin-top: 4px; }
.about-two { display: grid; gap: 50px; }
.about-two__col { display: grid; gap: 14px; align-content: start; justify-items: start; }
.about-two__col .label { margin: 0; }
.about-two__sketch { width: 100%; max-width: 520px; margin: 8px 0; }
@media (min-width: 900px) { .about-two { grid-template-columns: 1fr 1fr; gap: 60px; } }
.about-meet__vit { width: 100%; max-width: 480px; }
.with-cards { display: grid; gap: 20px; grid-template-columns: 1fr; margin-top: 10px; }
@media (min-width: 760px) { .with-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.with-card { display: grid; gap: 6px; padding: 22px; border: 2px solid var(--ink-2); background: var(--paper-2); color: var(--ink); text-decoration: none; transition: transform .3s var(--ease), box-shadow .3s; }
.with-card:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 8px 18px rgba(40,30,20,.15); }
.with-card .label { margin: 0; }

/* ---------- Kallos One page ---------- */
.kallos-hero .app-title { align-items: flex-start; }
.kallos-hero .app-title .label { margin: 4px 0 6px; }
.launch { display: grid; gap: 8px; width: 100%; max-width: 520px; }
.launch .label { margin: 0; }
.launch__row { display: flex; flex-wrap: wrap; gap: 8px; }
.launch__row input { flex: 1 1 220px; min-height: 48px; padding: 10px 12px; border: 2px solid var(--ink-2); background: #fff; font: 18px var(--serif); border-radius: 0; color: var(--ink); }
.launch__row input:focus { outline: 2px solid var(--blue); outline-offset: 0; }
.launch__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.launch-ok { padding: 12px 16px; border: 2px dashed var(--blue); color: var(--blue); }
.launch-err { color: var(--red); font-size: 14px; }
.notebook { display: grid; gap: 22px; }
.notebook__tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; }
.notebook__tabs::-webkit-scrollbar { display: none; }
.notebook__tabs button { flex: none; display: grid; gap: 2px; text-align: left; min-height: 64px; padding: 10px 14px; border: 2px solid var(--ink-2); background: var(--paper-2); cursor: pointer; color: var(--muted); max-width: 220px; }
.notebook__tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.notebook__n { font-size: 11px; color: var(--red); }
.notebook__t { font: italic 500 20px/1.15 var(--serif); }
.notebook__page { display: grid; gap: 24px; align-items: center; }
.notebook__shot { position: relative; border: 2.5px solid var(--blue); background: rgba(255,255,255,.55); padding: 16px; min-height: 260px; }
.notebook__shot > img { width: 100%; height: auto; display: block; }
.wire--big i { height: 80px; }
.wire--big .wire__grid, .wire--big .wire__tall { height: 150px; }
.notebook__text { display: grid; gap: 10px; }
.notebook__text .card__title { font-size: clamp(28px, 5vw, 36px); }
@media (min-width: 900px) {
  .notebook { grid-template-columns: 280px minmax(0, 1fr); }
  .notebook__tabs { flex-direction: column; overflow: visible; margin: 0; padding: 0; }
  .notebook__tabs button { max-width: none; }
  .notebook__page { grid-template-columns: 1.2fr 1fr; }
}
.kallos-why__sketch { width: 100%; max-width: 440px; transform: rotate(-3deg); }
.facts { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fact { display: grid; gap: 8px; padding-top: 16px; border-top: 2px solid var(--ink-2); align-content: start; }
.fact .label { margin: 0; }
.kallos-links { margin-top: 30px; }

/* ---------- Book & Models ---------- */
.book-page { display: grid; gap: 44px; align-items: start; }
@media (min-width: 1000px) { .book-page { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 60px; } }
.book-page__intro { display: grid; gap: 18px; justify-items: start; }
.book-page__intro .label { margin: 0; }
.steps { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 12px; width: 100%; }
.steps li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: baseline; padding-bottom: 12px; border-bottom: 1px dashed var(--line); font-family: var(--serif); font-size: 19px; line-height: 1.45; }
.steps .mono { color: var(--red); font-size: 12px; }
.book-page__contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.book-page__contact li { display: grid; gap: 2px; }
.book-page__contact .label { margin: 0; font-size: 11px; }
.book-page__contact a { font-size: 16px; color: var(--ink); overflow-wrap: anywhere; }
.book-page__form { position: relative; min-width: 0; background: var(--paper-2); border: 2px solid var(--ink-2); padding: 30px 18px 22px; box-shadow: 0 6px 18px rgba(40,30,20,.14); }
@media (min-width: 640px) { .book-page__form { padding: 34px 28px 28px; } }
.book-page__form .book-context { margin: 0 0 22px; }
.models-page__sketch { width: min(320px, 80%); }

/* Fixes after the full-site check */
[hidden] { display: none !important; }
.sheet-card__strip { grid-template-rows: repeat(2, minmax(0, 1fr)); overflow: hidden; min-width: 0; }
.sheet-card__strip img { min-height: 0; min-width: 0; height: 100%; }

.notebook__tabs button[aria-selected="true"] .notebook__n { color: var(--amber); }
.comments { max-width: 760px; margin: 0 auto; display: grid; gap: 18px; }
.comment-list li { list-style: none; }
.comment-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.comment-form label { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; }
@media (min-width: 1280px) {
  .site-footer { grid-template-columns: auto 1fr auto; }
  .site-footer__end { grid-column: auto; grid-template-columns: none; justify-content: stretch; border-top: 0; padding-top: 0; }
}


/* Camera settings under a photo */
.exif { display: block; margin-top: 4px; font-family: var(--mono, ui-monospace, monospace); font-size: 11px; font-style: normal; letter-spacing: .06em; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
figcaption:empty { display: none; }

/* iPhone · iPad · Mac as small pen-drawn devices */
.platforms { list-style: none; margin: 18px 0 0; padding: 0; display: flex; align-items: flex-end; gap: 26px; color: var(--ink); }
.platforms li { display: grid; justify-items: center; gap: 6px; }
.platforms svg { height: 34px; width: auto; }
.platforms span { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.platforms li:hover svg { color: var(--red); transform: rotate(-4deg); transition: transform .2s, color .2s; }
.platforms__price { margin-top: 10px; }

/* Apple's official store badges (artwork used exactly as supplied) */
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; }
.store-badge { display: inline-block; padding: 0; line-height: 0; }
.store-badge img { height: 48px; width: auto; display: block; }
.store-badge:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.store-credit { margin: 10px 0 0; font-size: 10px; line-height: 1.5; color: var(--muted); max-width: 46ch; }
.actions .store-badges { margin: 0; }

/* ---------- Compact home (1.0.9): every word and picture kept, less scrolling ----------
   Only the home page (body.home) changes: tighter section spacing and smaller drawings.
   On phones the old-masters studies and journal notes become swipe strips, like the rooms. */
.home .section { padding-top: 40px; padding-bottom: 44px; }
.home .section__head { margin-bottom: 22px; }
.home .two-col { gap: 24px; }
.home .two-col__words { gap: 14px; }
.home .section__sketch img, .home img.section__sketch { width: min(170px, 42vw); }

.home .opening { gap: 28px; padding-top: 28px; padding-bottom: 40px; }
.home .opening__words { gap: 18px; }
.home .opening__obscura { max-width: 220px; }
.home .collage { gap: 22px; }

.home .lens { padding-top: 26px; padding-bottom: 26px; }

.home .about-teaser__vit { max-width: 300px; }
.home .data-ai__diagram { max-width: 420px; }
.home .client-teaser__cryptex { max-width: 360px; }

.home .masters__grid { gap: 30px; }
.home .study__img { max-width: 260px; }
.home .study__img--3 { max-width: 300px; }

.home .devices { min-height: 300px; }
.home .devices__mac { min-height: 200px; }
.home .devices__phone { top: 110px; width: 104px; height: 196px; padding: 14px 8px; }
.home .wire i { height: 40px; } .home .wire .wire__grid, .home .wire .wire__tall { height: 80px; }
.home .wire--phone i { height: 22px; } .home .wire--phone .wire__tall { height: 44px; }

.home .cards { gap: 24px; }
.home .more { margin-top: 18px; }
.home .book-teaser { gap: 26px; }
.home .docket { padding: 26px 22px 20px; }

@media (max-width: 639px) {
  .home .collage__a { width: 84%; justify-self: center; }

  .home .masters__grid, .home .journal-teaser .cards {
    display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 74%; gap: 22px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1);
    padding: 14px var(--gutter) 14px; scroll-padding-left: var(--gutter);
  }
  .home .masters__grid::-webkit-scrollbar, .home .journal-teaser .cards::-webkit-scrollbar { display: none; }
  .home .study:last-child { grid-column: auto; }
  .home .study, .home .journal-teaser .card { scroll-snap-align: start; }
  .home .study__img, .home .study__img--3 { max-width: 100%; }
}

@media (min-width: 900px) {
  .home .section { padding-top: 56px; padding-bottom: 60px; }
  .home .section__head { margin-bottom: 30px; }
  .home .two-col { gap: 48px; }
  .home .section__sketch img, .home img.section__sketch { width: 200px; }
  .home .about-teaser__vit { max-width: 400px; }
  .home .data-ai__diagram { max-width: 480px; }
  .home .client-teaser__cryptex { max-width: 460px; }
  .home .study__img { max-width: 280px; }
  .home .study__img--3 { max-width: 330px; }
  .home .rooms__grid { max-width: 1060px; margin-left: auto; margin-right: auto; }
  .home .devices { min-height: 390px; }
  .home .devices__wash { inset: 16px 0 0 60px; }
  .home .devices__mac { left: 76px; top: 30px; min-height: 260px; }
  .home .devices__phone { top: 140px; width: 130px; height: 248px; padding: 18px 10px; }
  .home .wire i { height: 56px; } .home .wire .wire__grid, .home .wire .wire__tall { height: 104px; }
  .home .wire--phone i { height: 26px; } .home .wire--phone .wire__tall { height: 50px; }
}

@media (min-width: 1100px) {
  .home .opening { padding-top: 40px; padding-bottom: 56px; gap: 44px; }
  .home .opening__words { gap: 24px; }
  .home .collage { min-height: 630px; }
  .home .collage__a .print__frame { height: 450px; }
  .home .collage__b { top: 20px; }
  .home .collage__b .print__frame { height: 240px; }
  .home .collage__c { top: 330px; }
  .home .collage__c .print__frame { height: 220px; }
  .home .collage__arrow { top: 490px; }
  .home .collage__hint { top: 510px; }
}
@media (min-width: 900px) { .home .lens { padding-top: 26px; padding-bottom: 26px; } }

/* Opening captions wrap onto a second line on phones and tablets instead of being cut off with "…". */
@media (max-width: 1099px) {
  .collage .print { padding-bottom: 8px; }
  .collage .print__caption { position: static; white-space: normal; overflow: visible; padding: 6px 2px 0; }
}

/* Register as a model: a clear second path beside booking (1.0.9). */
.docket__model { display: grid; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.docket__model .hand { text-align: center; }
.book-page__model { display: grid; gap: 10px; justify-items: start; width: 100%; padding: 16px 18px; border: 2px dashed var(--blue); background: rgba(31,63,120,.05); }

/* Join the beta on TestFlight (1.0.9) */
.tf-btn {
  display: inline-flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 18px 8px 20px;
  background: var(--ink); color: var(--paper); border: 2px solid var(--ink); border-radius: 12px; text-decoration: none;
  box-shadow: 0 4px 12px rgba(30,20,10,.18); transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.tf-btn:hover, .tf-btn:focus-visible { color: var(--paper); border-color: #1C8BF0; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(28,139,240,.32); }
.tf-btn__text { display: grid; line-height: 1.05; text-align: left; }
.tf-btn__small { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: #C9D8EE; }
.tf-btn__big { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.tf-btn__arrow { margin-left: 4px; font-size: 18px; color: #1C8BF0; transition: transform .3s var(--ease); }
.tf-btn:hover .tf-btn__arrow { transform: translateX(3px); }
