/* m43rts.com — one pager. Reference: Claude Design "m43 One Pager". */

@font-face { font-family: Archivo; src: url(fonts/archivo.woff2) format("woff2"); font-weight: 100 900; font-stretch: 100%; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/plexmono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/plexmono-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #0a0a0a;
  --paper: #fff;
  --text: #3d3d3d;
  --muted: #595959;
  --faint: #8a8a8a;
  --tint: #f4f4f2;
  --line: 3px solid var(--ink);
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Archivo, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* The whole site fits in one screen; below 560px of height the page scrolls instead of squeezing. */
.page { height: max(100vh, 560px); height: max(100svh, 560px); display: flex; flex-direction: column; overflow: hidden; }

/* ---------- Top bar ---------- */
.top { flex: none; display: flex; align-items: stretch; justify-content: space-between; border-bottom: var(--line); }
.brand { display: flex; align-items: center; gap: 14px; padding: 12px 18px; text-decoration: none; font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; min-width: 0; }
.brand-logo { background: var(--ink); color: var(--paper); font-weight: 600; font-size: 14px; letter-spacing: 0.08em; padding: 5px 9px; text-transform: none; }
.brand-name { letter-spacing: 0.18em; white-space: nowrap; }
.brand-role { letter-spacing: 0.14em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang { display: flex; align-items: stretch; border-left: var(--line); font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; }
.lang > * { display: flex; align-items: center; padding: 0 11px; text-decoration: none; }
.lang [aria-current] { background: var(--ink); color: var(--paper); }
.lang a { color: #666; }
.lang a:hover { color: var(--ink); }

/* ---------- Views: home by default, work when #work is targeted ---------- */
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#work { display: none; }
#work:target { display: flex; }
#work:target ~ .home { display: none; }

/* ---------- Home: hero ---------- */
.hero { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); border-bottom: var(--line); overflow: hidden; }
.hero-main { padding: clamp(10px, 2.2vh, 32px) clamp(18px, 2.4vw, 34px); border-right: var(--line); display: flex; flex-direction: column; gap: clamp(10px, 1.6vh, 20px); min-height: 0; overflow: hidden; }
.intro { display: flex; flex-direction: column; gap: clamp(5px, 1.1vh, 16px); }
.eyebrow { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.intro h1 { font-size: clamp(24px, min(4.3vw, 5.2vh), 52px); line-height: 1.03; font-weight: 800; letter-spacing: -0.03em; text-wrap: pretty; }
.intro p { max-width: 46ch; font-size: clamp(12.5px, 1.85vh, 17px); line-height: 1.45; color: var(--text); }
.hero-lower { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: space-evenly; gap: clamp(10px, 1.6vh, 20px); }

/* Recent work */
.recent { display: flex; flex-direction: column; gap: clamp(5px, 1vh, 10px); min-height: 0; flex-shrink: 1; overflow: hidden; }
.recent-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
.recent-head span { letter-spacing: 0.2em; color: var(--muted); }
.recent-head a { letter-spacing: 0.14em; text-underline-offset: 3px; white-space: nowrap; }
.recent-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 8px; }
.recent-card, .recent-more { background: var(--paper); border: var(--line); text-decoration: none; }
.recent-card { padding: clamp(6px, 1.1vh, 10px) 10px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.recent-card .idx { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--faint); }
.recent-card .name { font-weight: 800; font-size: clamp(12px, 1.75vh, 14px); letter-spacing: -0.01em; text-transform: uppercase; }
.recent-card .kind { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-more { display: flex; align-items: center; padding: 0 clamp(10px, 1.2vw, 16px); font-family: var(--mono); font-weight: 600; font-size: 16px; letter-spacing: 0.1em; line-height: 1; }

/* Contact box */
.contact { flex: none; border: var(--line); display: flex; flex-direction: column; }
.contact-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: clamp(6px, 1.1vh, 10px) 14px; border-bottom: var(--line); background: var(--ink); color: var(--paper); font-family: var(--mono); text-transform: uppercase; }
.contact-head strong { font-weight: 400; font-size: 11.5px; letter-spacing: 0.14em; white-space: nowrap; }
.contact-head span { font-size: 11px; letter-spacing: 0.14em; color: #b5b5b5; text-align: right; }
.callback { display: flex; align-items: stretch; }
.callback input[type="tel"] { flex: 1; min-width: 0; border: none; outline: none; border-radius: 0; padding: clamp(8px, 1.4vh, 14px) 14px; font-family: var(--mono); font-size: clamp(13px, 1.8vh, 15px); letter-spacing: 0.06em; background: var(--paper); color: var(--ink); }
.callback input[type="tel"]::placeholder { color: var(--faint); }
.callback input[type="tel"]:focus-visible { background: var(--tint); }
.callback button { border: none; border-left: var(--line); border-radius: 0; background: var(--paper); padding: clamp(8px, 1.4vh, 14px) 20px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.callback button:disabled { cursor: progress; }
.callback .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.callback-msg { display: flex; align-items: center; gap: 10px; padding: clamp(8px, 1.4vh, 14px) 14px; font-size: 15px; }
.callback-msg .mark { font-family: var(--mono); font-size: 13px; }
.callback-msg button { margin-left: auto; border: none; background: transparent; padding: 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.contact-links { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: var(--line); }
.contact-links a { display: flex; align-items: center; gap: 10px; padding: clamp(7px, 1.3vh, 12px) 14px; text-decoration: none; min-width: 0; font-family: var(--mono); }
.contact-links a:first-child { border-right: var(--line); }
.contact-links .label { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.contact-links .value { font-size: clamp(11px, 1.6vh, 12.5px); letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Inverted hover, shared */
.recent-card:hover, .recent-more:hover, .callback button:not(:disabled):hover, .contact-links a:hover,
.recent-card:focus-visible, .recent-more:focus-visible, .callback button:focus-visible, .contact-links a:focus-visible { background: var(--ink); color: var(--paper); outline: none; }
.contact-links a:hover .label, .contact-links a:focus-visible .label { color: #b5b5b5; }

/* Photo + facts */
.hero-side { display: flex; flex-direction: column; min-height: 0; }
.photo { flex: 1; min-height: 0; position: relative; overflow: hidden; border-bottom: var(--line); background: var(--tint); }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.facts { flex: none; display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.facts div { padding: clamp(7px, 1.2vh, 11px) 14px; }
.facts div:nth-child(odd) { border-right: var(--line); }
.facts div:nth-child(-n+2) { border-bottom: var(--line); }
.facts dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 3px 0 0; font-weight: 700; font-size: clamp(12px, 1.85vh, 14px); }

/* ---------- Home: offer ---------- */
.offers { flex: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.offer { padding: clamp(10px, 1.9vh, 18px) clamp(14px, 1.6vw, 20px) clamp(11px, 1.9vh, 20px); display: flex; flex-direction: column; gap: clamp(4px, 0.9vh, 9px); }
.offer:not(:last-child) { border-right: var(--line); }
.offer h2 { display: flex; align-items: baseline; gap: 10px; font-size: clamp(15px, 2.2vh, 19px); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; text-transform: uppercase; }
.offer h2 span { font-family: var(--mono); font-size: clamp(15px, 2.3vh, 20px); font-weight: 600; line-height: 1; letter-spacing: 0; }
.offer p { font-size: clamp(11.5px, 1.65vh, 14px); line-height: 1.4; color: var(--text); }
.offer.inverse { background: var(--ink); color: var(--paper); }
.offer.inverse p { color: #d6d6d6; }

/* ---------- Work ---------- */
.work-head { flex: none; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: var(--line); font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; }
.work-head h2 { font: inherit; letter-spacing: 0.2em; }
.work-head a { letter-spacing: 0.14em; text-underline-offset: 3px; white-space: nowrap; }
.work-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 1fr 1fr; gap: 3px; background: var(--ink); }
.project { background: var(--paper); padding: clamp(10px, 1.8vh, 16px) 16px clamp(9px, 1.6vh, 14px); display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: hidden; }
.project-meta { display: flex; align-items: baseline; justify-content: space-between; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--muted); }
.project-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.project-title h3 { font-size: clamp(16px, 2.4vh, 21px); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; text-transform: uppercase; min-width: 0; }
.project-title a, .project-title span { flex: none; font-family: var(--mono); font-size: 10.5px; white-space: nowrap; }
.project-title a { letter-spacing: 0.06em; text-underline-offset: 3px; }
.project-title span { letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.project p { flex-shrink: 0; font-size: clamp(11px, 1.6vh, 13px); line-height: 1.4; color: var(--text); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 8; line-clamp: 8; overflow: hidden; }
.project.has-shot p { -webkit-line-clamp: 2; line-clamp: 2; }
.shot { flex: 1 1 auto; min-height: clamp(40px, 10vh, 140px); margin: 4px 0; position: relative; border: var(--line); background: var(--tint); overflow: hidden; }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.tags { margin: auto 0 0; padding: 0; list-style: none; display: flex; flex-wrap: nowrap; overflow: hidden; flex-shrink: 0; gap: 5px; align-items: center; }
.tags li { background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; padding: 3px 6px; text-transform: uppercase; white-space: nowrap; }

/* ---------- Footer ---------- */
.foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 7px 18px; border-top: var(--line); font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--muted); white-space: nowrap; overflow: hidden; }

/* ---------- Narrow screens: the one-screen layout becomes a normal scrolling page ---------- */
@media (max-width: 860px) {
  .page { height: auto; min-height: 100svh; overflow: visible; }
  .brand-role { display: none; }
  #work { scroll-margin-top: 60px; }
  .hero { display: flex; flex-direction: column; overflow: visible; }
  .hero-main { border-right: none; border-bottom: var(--line); padding: 22px 18px; gap: 22px; overflow: visible; }
  .intro { gap: 12px; }
  .intro h1 { font-size: clamp(28px, 8vw, 44px); }
  .intro p { font-size: 15.5px; }
  .hero-lower { gap: 22px; }
  .recent { overflow: visible; }
  .recent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recent-card { padding: 10px; }
  .recent-card .name { font-size: 14px; }
  .recent-more { justify-content: center; min-height: 44px; }
  .contact-head { flex-wrap: wrap; gap: 4px 16px; padding: 10px 14px; }
  .contact-head span { text-align: left; }
  .callback input[type="tel"] { font-size: 16px; padding: 14px; }
  .callback button { padding: 14px 16px; }
  .callback-msg { padding: 14px; flex-wrap: wrap; }
  .contact-links a { padding: 12px 14px; }
  .photo { flex: none; aspect-ratio: 4 / 3; }
  .facts div { padding: 11px 14px; }
  .facts dd { font-size: 14px; }
  .offers { grid-template-columns: 1fr; }
  .offer { padding: 18px; gap: 8px; }
  .offer:not(:last-child) { border-right: none; border-bottom: var(--line); }
  .offer h2 { font-size: 19px; }
  .offer h2 span { font-size: 20px; }
  .offer p { font-size: 14px; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .project { padding: 16px; overflow: visible; }
  .project-title h3 { font-size: 20px; }
  .project p, .project.has-shot p { font-size: 13.5px; display: block; overflow: visible; }
  .shot { flex: none; min-height: 0; aspect-ratio: 16 / 10; }
  .tags { flex-wrap: wrap; margin-top: auto; }
  .foot { flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 18px; white-space: normal; }
}
@media (max-width: 520px) {
  .contact-links { grid-template-columns: 1fr; }
  .contact-links a:first-child { border-right: none; border-bottom: var(--line); }
  .work-grid { grid-template-columns: 1fr; }
  .project-title { flex-wrap: wrap; }
}

/* ---------- 404 ---------- */
.notfound { justify-content: center; gap: 14px; padding: 18px clamp(18px, 2.4vw, 34px); }
.notfound h1 { font-size: clamp(28px, 6vw, 52px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.03; }
.notfound p { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.notfound a { text-underline-offset: 3px; }
