/*
 * The Nianna group site.
 *
 * Plain CSS for the same reason as brand-site.css: Eleboot's Tailwind bundle
 * is built and committed, and this page must never trigger a rebuild of it.
 * The palette is the warm paper and ink-brown every brand already shares -
 * the group is the ground the five characters stand on, so it takes no
 * colour of its own and lets theirs ring the circle.
 */

:root {
    --paper: #f7f1e6;
    --paper-deep: #efe6d6;
    --ink: #2b2620;
    --muted: #6d6357;
    --rule: #e2d6c2;
    --accent: #7a5a3a;
    --measure: 62ch;
    --serif: 'Noto Serif Georgian', 'Noto Serif', Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Noto Sans Georgian', 'Noto Sans', system-ui, -apple-system, sans-serif;
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

main { flex: 1; }

.wrap { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: 20px; }
.wrap.narrow { max-width: 760px; }

a { color: inherit; }

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

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 700;
    line-height: 1.25;
    text-wrap: balance;
    margin: 0 0 14px;
}

h1 { font-size: clamp(34px, 6vw, 54px); letter-spacing: -.01em; }
h2 { font-size: clamp(22px, 3.4vw, 28px); }
h3 { font-size: 19px; }

p { margin: 0 0 16px; }

.lead { font-size: clamp(18px, 2.4vw, 21px); color: var(--ink); max-width: var(--measure); }

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

.site-head {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--rule);
}

.site-head .wrap {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 64px;
    flex-wrap: wrap;
}

.wordmark {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 23px;
    text-decoration: none;
    margin-inline-end: auto;
}

.site-nav { display: flex; gap: 20px; flex-wrap: wrap; }

.site-nav a {
    text-decoration: none;
    font-size: 15px;
    padding: 4px 0;
    color: var(--muted);
    border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.langs { display: flex; gap: 10px; font-size: 13px; text-transform: uppercase; }
.langs a { text-decoration: none; color: var(--muted); }
.langs a[aria-current="true"] { color: var(--ink); font-weight: 600; }

/* ---------- intro: about on the left, the circle on the right ---------- */

.intro { padding-block: 56px 72px; overflow-x: clip; }

.intro-grid {
    display: grid;
    gap: 48px;
}

@media (min-width: 940px) {
    .intro-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
    .family { position: sticky; top: 96px; }
}

.eyebrow {
    font-size: 13px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
}

.about h2 { margin-top: 40px; }
.about p { max-width: var(--measure); }

.pillars {
    display: grid;
    gap: 16px;
    margin-top: 36px;
}

@media (min-width: 640px) { .pillars { grid-template-columns: 1fr 1fr; } }

.pillars > div {
    background: var(--paper-deep);
    border-radius: 16px;
    padding: 22px 22px 8px;
}

.pillars h3 { color: var(--accent); }
.pillars p { font-size: 16px; }

/* ---------- the circle of characters ---------- */

.family { text-align: center; }

/* On a phone the circle comes first - below a long read it would go unseen. */
@media (max-width: 939px) { .family { order: -1; } }

.family-title { margin-bottom: 22px; }

.family-hint { color: var(--muted); font-size: 15px; margin-top: 6px; }

.orbit {
    --size: min(500px, 88vw);
    --avatar: clamp(64px, 17vw, 100px);
    --r: calc(var(--size) / 2 - var(--avatar) / 2 - 18px);
    --turn: 90s;
    position: relative;
    width: var(--size);
    aspect-ratio: 1;
    margin: 0 auto;
}

.orbit-track {
    position: absolute;
    inset: calc(var(--size) / 2 - var(--r));
    border: 2px dashed var(--rule);
    border-radius: 50%;
}

.orbit-centre {
    position: absolute;
    inset: 32%;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--paper-deep);
    box-shadow: inset 0 0 0 1px var(--rule);
}

.orbit-centre span {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(20px, 4.4vw, 30px);
}

/* The ring is a zero-size pivot at the centre: a full-size square spinning
   would sweep its corners past the page edge and make it scroll sideways. */
.orbit-ring {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    animation: orbit-spin var(--turn) linear infinite;
}

