/* malem — natural interiors
   Quiet, editorial: one background, near-black text, one grey, 1px light lines.
   Image leads, little text, generous space, small type, text links instead of buttons. */

/* Hanken Grotesk (SIL OFL), variable 300–400, self-hosted: latin + latin-ext (Polish) */
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 300 400; font-display: swap;
  src: url("fonts/hanken-grotesk-latin-ext.woff2") format("woff2");
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 300 400; font-display: swap;
  src: url("fonts/hanken-grotesk-latin.woff2") format("woff2");
  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;
}

:root {
  --bg: #FAF9F5;        /* the only background */
  --ink: #1A1917;       /* near-black text */
  --soft: #75726B;      /* the one grey: labels, captions, secondary text */
  --line: #DEDBD3;      /* 1px light lines */
  --white: #FAF9F5;     /* text on photos */

  /* flat colour samples — average colour of img/sw-*.webp */
  --sw-biel: #A8A18B;
  --sw-kosc: #A99F85;
  --sw-piasek: #C3A288;
  --sw-greige: #9D978E;
  --sw-taupe: #9C8B82;
  --sw-szarozielony: #82754F;
  --sw-oliwka: #747A59;
  --sw-musztarda: #AC9156;

  --font: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --max: 1440px;                                   /* shared content width */
  --gutter: clamp(18px, 4vw, 56px);                /* equal side margins */
  --space: clamp(104px, 12.5vw, 184px);            /* equal vertical rhythm between sections */
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 300 15px/1.6 var(--font); letter-spacing: .005em; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
b, strong, h1, h2, h3 { font-weight: 400; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; letter-spacing: inherit; }
p { margin: 0; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }

/* small uppercase label — section rules, captions, form labels */
.rule, .label, .meta, .duo-label, .field > span, .ft-label, .collages h3, .strip b, .mosaic figcaption, .tagline {
  font-size: 11px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase;
}

/* logo: SVG files used as a mask so colour follows currentColor.
   Variant can be switched with ?logo=cienka | cienka-dlugie-l | bardzo-cienka | bardzo-cienka-dlugie-l */
:root {
  --logo-lg: url("logo/malem-uma-bardzo-cienka-dlugie-l.svg"); --ar-lg: 3.810;
  --logo-sm: url("logo/malem-uma-cienka-dlugie-l.svg"); --ar-sm: 3.731;
}
.logo { display: block; background: currentColor; -webkit-mask: var(--logo-lg) left center / contain no-repeat; mask: var(--logo-lg) left center / contain no-repeat; aspect-ratio: var(--ar-lg); }
.logo-sm { -webkit-mask-image: var(--logo-sm); mask-image: var(--logo-sm); aspect-ratio: var(--ar-sm); }

/* ---------- text links ---------- */
.paren { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 400; text-underline-offset: 4px; }
.paren:hover, .footer a:hover, .menu-foot a:hover, .mail:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* ---------- header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gutter); color: var(--white);
  transition: color .4s var(--ease), background .4s var(--ease), transform .4s var(--ease);
}
.header.is-solid { color: var(--ink); background: var(--bg); box-shadow: 0 1px 0 var(--line); }
.header.is-hidden { transform: translateY(-100%); }
.header .logo { width: 84px; opacity: 0; transition: opacity .4s var(--ease); }
.header.is-solid .logo, .menu-open .header .logo { opacity: 1; }
.header-tools { display: flex; align-items: center; gap: 28px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.lang { display: flex; gap: 10px; }
.lang button { opacity: .45; font-size: 12px; text-transform: uppercase; }
.lang button[aria-pressed="true"] { opacity: 1; }
.lang button:hover, .menu-btn:hover { text-decoration: underline; text-underline-offset: 4px; }
.menu-btn { font-size: 12px; text-transform: uppercase; min-width: 4.5em; text-align: right; }

/* ---------- menu overlay ---------- */
.menu {
  position: fixed; inset: 0; z-index: 50; background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column; justify-content: center; padding: 120px var(--gutter) 48px;
}
.menu[hidden] { display: none; }
.menu ol { list-style: none; margin: 0 auto; padding: 0; width: 100%; max-width: var(--max); }
.menu a { display: flex; align-items: baseline; gap: 28px; padding: clamp(8px, 1.4vw, 14px) 0; }
.menu span { font-size: 11px; letter-spacing: .12em; color: var(--soft); width: 28px; }
.menu b { font-weight: 300; font-size: clamp(30px, 4.6vw, 64px); line-height: 1.15; letter-spacing: -.01em; }
.menu a:hover b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 8px; }
.menu-foot { margin: 48px auto 0; width: 100%; max-width: var(--max); color: var(--soft); font-size: 13px; }
.menu-open { overflow: hidden; }
.menu-open .header { color: var(--ink); background: transparent; box-shadow: none; transform: none; }

