/* matthewcm.com — styles */
:root {
  --bg: #F2F2F2;
  --ink: #1A1A1A;
  --ink-2: #3D3D3D;
  --muted: #595959;
  --rule: #1A1A1A;
  --line-soft: #CFCFCF;
  --cyan: #1EB4EF;
  --blue: #1872C2;
  --indigo: #4A43A0;
  --plum: #941C6A;
  --pink: #EC1159;
  --mono: 'Fira Mono', Menlo, Consolas, monospace;
  --cond: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --gutter: clamp(20px, 7vw, 144px);
  --tilt: -4deg;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
a { color: var(--ink); }
a:hover { color: var(--indigo); }
:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }
img, svg { display: block; }

.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;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--ink); color: #fff; padding: 10px 16px; text-decoration: none;
}
.skip:focus { top: 12px; color: #fff; }

.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding-inline: var(--gutter); }

/* header */
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; padding-block: 40px;
}
.logo { display: flex; }
.logo svg { width: 64px; height: 64px; }
.nav { display: flex; gap: 28px; flex-wrap: wrap; }
.nav a, .label {
  font-family: var(--cond); font-weight: 500; text-transform: uppercase;
}
.nav a { font-size: 22px; letter-spacing: 0.06em; text-decoration: none; padding-block: 8px; }
.nav a[aria-current="page"] { border-bottom: 2px solid var(--ink); }

