/* New design (playground): warm paper colours, Europa Nuova + Minion Pro, IBM Plex Mono labels.
   Used by src/layouts/NewLayout.astro. The old pages keep using niki-design.css. */

@font-face { font-family: 'Europa Nuova'; src: url(../fonts/6156cae3771c7b74fa12ee84_EuropaNuovaRegular.woff) format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Europa Nuova'; src: url(../fonts/6156cae3bc74b667e96dccb5_EuropaNuovaItalic.woff) format('woff'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Europa Nuova'; src: url(../fonts/6156cae32f7d93b60a0b63fc_EuropaNuovaBold.woff) format('woff'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Europa Nuova'; src: url(../fonts/6156cae3e6bbfc1ea1096a12_EuropaNuovaExtraBold.woff) format('woff'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Minion Pro'; src: url(../fonts/6156c1f4a132182e79808280_MinionPro-Regular.woff) format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Minion Pro'; src: url(../fonts/6156c1f456aae0fb028570cd_MinionPro-It.woff) format('woff'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Minion Pro'; src: url(../fonts/6156c1f44a284fbdbeba591e_MinionPro-Semibold.woff) format('woff'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --paper: #faf5ea; --sand: #efe4cf; --tomato: #e0563b; --ink: #23242b; --muted: #5a5a63; --card: #fffdf8;
  --sans: 'Europa Nuova', Verdana, sans-serif; --serif: 'Minion Pro', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace; --hand: 'Caveat', cursive;
  --pad: clamp(16px, 5vw, 72px); --max: 1176px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--sans);
  background-image: radial-gradient(rgba(35, 36, 43, 0.1) 1px, transparent 1px); background-size: 22px 22px;
}
a { color: inherit; }
img { max-width: 100%; display: block; height: auto; }
a:focus-visible, input:focus-visible { outline: 2px solid var(--tomato); outline-offset: 3px; }
.wrap { max-width: var(--max); margin: 0 auto; }

/* Banner, nav */
.topbar { background: var(--ink); color: var(--paper); font: 400 12px/1.3 var(--mono); padding: 10px var(--pad); display: flex; justify-content: space-between; gap: 12px; }
.topbar a { text-decoration: none; white-space: nowrap; color: #f0a08d; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px var(--pad); flex-wrap: wrap; }
.logo { font: 800 20px/1 var(--sans); letter-spacing: -0.01em; text-decoration: none; }
.logo span { color: var(--tomato); }
.links { display: flex; gap: 24px; font: 400 13px/1 var(--mono); flex-wrap: wrap; }
.links a { text-decoration: none; padding-bottom: 3px; }
.links a:hover, .links a[aria-current='page'] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; text-decoration-color: var(--tomato); }
.yt { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--ink); border-radius: 999px; padding: 8px 14px; font: 500 12px/1 var(--mono); text-decoration: none; background: var(--paper); }
.yt svg { width: 18px; height: 13px; }
.yt:hover { background: var(--ink); color: var(--paper); }

/* Type */
.eyebrow { font: 400 12px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 18px; color: var(--muted); }
h1 { font: 800 clamp(40px, 6.2vw, 80px)/0.98 var(--sans); letter-spacing: -0.035em; margin: 0 0 24px; }
h2 { font: 800 clamp(30px, 3.6vw, 44px)/1.05 var(--sans); letter-spacing: -0.03em; margin: 0 0 28px; }
h1 em, h2 em { font: italic 400 1.1em/1 var(--serif); letter-spacing: -0.01em; color: var(--tomato); background: linear-gradient(transparent 62%, var(--sand) 62%); padding: 0 0.08em; white-space: nowrap; }
.center { text-align: center; }
.lede { font-size: clamp(17px, 1.6vw, 20px); max-width: 600px; margin: 0 0 28px; }
.kicker { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--tomato); }
.hand { font: 600 24px/1 var(--hand); }

/* Buttons and links */
.cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-block; background: var(--tomato); color: #fff; border-radius: 999px; padding: 14px 22px; font: 500 13px/1 var(--mono); text-decoration: none; border: 0; cursor: pointer; }
.btn:hover { background: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); padding: 12.5px 20.5px; }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.textlink { font: 400 13px/1 var(--mono); text-underline-offset: 4px; text-decoration-color: var(--tomato); }
.squiggle { display: block; width: 100%; max-width: 560px; height: 12px; margin-top: 36px; }