/* ---------- 1. hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); height: 100svh; min-height: 560px; }
.hero-main { position: relative; overflow: hidden; color: var(--white); background: #2f2d29; }
.hero-main img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(20, 20, 18, .4), rgba(20, 20, 18, 0) 45%); }
/* --lw = logo width; the tagline runs under the logo at exactly its width
   (inline SVG text, textLength="100%" spreads the letter spacing) */
.hero-brand { --lw: clamp(190px, 19vw, 290px); position: absolute; left: var(--gutter); bottom: clamp(28px, 5vw, 56px); z-index: 2; width: var(--lw); }
.hero-brand h1 { margin: 0; line-height: 0; }
.hero-brand .logo { width: 100%; }
/* tagline: 8px desktop, 5.6px phone; gap under the logo fixed in px */
.tagline { margin-top: 9px; font-size: 8px; line-height: 1; letter-spacing: 0; }
.tagline svg { display: block; width: 100%; height: 1em; overflow: visible; }
.tagline text { fill: currentColor; }
.intro-lines { white-space: pre-line; }
.hero-side { position: relative; overflow: hidden; background: #2f2d29; color: var(--white); }
.hero-side video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- sections ---------- */
.block { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: var(--space) var(--gutter) 0; }
.rule {
  display: flex; justify-content: space-between; gap: 20px;
  border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: clamp(40px, 5.5vw, 80px);
  color: var(--soft);
}
.rule-note { text-align: right; }
.intro { font-size: clamp(19px, 2vw, 27px); line-height: 1.4; font-weight: 300; letter-spacing: -.005em; max-width: 34em; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
.cta-gap { margin-top: 40px; }

/* 3. qualities */
.features { display: flex; gap: 28px; align-items: baseline; margin-top: clamp(40px, 5vw, 72px); }
.features .label { color: var(--soft); flex: 0 0 auto; }
.features p { font-size: 14px; color: var(--ink); }

/* 4. full-width break */
.bleed { margin: var(--space) 0 0; }
.bleed img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; object-position: 50% 30%; }

.side-img { aspect-ratio: 4 / 5; overflow: hidden; }
.side-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 6. work: collages ---------- */
.collages { display: flex; flex-direction: column; gap: clamp(120px, 14vw, 220px); }
.collages figure { margin: 0; }
.pip-frame { position: relative; }
.pip-main { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.pip-inset { position: absolute; right: 6%; bottom: 8%; width: 26%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
/* narrow variant for low-resolution clips; inset overlaps the frame edge */
.pip-narrow .pip-frame { width: 64%; }
.pip-narrow .pip-main { aspect-ratio: 3 / 4; }
.pip-narrow .pip-inset { right: -40%; bottom: 10%; width: 52%; }
.pip-narrow-right .pip-frame { margin-left: auto; }
.pip-narrow-right .pip-main { object-position: 50% 85%; }
.pip-narrow-right .pip-inset { right: auto; left: -40%; aspect-ratio: 1; object-position: 50% 100%; }
.pip-narrow-right figcaption { margin-left: auto; width: 64%; }
/* minmax(0, …): rows must not grow to the photos' natural height, or the caption ends up over the images */
.trio-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); height: clamp(460px, 74vw, 980px); }
.trio-grid img { width: 100%; height: 100%; min-height: 0; object-fit: cover; display: block; }
.trio-a { grid-row: 1 / 3; }
/* captions as in Norm: small title, short description, small grey meta */
.collages figcaption { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; max-width: 34em; }
.collages h3 { margin: 0; color: var(--ink); }
.collages figcaption p { font-size: 14px; color: var(--soft); }
.collages figcaption .meta { font-size: 11px; color: var(--soft); }

/* ---------- 7. textures: joined mosaic ---------- */
.mosaic {
  display: grid; gap: 0;
  grid-template-columns: 2fr 1fr 1fr 1fr; grid-template-rows: repeat(3, clamp(180px, 22vw, 340px));
  grid-template-areas: "hand a olive b" "hand c c mustard" "hand d e e";
}
.mosaic figure { margin: 0; overflow: hidden; position: relative; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-hand { grid-area: hand; } .m-hand img { object-position: 50% 28%; } .m-a { grid-area: a; } .m-b { grid-area: b; } .m-c { grid-area: c; }
.m-d { grid-area: d; } .m-e { grid-area: e; } .m-olive { grid-area: olive; } .m-mustard { grid-area: mustard; }
.mosaic figcaption { position: absolute; left: 14px; bottom: 12px; color: var(--white); }

/* ---------- 8. outdoors ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 120px); }
.duo-media { aspect-ratio: 4 / 5; overflow: hidden; }
.duo-media video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 80%; }
.duo-media img { width: 100%; height: 100%; object-fit: cover; }
.srv-media { margin-top: clamp(40px, 5vw, 72px); }
.duo-text { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; border-top: 1px solid var(--line); padding-top: 14px; }
.duo-label { color: var(--soft); }

/* ---------- steps (services, material) ---------- */
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.steps li { display: grid; grid-template-columns: 44px 130px 1fr; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.steps span { font-size: 11px; letter-spacing: .12em; color: var(--soft); }
.steps b { font-weight: 400; }
.steps em { font-style: normal; color: var(--soft); }

/* ---------- 11. colours: flat swatches ---------- */
.strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px 10px; }
.chip { display: block; aspect-ratio: 3 / 4; }
.strip b { display: block; margin-top: 10px; color: var(--soft); }
.strip-note { margin-top: 32px; font-size: 13px; color: var(--soft); max-width: 40em; }
.strip-note + .cta-gap { margin-top: 20px; }

/* ---------- 13. faq ---------- */
.faq { border-top: 1px solid var(--line); max-width: 920px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; padding: 18px 0; font-size: 15px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--soft); font-weight: 300; }
.faq details[open] summary::after { content: "–"; }
.faq summary:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.faq details p { padding: 0 0 22px; color: var(--soft); font-size: 14px; max-width: 40em; }

/* ---------- 14. contact & form ---------- */
.mail { display: inline-block; margin-top: 24px; font-size: clamp(16px, 1.4vw, 19px); }
.ig { margin-top: 16px; }
.form { display: flex; flex-direction: column; gap: 26px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { color: var(--soft); }
.field input, .field select, .field textarea {
  font: 300 16px/1.4 var(--font); color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 8px 0; outline: none;
  -webkit-appearance: none; appearance: none; transition: border-color .3s;
}
.field select { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2375726B'/%3E%3C/svg%3E") right 2px center no-repeat; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); }
.field input.invalid { border-color: var(--ink); }
.form .paren { align-self: flex-start; }
.form-note { min-height: 1.6em; color: var(--soft); font-size: 13px; }
.form-legal { margin-top: -6px; color: var(--soft); font-size: 12px; }
.form-legal a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---------- footer ---------- */
/* top hairline drawn inside the gutters (the logo is a mask, so it can't carry a border) */
.footer {
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: var(--space) auto 0; padding: clamp(48px, 6vw, 80px) var(--gutter) 32px;
  background: linear-gradient(var(--line), var(--line)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
.footer-brand { width: clamp(180px, 26vw, 400px); }
.footer-brand .logo { width: 100%; }
.footer-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 16px; margin-top: clamp(48px, 6vw, 80px); font-size: 13px; }
.footer-row p + p { margin-top: 4px; }
.ft-label { color: var(--soft); margin-bottom: 10px; }

/* ---------- reveal: the only motion ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- tablet ---------- */
@media (max-width: 1024px) {
  .strip { grid-template-columns: repeat(4, 1fr); }
  .footer-row { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .two, .duo { grid-template-columns: 1fr; }
  .features { flex-direction: column; gap: 8px; }
  .bleed img { aspect-ratio: 4 / 5; }
  .pip-main { aspect-ratio: 4 / 5; }
  .pip-inset { width: 38%; }
  .pip-narrow .pip-frame { width: 78%; }
  .pip-narrow .pip-inset { right: -22%; width: 46%; }
  .pip-narrow-right .pip-inset { right: auto; left: -22%; }
  .pip-narrow-right figcaption { width: auto; }
  .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: 120vw repeat(4, 46vw); grid-template-areas: "hand hand" "a olive" "b mustard" "c c" "d e"; }
  .steps li { grid-template-columns: 32px 100px 1fr; }
  .hero { grid-template-columns: 1fr; grid-template-rows: 68svh 42svh; height: auto; }
  .tagline { font-size: 5.6px; margin-top: 6.3px; }
  .header-tools { gap: 20px; }
}
@media (max-width: 600px) {
  .strip { grid-template-columns: repeat(2, 1fr); }
  .header-quote { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