/* Each character sits on the circle at its own angle... */
.orbit-ring li {
    --angle: calc(var(--i) / var(--n) * 1turn);
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    transform: rotate(var(--angle)) translateY(calc(-1 * var(--r)));
}

/* ...turned back upright... */
.orbit-ring .slot {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(-50%, -50%) rotate(calc(-1 * var(--angle)));
}

/* ...and kept upright while the ring turns, by turning the other way. */
.orbit-ring a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: calc(var(--avatar) + 40px);
    text-decoration: none;
    animation: orbit-spin var(--turn) linear infinite reverse;
}

.orbit-ring img {
    width: var(--avatar);
    height: var(--avatar);
    border-radius: 50%;
    border: 4px solid var(--ring);
    box-shadow: 0 6px 18px rgb(43 38 32 / .16);
    transition: transform .25s ease;
}

.orbit-ring span {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    background: var(--paper);
    padding: 1px 8px;
    border-radius: 999px;
}

.orbit-ring a:hover img,
.orbit-ring a:focus-visible img { transform: scale(1.08); }

.orbit-ring a:focus-visible { outline: none; }
.orbit-ring a:focus-visible span { outline: 2px solid var(--accent); }

/* Stop to be clicked: hovering or tabbing into the circle holds it still. */
.orbit:hover .orbit-ring,
.orbit:hover .orbit-ring a,
.orbit:focus-within .orbit-ring,
.orbit:focus-within .orbit-ring a { animation-play-state: paused; }

@keyframes orbit-spin { to { rotate: 1turn; } }

@media (prefers-reduced-motion: reduce) {
    .orbit-ring, .orbit-ring a { animation: none; }
}

/* ---------- blog ---------- */

.latest { padding-block: 56px; border-top: 1px solid var(--rule); }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.section-head h2 { margin: 0; }
.section-head a { color: var(--accent); text-decoration: none; font-weight: 600; }

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 24px;
}

.card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: #fffaf2;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--rule);
    transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--rule), 0 12px 28px rgb(43 38 32 / .1); }

.card-art {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--paper-deep);
}

.card-art img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 16px 18px 20px; }
.card-body h3 { margin: 0; font-size: 19px; }

.meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 8px;
}

.chip {
    font-size: 13px;
    padding: 1px 10px;
    border-radius: 999px;
    background: var(--paper-deep);
    color: var(--ink);
    text-decoration: none;
}

.play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    border-radius: 50%;
    background: rgb(43 38 32 / .72);
}

.play::after {
    content: '';
    position: absolute;
    left: 26px;
    top: 20px;
    border-style: solid;
    border-width: 12px 0 12px 19px;
    border-color: transparent transparent transparent #fff;
}

.page { padding-block: 48px 72px; }

.empty {
    margin-top: 32px;
    padding: 28px;
    border-radius: 16px;
    background: var(--paper-deep);
    color: var(--muted);
    text-align: center;
}

.pager { display: flex; justify-content: center; gap: 18px; margin-top: 36px; }
.pager a { text-decoration: none; font-weight: 600; }

.back a { color: var(--muted); text-decoration: none; font-size: 15px; }

.post h1 { margin-bottom: 26px; }

.video, .post-art {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
    width: 100%;
}

.post-art { object-fit: cover; background: var(--paper-deep); }

.video button { all: unset; cursor: pointer; display: block; width: 100%; height: 100%; }
.video button img { width: 100%; height: 100%; object-fit: cover; }
.video button:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }

.video-link { margin: 10px 0 28px; font-size: 15px; }
.video-link a { color: var(--accent); }

.post .post-art { margin-bottom: 28px; }

.prose p { max-width: var(--measure); }

/* ---------- contact ---------- */

.site-foot {
    background: var(--ink);
    color: var(--paper);
    padding-block: 48px 32px;
}

.site-foot .wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    flex-wrap: wrap;
}

.site-foot h2 { color: var(--paper); }
.site-foot p { margin: 0 0 6px; }
.site-foot .company { font-weight: 600; }
.site-foot a { color: var(--paper); }

.foot-mark { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; opacity: .7; font-size: 14px; }
.foot-mark .wordmark { margin: 0; font-size: 26px; }
