/* Runecat — public website styles. Tokens & fonts live in shared.css. */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 500; }
p { margin: 0; }
button { font: inherit; }
::selection { background: var(--teal); color: var(--navy); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: max(16px, 4vw); }
@media (min-width: 1300px) { .container { padding-inline: 2rem; } }
.container--narrow { max-width: 780px; }
.container--wide { max-width: 1100px; }

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--teal); color: var(--navy);
  padding: 0.6rem 1rem; border-radius: 999px; font-weight: 600; text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* ---------------------------------------------------------------- rune motif */
.rune { width: 0.62em; height: 1.04em; flex: none; color: var(--teal); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 1.1rem;
}
.eyebrow .rune { width: 9px; height: 15px; color: var(--teal); }
.eyebrow--light { color: var(--mist); }

/* ---------------------------------------------------------------- buttons & links */
.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.button-row--center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.8rem 1.45rem;
  border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--teal); color: var(--navy); box-shadow: 0 6px 24px rgba(75, 159, 168, 0.25); }
.btn--primary:hover { background: var(--mist); box-shadow: 0 8px 28px rgba(181, 216, 222, 0.28); }
.btn--ghost { border-color: rgba(245, 247, 245, 0.28); color: var(--on-dark); }
.btn--ghost:hover { border-color: var(--on-dark); background: rgba(245, 247, 245, 0.06); }
.btn--ghost-dark { border-color: rgba(16, 29, 48, 0.2); color: var(--navy); }
.btn--ghost-dark:hover { border-color: var(--navy); background: rgba(16, 29, 48, 0.04); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 600; font-size: 0.95rem; color: var(--slate); text-decoration: none;
}
.link-arrow::after { content: '→'; transition: transform 0.25s var(--ease); }
a.link-arrow:hover::after, a:hover .link-arrow::after { transform: translateX(4px); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease), backdrop-filter 0.35s;
}
.site-header.is-scrolled, .site-header.is-open {
  background: rgba(16, 29, 48, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  box-shadow: 0 1px 0 var(--line-dark);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: block; line-height: 0; border-radius: 8px; }
.brand img { height: 42px; width: auto; }
.site-nav ul { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  position: relative; display: block;
  padding: 0.55rem 0.95rem;
  color: var(--on-dark-soft); text-decoration: none;
  font-size: 0.95rem; font-weight: 500;
  border-radius: 999px;
  transition: color 0.2s, background-color 0.2s;
}
.site-nav a:hover { color: var(--on-dark); background: rgba(245, 247, 245, 0.06); }
.site-nav a[aria-current='page'] { color: var(--on-dark); }
.site-nav a[aria-current='page']::after {
  content: ''; position: absolute; left: 50%; bottom: 0.15rem;
  width: 6px; height: 9px; margin-left: -3px;
  background: var(--teal); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.nav-toggle { display: none; }

@media (max-width: 820px) {
  .site-header__inner { height: 66px; }
  .brand img { height: 32px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-right: -8px;
    background: none; border: 0; color: var(--on-dark); cursor: pointer; border-radius: 12px;
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor;
    transition: transform 0.3s var(--ease), opacity 0.2s;
  }
  .nav-toggle__bars { position: relative; }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ''; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -7px; }
  .nav-toggle__bars::after { top: 7px; }
  .is-open .nav-toggle__bars { background: transparent; }
  .is-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
  .is-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    position: fixed; inset: 66px 0 auto; height: calc(100svh - 66px);
    background: var(--navy);
    padding: 1.5rem max(16px, 4vw) 2rem;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }
  .is-open .site-nav { opacity: 1; visibility: visible; transform: none; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a {
    font-family: var(--font-display); font-size: 1.6rem; font-weight: 400;
    padding: 0.85rem 0; border-radius: 0; border-bottom: 1px solid var(--line-dark); color: var(--on-dark);
  }
  .site-nav a:hover { background: none; color: var(--mist); }
  .site-nav a[aria-current='page']::after { left: auto; right: 4px; top: 50%; bottom: auto; margin: -5px 0 0; }
}

/* ---------------------------------------------------------------- shared dark backdrops */
.hero, .page-hero, .article-hero, .section--dark, .feature-hero, .section--contact { position: relative; isolation: isolate; color: var(--on-dark); }
.hero::after, .page-hero::after, .article-hero::after, .section--dark::after, .section--contact::after {
  /* fine grain for depth */
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero__backdrop, .page-hero__backdrop { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; }
.blob--a { width: 55vw; height: 55vw; max-width: 760px; max-height: 760px; right: -12vw; top: -22vw; background: var(--slate); }
.blob--b { width: 36vw; height: 36vw; max-width: 520px; max-height: 520px; left: -14vw; bottom: -18vw; background: rgba(75, 159, 168, 0.45); opacity: 0.35; }
.blob--c { width: 22vw; height: 22vw; max-width: 320px; max-height: 320px; left: 38%; top: 30%; background: rgba(40, 85, 116, 0.7); opacity: 0.3; }
@media (prefers-reduced-motion: no-preference) {
  .blob--a { animation: drift-a 26s ease-in-out infinite alternate; }
  .blob--b { animation: drift-b 32s ease-in-out infinite alternate; }
  .blob--c { animation: drift-c 22s ease-in-out infinite alternate; }
}
@keyframes drift-a { to { transform: translate(-6vw, 5vw) scale(1.08); } }
@keyframes drift-b { to { transform: translate(8vw, -4vw) scale(1.15); } }
@keyframes drift-c { to { transform: translate(-10vw, 6vw) scale(0.9); } }

/* ---------------------------------------------------------------- hero */
.hero {
  min-height: min(100svh, 940px);
  display: flex; align-items: center;
  padding: 120px 0 96px;
  background: radial-gradient(120% 90% at 85% 0%, rgba(40, 85, 116, 0.55), transparent 60%), var(--navy);
  overflow: hidden;
}
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); }
.hero__title {
  font-size: clamp(2.6rem, 1.4rem + 4.2vw, 5rem);
  line-height: 1.04; letter-spacing: -0.025em; font-weight: 450;
  max-width: 13ch; text-wrap: balance;
}
.hero__subtitle { margin-top: 1.5rem; max-width: 40ch; font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem); color: var(--on-dark-soft); line-height: 1.65; }
.hero__art { position: relative; justify-self: center; width: min(100%, 440px); aspect-ratio: 1; display: grid; place-items: center; }
.hero__art picture { position: relative; width: 82%; }
.hero__symbol { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(4, 10, 20, 0.45)); }
.hero__halo {
  position: absolute; inset: -6%; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(75, 159, 168, 0.22), rgba(40, 85, 116, 0.18) 40%, transparent 68%);
}
.hero__halo::before {
  content: ''; position: absolute; inset: 9%; border-radius: 50%;
  border: 1px solid rgba(181, 216, 222, 0.12);
}
.hero__halo::after {
  content: ''; position: absolute; inset: 20%; border-radius: 50%;
  border: 1px dashed rgba(181, 216, 222, 0.08);
}
.hero__glint {
  position: absolute; left: 57.5%; top: 24.5%; width: 26%; aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(111, 195, 203, 0.75) 0%, rgba(75, 159, 168, 0.25) 35%, transparent 70%);
  mix-blend-mode: screen; opacity: 0.55; pointer-events: none;
}
.hero__scroll {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 28px; height: 44px; border-radius: 14px; border: 1.5px solid rgba(245, 247, 245, 0.3);
}
.hero__scroll span[aria-hidden] {
  position: absolute; left: 50%; top: 9px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--mist);
}
@media (prefers-reduced-motion: no-preference) {
  .hero__art { animation: float 9s ease-in-out infinite alternate; }
  .hero__glint { animation: glint 4.5s ease-in-out infinite; }
  .hero__halo::after { animation: spin 120s linear infinite; }
  .hero__scroll span[aria-hidden] { animation: scroll-dot 2.2s var(--ease) infinite; }
  .hero__copy > * { animation: rise 0.9s var(--ease) both; }
  .hero__copy > :nth-child(2) { animation-delay: 0.08s; }
  .hero__copy > :nth-child(3) { animation-delay: 0.16s; }
  .hero__copy > :nth-child(4) { animation-delay: 0.24s; }
  .hero__art { animation: float 9s ease-in-out infinite alternate, fade 1.4s var(--ease) both; }
}
@keyframes float { from { transform: translateY(-6px); } to { transform: translateY(10px); } }
@keyframes glint { 0%, 100% { opacity: 0.35; transform: translate(-50%, -50%) scale(0.85); } 50% { opacity: 0.85; transform: translate(-50%, -50%) scale(1.1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scroll-dot { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 860px) {
  .hero { padding: 96px 0 88px; min-height: auto; }
  .hero__inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero__art { order: -1; width: min(62vw, 260px); justify-self: start; margin-left: -4%; }
  .hero__scroll { display: none; }
}

/* ---------------------------------------------------------------- sections */
.section { padding-block: clamp(4.5rem, 3rem + 6vw, 8rem); }
.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
.section--tight-top { padding-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.section--light { background: var(--cloud); color: var(--ink); }
.section--mist { background: linear-gradient(180deg, var(--mist-tint), var(--cloud)); color: var(--ink); }
.section--dark { background: var(--navy); }
.section--first { padding-top: calc(76px + clamp(3rem, 2rem + 5vw, 6rem)); }
.section--contact { background: radial-gradient(90% 120% at 50% 120%, rgba(75, 159, 168, 0.28), transparent 60%), linear-gradient(160deg, var(--slate), var(--navy) 70%); overflow: hidden; }

.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.section-head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.section-title { font-size: clamp(2rem, 1.4rem + 2.2vw, 3.1rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 450; text-wrap: balance; max-width: 22ch; }
.section-intro { margin-top: 1.1rem; font-size: 1.125rem; color: var(--ink-muted); max-width: 56ch; }
.lead { font-size: 1.25rem; line-height: 1.6; color: var(--ink); margin-bottom: 1.6rem; }

/* Scroll reveal (pure CSS; only where supported and motion is welcome) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  }
}

/* ---------------------------------------------------------------- about */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.about__head { position: sticky; top: 120px; }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .about__head { position: static; }
}

/* ---------------------------------------------------------------- services */
.service-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 600px) { .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 760px) { .service-grid:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .service-grid:not(:has(> :nth-child(5))) { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .service-grid:has(> :nth-child(5)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.service-card {
  position: relative; padding: 2rem 1.75rem 2.1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(40, 85, 116, 0.12);
  border-radius: var(--radius-lg);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease), background-color 0.4s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(75, 159, 168, 0.4); background: #fff; }
.service-card__num { display: block; font-family: var(--font-display); font-size: 0.95rem; font-weight: 500; color: var(--teal-ink); letter-spacing: 0.04em; margin-bottom: 2.4rem; }
.service-card__rune { position: absolute; top: 1.9rem; right: 1.75rem; width: 12px; height: 20px; color: var(--teal); opacity: 0.55; transition: opacity 0.3s, transform 0.5s var(--ease); }
.service-card:hover .service-card__rune { opacity: 1; transform: translateY(-3px); }
.service-card h3 { font-size: 1.35rem; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; margin-bottom: 0.6rem; }
.service-card p { color: var(--ink-muted); line-height: 1.6; }

/* ---------------------------------------------------------------- teaser (sealed stone) */
.section--project { background: radial-gradient(80% 90% at 20% 50%, rgba(40, 85, 116, 0.45), transparent 70%), var(--navy); overflow: hidden; }
.teaser { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); }
.teaser--full { min-height: calc(100svh - 260px); }
.teaser__stone { position: relative; width: min(100%, 400px); aspect-ratio: 1; justify-self: center; display: grid; place-items: center; }
.teaser__mist { position: absolute; inset: -10%; border-radius: 50%; background: radial-gradient(circle, rgba(75, 159, 168, 0.25), transparent 62%); filter: blur(10px); }
.teaser__rock {
  position: absolute; inset: 16% 10% 9% 13%;
  border-radius: 54% 46% 40% 60% / 66% 62% 38% 34%;
  background:
    radial-gradient(120% 90% at 30% 10%, rgba(181, 216, 222, 0.14), transparent 50%),
    linear-gradient(165deg, #22405a 0%, #172b42 45%, #0c1828 100%);
  box-shadow:
    inset 0 1px 0 rgba(181, 216, 222, 0.18),
    inset 0 -40px 60px rgba(0, 0, 0, 0.35),
    0 40px 80px rgba(3, 8, 16, 0.5);
}
.teaser__rock::after {
  /* veil */
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: repeating-linear-gradient(115deg, rgba(181, 216, 222, 0.035) 0 2px, transparent 2px 14px);
}
.teaser__rune {
  position: absolute; top: 30%; left: 50%; width: 9%; height: auto; aspect-ratio: 12 / 20;
  transform: translate(-50%, -50%);
  color: #6FC3CB; filter: drop-shadow(0 0 10px rgba(111, 195, 203, 0.8)) drop-shadow(0 0 24px rgba(75, 159, 168, 0.6));
}
.teaser__ring {
  position: absolute; top: 30%; left: 50%; width: 22%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%); border: 1px solid rgba(111, 195, 203, 0.5); opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .teaser__rock { animation: morph 18s ease-in-out infinite alternate; }
  .teaser__rune { animation: pulse 3.6s ease-in-out infinite; }
  .teaser__ring { animation: ripple 3.6s var(--ease) infinite; }
}
@keyframes morph {
  50% { border-radius: 48% 52% 36% 64% / 60% 56% 44% 40%; }
  100% { border-radius: 60% 40% 46% 54% / 68% 58% 42% 32%; }
}
@keyframes pulse { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; filter: drop-shadow(0 0 14px rgba(111, 195, 203, 1)) drop-shadow(0 0 34px rgba(75, 159, 168, 0.8)); } }
@keyframes ripple { 0% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.5); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(3.2); } }
.teaser__title { font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.6rem); line-height: 1.06; letter-spacing: -0.02em; font-weight: 450; text-wrap: balance; }
.teaser__text { margin-top: 1.25rem; font-size: 1.125rem; color: var(--on-dark-soft); max-width: 48ch; line-height: 1.7; }
.teaser__note { margin-top: 1.5rem; font-size: 0.92rem; color: var(--on-dark-muted); }
@media (max-width: 860px) {
  .teaser { grid-template-columns: 1fr; text-align: left; }
  .teaser__stone { width: min(72vw, 300px); justify-self: start; }
}

.announce-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.announce-card__media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 10; box-shadow: var(--shadow-lg); background: var(--navy-raised); }
.announce-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.announce-card__tagline { margin-top: 0.8rem; font-size: 1.2rem; color: var(--mist); }
@media (max-width: 860px) { .announce-card { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- placeholder art */
.art-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 0.9rem;
  background: radial-gradient(70% 80% at 70% 10%, rgba(75, 159, 168, 0.35), transparent 60%), linear-gradient(150deg, var(--slate), var(--navy) 75%);
  color: var(--on-dark);
}
.art-placeholder__rune { width: 26px; height: 44px; color: #6FC3CB; filter: drop-shadow(0 0 12px rgba(111, 195, 203, 0.6)); }
.art-placeholder span { font-family: var(--font-display); font-size: 1.25rem; opacity: 0.9; }

/* ---------------------------------------------------------------- post cards */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(1.25rem, 2vw, 1.75rem); }
.post-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(75, 159, 168, 0.35); }
.post-card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.post-card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy); }
.post-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.04); }
.post-card__body { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.5rem 1.6rem 1.7rem; flex: 1; }
.post-card__title { font-size: 1.35rem; line-height: 1.25; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.post-card__excerpt { color: var(--ink-muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .link-arrow { margin-top: auto; padding-top: 0.4rem; }
@media (min-width: 900px) {
  .post-grid--featured .post-card--featured { grid-column: 1 / -1; }
  .post-card--featured .post-card__link { flex-direction: row; }
  .post-card--featured .post-card__media { flex: 0 0 58%; aspect-ratio: auto; min-height: 340px; }
  .post-card--featured .post-card__body { padding: 2.5rem; justify-content: center; }
  .post-card--featured .post-card__title { font-size: 2rem; }
  .post-card--featured .link-arrow { margin-top: 0.5rem; }
}

.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.65rem; font-size: 0.875rem; color: var(--ink-muted); }
.post-meta__sep { opacity: 0.6; }
.pill {
  display: inline-flex; align-items: center; height: 26px; padding: 0 0.7rem; border-radius: 999px;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap;
  background: rgba(16, 29, 48, 0.07); color: var(--navy);
}
.pill--devlog { background: rgba(75, 159, 168, 0.16); color: var(--teal-ink); }
.pill--patch-notes { background: rgba(40, 85, 116, 0.13); color: var(--slate); }
.pill--news { background: rgba(16, 29, 48, 0.08); color: var(--navy); }
.pill--studio { background: var(--mist-tint); color: var(--navy); }
.pill--version { background: transparent; border: 1px solid rgba(40, 85, 116, 0.3); color: var(--slate); font-family: var(--font-mono); font-weight: 500; }
.pill--hidden { position: absolute; top: 12px; left: 12px; background: var(--navy); color: var(--cloud); }

/* ---------------------------------------------------------------- filters & pagination */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.25rem; }
.filters a {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1rem; border-radius: 999px;
  border: 1px solid rgba(16, 29, 48, 0.14); color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: 0.92rem;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.filters a span { font-size: 0.78rem; color: var(--ink-muted); }
.filters a:hover { border-color: var(--navy); color: var(--navy); }
.filters a[aria-current='page'] { background: var(--navy); border-color: var(--navy); color: var(--cloud); }
.filters a[aria-current='page'] span { color: var(--mist); }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-top: 3rem; }
.pagination a[rel='next'] { justify-self: end; }
.pagination__status { color: var(--ink-muted); font-size: 0.9rem; }

.empty-state { text-align: center; padding: clamp(3rem, 8vw, 6rem) 1rem; max-width: 460px; margin: 0 auto; }
.empty-state__rune { width: 22px; height: 36px; color: var(--teal); margin-bottom: 1.2rem; }
.empty-state h2 { font-size: 1.7rem; margin-bottom: 0.6rem; }
.empty-state p { color: var(--ink-muted); margin-bottom: 1.5rem; }

/* ---------------------------------------------------------------- page hero */
.page-hero { padding: calc(76px + clamp(3rem, 2rem + 4vw, 5.5rem)) 0 clamp(3rem, 2rem + 4vw, 5rem); background: var(--navy); overflow: hidden; }
.page-hero__title { font-size: clamp(2.6rem, 1.6rem + 3.6vw, 4.4rem); line-height: 1.04; letter-spacing: -0.025em; font-weight: 450; text-wrap: balance; }
.page-hero__text { margin-top: 1.1rem; font-size: 1.15rem; color: var(--on-dark-soft); max-width: 52ch; }

/* ---------------------------------------------------------------- article */
.article-hero { padding: calc(76px + clamp(2.5rem, 2rem + 3vw, 4.5rem)) 0 clamp(3rem, 2rem + 3vw, 4.5rem); background: var(--navy); overflow: hidden; }
.article-hero__title { font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.6rem); line-height: 1.08; letter-spacing: -0.02em; font-weight: 450; margin: 1.5rem 0 1.4rem; text-wrap: balance; }
.article-hero .post-meta { color: var(--on-dark-soft); }
.article-hero .pill { background: rgba(181, 216, 222, 0.12); color: var(--mist); }
.article-hero .pill--version { background: transparent; border-color: rgba(181, 216, 222, 0.3); }
.article:has(.article__cover) .article-hero { padding-bottom: clamp(7rem, 6rem + 6vw, 11rem); }
.back-link { display: inline-flex; color: var(--on-dark-soft); text-decoration: none; font-size: 0.92rem; font-weight: 500; transition: color 0.2s; }
.back-link:hover { color: var(--on-dark); }
.article__cover { position: relative; z-index: 2; margin-top: calc(-1 * clamp(5rem, 4rem + 5vw, 9rem)); }
.article__cover img { display: block; width: 100%; max-height: 620px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.article__section { padding-top: clamp(3rem, 2rem + 3vw, 4.5rem); }
.article__section--cover { margin-top: calc(-1 * clamp(4rem, 3rem + 4vw, 7rem)); padding-top: calc(clamp(4rem, 3rem + 4vw, 7rem) + clamp(2.5rem, 2rem + 2vw, 3.5rem)); }
.article__footer { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.article__updated { color: var(--ink-muted); font-size: 0.92rem; margin-bottom: 1.5rem; }
.adjacent { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.adjacent__link {
  display: flex; flex-direction: column; gap: 0.35rem; padding: 1.1rem 1.3rem; border-radius: var(--radius);
  border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-family: var(--font-display); font-size: 1.1rem; line-height: 1.3;
  transition: border-color 0.2s, background-color 0.2s;
}
.adjacent__link span { font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate); }
.adjacent__link:hover { border-color: var(--teal); background: #fff; }
.adjacent__link--older { text-align: right; }
@media (max-width: 640px) { .adjacent { grid-template-columns: 1fr; } .adjacent__link--older { text-align: left; } }

/* ---------------------------------------------------------------- feature hero (announced project, portfolio item) */
.feature-hero { min-height: min(86svh, 820px); display: flex; align-items: flex-end; background: var(--navy); overflow: hidden; padding: 140px 0 clamp(3rem, 6vw, 5rem); }
.feature-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.feature-hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(16, 29, 48, 0.35), rgba(16, 29, 48, 0.2) 35%, rgba(16, 29, 48, 0.92) 85%, var(--navy)), linear-gradient(90deg, rgba(16, 29, 48, 0.7), transparent 60%); }
.feature-hero:not(.feature-hero--art) .feature-hero__shade { background: radial-gradient(80% 80% at 80% 0%, rgba(40, 85, 116, 0.6), transparent 60%); }
.feature-hero__title { font-size: clamp(3rem, 1.8rem + 5vw, 6rem); line-height: 1; letter-spacing: -0.03em; font-weight: 450; margin-top: 0.4rem; text-wrap: balance; }
.feature-hero__logo { margin: 0.4rem 0 0; }
.feature-hero__logo img { max-width: min(520px, 90%); max-height: 220px; width: auto; display: block; filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.5)); }
.feature-hero__tagline { margin-top: 1rem; font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem); color: var(--on-dark-soft); max-width: 46ch; }
.feature-hero .back-link { margin-bottom: 1.2rem; }
.facts { display: flex; flex-wrap: wrap; gap: 0.75rem 2.5rem; margin: 1.8rem 0 0; }
.facts div { display: flex; flex-direction: column; gap: 0.2rem; }
.facts dt { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mist); }
.facts dd { margin: 0; font-size: 1.05rem; color: var(--on-dark); }

