/* nathanfried.com — shared styles on top of the inline press-proof design. */
/* Self-hosted fonts (OFL), so pages render the same everywhere and load fast. */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/assets/fonts/bricolage-grotesque.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/instrument-serif-italic.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/instrument-serif.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/jetbrains-mono-400.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/jetbrains-mono-600.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/inter.woff2) format('woff2'); }

html { scroll-behavior: smooth; overflow-x: clip; }
body { overflow-x: clip; }
.nf-sched-mobile { display: none; }
body { margin: 0; background: #FBFAF6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a, button { -webkit-tap-highlight-color: transparent; }
a[href] { transition: color 150ms ease; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Pressable things answer the press. */
a[style*="padding: 1"], button { transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1), color 150ms ease; }
a[style*="padding: 1"]:active, button:active { transform: scale(0.97); }

:focus-visible { outline: 2px solid #00A3E0; outline-offset: 3px; }

/* ---------- forms (start page) ---------- */
.nf-field { display: flex; flex-direction: column; gap: 8px; }
.nf-field label, .nf-legend { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.nf-field input, .nf-field textarea {
  font: 16px/1.4 Inter, system-ui, sans-serif; color: #111111; background: #FFFFFF;
  border: 1.5px solid #111111; border-radius: 0; padding: 14px 14px; width: 100%; box-sizing: border-box;
}
.nf-field textarea { min-height: 110px; resize: vertical; }
.nf-field input:focus, .nf-field textarea:focus { outline: none; border-color: #E6007E; box-shadow: 0 0 0 3px rgba(230,0,126,0.15); }
.nf-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.nf-choice label {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1.5px solid #111111; background: #FFFFFF; cursor: pointer;
  font-family: Inter, sans-serif; font-size: 15px; font-weight: 600; text-transform: none; letter-spacing: 0;
  transition: background-color 150ms ease, color 150ms ease;
}
.nf-choice label span { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; font-weight: 400; color: #6B675E; }
.nf-choice input { position: absolute; opacity: 0; pointer-events: none; }
.nf-choice input:checked + label, .nf-choice label:has(input:checked) { background: #111111; color: #FFFFFF; }
.nf-choice label:has(input:checked) span { color: #B5B1A6; }
.nf-choice label:has(input:focus-visible) { outline: 2px solid #00A3E0; outline-offset: 3px; }
.nf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nf-submit {
  align-self: flex-start; border: none; background: #E6007E; color: #FFFFFF; cursor: pointer;
  padding: 17px 28px; font-family: 'JetBrains Mono', monospace; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase;
}
.nf-submit[disabled] { opacity: 0.6; cursor: progress; }
.nf-msg { font-family: 'JetBrains Mono', monospace; font-size: 13px; min-height: 1.4em; margin: 0; }
.nf-msg.err { color: #B0005F; }
.nf-done { display: none; }
form.sent .nf-fields { display: none; }
form.sent .nf-done { display: flex; }

/* ---------- work page sort pills ---------- */
.nf-pill {
  border: 1.5px solid #111111; background: #FFFFFF; color: #111111; cursor: pointer;
  padding: 10px 18px; font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
  transition: background-color 150ms ease, color 150ms ease, transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}
.nf-pill[aria-pressed="true"] { background: #111111; color: #FFFFFF; }

/* ---------- tablet ---------- */
@media (max-width: 1020px) {
  [style*="grid-template-columns: repeat(12"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns: repeat(12"] > [style*="grid-column"] { grid-column: 1 / -1 !important; }
  [style*="grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px"] { gap: 40px !important; }
  h1[style*="font-size: 92px"] { font-size: 76px !important; }
  /* margin note under the headline instead of beside it */
  [style*="grid-column: span 3; position: relative"] { border-left: none !important; border-top: 1px solid currentColor; padding-left: 0 !important; padding-top: 16px; max-width: 420px; }
}

/* ---------- phone ---------- */
@media (max-width: 720px) {
  [style*="max-width: 1240px; margin: 0 auto; padding"] { padding-left: 16px !important; padding-right: 16px !important; }
  [style*="padding: 96px 32px"], [style*="padding: 88px 32px"] { padding-top: 64px !important; padding-bottom: 64px !important; }
  /* the trim box: smaller margins so crop marks still fit */
  [style*="position: relative; margin: 36px; padding: 80px 72px 72px"] { margin: 28px 20px !important; padding: 36px 20px 32px !important; }
  h1[style*="font-size: 92px"] { font-size: 48px !important; }
  h2[style*="font-size: calc(76px"], h2[style*="font-size: calc(72px"] { font-size: 44px !important; }
  h2[style*="font-size: calc(120px"] { font-size: 72px !important; }
  [style*="grid-template-columns: repeat(3, minmax(0, 1fr))"] { grid-template-columns: 1fr !important; }
  .nf-choice { grid-template-columns: 1fr; }
  /* production schedule: scroll sideways inside its box */
  .nf-sched-wrap { display: none; }
  .nf-sched-mobile { display: block; }
  /* rate-card rows: detail drops under the plan name */
  [style*="display: flex; align-items: baseline; gap: 16px; padding: 20px 0"] { flex-wrap: wrap; row-gap: 4px !important; }
  [style*="display: flex; align-items: baseline; gap: 16px; padding: 20px 0"] > span:nth-child(2) { order: 3; flex-basis: 100%; }
  /* nav: brand on top, links scroll */
  header nav { gap: 18px !important; font-size: 12px !important; }
  header [style*="height: 88px"] { height: auto !important; padding-top: 16px !important; padding-bottom: 16px !important; row-gap: 12px !important; }
}

/* Home light table on phones: one placeholder proof is enough. */
@media (max-width: 720px) {
  [style*="grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px"]:not(#proofs) > :nth-child(n+2) { display: none; }
}

.nf-nowrap { white-space: nowrap; }
@media (max-width: 720px) { .nf-nowrap { white-space: normal; } }
.nf-rates[hidden] { display: none !important; }

/* Hero: once the note can't sit beside the buttons, it's hidden. */
@media (max-width: 1020px) {
  .nf-note, .nf-lede { grid-row: auto !important; }
  .nf-note { display: none !important; } /* would only sit under the buttons */
}

/* Job ticket list: its top rule lines up with the top of "Everything" on
   wide screens; stacked, it simply follows the heading. */
@media (max-width: 1020px) { .nf-ticket-list { margin-top: 0 !important; } }

/* The footer's colour bar is the divider: no black rule on top of it. */
section:has(+ footer) { border-bottom: 0 !important; }

/* Phones only: drop the file-name slug and the hero margin note. */
@media (max-width: 720px) {
  [style*="padding: 10px 32px; display: flex; justify-content: space-between"] > span:first-child { display: none; }
  .nf-note { display: none !important; }
  /* no menu in the header: visitors just scroll */
  header nav { display: none !important; }
}