/* Home hero and inner-page hero */
.hero { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(32px, 6vw, 88px); align-items: center; padding: clamp(32px, 6vw, 72px) var(--pad) clamp(48px, 7vw, 96px); max-width: 1320px; margin: 0 auto; }
.page-hero { padding: clamp(28px, 5vw, 64px) var(--pad) clamp(36px, 5vw, 64px); max-width: 1320px; margin: 0 auto; }
.page-hero h1 { font-size: clamp(40px, 5.6vw, 72px); }
.page-hero.split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(32px, 6vw, 88px); align-items: center; }

.photo { position: relative; justify-self: center; width: 100%; max-width: 420px; }
.photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; border-radius: 6px; transform: rotate(2deg); box-shadow: 0 22px 48px rgba(35, 36, 43, 0.2); }
.photo.square img { aspect-ratio: 1; transform: rotate(-2deg); }
.photo .note { position: absolute; left: -22px; bottom: 28px; background: var(--ink); color: var(--paper); font: 600 24px/1 var(--hand); padding: 8px 16px; transform: rotate(-5deg); }
.photo .arrow { position: absolute; left: -62px; bottom: 72px; width: 54px; height: 44px; }

/* Stats band */
.stats { margin: 0 var(--pad); background: var(--tomato); color: var(--paper); border-radius: 14px; display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; padding: 28px 12px; }
@media (min-width: 1320px) { .stats { max-width: var(--max); margin: 0 auto; } }
.stats div + div { border-left: 1.5px dashed rgba(250, 245, 234, 0.55); }
.stats b { display: block; font: 800 30px/1.1 var(--sans); letter-spacing: -0.02em; }
.stats b em { font: italic 400 1.05em var(--serif); }
.stats span { font: 400 12px/1.4 var(--mono); opacity: 0.9; }

/* Sections */
.section { padding: clamp(48px, 7vw, 96px) var(--pad); max-width: 1320px; margin: 0 auto; }
.section.tight { padding-top: 0; }
.band { background: var(--tomato); color: var(--paper); }
.band h2 em { color: var(--ink); background: linear-gradient(transparent 62%, rgba(250, 245, 234, 0.45) 62%); }
.band .card, .band .tile { color: var(--ink); }

