/* Kolcak Solutions — two cities, one studio. Delft/Iznik tile blue + tulip red (the flower both countries claim). Left-aligned editorial column. */
:root {
  --paper: #F5F7FC;
  --ink: #141A2E;
  --muted: #4A5372;
  --tile: #E2E8F8;
  --blue: #2445A8;
  --blue-ink: #FFFFFF;
  --tulip: #C7303A;
  --rule: #CDD5EC;
  --card: #FFFFFF;
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 4vw, 2.5rem);
  --step-4: clamp(2.5rem, 6vw, 4.25rem);
  --measure: 62ch;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgb(20 26 46 / 0.05), 0 10px 30px -12px rgb(20 26 46 / 0.16);
  --shadow-lift: 0 2px 4px rgb(20 26 46 / 0.06), 0 18px 44px -14px rgb(20 26 46 / 0.24);
  --glass: color-mix(in srgb, var(--paper) 70%, transparent);
  --glow-blue: rgb(36 69 168 / 0.16);
  --glow-tulip: rgb(199 48 58 / 0.10);
  --photo-opacity: 0.2;
  --photo-opacity-narrow: 0.2;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1323; --ink: #E9EDF8; --muted: #A5AFCC; --tile: #18203A;
    --blue: #8EA7F4; --blue-ink: #0E1323; --tulip: #FF6B72; --rule: #2A3455; --card: #141B30;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px -12px rgb(0 0 0 / 0.6);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / 0.4), 0 20px 48px -14px rgb(0 0 0 / 0.75);
    --glow-blue: rgb(142 167 244 / 0.14); --glow-tulip: rgb(255 107 114 / 0.08);
    --photo-opacity: 0.14; --photo-opacity-narrow: 0.22;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0E1323; --ink: #E9EDF8; --muted: #A5AFCC; --tile: #18203A;
  --blue: #8EA7F4; --blue-ink: #0E1323; --tulip: #FF6B72; --rule: #2A3455; --card: #141B30;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px -12px rgb(0 0 0 / 0.6);
  --shadow-lift: 0 2px 4px rgb(0 0 0 / 0.4), 0 20px 48px -14px rgb(0 0 0 / 0.75);
  --glow-blue: rgb(142 167 244 / 0.14); --glow-tulip: rgb(255 107 114 / 0.08);
  --photo-opacity: 0.14; --photo-opacity-narrow: 0.22;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--tulip); outline-offset: 3px; border-radius: 4px; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 70%, transparent);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; padding-block: 12px; flex-wrap: wrap; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.125rem; letter-spacing: -0.01em; }
.mark svg { flex: none; }
.nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; }
.nav a { text-decoration: none; font-weight: 600; color: var(--muted); padding-block: 6px; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--tulip); }
.nav a:hover { color: var(--ink); border-bottom-color: var(--rule); }
.nav a[aria-current="page"]:hover { border-bottom-color: var(--tulip); }
.langs { display: flex; gap: 2px; }
.langs button {
  font: 600 var(--step--1) var(--font-body); color: var(--muted);
  background: transparent; border: 1px solid transparent; border-radius: 999px;
  padding: 4px 10px; cursor: pointer; min-height: 34px;
}
.langs button[aria-pressed="true"] { color: var(--ink); border-color: var(--rule); background: var(--tile); }
.top-right { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  border-radius: 999px; font: 600 var(--step-0) var(--font-body); text-decoration: none; border: 2px solid var(--blue); cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--blue); color: var(--blue-ink); box-shadow: 0 10px 24px -10px var(--blue); }
.btn.primary:hover { box-shadow: 0 14px 30px -10px var(--blue); }
.btn.primary::after { content: "→"; margin-left: 10px; transition: transform .2s ease; }
.btn.primary:hover::after { transform: translateX(3px); }
.btn.ghost { background: var(--glass); color: var(--ink); }
.btn.ghost:hover { background: var(--tile); }
@media (prefers-reduced-motion: reduce) {
  .btn, .btn::after { transition: none; }
  .btn:hover, .btn.primary:hover::after { transform: none; }
}

