/* Klara · manifesto site. One centred column, brand paper and ink, nothing extra. */
:root {
  --paper: #F6F0E9;
  --ink: #231C16;
  --ink-2: #51463D;
  --mute: rgba(35, 28, 22, .55);
  --line: rgba(35, 28, 22, .11);
  --field: #FFFCF8;
  --terra: #C8562A;
  --terra-deep: #97391A;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --col: 640px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(200, 86, 42, .18); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.shell {
  min-height: 100svh; display: flex; flex-direction: column;
  max-width: 1120px; margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}

/* header + footer: the same quiet line top and bottom */
.top { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.top .brand { display: block; line-height: 0; }
.top .brand img { width: 104px; }
.top nav a { text-decoration: none; font-size: 15px; color: var(--ink-2); }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); }
.foot {
  margin-top: auto; display: flex; justify-content: space-between; gap: 16px;
  padding: 32px 0 calc(32px + env(safe-area-inset-bottom, 0px)); font-size: 13px; color: var(--mute);
}

/* button */
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 18px;
  border: 0; border-radius: 12px; background: var(--ink); color: var(--paper);
  font: 500 15px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s;
}
.btn:hover { background: #000; }

/* halo */
.halo { position: relative; }
.halo img { width: 100%; }
.led {
  position: absolute; left: var(--x); top: var(--y); width: 4.2%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255,140,90,.95) 0 22%, rgba(255,96,48,.45) 38%, rgba(255,90,40,0) 70%);
  animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: .2; } 50% { opacity: .9; } }

/* ---------- home: one centred column ---------- */
.home { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8px 0 40px; }
.halo-home { width: clamp(180px, 22vw, 248px); margin-bottom: 36px; }
.home h1 { font: 400 clamp(36px, 4.6vw, 52px)/1.08 var(--serif); letter-spacing: -0.028em; margin: 0; text-wrap: balance; }
.home .lede { max-width: 500px; margin-top: 22px; font-size: 17px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }

.join { width: 100%; max-width: 440px; margin-top: 36px; }
.join-row {
  display: flex; gap: 6px; padding: 5px; border-radius: 16px;
  background: var(--field); border: 1px solid var(--line);
  transition: border-color .2s, box-shadow .2s;
}
.join-row:focus-within { border-color: rgba(200, 86, 42, .55); box-shadow: 0 0 0 4px rgba(200, 86, 42, .1); }
.join input {
  flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 0; background: transparent;
  font: 400 15px var(--sans); color: var(--ink); outline: none;
}
.join input::placeholder { color: rgba(35, 28, 22, .42); }
.join input[aria-invalid="true"] { color: var(--terra-deep); }
.join .msg { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.join .msg:empty { display: none; }

.meta { margin-top: 18px; display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--mute); }
.readlink { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 1px; transition: border-color .2s; }
.readlink:hover { border-color: var(--ink); }
.readlink .arr { display: inline-block; transition: transform .2s; }
.readlink:hover .arr { transform: translateX(3px); }

