/* Napkin Labs careers — shared styles.
   Fonts and colors match napkinlabs.com (Work Sans headings, Source Sans body,
   accent #466BF2, near-black #1A1E2E).

   Layout: the page width follows the browser window (up to 80rem). On wide
   screens each section is two columns — heading left, text right — so the
   page uses the full width while lines stay ~75 characters. */

:root {
  --blue: #466bf2;
  --blue-hover: #2f52d4;
  --ink: #1a1e2e;
  --text: #2b3044;
  --muted: #5b6178;
  --line: #dde3f3;
  --tint: #f0f4ff;
  --bg: #ffffff;
  --page: 80rem;
  --measure: 40rem;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --heading: "Work Sans", system-ui, sans-serif;
  --body: "Source Sans 3", "Source Sans Pro", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--blue-hover);
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  font-family: var(--heading);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.375rem, 2vw, 1.625rem);
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

p,
ul {
  margin: 0 0 1rem;
}

ul {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.5rem;
}

strong {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- Page frame ---------- */

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-header {
  background: var(--ink);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  min-height: 4.5rem;
}

.logo {
  display: inline-flex;
  padding: 0.25rem 0;
}

.logo img {
  display: block;
  height: 2rem;
  width: auto;
}

.site-header .logo:focus-visible,
.site-footer a:focus-visible {
  outline-color: #ffffff;
}

.site-footer {
  background: var(--ink);
  color: #c9cede;
  font-size: 0.9375rem;
  margin-top: clamp(3rem, 6vw, 6rem);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.site-footer p {
  margin: 0;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin: 0;
}

.site-footer a {
  color: #ffffff;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration-thickness: 2px;
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3.5rem);
}

.subtitle {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  color: var(--muted);
  margin: 1rem 0 0;
}

.back {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 1.25rem;
}

.back:hover {
  text-decoration: underline;
}

.hero .cta {
  margin: 2rem 0 0;
}

/* ---------- Sections: heading left, text right on wide screens ---------- */

.row {
  border-top: 1px solid var(--line);
  padding: clamp(2rem, 4vw, 3.5rem) 0;
}

.row > h2,
.row > .row-lead {
  margin-bottom: 1.25rem;
}

.row-lead {
  font-size: 1.125rem;
}

.row-body {
  max-width: var(--measure);
}

.row-body > :last-child {
  margin-bottom: 0;
}

@media (min-width: 60rem) {
  .row {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) minmax(0, var(--measure));
    gap: clamp(2rem, 5vw, 6rem);
    align-items: start;
  }

  .row > h2,
  .row > .row-lead {
    margin-bottom: 0;
  }
}

/* ---------- Buttons ---------- */

.button {
  display: inline-block;
  background: var(--blue);
  color: #ffffff;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  padding: 0.8rem 1.4rem;
  border-radius: 8px;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
  background: var(--blue-hover);
  color: #ffffff;
}

.button:active {
  transform: translateY(1px);
}

.button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Button plus a plain-text address, for when mailto: can't open a mail app. */
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.cta-note {
  color: var(--muted);
  font-size: 0.9375rem;
}

.cta-note .email {
  color: var(--ink);
  font-weight: 600;
  user-select: all;
}

.row-body .cta {
  margin-top: 2rem;
}

/* ---------- Landing: role cards ---------- */

.muted {
  color: var(--muted);
  font-weight: 400;
}

.roles {
  display: grid;
  gap: 1.25rem;
  margin: 0 0 2.5rem;
}

.role-card {
  position: relative;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.role-card:hover {
  border-color: var(--blue);
  box-shadow: 0 10px 30px -12px rgba(26, 30, 46, 0.25);
  transform: translateY(-2px);
}

.role-card:focus-within {
  border-color: var(--blue);
}

.role-card h3 {
  margin-bottom: 0.75rem;
}

.role-card p {
  margin-bottom: 1.5rem;
}

/* The whole card is clickable: stretch the "View role" link over the card. */
.role-card .button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
}

.role-card:hover .button {
  background: var(--blue-hover);
}

/* ---------- Job pages: details list (label left, value right) ---------- */

.details {
  list-style: none;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  margin: 0 0 clamp(2.5rem, 5vw, 4rem);
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.details li {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.25rem 1rem;
  padding: 0.6rem 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.details li:first-child {
  border-top: 0;
  padding-top: 0;
}

.details li:last-child {
  padding-bottom: 0;
}

@media (max-width: 30rem) {
  .details li {
    grid-template-columns: 1fr;
  }
}

.fine-print .row-body {
  font-size: 0.9375rem;
  color: var(--muted);
}

.fine-print .row-body strong {
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

.email-link {
  font-weight: 600;
}