/* Hero */
.hero {
  background:
    radial-gradient(55% 70% at 88% 18%, var(--glow-blue), transparent 70%),
    radial-gradient(40% 55% at 4% 96%, var(--glow-tulip), transparent 70%);
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; padding-block: clamp(48px, 8vw, 104px) clamp(40px, 6vw, 80px); }
.hero h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.025em; }
.hero .lede { margin-top: 24px; font-size: var(--step-1); color: var(--muted); max-width: 38ch; line-height: 1.5; }

.cities { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tile {
  aspect-ratio: 1; max-width: 100%;
  position: relative; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  background:
    radial-gradient(circle at 0 0, var(--blue) 0 14px, transparent 15px),
    radial-gradient(circle at 100% 0, var(--blue) 0 14px, transparent 15px),
    radial-gradient(circle at 0 100%, var(--blue) 0 14px, transparent 15px),
    radial-gradient(circle at 100% 100%, var(--blue) 0 14px, transparent 15px),
    var(--tile);
  border: 2px solid var(--blue);
  display: flex; flex-direction: column; justify-content: space-between;
}
.tile .city { font-weight: 600; color: var(--muted); padding-left: 10px; }
.tile .time { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.25rem, 5vw, 3.25rem); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; padding-left: 10px; }
.tile .day { color: var(--muted); font-size: var(--step--1); padding-left: 10px; }
.offset { grid-column: 1 / -1; color: var(--muted); font-size: var(--step--1); }
.offset strong { color: var(--tulip); font-weight: 600; }

.band { height: 22px; background:
  conic-gradient(from 45deg, var(--blue) 0 25%, transparent 0 50%, var(--blue) 0 75%, transparent 0) 0 0 / 22px 22px;
  opacity: 0.18; }

/* Page header (inner pages) */
.page-head .wrap { padding-block: clamp(48px, 7vw, 88px) clamp(24px, 4vw, 40px); }
.page-head h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.025em; max-width: 18ch; }
.page-head .lede { margin-top: 20px; font-size: var(--step-1); color: var(--muted); max-width: 48ch; line-height: 1.5; }

/* Sections */
section.block .wrap { padding-block: clamp(56px, 8vw, 96px); }
.block.tinted { background: var(--tile); }
.block h2 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.02em; max-width: 22ch; }
.block .intro { margin-top: 16px; color: var(--muted); max-width: var(--measure); }
.section-foot { margin-top: 32px; }
.section-foot a { font-weight: 600; color: var(--blue); }

/* Services (home) */
.services { margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.service {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease;
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.service::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; margin-bottom: 20px; background: linear-gradient(90deg, var(--blue), var(--tulip)); }
.service h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; }
.service p { margin-top: 10px; color: var(--muted); }
.service ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.service li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.service li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--tulip); transform: translateY(-1px) rotate(45deg); }

/* News */
.news-meta { margin-top: 12px; color: var(--muted); font-size: var(--step--1); }
.news { margin: 40px 0 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.news li {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 24px; padding: 28px;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow);
}
/* Decorative photo behind each item: faded, on the right, fading out toward the text */
.news-art {
  position: absolute; z-index: -1; top: 0; right: 0; width: min(55%, 560px); height: 100%;
  object-fit: cover; opacity: var(--photo-opacity); pointer-events: none; user-select: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 65%);
  mask-image: linear-gradient(to right, transparent, #000 65%);
}
.news .when { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.news time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: var(--step--1); }
.chip { display: inline-block; font-size: var(--step--1); font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); }
.chip.web { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 10%, var(--card)); }
.chip.social { border-color: var(--tulip); background: color-mix(in srgb, var(--tulip) 9%, var(--card)); }
.chip.qa { border-color: var(--muted); background: color-mix(in srgb, var(--muted) 10%, var(--card)); }
.chip.rules { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, var(--card)); }
.news-credit { margin-top: 20px; color: var(--muted); font-size: var(--step--1); }
.news-credit a { color: inherit; }
.news h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; }
.news p { margin-top: 8px; max-width: var(--measure); }
.news .mean { color: var(--muted); }
.news .mean b { color: var(--ink); font-weight: 600; }
.news .src { margin-top: 10px; font-size: var(--step--1); }
.news .src a { color: var(--blue); font-weight: 600; }

