:root {
  --paper: #ece8dc;
  --ink: #191816;
  --red: #ed5b43;
  --blue: #5e7ce2;
  --yellow: #edc63d;
  --orange: #ec7a2c;
  --night: #201e1a;
  --chalk: #f1eddf;
  --line: rgba(25, 24, 22, .68);
  --gutter: 4vw;
  --hand: 'Nanum Pen Script', 'Caveat', cursive;
  --sans: 'Plus Jakarta Sans', 'Manrope', sans-serif;
  --mono: 'DM Mono', 'IBM Plex Mono', monospace;
}
/* Nanum Pen Script has no Turkish or Cyrillic letters, so translated handwriting switches to Caveat */
html[lang="tr"], html[lang="uk"] { --hand: 'Caveat', cursive; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
img { max-width: 100%; }
/* Discourage copying: no text selection, image dragging or iOS long-press save (the email stays copyable) */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
img, svg { -webkit-user-drag: none; user-drag: none; pointer-events: none; }
input, textarea { -webkit-user-select: text; user-select: text; }

.paper-grain {
  position: fixed; inset: 0; pointer-events: none; opacity: .18; z-index: 10; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* Top bar */
.topbar {
  height: 70px; padding: 0 var(--gutter); display: flex; align-items: center; gap: clamp(18px, 3vw, 40px);
  position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line);
  background: rgba(236, 232, 220, .88); backdrop-filter: blur(6px);
}
.monogram { text-decoration: none; color: var(--ink); font: 40px/1 'Nanum Pen Script', cursive; transform: rotate(-6deg); }
.tiny-note, .section-label, .places, footer { font: 500 10px/1.45 var(--mono); letter-spacing: .09em; margin: 0; }
.topbar nav { display: flex; gap: 21px; }
.lang { display: flex; gap: 2px; margin-left: auto; }
.lang button { font: 500 9px var(--mono); letter-spacing: .08em; color: var(--ink); background: none; border: 1px solid transparent; padding: 4px 5px; cursor: pointer; }
.lang button[aria-pressed="true"] { border-color: var(--ink); }
.topbar nav a { color: var(--ink); font: 500 9px var(--mono); text-decoration: none; letter-spacing: .08em; }

/* Intro */
.intro {
  position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  padding: clamp(40px, 7vh, 80px) 12vw clamp(56px, 8vh, 90px);
}
.intro:before, .intro:after { content: ''; position: absolute; border: 1px solid rgba(25, 24, 22, .48); border-radius: 50%; pointer-events: none; }
.intro:before { width: 640px; height: 380px; right: -100px; top: 60px; transform: rotate(-22deg); }
.intro:after { width: 500px; height: 270px; right: 10px; top: 110px; transform: rotate(31deg); }
.sun { position: absolute; right: 17vw; top: 70px; font-size: 140px; color: var(--yellow); line-height: 1; transform: rotate(12deg); text-shadow: 3px 2px 0 var(--ink); }
.scribble { font-family: 'Nanum Pen Script', cursive; }
.intro h1 {
  font-size: clamp(48px, 8vw, 124px); letter-spacing: -.07em; word-spacing: .08em; line-height: .9;
  max-width: 900px; margin: clamp(28px, 6vh, 64px) 0 24px; position: relative; z-index: 1;
}
.intro h1 i, .about h2 i, .hello h2 i, .street-intro i { font-family: var(--hand); font-weight: 400; letter-spacing: -.02em; word-spacing: 0; }
.intro-copy { font-size: 14px; line-height: 1.7; max-width: 340px; margin: 0 0 32px; position: relative; z-index: 1; }
.walk { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 9px; font: 500 11px var(--mono); letter-spacing: .06em; }
.walk span { font-size: 19px; margin-right: 11px; }
.walk em { font-style: normal; }
.places { position: absolute; right: var(--gutter); bottom: 32px; display: flex; gap: 9px; }
.places b { color: var(--red); }

/* Shared section bits */
.hallway, .street { padding: clamp(56px, 8vh, 88px) var(--gutter); position: relative; }
.section-label { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; }
.section-label h2 { font-size: 10px; margin: 0; font-weight: 500; }
.handnote { display: table; font: 30px/1 var(--hand); }
.note-left { margin: 18px 8vw 18px auto; color: var(--orange); transform: rotate(-6deg); }

/* App rooms */
/* App rooms — each card is a plain door: frame, two panels, knob; everything sits on the door */
.room-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.room {
  aspect-ratio: 5 / 8; position: relative; color: inherit; text-decoration: none;
  border: 2px solid var(--ink); border-bottom: 0; border-radius: 3px 3px 0 0;
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .14);
  transform-origin: left center; transition: transform .45s ease;
}
.room:before, .room:after { content: ''; position: absolute; left: 13%; right: 13%; border: 1.5px dashed rgba(25, 24, 22, .55); pointer-events: none; }
.room:before { top: 9%; height: 45%; }
.room:after { top: 60%; bottom: 6%; }
a.room:hover { transform: perspective(900px) rotateY(-14deg); }
.room-number { position: absolute; top: 2.5%; left: 13%; font: 500 9px var(--mono); letter-spacing: .08em; }
.app-icon { position: absolute; top: 13.5%; left: 50%; width: 54%; transform: translateX(-50%); border-radius: 23%; filter: drop-shadow(4px 6px 0 rgba(25, 24, 22, .22)); }
.door-knob { position: absolute; width: 10px; height: 10px; border-radius: 50%; right: 5%; top: 56%; background: var(--ink); }
.room-caption { position: absolute; left: 18%; right: 18%; top: 64%; }
.room-caption h3 { margin: 0; font: 400 34px/.85 'Nanum Pen Script', cursive; letter-spacing: -.02em; }
.room-caption p { font: 9px/1.45 var(--mono); margin: 8px 0 0; }
.open-mark { position: absolute; bottom: 9%; right: 18%; font: 500 9px var(--mono); letter-spacing: .08em; }
.open-mark { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.open-mark em { font-style: normal; }
.ico { height: 10px; width: auto; fill: currentColor; flex: none; }
.room-caption p .ico { vertical-align: -1px; margin-right: 4px; }
.stamp { padding: 3px 6px; border: 1.5px solid var(--ink); transform: rotate(-4deg); }
.room-snake { background: #9fd062; }
.room-chef { background: #f08b66; }
.room-ultra { background: #93a3ea; }
.room-tato { background: #8fc6b8; }
.room-rtsp { background: #e9bf55; }

/* Web street */
.street { background: var(--night); color: var(--chalk); }
.street .section-label { border-color: var(--chalk); }
.street-intro { font-size: clamp(34px, 5vw, 68px); letter-spacing: -.06em; word-spacing: .08em; line-height: .95; margin: 36px 0 48px; }
.buildings { height: 420px; display: flex; align-items: flex-end; justify-content: center; gap: 8px; border-bottom: 2px solid var(--chalk); }
.building {
  position: relative; display: block; flex: 0 1 auto; color: var(--chalk); text-decoration: none;
  border: 2px solid var(--chalk); border-bottom: 0; background: #292621;
  transition: transform .35s, background .35s;
}
.building:hover { transform: translateY(-18px); background: var(--red); }
.building:before { content: ''; position: absolute; top: -18px; left: -2px; right: -2px; height: 17px; border: 2px solid var(--chalk); border-bottom: 0; transform: skewX(-30deg); transform-origin: bottom; }
.b1 { width: 18%; height: 70%; }
.b2 { width: 19%; height: 84%; }
.b3 { width: 17%; height: 60%; }
.b4 { width: 19%; height: 92%; }
.b5 { width: 17%; height: 74%; }
.window { position: absolute; width: 27%; height: 16%; border: 1px solid var(--chalk); top: 24%; left: 20%; }
.window:after { content: ''; position: absolute; width: 1px; background: var(--chalk); top: 0; bottom: 0; left: 50%; }
.w2 { left: auto; right: 20%; }
.w3 { top: 49%; left: 36%; }
.sign { position: absolute; left: 14px; bottom: 22px; font: 29px/.8 'Nanum Pen Script', cursive; letter-spacing: -.04em; }
.building b { position: absolute; right: 10px; top: 12px; font: 9px var(--mono); }
.note-right { margin: 22px 8vw 0 auto; color: var(--yellow); transform: rotate(6deg); }

/* About + hello */
.about { padding: clamp(56px, 9vh, 96px) 12vw; position: relative; overflow: hidden; }
.about > div { margin-top: 32px; display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; }
.about h2, .hello h2 { font-size: clamp(44px, 6.5vw, 100px); line-height: .88; letter-spacing: -.065em; word-spacing: .08em; margin: 0; }
.about div > p { font-size: 14px; line-height: 1.8; max-width: 310px; margin: 0; }
.flower { position: absolute; right: 13vw; top: 30px; font: 190px/1 'Nanum Pen Script', cursive; color: var(--red); transform: rotate(18deg); }
.hello { background: var(--blue); color: #f6f0df; padding: clamp(56px, 9vh, 96px) 12vw; position: relative; overflow: hidden; }
.hello:before { content: ''; position: absolute; width: 520px; height: 520px; border: 2px solid #f6f0df; border-radius: 45% 52% 47% 50%; right: -150px; top: -190px; transform: rotate(20deg); }
.hello h2 { margin: 32px 0 40px; position: relative; z-index: 1; }
.hello-btn { font: 17px var(--mono); color: #f6f0df; background: none; border: 0; border-bottom: 1px solid #f6f0df; padding: 0 0 9px; position: relative; z-index: 1; cursor: pointer; }
.hello-btn span + span { margin-left: 17px; transition: margin .3s; }
.hello-btn:hover span + span { margin-left: 24px; }
.sent-note { font: 28px/1 var(--hand); color: var(--yellow); margin: 22px 0 0; transform: rotate(-3deg); position: relative; z-index: 1; }

/* Contact note — a sheet of paper drawn in ink, ruled like a notebook */
.note-form {
  width: min(92vw, 520px); padding: 0; border: 2px solid var(--ink); border-radius: 3px;
  background: var(--paper); color: var(--ink); box-shadow: 7px 7px 0 var(--ink); transform: rotate(-.6deg);
}
.note-form::backdrop { background: rgba(32, 30, 26, .55); backdrop-filter: blur(2px); }
.note-form[open] { animation: kagit .28s ease-out; }
@keyframes kagit { from { opacity: 0; transform: translateY(14px) rotate(-2deg); } }
.note-form form { position: relative; padding: 30px 30px 24px; }
.note-form form::before { content: ''; position: absolute; inset: 9px; border: 1.5px dashed rgba(25, 24, 22, .45); pointer-events: none; }
.note-form h2 { font-size: clamp(34px, 6vw, 46px); line-height: .9; letter-spacing: -.06em; margin: 10px 0 18px; }
.note-form h2 i { font-family: var(--hand); font-weight: 400; letter-spacing: -.02em; color: var(--orange); }
.x { position: absolute; top: 14px; right: 18px; font: 36px/1 'Nanum Pen Script', cursive; color: var(--ink); background: none; border: 0; cursor: pointer; padding: 0 4px; }
.x:hover { color: var(--red); }
.field { display: block; margin-top: 16px; }
.field > span { font: 500 9px var(--mono); letter-spacing: .09em; }
.field textarea, .field input {
  display: block; width: 100%; margin-top: 4px; border: 0; outline: 0; background: transparent; color: var(--ink); resize: none;
}
.field textarea {
  font: 26px/32px var(--hand); height: 130px; padding: 0 2px;
  background: repeating-linear-gradient(transparent 0 31px, rgba(25, 24, 22, .35) 31px 32px);
}
.field input { font: 14px var(--mono); padding: 8px 2px; border-bottom: 1.5px solid var(--ink); }
.field textarea::placeholder, .field input::placeholder { color: rgba(25, 24, 22, .38); }
.field textarea:focus, .field input:focus { background-color: rgba(237, 198, 61, .12); }
/* "Sent" postmark — a green rubber stamp thumped onto the note before it closes */
.postmark {
  --stamp: rgba(46, 140, 82, .88);
  position: absolute; right: 44px; top: 128px; width: 138px; height: 138px; border-radius: 50%;
  display: grid; place-content: center; text-align: center; color: var(--stamp);
  border: 3px solid var(--stamp); box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 7px var(--stamp);
  transform: rotate(-14deg) scale(2.2); opacity: 0; pointer-events: none; mix-blend-mode: multiply; z-index: 2;
}
.postmark::after {
  content: ''; position: absolute; left: -96px; top: 50%; width: 110px; height: 44px; margin-top: -22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 110 44'%3E%3Cg fill='none' stroke='%232e8c52' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M2 8q9-6 18 0t18 0 18 0 18 0 18 0 18 0'/%3E%3Cpath d='M2 22q9-6 18 0t18 0 18 0 18 0 18 0 18 0'/%3E%3Cpath d='M2 36q9-6 18 0t18 0 18 0 18 0 18 0 18 0'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  opacity: .85;
}
.postmark b { font: 700 17px var(--mono); letter-spacing: .14em; }
.postmark small { font: 500 9px var(--mono); letter-spacing: .1em; margin-top: 4px; }
/* GÖNDERİLDİ / НАДІСЛАНО are longer than SENT — keep them inside the ring */
html[lang="tr"] .postmark b, html[lang="uk"] .postmark b { font-size: 12px; letter-spacing: .05em; }
.note-form.stamped .postmark { animation: damga .45s cubic-bezier(.2, 1.6, .4, 1) forwards; }
.note-form.stamped form { animation: sars .3s .12s; }
@keyframes damga { to { opacity: 1; transform: rotate(-14deg) scale(1); } }
@keyframes sars { 30% { transform: translate(2px, 3px); } 60% { transform: translate(-1px, -1px); } }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; }
.form-status { font: 10px/1.4 var(--mono); letter-spacing: .04em; margin: 0; }
.form-status.err { color: var(--red); }
.send { font: 500 11px var(--mono); letter-spacing: .08em; color: var(--paper); background: var(--ink); border: 2px solid var(--ink); padding: 11px 18px; cursor: pointer; box-shadow: 3px 3px 0 var(--orange); transition: transform .15s, box-shadow .15s; }
.send:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--orange); }
.send:disabled { opacity: .55; cursor: wait; }
.hello-doodle { font: 170px/1 'Nanum Pen Script', cursive; position: absolute; right: 18vw; bottom: -30px; color: var(--yellow); transform: rotate(12deg); }
footer { padding: 22px var(--gutter); display: flex; justify-content: space-between; gap: 14px; background: var(--night); color: var(--chalk); }
footer a { color: var(--chalk); text-decoration: none; }

/* Laptop / tablet landscape */
@media (max-width: 1100px) {
  .room-grid { gap: 10px; }
  .room-caption { left: 16%; right: 16%; }
  .room-caption h3 { font-size: 25px; }
  .room-caption p, .open-mark, .room-number { font-size: 8px; }
  .room-caption p { margin-top: 5px; }
  .door-knob { width: 8px; height: 8px; }
  .buildings { height: 360px; gap: 6px; }
  .sign { font-size: 22px; left: 10px; }
  .sun { right: 8vw; }
}

/* Phones: rooms and buildings become one swipeable row, so every card keeps the same size */
@media (max-width: 760px) {
  .room-grid, .buildings {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 calc(-1 * var(--gutter)); padding: 22px var(--gutter) 6px; scroll-padding: 0 var(--gutter);
  }
  .room-grid::-webkit-scrollbar, .buildings::-webkit-scrollbar { display: none; }
  .room { flex: 0 0 56vw; scroll-snap-align: start; }
  a.room:hover { transform: none; }
  .room-caption h3 { font-size: 30px; }
  .room-caption p, .open-mark, .room-number { font-size: 9px; }
  .buildings { height: 330px; justify-content: flex-start; align-items: flex-end; gap: 8px; border-bottom: 0; padding-top: 30px; padding-bottom: 0; background: linear-gradient(var(--chalk), var(--chalk)) bottom / 100% 2px no-repeat; }
  .buildings .building { flex: 0 0 44vw; scroll-snap-align: start; }
  .building:hover { transform: none; }
}

/* Tablet portrait / large phone */
@media (max-width: 700px) {
  :root { --gutter: 5vw; }
  .topbar { height: 62px; }
  .topbar nav { gap: 12px; }
  .topbar nav a { font-size: 8px; }
  .intro { padding: 36px 7vw 72px; }
  .intro:before { width: 420px; height: 250px; right: -160px; top: 30px; }
  .intro:after { width: 320px; height: 180px; right: -80px; top: 60px; }
  .sun { right: 5vw; top: 24px; font-size: 96px; }
  .intro h1 { font-size: 14vw; margin-top: 64px; }
  .places { left: 7vw; right: auto; bottom: 26px; }
  .note-left { display: none; }
  .note-right { font-size: 24px; margin-top: 14px; }
  .hallway, .street { padding-block: 44px; }
  .street-intro { margin: 28px 0 8px; }
  .about > div { display: block; }
  .about div > p { margin-top: 26px; }
  .flower { font-size: 120px; right: 5vw; }
  .hello-doodle { right: 5vw; font-size: 120px; }
  footer { flex-wrap: wrap; font-size: 8px; }
}

/* Small phone */
@media (max-width: 440px) {
  .topbar nav { gap: 10px; }
  .intro h1 { font-size: 15.5vw; }
  .room { flex-basis: 62vw; }
  .buildings .building { flex-basis: 52vw; }
  .about h2, .hello h2 { font-size: 13vw; }
  .hello-btn { font-size: 14px; }
  .note-form form { padding: 26px 22px 20px; }
  .postmark { right: 26px; top: 120px; width: 116px; height: 116px; }
  .postmark b { font-size: 14px; }
}