/* ---------------------------------------------------------------- gallery & lightbox */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1rem; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: var(--navy); }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s var(--ease), opacity 0.3s; }
.gallery a:hover img { transform: scale(1.04); }
.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(6, 12, 22, 0.92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox__inner { width: 100%; height: 100%; display: grid; place-items: center; padding: 56px 16px; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.lightbox__btn { position: fixed; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(245, 247, 245, 0.25); background: rgba(16, 29, 48, 0.6); color: var(--cloud); cursor: pointer; font-size: 1.3rem; }
.lightbox__btn:hover { background: var(--slate); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------------------------------------------------------------- portfolio cards */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(1.25rem, 2vw, 1.75rem); }
.work-card { position: relative; }
.work-card__link { display: block; text-decoration: none; color: inherit; }
.work-card__media { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; background: var(--navy); box-shadow: var(--shadow-sm); }
.work-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.work-card__link:hover .work-card__media img { transform: scale(1.05); }
.work-card__body { padding: 1.1rem 0.25rem 0; }
.work-card h3 { font-size: 1.4rem; color: var(--ink); letter-spacing: -0.01em; }
.work-card p { color: var(--ink-muted); margin-top: 0.3rem; }
.work-card__meta { font-size: 0.88rem; }

/* ---------------------------------------------------------------- contact */
.contact { text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact__title { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.3rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 450; max-width: 18ch; text-wrap: balance; }
.contact__text { margin-top: 1rem; color: var(--on-dark-soft); font-size: 1.125rem; max-width: 46ch; }
.contact__email {
  margin-top: 2.2rem; display: inline-flex; align-items: center; gap: 0.8rem;
  font-family: var(--font-display); font-size: clamp(1.35rem, 0.9rem + 2.4vw, 2.6rem); font-weight: 400; letter-spacing: -0.01em;
  color: var(--on-dark); text-decoration: none; padding-bottom: 0.3rem;
  background: linear-gradient(var(--teal), var(--teal)) left bottom / 0% 2px no-repeat, linear-gradient(rgba(245, 247, 245, 0.2), rgba(245, 247, 245, 0.2)) left bottom / 100% 1px no-repeat;
  transition: background-size 0.5s var(--ease), color 0.3s;
  overflow-wrap: anywhere;
}
.contact__email svg { width: 0.8em; height: 0.8em; flex: none; color: var(--teal); transition: transform 0.4s var(--ease); }
.contact__email:hover { background-size: 100% 2px, 100% 1px; color: #fff; }
.contact__email:hover svg { transform: translateX(6px); }
.contact--compact { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem; }
.contact--compact .contact__text { margin: 0; }
.contact--compact .contact__email { margin: 0; font-size: clamp(1.15rem, 1rem + 1vw, 1.6rem); }

.socials { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.socials--center { justify-content: center; margin-top: 2rem; }
.socials a {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.45rem 0.85rem; border-radius: 999px;
  border: 1px solid rgba(245, 247, 245, 0.18); color: var(--on-dark-soft); text-decoration: none; font-size: 0.86rem; font-weight: 500;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.socials a svg { width: 12px; height: 12px; opacity: 0.7; }
.socials a:hover { color: var(--on-dark); border-color: var(--teal); background: rgba(75, 159, 168, 0.1); }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--navy-deep); color: var(--on-dark-soft); padding: clamp(3.5rem, 6vw, 5rem) 0 1.5rem; border-top: 1px solid var(--line-dark); }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.site-footer__brand img { width: 150px; height: auto; }
.site-footer__brand p { margin-top: 1rem; font-size: 0.95rem; color: var(--on-dark-muted); }
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.site-footer a { color: var(--on-dark-soft); text-decoration: none; transition: color 0.2s; }
.site-footer a:hover { color: var(--on-dark); }
.site-footer__label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mist); margin-bottom: 0.8rem; }
.site-footer__email { font-family: var(--font-display); font-size: 1.15rem; color: var(--on-dark) !important; overflow-wrap: anywhere; }
.site-footer__legal { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-dark); font-size: 0.85rem; color: var(--on-dark-muted); }
@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 420px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- errors */
.error-page { min-height: 80svh; display: flex; align-items: center; background: radial-gradient(70% 70% at 50% 30%, rgba(40, 85, 116, 0.5), transparent 70%), var(--navy); }
.error-page__inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.error-page__symbol { width: 120px; height: auto; opacity: 0.9; margin-bottom: 1.5rem; }
.error-page .page-hero__text { margin-inline: auto; }

/* ---------------------------------------------------------------- admin shortcuts (signed-in only) */
.admin-dock { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; max-width: calc(100vw - 32px); }
.admin-pill, .preview-banner {
  display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.55rem 1rem; border-radius: 999px;
  background: rgba(16, 29, 48, 0.94); color: var(--cloud); font-size: 0.85rem; font-weight: 500;
  border: 1px solid var(--line-dark); box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.admin-pill a { color: var(--cloud); text-decoration: none; }
.admin-pill a:hover { color: var(--mist); }
.admin-pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(75, 159, 168, 0.25); }
.preview-banner { border-radius: var(--radius); background: var(--slate); max-width: 440px; line-height: 1.4; }
.preview-banner .rune { color: var(--mist); width: 10px; height: 16px; }
