/* glikstein.ca: one sheet for every page. Colours and type are the C-22 brief's own
   (c22brief.sty: ink, secondary, muted, rule, tint, accent; Source Serif 4, subset and renamed
   under OFL 1.1, see fonts/LICENSE-SourceSerif4.md). One language per page, the other one a
   link away in the masthead. No JavaScript anywhere on the site. */

@font-face {
  font-family: "GS Text";
  src: url("fonts/gs-text-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "GS Text";
  src: url("fonts/gs-text-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "GS Subhead";
  src: url("fonts/gs-subhead-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "GS Display";
  src: url("fonts/gs-display-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: block;
}

:root {
  --paper: #ffffff;
  --ink: #000000;
  --secondary: #3b4149;
  --muted: #5b6470;
  --rule: #c9ced6;
  --tint: #e9eff7;
  --accent: #1d4e89;

  --text: "GS Text", Georgia, "Times New Roman", serif;
  --subhead: "GS Subhead", var(--text);
  --display: "GS Display", var(--text);

  --measure: 38rem;     /* about 70 characters of the text face */
  --side: 1.25rem;      /* page margin on a phone */
  --bleed: var(--side); /* how far the contact panel reaches past the text */
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variant-numeric: oldstyle-nums proportional-nums;
  font-kerning: normal;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sheet {
  max-width: calc(var(--measure) + 2 * var(--side));
  margin: 0 auto;
  padding: 0 var(--side);
}

/* Masthead: the site's two pages, the one shown in ink and the other a link, then the other language. */
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.25rem 0 0;
  font-size: 1rem;
}
.masthead .pages { display: flex; gap: 1.25rem; }
.masthead .pages a { letter-spacing: 0.01em; }
.masthead .pages a[aria-current="page"] { color: var(--ink); text-decoration: none; }

/* The title: the page's only large type, the same in both languages. It hangs a hair to the left
   so the stem of the first letter lines up with the text below. The display face is subset to the
   letters of "tako" and "Dan Glikstein"; any other title needs a new subset. */
.title {
  margin: 0 0 0 -0.04em;
  padding: clamp(1.5rem, 5vw, 3rem) 0 clamp(1.25rem, 3vw, 2rem);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(4.5rem, 21vw, 8.5rem);
  line-height: 0.82;
  letter-spacing: -0.035em;
  hyphens: none;
}
.title-small { font-size: clamp(3rem, 13vw, 4.5rem); }
.title-name { font-size: clamp(3.25rem, 13.5vw, 6.25rem); letter-spacing: -0.03em; }

main p { margin: 0 0 1.1rem; }
.notfound { margin-top: clamp(2.5rem, 8vw, 4.5rem); }
.nw { white-space: nowrap; } /* a hyphenated word kept on one line */
.lead { font-size: 1.25rem; line-height: 1.5; }

h2 {
  margin: 2.75rem 0 0.75rem;
  font-family: var(--subhead);
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.005em;
  hyphens: manual;
  text-wrap: balance;
}

/* The services: one per row, ruled off from each other so each reads as a separate offer. */
.offers { list-style: none; margin: 1.5rem 0 0; padding: 0; border-top: 1px solid var(--rule); }
.offers li { padding: 0.8rem 0 0.85rem; border-bottom: 1px solid var(--rule); }

/* The one place to act: the contact paragraph and the form, on the brief's tint. The panel
   reaches past the text on both sides so the text inside it stays on the page's left edge. */
.contact {
  background: var(--tint);
  margin: 3.25rem calc(-1 * var(--bleed)) 3rem;
  padding: 0.25rem var(--bleed) 2rem;
}
.contact h2 { margin-top: 1.75rem; }
.contact form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem 1.25rem;
  margin-top: 1.5rem;
}
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field.wide, .notice, .actions { grid-column: 1 / -1; }
label { font-size: 1rem; color: var(--secondary); }
label .opt { color: var(--muted); }
input[type="text"], input[type="email"], textarea {
  font: inherit;
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--muted);
  border-radius: 0;
  padding: 0.55rem 0.7rem;
  width: 100%;
}
textarea { min-height: 10rem; resize: vertical; line-height: 1.55; }
input:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--accent); }
.actions { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
button {
  font: inherit;
  font-size: 1.0625rem;
  color: var(--paper);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 0;
  padding: 0.6rem 1.75rem;
  cursor: pointer;
}
button:hover { background: #163d6c; }

/* A field only software fills in. Kept off screen and out of the tab order. */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice {
  margin: 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--paper);
}
.notice:empty { display: none; }

.colophon {
  border-top: 1px solid var(--rule);
  padding: 1.25rem 0 2.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
}
.colophon p { margin: 0; }

/* Wider than a phone: a larger body and lead, two fields to a row, a deeper contact panel. */
@media (min-width: 40rem) {
  :root { --bleed: 2rem; }
  body { font-size: 1.125rem; line-height: 1.65; }
  .lead { font-size: 1.375rem; }
  h2 { font-size: 1.5rem; }
  .contact { padding-bottom: 2.25rem; }
  .contact form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
