/* ==========================================================================
   karuti.com - site stylesheet
   Hand-written, mobile-first. Breakpoints: 480px, 768px, 1024px.
   Light theme only.
   ========================================================================== */

:root {
  color-scheme: only light;

  --c-bg: #ffffff;
  --c-ink: #111417;
  --c-text: #1f262b;
  --c-muted: #4a555c;
  --c-teal: #0b6a85;
  --c-teal-dark: #084f64;
  --c-tint: #eaf3f6;
  --c-card: #eceff1;
  --c-rule: #cbd5da;
  --c-white: #ffffff;

  --font-sans: "Source Sans 3", "Source Sans Pro", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", Times, serif;

  --wrap: 768px;
  --gutter: 16px;
  --radius: 3px;
}

/* ---------- Base ---------- */

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

html {
  background-color: var(--c-bg);
  color: var(--c-text);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
  line-height: 1.55;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

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

img {
  display: block;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-weight: 700;
}

p {
  margin: 0 0 1.1em;
}

ul,
ol {
  margin: 0 0 1.25em;
  padding-left: 1.3em;
}

li {
  margin-bottom: 0.55em;
  padding-left: 0.2em;
}

li::marker {
  color: var(--c-teal);
}

strong {
  color: var(--c-ink);
}

a {
  color: var(--c-teal);
}

a:hover {
  color: var(--c-teal-dark);
}

:focus-visible {
  outline: 3px solid var(--c-ink);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 20;
  padding: 12px 16px;
  background-color: var(--c-ink);
  color: var(--c-white);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--c-white);
}

/* ---------- Layout wrappers ---------- */

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

/* ---------- Masthead ---------- */

.masthead {
  background-color: var(--c-bg);
  color: var(--c-ink);
  border-bottom: 1px solid var(--c-ink);
}

.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 12px;
  max-width: 1032px;
  min-height: 64px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.masthead__brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--c-ink);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.masthead__brand:hover {
  color: var(--c-teal);
}