/* Cards (posts) */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { display: block; text-decoration: none; background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; padding: 22px; transition: transform 0.15s ease, box-shadow 0.15s ease; }
a.card:hover, a.tile:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--ink); }
.card h3 { font: 600 22px/1.2 var(--serif); margin: 12px 0 8px; }
.card p { margin: 0; font-size: 15px; color: #4b4b53; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.more { text-align: center; margin-top: 32px; }

/* Tiles (resources, free stuff, links) */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; }
.tile { display: flex; flex-direction: column; gap: 10px; text-decoration: none; background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; padding: 22px; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.tile h3 { font: 800 20px/1.2 var(--sans); letter-spacing: -0.01em; margin: 0; }
.tile p { margin: 0; font-size: 15px; color: #4b4b53; }
.tile .go { margin-top: auto; padding-top: 6px; font: 500 12px/1 var(--mono); color: var(--tomato); }
.tile .num { font: italic 400 34px/1 var(--serif); color: var(--tomato); }

/* Badges and shop products */
.badge { align-self: flex-start; display: inline-block; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 6px 10px; font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }

.free-row { grid-template-columns: repeat(4, 1fr); }
.free-row .featured { background: var(--sand); }
.free-row .featured .hand { color: var(--tomato); transform: rotate(-3deg); display: inline-block; }

.dark { background: var(--ink); color: var(--paper); }
.dark h2 em { color: #f0a08d; background: linear-gradient(transparent 62%, rgba(224, 86, 59, 0.35) 62%); }
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product { display: flex; align-items: stretch; text-decoration: none; color: var(--ink); background: var(--card); border: 1.5px solid var(--paper); border-radius: 12px; overflow: hidden; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.product:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--tomato); }
.product img { width: 128px; height: 128px; flex: none; align-self: center; object-fit: cover; margin: 12px 0 12px 12px; border-radius: 6px; border: 1px solid rgba(35, 36, 43, 0.15); }
.product-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; flex: 1; min-width: 0; }
.product h3 { font: 600 18px/1.2 var(--serif); margin: 0; }
.product p { margin: 0; font-size: 13.5px; line-height: 1.45; color: #4b4b53; }
.product .go { margin-top: auto; padding-top: 4px; font: 500 12px/1 var(--mono); color: var(--tomato); }
.btn.ghost.light { color: var(--paper); border-color: var(--paper); }
.btn.ghost.light:hover { background: var(--paper); color: var(--ink); }

/* Services */
.values { grid-template-columns: repeat(5, 1fr); }
.values .tile { gap: 8px; }
.services { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.service { flex: 0 1 calc((100% - 44px) / 3); background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; padding: 18px; display: flex; align-items: flex-start; gap: 14px; }
.service img { width: 92px; height: 92px; flex: none; margin: -10px -6px -10px -10px; }
.service h3 { font: 800 19px/1.2 var(--sans); letter-spacing: -0.01em; margin: 2px 0 6px; }
.service p { margin: 0; font-size: 14.5px; line-height: 1.5; color: #4b4b53; }
.eyebrow.light { color: #cfcac0; }
/* One strip when everything fits; otherwise two strips (4 + 3), each kept on one line */
.logos { margin: 18px auto 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px 48px; }
.logo-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 48px; }
.logos img { height: var(--h); width: auto; display: block; opacity: 0.95; }
.talk { max-width: 680px; margin: 0 auto; text-align: center; }
.talk .hand { color: var(--tomato); display: block; transform: rotate(-3deg); margin-bottom: 10px; }
.talk h2 { margin-bottom: 16px; }
.talk p { font-size: 18px; margin: 0 0 26px; }

/* Article pages */
.article-head { max-width: 760px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) var(--pad) 8px; box-sizing: content-box; }
.article-head .back { display: inline-block; margin-bottom: 26px; }
.article-head h1 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.04; margin-bottom: 18px; }
.article-head .lede { font: italic 400 clamp(20px, 2vw, 24px)/1.4 var(--serif); color: var(--muted); max-width: none; margin-bottom: 0; }
.article-head .squiggle { margin-top: 28px; max-width: 220px; }
.article { max-width: 680px; margin: 0 auto; padding: 24px var(--pad) clamp(40px, 6vw, 72px); box-sizing: content-box; font-size: 18px; line-height: 1.7; overflow-wrap: break-word; }
.article > :first-child { margin-top: 0; }
.article p { margin: 0 0 20px; }
.article h2 { font: 800 clamp(26px, 3vw, 32px)/1.15 var(--sans); letter-spacing: -0.02em; margin: 52px 0 16px; text-align: left; }
.article h3 { font: 800 22px/1.25 var(--sans); letter-spacing: -0.01em; margin: 40px 0 12px; }
.article h4 { font: 600 20px/1.3 var(--serif); margin: 32px 0 10px; }
.article h2 strong, .article h3 strong, .article h4 strong { font-weight: inherit; }
.article a { text-decoration-color: var(--tomato); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.article a:hover { color: var(--tomato); }
.article ul, .article ol { margin: 0 0 22px; padding-left: 1.3em; }
.article li { margin: 0 0 8px; padding-left: 0.2em; }
.article ul li::marker { color: var(--tomato); }
.article ol li::marker { color: var(--tomato); font: 500 0.85em var(--mono); }
.article blockquote { margin: 28px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--tomato); font: italic 400 21px/1.5 var(--serif); color: var(--ink); }
.article blockquote p { margin: 0 0 10px; }
.article blockquote p:last-child { margin-bottom: 0; }
.article hr { border: 0; height: 12px; margin: 44px auto; max-width: 160px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 12'%3E%3Cpath d='M0 6 Q 10 0 20 6 T 40 6 T 60 6 T 80 6 T 100 6 T 120 6 T 140 6 T 160 6' fill='none' stroke='%23e0563b' stroke-width='2.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.article img { max-width: 100%; height: auto; }
.article figure { margin: 32px 0; }
.article figure > div { text-align: center; }
.article figure img { display: inline-block; border-radius: 10px; border: 1.5px solid var(--ink); box-shadow: 5px 5px 0 var(--sand); }
.article figure.w-richtext-align-fullwidth { margin-left: -40px; margin-right: -40px; }
.article figcaption { font: 400 12px/1.4 var(--mono); color: var(--muted); text-align: center; margin-top: 12px; }
/* YouTube embeds: the old markup sets padding-bottom inline; use a 16:9 frame instead */
.article figure.w-richtext-figure-type-video { padding-bottom: 0 !important; }
.article figure.w-richtext-figure-type-video > div { position: relative; aspect-ratio: 16 / 9; border: 1.5px solid var(--ink); border-radius: 12px; overflow: hidden; background: var(--ink); box-shadow: 5px 5px 0 var(--sand); }
.article figure.w-richtext-figure-type-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.article strong { font-weight: 700; }
.article code { font: 400 0.88em var(--mono); background: var(--sand); padding: 1px 5px; border-radius: 4px; }

/* Long text */
.prose { max-width: 680px; margin: 0 auto; font-size: 18px; line-height: 1.65; }
.prose h2 { font-size: clamp(26px, 3vw, 34px); margin: 56px 0 18px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 18px; }
.prose a { text-decoration-color: var(--tomato); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose a:hover { color: var(--tomato); }
.prose .lead { font: italic 400 26px/1.3 var(--serif); color: var(--tomato); margin: 28px 0 10px; }
.prose ul { padding-left: 0; list-style: none; margin: 0 0 18px; }
.prose li { padding: 10px 0; border-bottom: 1px dashed rgba(35, 36, 43, 0.25); }
.pullquote { margin: 28px 0; padding: 24px 26px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; box-shadow: 5px 5px 0 var(--sand); }
.pullquote p { margin: 0; font: italic 400 20px/1.45 var(--serif); }
.pullquote .kicker { display: block; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; padding: 0; list-style: none; }
.chips li { border: 1.5px solid var(--ink); border-radius: 999px; padding: 8px 14px; font: 500 13px/1 var(--mono); background: var(--card); }

/* Writing list */
.search { display: flex; align-items: center; gap: 10px; max-width: 480px; border-bottom: 2px solid var(--ink); padding: 4px 2px; margin: 0 0 8px; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: 400 18px/1.4 var(--sans); color: var(--ink); padding: 8px 0; }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--tomato); }
.count { font: 400 12px/1 var(--mono); color: var(--muted); margin: 10px 0 0; }
.posts { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1.5px solid var(--ink); }
.post { border-bottom: 1px dashed rgba(35, 36, 43, 0.3); }
.post a { display: grid; grid-template-columns: 130px 1fr auto; gap: 24px; align-items: baseline; padding: 18px 4px; text-decoration: none; }
.post a:hover { background: rgba(239, 228, 207, 0.55); }
.post a:hover h3 { color: var(--tomato); }
.post time, .post .nodate { font: 400 12px/1.4 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.post h3 { font: 600 21px/1.25 var(--serif); margin: 0 0 4px; }
.post p { margin: 0; font-size: 15px; color: #4b4b53; }
.post .arrow-go { font: 500 13px/1 var(--mono); color: var(--tomato); }
.empty { padding: 28px 4px; font: 400 14px/1.4 var(--mono); color: var(--muted); }

/* Videos */
.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.video { position: relative; aspect-ratio: 16 / 9; border: 1.5px solid var(--ink); border-radius: 12px; overflow: hidden; background: var(--ink); box-shadow: 5px 5px 0 var(--sand); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-title { font: 600 18px/1.3 var(--serif); margin: 12px 2px 0; }

/* Newsletter band and footer */
.newsletter { background: var(--ink); color: var(--paper); padding: clamp(48px, 7vw, 80px) var(--pad); }
.newsletter .inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.newsletter h2 { text-align: left; margin: 0 0 10px; color: var(--paper); }
.newsletter h2 em { color: #f0a08d; background: linear-gradient(transparent 62%, rgba(224, 86, 59, 0.35) 62%); }
.newsletter p { margin: 0; color: #cfcac0; max-width: 440px; }
.newsletter .btn:hover { background: var(--paper); color: var(--ink); }
.foot { background: var(--ink); color: #9d9890; border-top: 1px solid #3a3b44; padding: 22px var(--pad); font: 400 12px/1.4 var(--mono); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot .social { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--paper); }


@media (max-width: 1100px) { .products, .free-row { grid-template-columns: 1fr 1fr; } .values { grid-template-columns: repeat(3, 1fr); } .service { flex-basis: calc((100% - 22px) / 2); } }

@media (max-width: 860px) {
  .hero, .page-hero.split { grid-template-columns: 1fr; }
  .photo { max-width: 320px; justify-self: start; margin-left: 24px; }
  .photo .arrow { display: none; }
  .stats { grid-template-columns: 1fr 1fr; gap: 18px 0; }
  .stats div:nth-child(3) { border-left: 0; }
  .cards, .videos { grid-template-columns: 1fr; }
  .products, .free-row, .values { grid-template-columns: 1fr; }
  .service { flex-basis: 100%; }
  .article { font-size: 17px; }
  .article figure.w-richtext-align-fullwidth { margin-left: 0; margin-right: 0; }
  .article blockquote { font-size: 19px; }
  .logos, .logo-row { gap: 20px 22px; }
  .logos img { height: calc(var(--h) * 0.62); }
  .product img { width: 96px; height: 96px; }
  .newsletter .inner { grid-template-columns: 1fr; }
  .topbar .msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav { row-gap: 14px; }
  .nav .links { order: 3; width: 100%; gap: 18px; }
  .yt { padding: 7px 12px; }
  .post a { grid-template-columns: 1fr; gap: 6px; padding: 16px 2px; }
  .post .arrow-go { display: none; }
  .page-hero h1 em, h2 em { white-space: normal; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
}