/* the typing block */
.block-slot { display: inline-block; white-space: nowrap; }
.block {
  display: inline-block;
  white-space: nowrap;
  unicode-bidi: isolate;
  background: #000;
  color: #fff;
  padding: 0.04em 0.7em 0.08em 0.45em;
  transform: rotate(var(--tilt));
  transform-origin: 50% 55%;
  clip-path: polygon(0.5em 0, 100% 0, calc(100% - 0.5em) 100%, 0 100%);
}
.cursor { color: #8A8A8A; animation: blink 1s steps(1) infinite; }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* home hero */
.hero { padding-block: 72px 120px; display: flex; flex-direction: column; gap: 64px; }
.hero h1 {
  margin: 0; max-width: 1180px; font-weight: 400;
  font-size: clamp(25px, 4.6vw, 68px); line-height: 1.55; letter-spacing: 0.01em;
}
.hero-foot { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; }
.prompt-link {
  font-family: var(--cond); font-weight: 500; font-size: 34px; letter-spacing: 0.04em;
  text-transform: uppercase; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px;
}
.clocks { font-size: 15px; color: var(--muted); }

.stripe { display: flex; height: 8px; }
.stripe span { flex: 1; }
.stripe span:nth-child(1) { background: var(--cyan); }
.stripe span:nth-child(2) { background: var(--blue); }
.stripe span:nth-child(3) { background: var(--indigo); }
.stripe span:nth-child(4) { background: var(--plum); }
.stripe span:nth-child(5) { background: var(--pink); }

/* sections */
.section { padding-top: 112px; display: flex; flex-wrap: wrap; gap: 40px; scroll-margin-top: 24px; }
.section > h2 {
  flex: 1 1 220px; margin: 0;
  font-family: var(--cond); font-weight: 500; font-size: 22px; letter-spacing: 0.08em; text-transform: uppercase;
}
.section > .body { flex: 999 1 720px; min-width: 0; }

.services { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--rule); }
.services li { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 28px 0; border-top: 1px solid var(--rule); }
.services .name { flex: 1 1 340px; font-size: 30px; font-weight: 500; line-height: 1.3; }
.services .desc { flex: 1 1 300px; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.services li:nth-child(4n+1) .gt { color: var(--blue); }
.services li:nth-child(4n+2) .gt { color: var(--indigo); }
.services li:nth-child(4n+3) .gt { color: var(--plum); }
.services li:nth-child(4n+4) .gt { color: var(--pink); }

.about { max-width: 820px; display: flex; flex-direction: column; gap: 24px; font-size: 22px; line-height: 1.7; }
.about p { margin: 0; }

.talk {
  display: block; margin-top: 160px; text-decoration: none;
  border-top: 8px solid var(--plum);
}
.talk .wrap {
  padding-block: 72px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 24px;
}
.talk .big {
  font-family: var(--cond); font-weight: 500; font-size: clamp(48px, 7vw, 96px); line-height: 0.9; text-transform: uppercase;
}
.talk .small { font-size: 16px; color: var(--muted); }
.talk:hover .big { color: var(--plum); }

/* contact */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "head fields" "copy message" "where send";
  column-gap: clamp(48px, 7vw, 112px);
  padding-block: 72px 120px;
}
.c-head { grid-area: head; display: flex; align-items: flex-end; }
.c-fields { grid-area: fields; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 32px 48px; }
.c-copy { grid-area: copy; padding: 56px 0 72px; max-width: 520px; display: flex; flex-direction: column; gap: 18px; color: var(--ink-2); line-height: 1.7; }
.c-copy p { margin: 0; }
.c-message { grid-area: message; padding-top: 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.c-where { grid-area: where; border-top: 1px solid var(--rule); padding-top: 32px; display: flex; flex-direction: column; gap: 8px; }
.c-send { grid-area: send; padding-top: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; align-self: start; }

.c-head h1 {
  margin: 0; display: flex; flex-direction: column; gap: 0.12em;
  font-family: var(--cond); font-weight: 500; font-size: clamp(40px, 4.4vw, 60px);
  line-height: 1.3; letter-spacing: 0.02em; text-transform: uppercase;
}
.c-head .say-line { display: block; height: 1.5em; white-space: nowrap; }
.c-head .block {
  text-transform: none; font-size: 0.82em; padding: 0 0.6em 0.04em 0.4em;
  clip-path: polygon(0.45em 0, 100% 0, calc(100% - 0.45em) 100%, 0 100%);
  font-family: var(--mono), 'Noto Sans', 'Noto Sans Arabic', 'Noto Sans JP', system-ui, sans-serif;
}

.field { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.field label, .c-message label { font-size: 17px; }
.input {
  font: inherit; font-size: 20px; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0;
  padding: 10px 0; min-height: 44px; width: 100%;
}
.input:focus { outline: none; border-bottom-color: var(--plum); box-shadow: 0 1px 0 var(--plum); }
/* Lined message box: exactly 6 lines of 44px. The ruled lines scroll with
   the text (background-attachment: local) and the 6th line is the bottom
   border, so the text always sits on a line. */
textarea.input {
  flex: none; height: 265px; min-height: 0; padding: 0; line-height: 44px;
  resize: none; overflow-y: auto;
  background-color: transparent;
  background-image: repeating-linear-gradient(transparent 0 43px, var(--line-soft) 43px 44px);
  background-size: 100% 44px;
  background-attachment: local;
}
.hp { position: absolute; left: -9999px; }

.where-label { margin: 0 0 8px; font-size: 16px; color: var(--muted); }
.city {
  margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px;
  font-family: var(--cond); font-weight: 500; font-size: 44px; letter-spacing: 0.03em; text-transform: uppercase; line-height: 1.2;
}
.city time { font-family: var(--mono); font-size: 16px; letter-spacing: 0; color: var(--muted); text-transform: none; }

.send {
  font-family: var(--cond); font-weight: 500; font-size: 30px; letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff; background: #000; border: 0; padding: 10px 28px 10px 22px; min-height: 44px; cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.send:hover { background: var(--plum); }
.send[disabled] { opacity: 0.6; cursor: wait; }
.alt { margin: 0; font-size: 16px; color: var(--muted); }
.status { flex-basis: 100%; margin: 0; font-size: 16px; min-height: 1.6em; }
.status.ok { color: var(--ink); }
.status.err { color: #B80D45; }

/* 404 */
.lost { padding-block: 72px 160px; display: flex; flex-direction: column; gap: 40px; }
.lost h1 { margin: 0; font-weight: 400; font-size: clamp(28px, 4.6vw, 64px); line-height: 1.5; }

@media (max-width: 860px) {
  .contact { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "copy" "fields" "message" "send" "where"; }
  .c-copy { padding-bottom: 16px; }
  .c-send { padding-bottom: 56px; }
}
@media (max-width: 520px) {
  .site-header .wrap { padding-block: 24px; }
  .logo svg { width: 52px; height: 52px; }
  .nav { gap: 18px; }
  .nav a { font-size: 20px; }
  .hero { padding-block: 40px 80px; gap: 40px; }
  .section { padding-top: 80px; gap: 24px; }
  .services .name { font-size: 24px; }
  .about { font-size: 19px; }
  .talk { margin-top: 112px; }
  .city { font-size: 38px; }
}