.masthead__label {
  padding: 4px 8px;
  border: 1px solid var(--c-teal);
  border-radius: 2px;
  background-color: var(--c-bg);
  color: var(--c-teal);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.masthead--simple .masthead__label {
  margin-left: auto;
}

.masthead__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin-left: auto;
  padding: 0 14px;
  border: 1px solid var(--c-ink);
  border-radius: var(--radius);
  background-color: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.masthead__toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  margin: -3px 0 0 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.masthead__toggle[aria-expanded="true"]::after {
  margin-top: 3px;
  transform: rotate(-135deg);
}

.masthead__toggle:hover {
  background-color: var(--c-ink);
  color: var(--c-white);
}

.masthead--js .masthead__toggle {
  display: inline-flex;
}

.masthead__nav {
  flex: 1 0 100%;
  order: 3;
  background-color: var(--c-bg);
}

.masthead--js .masthead__nav {
  display: none;
}

.masthead--js.masthead--open .masthead__nav {
  display: block;
}

.masthead__nav ul {
  margin: 0;
  padding: 0 0 8px;
  list-style: none;
}

.masthead__nav li {
  margin: 0;
  padding: 0;
}

.masthead__nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  border-top: 1px solid var(--c-rule);
  color: var(--c-teal);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.masthead__nav a:hover {
  color: var(--c-ink);
}

/* ---------- Article header ---------- */

.article__head {
  padding-top: 32px;
}

.article__title {
  font-size: clamp(1.5rem, 1.05rem + 1.9vw, 2.25rem);
  line-height: 1.14;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

.article__dek {
  margin: 18px 0 0;
  color: var(--c-ink);
  font-size: 1.1875rem;
  line-height: 1.5;
}

.article__byline {
  margin: 16px 0 0;
  color: var(--c-muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

/* ---------- Figures and media ---------- */

.figure {
  margin-block: 32px;
  margin-inline: 0;
}

.figure--hero {
  margin-block: 28px 0;
}

.figure--hero.wrap {
  margin-inline: auto;
}

.figure__img {
  display: block;
  width: 100%;
  height: auto;
  background-color: var(--c-card);
}

.figure__caption {
  margin: 8px 0 0;
  color: var(--c-muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

.media {
  position: relative;
  width: 100%;
  aspect-ratio: 40 / 21;
  overflow: hidden;
  background-color: var(--c-ink);
}

.media__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pair {
  display: grid;
  gap: 32px;
  margin: 36px 0 0;
}

.pair__item {
  margin: 0;
}

.pair__title {
  margin: 12px 0 0;
  color: var(--c-teal);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

/* ---------- Sections ---------- */

.intro {
  padding: 32px 0 8px;
  background-color: var(--c-bg);
  color: var(--c-text);
}

.section {
  padding: 40px 0;
  background-color: var(--c-bg);
  color: var(--c-text);
}

.section--tint {
  background-color: var(--c-tint);
}

.intro + .section,
.section:not(.section--tint) + .section:not(.section--tint) {
  padding-top: 0;
}

.intro + .section {
  padding-top: 24px;
}

.section .wrap > :last-child {
  margin-bottom: 0;
}

.kicker {
  display: block;
  margin: 0 0 8px;
  color: var(--c-teal);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
}

.section__title {
  margin: 0 0 8px;
  font-size: clamp(1.3125rem, 1.15rem + 0.7vw, 1.625rem);
  line-height: 1.22;
}

/* ---------- Q&A ---------- */

.page {
  min-width: 320px;
}

.article,
.qa {
  margin: 0;
}

.qa__q {
  margin: 28px 0 14px;
  padding: 14px 16px 16px;
  background-color: var(--c-card);
  color: #1c262c;
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
}

.qa__label {
  display: block;
  margin-bottom: 6px;
  color: var(--c-teal);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.section--tint .qa__q {
  background-color: var(--c-white);
}

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

.steps {
  margin-top: 0.4em;
}

/* ---------- Table ---------- */

.table-block {
  margin: 20px 0 8px;
}

.data-table {
  display: block;
  width: 100%;
  border-collapse: collapse;
  color: var(--c-text);
  font-size: 1rem;
  line-height: 1.45;
}

.data-table thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.data-table tbody,
.data-table tr,
.data-table th,
.data-table td {
  display: block;
}

.data-table tr {
  margin-bottom: 14px;
  border: 1px solid var(--c-rule);
  background-color: var(--c-bg);
}

.data-table tbody th {
  padding: 10px 14px;
  background-color: var(--c-teal);
  color: var(--c-white);
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
}

.data-table td {
  padding: 10px 14px 0;
}

.data-table td:last-child {
  padding-bottom: 12px;
}

.data-table td::before {
  content: attr(data-label);
  display: block;
  color: var(--c-teal);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-table__caption {
  display: block;
  margin-top: 4px;
  color: var(--c-muted);
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: left;
}

/* ---------- Calls to action ---------- */

.cta {
  padding: 36px 0 8px;
}

.cta::before {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  margin-bottom: 20px;
  background-color: var(--c-teal);
}

.cta__lead {
  margin: 0 0 16px;
  color: var(--c-ink);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.cta__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 24px;
  border-radius: var(--radius);
  background-color: var(--c-teal);
  color: var(--c-white);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.cta__btn::after {
  content: "\2192";
  font-size: 1.125rem;
  transition: transform 0.2s ease;
}

.cta__btn:hover {
  background-color: var(--c-teal-dark);
  color: var(--c-white);
}

.cta__btn:hover::after {
  transform: translateX(4px);
}

.cta__btn:focus-visible {
  outline: 3px solid var(--c-ink);
  outline-offset: 3px;
}

.leave-note {
  margin: 10px 0 0;
  color: var(--c-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.section--tint .cta {
  padding-bottom: 0;
}

/* ---------- Documents (about + legal pages) ---------- */

.doc {
  padding-top: 24px;
  padding-bottom: 56px;
  background-color: var(--c-bg);
  color: var(--c-text);
}

.page--doc .doc__title {
  margin: 0;
}

.doc__back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 8px;
  color: var(--c-teal);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}

.doc__back:hover {
  color: var(--c-ink);
  text-decoration: underline;
}

.doc-dates {
  margin: 14px 0 24px;
  color: var(--c-muted);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.doc__lead {
  margin: 18px 0 0;
  color: var(--c-ink);
  font-size: 1.1875rem;
  line-height: 1.5;
}

.doc__title + .doc__lead {
  margin-bottom: 8px;
}

.doc h2 {
  margin: 36px 0 10px;
  font-size: 1.3125rem;
  line-height: 1.25;
}

.doc address {
  margin: 0 0 1.25em;
  font-style: normal;
}

/* ---------- Footer ---------- */

.page-footer {
  padding: 56px 0 48px;
  background-color: var(--c-bg);
  color: var(--c-muted);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.page-footer__imprint p {
  margin: 0 0 2px;
  color: var(--c-muted);
}

.page-footer__imprint .page-footer__name {
  margin-bottom: 4px;
  color: var(--c-ink);
  font-weight: 700;
}

.page-footer__legal {
  margin: 14px 0 12px;
}

.page-footer__legal ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-footer__legal li {
  margin: 0;
  padding: 0;
}

.page-footer__legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background-color: var(--c-bg);
  color: var(--c-ink);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.page-footer__legal a:hover {
  color: var(--c-teal);
  text-decoration: underline;
}

.byline-note {
  max-width: 62ch;
  margin: 0;
  color: var(--c-muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* ==========================================================================
   >= 480px
   ========================================================================== */

@media (min-width: 480px) {
  :root {
    --gutter: 24px;
  }

  .cta__btn {
    display: inline-flex;
    min-width: 280px;
  }
}

/* ==========================================================================
   >= 768px
   ========================================================================== */

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
  }

  .masthead__inner {
    flex-wrap: nowrap;
    min-height: 88px;
  }

  .masthead__brand {
    font-size: 1.75rem;
  }

  .masthead__label {
    order: 2;
    margin-left: auto;
  }

  .masthead--js .masthead__toggle,
  .masthead__toggle {
    display: none;
  }

  .masthead--js .masthead__nav,
  .masthead__nav {
    display: block;
    flex: 1 1 auto;
    order: 1;
    margin-left: 40px;
  }

  .masthead__nav ul {
    display: flex;
    gap: 30px;
    padding: 0;
  }

  .masthead__nav a {
    min-height: 44px;
    border-top: 0;
    font-size: 0.9375rem;
  }

  .article__head {
    padding-top: 48px;
  }

  .article__dek {
    margin-top: 22px;
  }

  .figure--hero {
    margin-block: 32px 0;
  }

  .intro {
    padding-top: 40px;
  }

  .section {
    padding: 56px 0;
  }

  .qa__q {
    padding: 16px 20px 18px;
    font-size: 1.125rem;
  }

  .pair {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  /* Table returns to a true grid */
  .data-table {
    display: table;
    table-layout: fixed;
    font-size: 0.9375rem;
  }

  .data-table thead {
    position: static;
    display: table-header-group;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }

  .data-table tbody {
    display: table-row-group;
  }

  .data-table tr {
    display: table-row;
    margin: 0;
    border: 0;
  }

  .data-table th,
  .data-table td {
    display: table-cell;
    padding: 12px 14px;
    border: 1px solid var(--c-rule);
    vertical-align: top;
  }

  .data-table thead th {
    border-color: var(--c-teal);
    background-color: var(--c-teal);
    color: var(--c-white);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: left;
  }

  .data-table tbody th {
    background-color: #f2f7f9;
    color: var(--c-ink);
    font-size: 0.9375rem;
  }

  .data-table td {
    padding: 12px 14px;
  }

  .data-table td:last-child {
    padding-bottom: 12px;
  }

  .data-table td::before {
    display: none;
  }

  .data-table__caption {
    display: table-caption;
    caption-side: bottom;
    margin-top: 0;
    padding-top: 10px;
  }

  .cta {
    padding-top: 44px;
  }

  .doc {
    padding-top: 36px;
    padding-bottom: 80px;
  }

  .page-footer {
    padding: 72px 0 64px;
  }
}

/* ==========================================================================
   >= 1024px
   ========================================================================== */

@media (min-width: 1024px) {
  .masthead__nav ul {
    gap: 38px;
  }

  .article__head {
    padding-top: 56px;
  }

  .section {
    padding: 64px 0;
  }

  .figure {
    margin-block: 40px;
  }

  .figure--hero {
    margin-block: 36px 0;
  }
}

/* ---------- Motion preference ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