/* CTA band */
.cta-band { padding-block: clamp(40px, 6vw, 72px); }
.cta-band .wrap {
  width: min(1088px, 100% - 32px); padding: clamp(32px, 5vw, 56px); border-radius: 28px;
  background: radial-gradient(70% 140% at 100% 0, rgb(255 255 255 / 0.16), transparent 60%), var(--blue);
  color: var(--blue-ink); box-shadow: 0 24px 60px -24px var(--blue);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
.cta-band h2 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.02em; max-width: 20ch; }
.cta-band .btn { border-color: var(--blue-ink); background: var(--blue-ink); color: var(--blue); }
.cta-band :focus-visible { outline-color: var(--blue-ink); }

/* Projects */
.projects { display: grid; gap: clamp(40px, 6vw, 64px); }
.project { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.cover {
  aspect-ratio: 4 / 3; max-width: 100%; border-radius: var(--radius); overflow: hidden; position: relative;
  display: flex; align-items: flex-end; padding: 24px; box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}
.project:hover .cover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.cover .name { position: relative; z-index: 1; }
.cover.penveil { background: radial-gradient(circle at 70% 30%, #3a0b0b 0, #0a0909 60%); color: #F0EDEA; }
.cover.penveil .name { font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(2.4rem, 6vw, 3.6rem); letter-spacing: 0.08em; font-weight: 600; }
.cover.penveil::after { content: ""; position: absolute; left: 24px; right: 24px; top: 50%; height: 2px; background: #8B1A1A; }
.cover.penveil .cities-line { position: absolute; top: 24px; left: 24px; font-size: 0.8rem; letter-spacing: 0.12em; color: #B0ADAA; }
.cover.wuhub { background: #111111; color: #FFD400; flex-direction: column; justify-content: center; align-items: flex-start; }
.cover.wuhub .name { font-family: var(--font-display); font-weight: 800; line-height: 0.85; font-size: clamp(3rem, 9vw, 5.5rem); }
.cover.wuhub .name span { display: block; color: #FFFFFF; font-size: 0.5em; letter-spacing: 0.2em; margin-top: 8px; }
.cover.community { background: var(--tile); color: var(--ink); }
.cover.community .dots { position: absolute; inset: 0; background: radial-gradient(circle, var(--blue) 0 4px, transparent 5px) 0 0 / 28px 28px; opacity: 0.35; }
.cover.community .name { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 5vw, 3rem); background: var(--paper); padding: 6px 14px; border-radius: 6px; }
.cover.cafe { background: #2B1D14; color: #F3E6D3; }
.cover.cafe .ring { position: absolute; width: 60%; aspect-ratio: 1; right: -8%; top: -10%; border-radius: 50%; border: 18px solid #6B4A32; opacity: 0.8; }
.cover.cafe .name { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.2rem); max-width: 12ch; line-height: 1.05; }
.cover.volan { background: #EFE9E1; color: #1E1B18; }
.cover.volan .ruffle { position: absolute; inset: 0; background: repeating-radial-gradient(circle at 100% 0, transparent 0 18px, #1E1B18 18px 20px); opacity: 0.18; }
.cover.volan .name { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 7vw, 4rem); letter-spacing: 0.06em; }
.cover.research { background: #15131C; color: #F5F1E8; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 6px; }
.cover.research .name { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 5vw, 3rem); line-height: 1; }
.cover.research .stat { font-family: var(--font-display); color: #FF5B2E; font-weight: 800; font-size: clamp(2.4rem, 6vw, 3.4rem); line-height: 1; }

.project .kind { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.project .kind .label { font-weight: 600; color: var(--tulip); font-size: var(--step--1); }
.project .kind .year { color: var(--muted); font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.project h2 { font-size: var(--step-2); font-weight: 800; letter-spacing: -0.015em; margin-top: 10px; }
.project .summary { margin-top: 12px; max-width: var(--measure); }
.project h3 { font-size: var(--step-0); font-family: var(--font-body); font-weight: 600; margin-top: 20px; }
.project ul { margin: 10px 0 0; padding-left: 1.1em; display: grid; gap: 6px; }
.project .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.project .link { margin-top: 16px; }
.project .link a { color: var(--blue); font-weight: 600; overflow-wrap: anywhere; }
.honest { margin-top: 48px; color: var(--muted); font-size: var(--step--1); max-width: var(--measure); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: start; }
form.contact-form { display: grid; gap: 18px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(20px, 4vw, 32px); box-shadow: var(--shadow); }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; }
.field .hint { color: var(--muted); font-size: var(--step--1); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 12px 14px; min-height: 48px; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); box-shadow: 0 0 0 6px color-mix(in srgb, var(--blue) 15%, transparent); }
.field.error input, .field.error textarea { border-color: var(--tulip); }
.field .err { color: var(--tulip); font-size: var(--step--1); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.form-note { color: var(--muted); font-size: var(--step--1); }
.form-status { padding: 14px 16px; border-radius: 6px; border: 1px solid var(--rule); background: var(--tile); }
.form-status.ok { border-color: var(--blue); }
.form-status.warn { border-color: var(--tulip); }
.direct { display: grid; gap: 28px; }
.direct h2 { font-size: var(--step-2); font-weight: 800; }
.direct dl { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.direct dl div { display: grid; gap: 4px; padding-block: 14px; border-bottom: 1px solid var(--rule); }
.direct dt { color: var(--muted); font-size: var(--step--1); }
.direct dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.email-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.email { user-select: all; overflow-wrap: anywhere; min-width: 0; }
.copy { font: 600 var(--step--1) var(--font-body); min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--blue); background: transparent; color: var(--blue); cursor: pointer; }
.steps-mini { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; color: var(--muted); }
.steps-mini b { color: var(--ink); }

footer { border-top: 1px solid var(--rule); }
footer .wrap { padding-block: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: var(--step--1); }

/* Scroll reveal: site.js adds .rv to cards and .in once they enter the viewport. Without JS or with reduced motion nothing is hidden. */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .service, .cover { transition: none; }
  .service:hover, .project:hover .cover { transform: none; }
}
@media print { .rv { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .hero .wrap, .contact-grid, .project { grid-template-columns: minmax(0, 1fr); }
  .services { grid-template-columns: minmax(0, 1fr); }
  .news li { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 22px; }
  .news .when { flex-direction: row; align-items: center; gap: 12px; }
  /* One column: the photo sits behind the whole card and fades out from the top-right corner */
  .news-art {
    width: 100%; opacity: var(--photo-opacity-narrow);
    -webkit-mask-image: linear-gradient(200deg, #000 5%, transparent 65%);
    mask-image: linear-gradient(200deg, #000 5%, transparent 65%);
  }
}
@media (max-width: 520px) {
  .two { grid-template-columns: minmax(0, 1fr); }
  .tile { padding: 14px; }
  .mark span { display: none; }
  /* Logo and language switch share the first row, nav gets the second, so the sticky header stays two rows in every language */
  .top .wrap { display: grid; grid-template-columns: auto auto; grid-template-areas: "mark langs" "nav nav"; justify-content: space-between; gap: 4px 12px; padding-block: 8px; }
  .top-right { display: contents; }
  .mark { grid-area: mark; }
  .langs { grid-area: langs; }
  .nav { grid-area: nav; }
}