/* ---------- manifesto: the same column, longer ---------- */
.essay { width: 100%; max-width: var(--col); margin: 0 auto; padding: 56px 0 72px; }
.essay header { text-align: center; padding-bottom: 48px; margin-bottom: 48px; border-bottom: 1px solid var(--line); }
.essay .kicker, .kicker { font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--terra); margin-bottom: 20px; }
.essay h1 { font: 400 clamp(36px, 5vw, 52px)/1.08 var(--serif); letter-spacing: -0.028em; margin: 0; text-wrap: balance; }
.essay .dek { margin-top: 14px; font-size: 16px; color: var(--mute); }
.essay p:not(.kicker):not(.dek):not(.open):not(.close):not(.contact-label):not(.contact-mail):not(.cf-alt):not(.msg), .essay li { font-size: 17px; line-height: 1.75; color: var(--ink); }
.essay p + p { margin-top: 1.1em; }
.essay p.open { font: 400 26px/1.35 var(--serif); letter-spacing: -0.014em; text-wrap: balance; }
.essay h2 { font: 400 27px/1.2 var(--serif); letter-spacing: -0.016em; margin: 2.3em 0 .65em; text-wrap: balance; }
.essay strong { font-weight: 600; }
.essay blockquote {
  margin: 1.8em 0; padding: 0 0 0 22px; border-left: 2px solid var(--terra);
  font: italic 400 24px/1.38 var(--serif); color: var(--ink);
}
.essay ul { margin: 1.1em 0; padding: 0; list-style: none; }
.essay ul li { position: relative; padding-left: 22px; }
.essay ul li + li { margin-top: .7em; }
.essay ul li::before { content: ""; position: absolute; left: 3px; top: .74em; width: 5px; height: 5px; border-radius: 50%; background: var(--terra); }
.essay figure { margin: 2.6em 0; }
.essay figure .halo { width: min(60%, 240px); margin: 0 auto; }
.essay figcaption { margin-top: 12px; text-align: center; font-size: 13px; color: var(--mute); }
.essay p.close { margin-top: 1.8em; font: 400 28px/1.3 var(--serif); letter-spacing: -0.016em; }
.essay .cta { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.essay .cta p:not(.x) { font-size: 15px; color: var(--mute); }

@media (prefers-reduced-motion: reduce) { .led { animation: none; opacity: .6; } .readlink .arr { transition: none; } }

@media (max-width: 560px) {
  .top { height: 64px; }
  .br { display: none; }
  .home { justify-content: flex-start; padding-top: 24px; }
  .halo-home { width: 168px; margin-bottom: 28px; }
  .home .lede { font-size: 16px; }
  .join { margin-top: 32px; }
  .join-row { flex-direction: column; gap: 10px; padding: 0; background: none; border: 0; border-radius: 0; }
  .join-row:focus-within { box-shadow: none; }
  .join input {
    height: 52px; padding: 0 16px; font-size: 16px; text-align: left;
    background: var(--field); border: 1px solid rgba(35, 28, 22, .14); border-radius: 14px;
    transition: border-color .2s, box-shadow .2s;
  }
  .join input:focus { border-color: rgba(200, 86, 42, .55); box-shadow: 0 0 0 4px rgba(200, 86, 42, .1); }
  .join .btn { width: 100%; height: 52px; border-radius: 14px; font-size: 16px; }
  .join .msg { text-align: center; }
  .meta { margin-top: 20px; gap: 8px; }
  .essay { padding-top: 32px; }
  .essay header { padding-bottom: 36px; margin-bottom: 36px; }
  .essay p:not(.kicker):not(.dek):not(.open):not(.close):not(.contact-label):not(.contact-mail):not(.cf-alt):not(.msg), .essay li { font-size: 16.5px; }
  .essay p.open { font-size: 22px; }
  .essay h2 { font-size: 24px; }
  .essay blockquote { font-size: 21px; }
  .essay p.close { font-size: 23px; }
}

/* footer links */
.foot { align-items: center; flex-wrap: wrap; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a { text-decoration: none; color: var(--mute); transition: color .2s; }
.foot-links a:hover, .foot-links a[aria-current="page"] { color: var(--ink); }

/* legal + contact pages */
.essay.legal h2 { font-size: 22px; margin-top: 2em; }
.essay a { text-decoration-color: rgba(35, 28, 22, .3); text-underline-offset: 3px; }
.essay a:hover { text-decoration-color: currentColor; }
.contact-card { margin: 2em 0; padding: 28px 30px; background: var(--field); border: 1px solid var(--line); border-radius: 18px; }
.essay p.contact-label { font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--terra); margin-bottom: 12px; }
.essay p.contact-mail { font: 400 28px/1.2 var(--serif); letter-spacing: -0.015em; margin: 0; }
.contact-mail a { text-decoration: none; }
@media (max-width: 560px) {
  .foot { flex-direction: column; align-items: center; gap: 10px; padding-top: 28px; border-top: 1px solid rgba(35, 28, 22, .08); }
  .foot-links { gap: 20px; justify-content: center; }
  .essay p.contact-mail { font-size: 22px; word-break: break-word; }
}

/* invitation form, refined 21 Nov: soft capsule, ink capsule button with arrow */
.join { max-width: 460px; }
.join-row {
  align-items: center; gap: 8px; padding: 6px; border-radius: 999px;
  border: 1px solid rgba(35, 28, 22, .10);
  box-shadow: 0 1px 2px rgba(35, 28, 22, .04), 0 10px 28px -6px rgba(35, 28, 22, .06);
}
.join input { height: 48px; padding: 0 8px 0 20px; }
.join input::placeholder { color: rgba(35, 28, 22, .45); }
.join .btn { height: 48px; border-radius: 999px; padding: 0 20px 0 22px; gap: 10px; }
.btn-arr { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.btn:hover .btn-arr { transform: translateX(2px); }
@media (prefers-reduced-motion: reduce) { .btn-arr { transition: none; } }
@media (max-width: 560px) {
  .join-row { gap: 10px; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; align-items: stretch; }
  .join input {
    flex: none; height: 54px; padding: 0 22px; border-radius: 999px; font-size: 16px;
    border: 1px solid rgba(35, 28, 22, .10);
    box-shadow: 0 1px 2px rgba(35, 28, 22, .04), 0 10px 28px -6px rgba(35, 28, 22, .06);
  }
  .join .btn { height: 54px; border-radius: 999px; font-size: 16px; }
}
/* mobile form, narrower (21 Nov): not edge to edge */
@media (max-width: 560px) {
  .join { max-width: 300px; }
  .join-row { align-items: center; }
  .join input { width: 100%; height: 50px; }
  .join .btn { width: auto; height: 50px; padding: 0 22px 0 24px; font-size: 15px; }
}

/* contact form (21 Nov) */
.contact-form { margin: 2.2em 0 2em; padding: 28px; background: var(--field); border: 1px solid rgba(35, 28, 22, .10); border-radius: 22px; box-shadow: 0 1px 2px rgba(35, 28, 22, .04), 0 10px 28px -6px rgba(35, 28, 22, .06); display: grid; gap: 20px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cf-field { display: grid; gap: 8px; min-width: 0; }
.cf-field > span, .cf-topics legend { font: 500 13px/1 var(--sans); color: var(--ink-2); }
.cf-field input, .cf-field textarea {
  width: 100%; min-width: 0; font: 400 16px/1.5 var(--sans); color: var(--ink);
  background: var(--paper); border: 1px solid rgba(35, 28, 22, .10); border-radius: 14px; padding: 12px 16px; outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.cf-field input { height: 50px; }
.cf-field textarea { resize: vertical; min-height: 132px; }
.cf-field input::placeholder, .cf-field textarea::placeholder { color: rgba(35, 28, 22, .4); }
.cf-field input:focus, .cf-field textarea:focus { background: #fff; border-color: rgba(200, 86, 42, .55); box-shadow: 0 0 0 4px rgba(200, 86, 42, .1); }
.cf-field [aria-invalid="true"] { border-color: var(--terra-deep); }
.cf-topics { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cf-topics legend { padding: 0; margin-bottom: 10px; }
.cf-topics label { position: relative; }
.cf-topics input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.cf-topics span { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(35, 28, 22, .12); font-size: 14px; color: var(--ink-2); background: var(--paper); transition: background-color .2s, color .2s, border-color .2s; }
.cf-topics input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.cf-topics input:focus-visible + span { outline: 2px solid var(--terra); outline-offset: 2px; }
.cf-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.btn-send { height: 50px; border-radius: 999px; padding: 0 22px 0 24px; gap: 10px; }
.essay p.cf-alt { font-size: 14px; color: var(--mute); margin: 0; }
.contact-form .msg { font-size: 14px; color: var(--ink-2); margin: -4px 0 0; }
.contact-form .msg:empty { display: none; }
@media (max-width: 560px) {
  .contact-form { padding: 20px; border-radius: 20px; gap: 18px; }
  .cf-row { grid-template-columns: 1fr; }
  .cf-foot { flex-direction: column; align-items: center; text-align: center; gap: 14px; }
}

/* mobile form = inline capsule with round arrow button (Nik's pick, 21 Nov) */
.m-only { display: none; }
@media (max-width: 560px) {
  .join { max-width: 330px; }
  .join-row {
    flex-direction: row; align-items: center; gap: 8px; padding: 5px 5px 5px 20px;
    background: var(--field); border: 1px solid rgba(35, 28, 22, .10); border-radius: 999px;
    box-shadow: 0 1px 2px rgba(35, 28, 22, .04), 0 10px 28px -6px rgba(35, 28, 22, .06);
  }
  .join-row:focus-within { border-color: rgba(200, 86, 42, .55); box-shadow: 0 0 0 4px rgba(200, 86, 42, .1); }
  .join input, .join input:focus {
    flex: 1; width: auto; height: 46px; padding: 0; border: 0; border-radius: 0;
    background: transparent; box-shadow: none; font-size: 16px; text-align: left;
  }
  .join .btn { flex: none; width: 46px; height: 46px; padding: 0; border-radius: 999px; gap: 0; }
  .join .btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .join .btn-arr { width: 16px; height: 16px; }
  .meta { flex-direction: column; gap: 10px; margin-top: 16px; }
  .meta .sep { display: none; }
  .meta > span:first-child { font-size: 13px; }
  .m-only { display: inline; }
}
