/* TasviR Graphic – v7 (2026-11-29): v4's menu, hero, about and contact in v6's look, with v6's works,
   services and smart home. Plain CSS, no build step. All fonts are self-hosted (no requests to third parties). */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Karla";
  src: url("../fonts/karla-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 300 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Karla";
  src: url("../fonts/karla-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 300 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Caveat";
  src: url("../fonts/caveat-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Caveat";
  src: url("../fonts/caveat-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #f7f1e5;
  --paper-2: #efe5d1;
  --card: #fffaf0;
  --ink: #1c1a26;
  --ink-2: #4b4757;
  --ink-3: #8a8494;
  --saffron: #f39200;
  --saffron-ink: #9a5600;
  --lapis: #2a4bb0;
  --rose: #c8463c;
  --mint: #2f8f6b;
  --line: rgba(28, 26, 38, .14);
  --dot: rgba(28, 26, 38, .10);
  --trail: #1c1a26;
  --photo: #ffffff;
  --f-display: "Bricolage Grotesque", "Karla", system-ui, sans-serif;
  --f-body: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
  --maxw: 1180px;
  --gutter: clamp(16px, 4vw, 36px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
html[data-theme="night"] {
  --paper: #15141d;
  --paper-2: #1d1b28;
  --card: #211f2d;
  --ink: #f2ead9;
  --ink-2: #cfc6b4;
  --ink-3: #8d8698;
  --saffron: #ffab2e;
  --saffron-ink: #ffbf5c;
  --lapis: #9db1ff;
  --rose: #ff8a7f;
  --mint: #6fd3a8;
  --line: rgba(242, 234, 217, .16);
  --dot: rgba(242, 234, 217, .07);
  --trail: #ffab2e;
  --photo: #f4efe6;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.3px);
  background-size: 22px 22px;
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--f-body);
  overflow-x: hidden;
  transition: background-color .6s ease, color .6s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.05; letter-spacing: -.02em; margin: 0; }
p { margin: 0 0 1em; }
::selection { background: var(--saffron); color: #1c1a26; }
:focus-visible { outline: 3px solid var(--lapis); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.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; }
.hand { font-family: var(--f-hand); font-weight: 600; }
.small { font-size: .9rem; color: var(--ink-2); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Language swap: hide German text briefly for English visitors (fallback reveal after 1.5 s) */
html.i18n-pending body { opacity: 0; animation: i18nReveal 0s linear 1.5s forwards; }
@keyframes i18nReveal { to { opacity: 1; } }

/* ---------- Header (legal pages) ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem var(--gutter);
  transition: background-color .3s, box-shadow .3s;
}
.site-header.is-scrolled {
  background-color: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font: 800 1.35rem/1 var(--f-display); letter-spacing: -.03em; }
.brand img { width: 34px; height: 34px; transition: transform .5s var(--ease); }
.brand:hover img { transform: rotate(-12deg) scale(1.08); }
html[data-theme="night"] .brand img, html[data-theme="night"] .stamp img { filter: invert(1) hue-rotate(180deg); }

/* ---------- Corner buttons ---------- */
/* Round corner buttons: logo top left, language and light top right (v4 style) */
.tab {
  height: 52px; min-width: 52px; padding: 0; border-radius: 999px; cursor: pointer; color: var(--ink);
  background: var(--card); border: 2px solid var(--ink); box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .35);
  display: inline-grid; place-items: center; text-decoration: none;
  transition: transform .25s var(--ease), background-color .3s, border-color .3s;
}
.tab:hover { transform: scale(1.06) rotate(-4deg); }
.tab-home { position: fixed; top: clamp(10px, 2vw, 20px); left: clamp(10px, 2vw, 20px); z-index: 100; width: 52px; }
.brand-mark { width: 32px; height: 32px; }
.mark-dots { fill: var(--saffron); }
.mark-smile { fill: var(--ink); }
.tab-tools { position: fixed; top: clamp(10px, 2vw, 20px); right: clamp(10px, 2vw, 20px); z-index: 100; display: flex; align-items: center; gap: .5rem; }
.lang-toggle { display: inline-flex; align-items: center; gap: 2px; padding: 0 5px; font: 700 .8rem/1 var(--f-display); letter-spacing: .04em; }
.lang-toggle span { padding: .5rem .55rem; border-radius: 999px; transition: background-color .25s, color .25s; }
html[data-lang="de"] .lang-toggle [data-l="de"],
html[data-lang="en"] .lang-toggle [data-l="en"],
html:not([data-lang]) .lang-toggle [data-l="de"] { background: var(--ink); color: var(--paper); }
.lamp-toggle { width: 52px; }
.lamp-toggle svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.lamp-toggle path:first-child { fill: var(--saffron); transition: fill .3s; }
html[data-theme="night"] .lamp-toggle path:first-child { fill: none; }
html[data-theme="night"] .lamp-toggle .rays { opacity: 0; }
@media (max-width: 600px) {
  .tab { height: 44px; min-width: 44px; }
  .tab-home, .lamp-toggle { width: 44px; }
  .brand-mark { width: 27px; height: 27px; }
  .tab-tools { gap: .35rem; }
  .lang-toggle span { padding: .45rem .45rem; }
}

/* ---------- Section names on the left ---------- */
/* Desktop: horizontal text. Phones and tablets: vertical text along the left edge. */
.rail { position: fixed; left: clamp(10px, 2vw, 20px); top: 50%; z-index: 40; transform: translateY(-50%); }
.rail ul { list-style: none; margin: 0; padding: 0; }
.rail a {
  position: relative; display: block; padding: .5rem 0 .5rem 16px; white-space: nowrap; text-decoration: none;
  font: 700 .9rem/1.2 var(--f-display); opacity: .3; transition: opacity .3s;
}
.rail a::before {
  content: ""; position: absolute; left: 1px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  background: var(--saffron); transform: rotate(45deg) scale(0); transition: transform .3s var(--ease);
}
.rail a:hover, .rail a:focus-visible, .rail a[aria-current] { opacity: 1; }
.rail a[aria-current]::before { transform: rotate(45deg) scale(1); }
/* Keep the page content clear of the names */
.rail ~ main .wrap, .rail ~ .site-footer .wrap { padding-left: max(var(--gutter), calc(136px - max(0px, (100vw - var(--maxw)) / 2))); }

@media (max-width: 599px), (max-width: 1099px) and (min-height: 511px) {
  .rail { left: 0; }
  .rail a { writing-mode: vertical-rl; padding: 9px 8px; font-size: .78rem; }
  .rail a::before { left: 50%; top: -2px; width: 6px; height: 6px; margin: 0 0 0 -3px; }
  .rail ~ main .wrap, .rail ~ .site-footer .wrap { padding-left: max(var(--gutter), 40px); }
}
/* Phones held sideways: horizontal names, closer together */
@media (min-width: 600px) and (max-height: 510px) { .rail a { padding-block: .3rem; } }
/* Very small phones: smaller names; hidden only while the keyboard is open */
@media (max-width: 599px) and (max-height: 510px) { .rail { top: calc(50% + 28px); } .rail a { padding: 4px 8px; font-size: .68rem; } }
@media (max-width: 599px) and (max-height: 400px) { .rail { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 7rem 0 4.5rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero-kicker { font-size: clamp(1.2rem, 2.4vw, 1.75rem); line-height: 1.2; margin-bottom: .7rem; }
.hero-title { font-size: clamp(2.9rem, 8vw, 6.4rem); font-weight: 800; letter-spacing: -.045em; line-height: .98; margin: 0; }
.hero-lead { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--ink-2); max-width: 38ch; margin: 1.3rem 0 0; }
.squiggle { position: relative; display: inline-block; white-space: nowrap; }
.squiggle svg { position: absolute; left: 0; bottom: -.1em; width: 100%; height: .22em; overflow: visible; }
.squiggle path { fill: none; stroke: var(--saffron); stroke-width: 4.5; stroke-linecap: round; }
@media (prefers-reduced-motion: no-preference) {
  .js .squiggle path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: squiggleDraw 1.1s var(--ease) .4s forwards; }
}
@keyframes squiggleDraw { to { stroke-dashoffset: 0; } }
.hero-hand { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--mint); margin: 1.1rem 0 0; min-height: 1.4em; }
.caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; background: currentColor; vertical-align: -.12em; animation: caretBlink 1s steps(1) infinite; }
@keyframes caretBlink { 50% { opacity: 0; } }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2.2rem; margin-top: 2.2rem; }

.btn-circle {
  position: relative; display: inline-block; padding: .95rem 1.6rem; color: var(--ink);
  font: 700 1.08rem/1 var(--f-display); text-decoration: none; letter-spacing: -.01em;
}
.btn-circle svg {
  position: absolute; inset: -8px -12px; width: calc(100% + 24px); height: calc(100% + 16px); pointer-events: none;
  fill: none; stroke: var(--saffron); stroke-width: 3; stroke-linecap: round; overflow: visible;
  stroke-dasharray: 600; stroke-dashoffset: 0; transition: stroke-dashoffset .8s var(--ease);
}
.btn-circle:hover svg { stroke-dashoffset: 600; animation: redraw .9s var(--ease) .05s forwards; }
@keyframes redraw { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }
.link-arrow {
  font-weight: 700; text-decoration: none; display: inline-flex; gap: .3rem;
  background: linear-gradient(var(--ink), var(--ink)) left 100% / 100% 2px no-repeat; padding-bottom: 3px;
  transition: background-size .3s var(--ease), color .2s;
}
.link-arrow:hover { color: var(--lapis); background-size: 40% 2px; }

/* The taped photo (v4) */
.hero-photo { position: relative; margin: 0; justify-self: center; width: clamp(230px, 24vw, 310px); transform: rotate(5deg); transition: transform .5s var(--ease); }
.hero-photo:hover { transform: rotate(1.5deg) scale(1.02); }
.photo-frame {
  display: block; background: var(--photo); padding: 12px 12px 16px; border-radius: 3px;
  box-shadow: 0 24px 40px -20px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .08);
}
.photo-frame img { width: 100%; mix-blend-mode: multiply; }
.tape {
  position: absolute; top: -13px; left: 50%; z-index: 1; width: 78px; height: 26px;
  background: color-mix(in srgb, var(--saffron) 50%, transparent); transform: translateX(-50%) rotate(-4deg);
}
.hero-photo figcaption { font-size: 1.35rem; color: var(--ink-2); text-align: center; margin-top: .8rem; transform: rotate(-3deg); }

/* "langsam scrollen" with a dripping ink drop (v6) */
.scroll-hint {
  position: absolute; left: 50%; bottom: 1.4rem; transform: translateX(-50%); margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: .3rem; font-size: 1.3rem; color: var(--ink-2);
}
.drop { width: 10px; height: 14px; background: var(--ink); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; animation: drip 2.2s ease-in infinite; }
@keyframes drip { 0% { transform: translateY(-6px) scale(.6); opacity: 0; } 30% { opacity: 1; } 80% { transform: translateY(18px) scale(1); opacity: 1; } 100% { transform: translateY(24px) scale(1.3, .3); opacity: 0; } }

@media (max-width: 860px) {
  .scroll-hint { display: none; }
  .hero { min-height: auto; padding: 5.5rem 0 3rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-photo { order: -1; width: min(44vw, 175px); transform: rotate(-4deg); }
  .hero-photo figcaption { font-size: 1.15rem; }
  .hero-actions { margin-top: 1.8rem; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(4.5rem, 10vw, 8rem) 0; position: relative; }
.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.kicker { font-size: 1.6rem; color: var(--saffron-ink); margin: 0 0 .2rem; transform: rotate(-2deg); transform-origin: left; display: inline-block; }

/* Handwritten notes above the sections, each with a small arrow to the heading */
.note { display: inline-flex; align-items: flex-start; gap: .3rem; font-size: clamp(1.65rem, 2.6vw, 2.05rem); line-height: 1.1; margin-bottom: .15rem; transform: rotate(-3deg); transform-origin: left bottom; }
.note-arrow { flex: none; width: 44px; height: 33px; margin-top: .5em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.section:nth-of-type(even) .note { transform: rotate(2deg); }
.section .note { color: var(--saffron-ink); }   /* beats the grey text colour of the copy columns */
.section h2 { font-size: clamp(2.3rem, 6vw, 4.4rem); font-weight: 800; letter-spacing: -.04em; margin-bottom: 1rem; }
.section-lead { font-size: clamp(1.08rem, 1.7vw, 1.25rem); color: var(--ink-2); max-width: 52ch; }
.sub-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin-bottom: 1.4rem; }

/* Scroll reveal (only once JS is running) */
.js-ready [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js-ready [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Buttons ---------- */
.btn-ink {
  display: inline-flex; align-items: center; gap: .4rem; border: 0; cursor: pointer; text-decoration: none;
  background: var(--ink); color: var(--paper); padding: .95rem 1.6rem; border-radius: 999px;
  font: 700 1.02rem/1 var(--f-display); transition: background-color .25s, color .25s, transform .25s var(--ease);
}
.btn-ink:hover { background: var(--saffron); color: #1c1a26; transform: translateY(-2px) rotate(-1deg); }

/* ---------- Work ---------- */
.sites { list-style: none; padding: 0; margin: 0 0 clamp(4rem, 8vw, 6rem); display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 2.4rem 2rem; }
.site-card a { display: flex; flex-direction: column; gap: .35rem; text-decoration: none; }
.browser {
  display: block; border: 2.5px solid var(--ink); border-radius: 14px; overflow: hidden; background: var(--card);
  box-shadow: 6px 6px 0 var(--lapis); margin-bottom: .8rem; transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.site-card:nth-child(3n+2) .browser { box-shadow: 6px 6px 0 var(--saffron); }
.site-card:nth-child(3n) .browser { box-shadow: 6px 6px 0 var(--rose); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 2.5px solid var(--ink); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); }
.browser-bar i:nth-child(1) { background: var(--rose); } .browser-bar i:nth-child(2) { background: var(--saffron); } .browser-bar i:nth-child(3) { background: var(--mint); }
.browser-url { margin-left: .5rem; font-size: .78rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser img { width: 100%; aspect-ratio: 1200 / 784; object-fit: cover; }
.site-card a:hover .browser, .site-card a:focus-visible .browser { transform: translate(-4px, -4px) rotate(-1deg); box-shadow: 11px 11px 0 var(--ink); }
.site-title { font: 800 1.3rem/1.15 var(--f-display); letter-spacing: -.02em; }
.site-text { color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.tags span { font-size: .78rem; font-weight: 700; padding: .25rem .6rem; border: 1.5px solid var(--ink); border-radius: 999px; }

.print-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1.4rem; }
.print-note { font-size: 1.4rem; color: var(--saffron-ink); transform: rotate(-2deg); margin: 0 0 1.4rem; }
.board {
  list-style: none; margin: 0; padding: clamp(1.5rem, 4vw, 3rem);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2.6rem 2rem;
  background: var(--paper-2); border: 2.5px dashed var(--line); border-radius: 22px;
}
.pin { position: relative; touch-action: auto; }
.pin.is-dragging { z-index: 20; }
.pin-btn {
  position: relative; display: block; width: 100%; padding: 9px 9px 12px; border: 0; background: var(--photo);
  cursor: zoom-in; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .5); transform: rotate(var(--r, -3deg));
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
@media (pointer: fine) { .pin-btn { cursor: grab; } .pin.is-dragging .pin-btn { cursor: grabbing; box-shadow: 0 26px 40px -16px rgba(0, 0, 0, .55); transform: rotate(0) scale(1.05); } }
.pin-btn::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 74px; height: 24px; z-index: 1;
  background: color-mix(in srgb, var(--saffron) 55%, transparent); transform: translateX(-50%) rotate(-4deg);
}
.pin:nth-child(even) .pin-btn::before { background: color-mix(in srgb, var(--lapis) 40%, transparent); transform: translateX(-50%) rotate(5deg); }
.pin-btn img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.pin-btn:hover { transform: rotate(0) scale(1.03); }
.pin:nth-child(1) { --r: -4deg; } .pin:nth-child(2) { --r: 3deg; } .pin:nth-child(3) { --r: -2deg; }
.pin:nth-child(4) { --r: 4deg; } .pin:nth-child(5) { --r: -3deg; } .pin:nth-child(6) { --r: 2deg; } .pin:nth-child(7) { --r: -5deg; } .pin:nth-child(8) { --r: 3deg; } .pin:nth-child(9) { --r: -2deg; }
.pin-cap { margin: .9rem 0 0; font-size: .92rem; color: var(--ink-2); line-height: 1.35; }
.pin-cap strong { display: block; color: var(--ink); font: 800 1.05rem/1.2 var(--f-display); }
.work-note { max-width: 62ch; margin: .4rem 0 0; }

/* ---------- Services ---------- */
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.card {
  background: var(--card); border: 2.5px solid var(--ink); border-radius: 20px; padding: 1.5rem;
  box-shadow: 6px 6px 0 var(--ink); transition: opacity .8s var(--ease), transform .8s var(--ease), translate .35s var(--ease), rotate .35s var(--ease), box-shadow .35s var(--ease);
}
.card:nth-child(even) { rotate: 1deg; } .card:nth-child(odd) { rotate: -1deg; }
.js-ready .card[data-reveal] { transition: opacity .8s var(--ease), transform .8s var(--ease), translate .35s var(--ease), rotate .35s var(--ease), box-shadow .35s var(--ease); }
.card:hover { translate: -3px -3px; rotate: 0deg; box-shadow: 10px 10px 0 var(--saffron); }
.card-icon { width: 56px; height: 56px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 1rem; transition: transform .4s var(--ease); }
.card-icon .accent { stroke: var(--saffron); }
.card:hover .card-icon { transform: rotate(-8deg) scale(1.08); }
.card h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: .6rem; }
.card p { color: var(--ink-2); margin: 0; font-size: 1rem; }

.facts { list-style: none; padding: 0; margin: clamp(3rem, 7vw, 5rem) 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.facts li { border-top: 3px solid var(--ink); padding-top: 1rem; }
.facts strong { display: block; font: 800 clamp(3rem, 7vw, 5rem)/1 var(--f-display); letter-spacing: -.05em; color: var(--saffron); margin-bottom: .4rem; }
.facts span { color: var(--ink-2); font-weight: 600; }

.avail-note { font-size: 1.45rem; line-height: 1.2; color: var(--saffron-ink); transform: rotate(-1.5deg); transform-origin: left; margin: .4rem 0 1rem; }
.gastro-box { background: var(--card); border: 2.5px solid var(--ink); border-radius: 26px; box-shadow: 6px 6px 0 var(--ink); padding: clamp(1.8rem, 5vw, 3rem); margin-bottom: clamp(2rem, 5vw, 3rem); }
.gastro-box p { max-width: 60ch; color: var(--ink-2); }
.gastro-box .kicker { color: var(--saffron-ink); }
.steps-box { background: var(--ink); color: var(--paper); border-radius: 26px; padding: clamp(1.8rem, 5vw, 3rem); }
.steps-box .sub-title { color: var(--paper); }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; position: relative; }
.steps li { counter-increment: step; position: relative; padding-top: 3.4rem; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: var(--saffron); color: #1c1a26; font: 800 1.2rem/1 var(--f-display);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 22px; left: 58px; right: -1.4rem; border-top: 2.5px dashed color-mix(in srgb, var(--paper) 45%, transparent);
}
.steps strong { display: block; font: 800 1.25rem/1.2 var(--f-display); margin-bottom: .4rem; }
.steps span { opacity: .82; }

@media (max-width: 980px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .cards, .facts, .steps { grid-template-columns: 1fr; }
  .steps li:not(:last-child)::after { display: none; }
}

/* ---------- Smart Home ---------- */
.sh-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.sh-copy > p { color: var(--ink-2); max-width: 50ch; }
.ticks { list-style: none; padding: 0; margin: 1.4rem 0 1.8rem; display: grid; gap: .7rem; }
.ticks li { position: relative; padding-left: 2rem; font-weight: 600; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 10px;
  border-left: 3px solid var(--saffron); border-bottom: 3px solid var(--saffron); transform: rotate(-45deg);
}
.sh-switch { justify-self: center; text-align: center; }
.wall-switch {
  width: 150px; height: 210px; border-radius: 26px; border: 3px solid var(--ink); background: var(--card);
  box-shadow: 9px 9px 0 var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.wall-switch:active { transform: translate(4px, 4px); box-shadow: 5px 5px 0 var(--ink); }
.switch-rocker {
  width: 72px; height: 118px; border-radius: 14px; border: 3px solid var(--ink);
  background: linear-gradient(to bottom, var(--saffron) 0 50%, var(--paper-2) 50% 100%);
  transform: perspective(300px) rotateX(16deg); transition: transform .3s var(--ease), background .3s;
}
.wall-switch[aria-checked="false"] .switch-rocker {
  background: linear-gradient(to bottom, var(--paper-2) 0 50%, var(--ink-3) 50% 100%);
  transform: perspective(300px) rotateX(-16deg);
}
.switch-note { position: relative; font-size: 1.5rem; color: var(--saffron-ink); margin: 1.4rem 0 .4rem; transform: rotate(-3deg); }
/* Arrow from the end of the note up to the side of the switch */
.switch-arrow { position: absolute; left: 50%; bottom: calc(100% - 8px); width: 48px; height: 72px; margin-left: 88px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.room-status { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .95rem; border: 2px solid var(--ink); border-radius: 999px; padding: .4rem .9rem; margin: 0; }
.room-led { width: 10px; height: 10px; border-radius: 50%; background: var(--saffron); box-shadow: 0 0 0 4px color-mix(in srgb, var(--saffron) 25%, transparent); }
html[data-theme="night"] .room-led { background: var(--ink-3); box-shadow: none; }
@media (max-width: 760px) { .sh-grid { grid-template-columns: 1fr; } }

/* Night mode torch (mouse only) */
.torch {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0; transition: opacity .6s;
  background: radial-gradient(circle 260px at var(--mx, 50%) var(--my, 40%), transparent 0 45%, rgba(4, 3, 10, .42) 100%);
}
@media (pointer: fine) { html[data-theme="night"] .torch { opacity: 1; } }

/* ---------- About me ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.about-text > p { color: var(--ink-2); max-width: 58ch; }
.tools { margin-top: 1.8rem; }
.tools h3 { font-size: 1.6rem; font-weight: 700; letter-spacing: 0; margin-bottom: .6rem; }
.tool-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.tool-tags li { font-size: .85rem; font-weight: 700; padding: .3rem .75rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); }
.about-stamp { text-align: center; }
.stamp-wrap { position: relative; width: min(100%, 280px); aspect-ratio: 1; margin-inline: auto; cursor: grab; touch-action: none; user-select: none; }
.stamp-wrap.is-dragging { cursor: grabbing; }
.stamp-wrap::before {
  content: ""; position: absolute; inset: 23%; border-radius: 50%;
  background: var(--card); border: 2.5px solid var(--ink); box-shadow: 6px 6px 0 var(--saffron);
}
.stamp-spin { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.stamp-text { font: 700 13px var(--f-display); letter-spacing: 1.6px; fill: var(--ink); }
.stamp-mark { position: absolute; inset: 0; margin: auto; width: 30%; height: 30%; pointer-events: none; }
.stamp-hint { display: block; margin-top: .8rem; font-size: 1.3rem; color: var(--ink-2); transform: rotate(-2deg); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.ct-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.8rem clamp(2rem, 6vw, 5rem);
  grid-template-areas: "copy form" "sign form";
}
.ct-copy { grid-area: copy; align-self: end; }
.ct-grid .postcard { grid-area: form; align-self: center; }
.ct-copy > p { color: var(--ink-2); max-width: 44ch; }
.contact-list { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .85rem; }
.contact-list li { display: flex; align-items: center; gap: .8rem; font-weight: 700; }
.contact-list svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--saffron-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--lapis); text-decoration: underline; }

/* "Bis bald! Hamid" – signed like a letter; the line underneath draws itself when the section comes in */
.signature { grid-area: sign; align-self: start; display: grid; justify-items: start; margin: .6rem 0 0; line-height: 1; rotate: -4deg; transform-origin: left center; }
.sign-bye { font-size: 1.7rem; color: var(--ink-2); margin-left: .2rem; }
.sign-name { position: relative; font-size: clamp(3.2rem, 6vw, 4.4rem); font-weight: 700; color: var(--ink); margin-top: .15rem; }
.sign-name svg { position: absolute; left: -3%; bottom: -.1em; width: 108%; height: .26em; overflow: visible; }
.sign-name path { fill: none; stroke: var(--saffron); stroke-width: 4; stroke-linecap: round; }
@media (prefers-reduced-motion: no-preference) {
  .js-ready .sign-name path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s var(--ease) .6s; }
  .js-ready .is-in .sign-name path { stroke-dashoffset: 0; }
}

/* The postcard form (v4) */
.postcard {
  position: relative; background: var(--card); border: 2.5px solid var(--ink); border-radius: 6px;
  box-shadow: 9px 9px 0 var(--lapis); padding: clamp(1.5rem, 4vw, 2.4rem); rotate: 1deg;
}
.form-fields { display: grid; gap: 1.1rem; }
.form-row { display: grid; gap: .25rem; }
.form-row label { font-family: var(--f-hand); font-weight: 700; font-size: 1.3rem; line-height: 1.1; color: var(--ink-2); }
.form-row input, .form-row textarea {
  width: 100%; font: inherit; color: var(--ink); background: transparent;
  border: 0; border-bottom: 2px solid var(--line); border-radius: 0; padding: .5rem .1rem; transition: border-color .2s;
}
.form-row textarea { resize: vertical; min-height: 8rem; }
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--saffron); }
.form-check { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; font-size: .92rem; color: var(--ink-2); }
.form-check input { width: 20px; height: 20px; margin: .15rem 0 0; accent-color: var(--saffron); }
.form-check a { font-weight: 700; }
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn-send { justify-self: start; margin: .7rem 0 .2rem .8rem; border: 0; background: none; cursor: pointer; }
.form-notice { margin: 0 0 1rem; padding: .8rem 1rem; border-radius: 10px; font-weight: 700; border: 2px solid; }
.form-notice.ok { color: var(--mint); background: color-mix(in srgb, var(--mint) 12%, transparent); }
.form-notice.error { color: var(--rose); background: color-mix(in srgb, var(--rose) 12%, transparent); }
@media (max-width: 860px) {
  .ct-grid { grid-template-columns: 1fr; grid-template-areas: "copy" "form" "sign"; }
  .signature { margin-top: 1.2rem; }
  .postcard { margin-right: 8px; box-shadow: 6px 6px 0 var(--lapis); rotate: .5deg; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 2.5px solid var(--ink); padding: 2rem 0 2.4rem; font-size: .95rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 2rem; }
.footer-row p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-links a { text-decoration: none; font-weight: 700; }
.footer-links a:hover { color: var(--lapis); text-decoration: underline; }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(94vw, 1100px); max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(10, 9, 15, .84); }
.lightbox img { max-height: 82vh; width: auto; max-width: 100%; margin: 0 auto; border: 8px solid #fff; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7); }
.lb-cap { color: #f7f1e5; text-align: center; font-size: 1.35rem; margin: .8rem auto 0; max-width: 60ch; }
.lb-close {
  position: absolute; top: -18px; right: -18px; width: 44px; height: 44px; border-radius: 50%; z-index: 1;
  border: 3px solid #1c1a26; background: #f39200; color: #1c1a26; font: 800 1.5rem/1 var(--f-display); cursor: pointer;
}

/* ---------- Ink trail ---------- */
.ink-trail { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; pointer-events: none; }

/* ---------- Legal pages ---------- */
.legal { padding: 7rem 0 4rem; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); font-weight: 800; letter-spacing: -.04em; margin-bottom: 2rem; }
.legal h2 { font-size: 1.35rem; font-weight: 800; margin: 2.2rem 0 .7rem; }
.legal address { font-style: normal; }
.legal .placeholder { background: color-mix(in srgb, var(--saffron) 30%, transparent); padding: 0 .25em; border-radius: 4px; }
.legal .lang-note { font-family: var(--f-hand); font-size: 1.3rem; color: var(--saffron-ink); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .caret { animation: none; }
  .drop { display: none; }
}

/* ---------- Print ---------- */
@media print {
  .tab-home, .tab-tools, .rail, .site-header, .ink-trail, .torch, .scroll-hint, .lightbox { display: none !important; }
  .js-ready [data-reveal] { opacity: 1 !important; transform: none !important; }
}
