/* glossover.co.uk — site styles */
:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --ink: #1d2327;
  --muted: #5d676e;
  --line: #e4e0d6;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: #d8efec;
  --code-bg: #0d1117;
  --shadow: 0 1px 2px rgba(20, 30, 40, .06), 0 8px 24px rgba(20, 30, 40, .06);
  --radius: 14px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11161a; --surface: #182026; --ink: #e8ecee; --muted: #9aa6ad; --line: #26313a;
    --accent: #2dd4bf; --accent-ink: #062b27; --accent-soft: #123a36;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11161a; --surface: #182026; --ink: #e8ecee; --muted: #9aa6ad; --line: #26313a;
  --accent: #2dd4bf; --accent-ink: #062b27; --accent-soft: #123a36;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; padding-bottom: 4rem; }
a { color: var(--accent); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 650; line-height: 1.15; letter-spacing: -.01em; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: .5rem 1rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.25rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--serif); font-size: 1.3rem; font-weight: 650; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 1.1rem; }
.nav { display: flex; gap: .25rem; margin-left: .5rem; }
.nav a { color: var(--muted); text-decoration: none; font-size: .93rem; font-weight: 500; padding: .4rem .7rem; border-radius: 8px; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); background: var(--accent-soft); }
.header-search { margin-left: auto; }
.header-search input {
  width: 190px; font: inherit; font-size: .9rem; padding: .45rem .8rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.theme-toggle, .nav-toggle { background: none; border: 0; color: var(--muted); cursor: pointer; padding: .4rem; border-radius: 8px; }
.theme-toggle:hover { color: var(--ink); background: var(--accent-soft); }
.nav-toggle { display: none; flex-direction: column; gap: 4px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; }

@media (max-width: 900px) {
  .nav-toggle { display: flex; order: 3; }
  .header-search { order: 1; margin-left: auto; }
  .header-search input { width: 130px; }
  .theme-toggle { order: 2; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0; margin: 0;
    flex-direction: column; padding: .5rem 16px 1rem; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a { padding: .7rem .8rem; font-size: 1rem; }
}
@media (max-width: 420px) { .brand span:last-child { display: none; } }

/* hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 2.5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 600; color: var(--accent); margin: 0 0 .75rem; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); margin: 0 0 1rem; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; margin: 0 0 1.5rem; }
.hero-search { display: flex; gap: .5rem; max-width: 560px; }
.hero-search input {
  flex: 1; min-width: 0; font: inherit; padding: .8rem 1.1rem; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
.hero-search button {
  font: inherit; font-weight: 600; padding: .8rem 1.3rem; border-radius: 12px; border: 0;
  background: var(--accent); color: var(--accent-ink); cursor: pointer;
}

/* section tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1rem; margin-bottom: 3.5rem; }
.tile {
  position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  color: #fff; text-decoration: none; background: #23313a; box-shadow: var(--shadow);
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,.05) 65%); }
.tile:hover img { transform: scale(1.04); }
.tile-text { position: absolute; z-index: 1; left: 1.2rem; right: 1.2rem; bottom: 1rem; display: flex; flex-direction: column; }
.tile strong { font-family: var(--serif); font-size: 1.5rem; font-weight: 650; }
.tile small { font-size: .9rem; opacity: .88; line-height: 1.4; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-head h2 { font-size: 1.8rem; margin: 0; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.25rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card-media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--accent-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-media--empty { display: grid; place-items: center; }
.card-media--empty span { font-family: var(--serif); font-size: 3.5rem; color: var(--accent); opacity: .6; }
.card-body { padding: 1rem 1.15rem 1.25rem; }
.card-meta { font-size: .8rem; color: var(--muted); margin: 0 0 .35rem; }
.card-meta span { color: var(--accent); font-weight: 600; }
.card h3 { font-size: 1.2rem; margin: 0 0 .45rem; }
.card-excerpt { font-size: .92rem; color: var(--muted); margin: 0; line-height: 1.55; }

/* page headers & listings */
.page-header { padding: 3rem 0 2rem; }
.page-header h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 .5rem; }
.subnav { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.chip {
  display: inline-block; font-size: .8rem; font-weight: 500; padding: .2rem .65rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); text-decoration: none; margin: 0 .3rem .3rem 0;
}
.chip:hover { background: var(--accent); color: var(--accent-ink); }
.archive-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.archive-list li { display: flex; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.archive-list time { flex: none; width: 4.5rem; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; padding-top: .1rem; }

/* article */
.post-header { padding: 3rem 0 1.5rem; }
.post-header h1 { font-size: clamp(2rem, 5vw, 3rem); margin: .25rem 0 0; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; color: var(--muted); font-size: .9rem; margin: 0; }
.post-meta .chip { margin: 0; }
.prose { overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose h2 { font-size: 1.6rem; margin-top: 2rem; }
.prose h3 { font-size: 1.3rem; margin-top: 1.6rem; }
.prose img { border-radius: 10px; display: block; margin-inline: auto; }
.prose .alignleft { float: left; margin: .3rem 1.25rem 1rem 0; max-width: 45%; }
.prose .alignright { float: right; margin: .3rem 0 1rem 1.25rem; max-width: 45%; }
.prose .aligncenter { margin-inline: auto; }
.prose .wp-caption { max-width: 100%; }
.prose .wp-caption-text, .prose figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: .4rem; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose blockquote { margin-inline: 0; padding-left: 1rem; border-left: 3px solid var(--accent); color: var(--muted); }
.prose table { border-collapse: collapse; width: 100%; font-size: .92rem; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: .4rem .6rem; }
.prose pre {
  background: var(--code-bg); color: #e6edf3; border-radius: 10px; padding: 1rem 1.15rem; overflow-x: auto;
  font-size: .85rem; line-height: 1.55; position: relative;
}
.prose pre code.hljs { background: none; padding: 0; }
.prose :not(pre) > code { background: var(--accent-soft); padding: .1em .35em; border-radius: 5px; font-size: .9em; }
.copy-btn {
  position: absolute; top: .5rem; right: .5rem; font: 500 .75rem var(--sans); padding: .25rem .6rem;
  border-radius: 6px; border: 1px solid #30363d; background: #161b22; color: #c9d1d9; cursor: pointer; opacity: .8;
}
.copy-btn:hover { opacity: 1; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose::after { content: ""; display: table; clear: both; }

/* galleries */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: .6rem; margin: 1.5rem 0; }
.gallery figure { margin: 0; }
.gallery a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--accent-soft); }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .35s ease; }
.gallery a:hover img { transform: scale(1.05); }
.gallery figcaption { font-size: .78rem; line-height: 1.35; text-align: left; margin-top: .3rem; }
@media (min-width: 900px) {
  .post .gallery { width: min(1000px, 100vw - 32px); position: relative; left: 50%; transform: translateX(-50%); }
}

.tags { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.tags > span { font-size: .8rem; color: var(--muted); margin-right: .4rem; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.pager a { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); font-weight: 500; line-height: 1.35; }
.pager small { color: var(--muted); font-weight: 400; font-size: .8rem; margin-bottom: .2rem; }
.pager .next { text-align: right; }

/* search */
.results { list-style: none; padding: 0; margin: 0; }
.results li { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.results img { flex: none; width: 96px; height: 72px; object-fit: cover; border-radius: 8px; }
.results h3 { margin: 0 0 .2rem; font-size: 1.15rem; }
.results h3 a { color: var(--ink); text-decoration: none; }
.results h3 a:hover { color: var(--accent); }
.results p { margin: 0; font-size: .9rem; color: var(--muted); }
.results mark { background: var(--accent-soft); color: var(--ink); border-radius: 3px; padding: 0 .1em; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(8, 10, 12, .94);
  display: none; align-items: center; justify-content: center; flex-direction: column; padding: 3.5rem 1rem 1rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 8rem); border-radius: 6px; object-fit: contain; }
.lightbox p { color: #d6dde1; font-size: .95rem; text-align: center; margin: .8rem 0 0; min-height: 1.5em; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%; font-size: 1.4rem; display: grid; place-items: center;
}
.lightbox button:hover { background: rgba(255,255,255,.22); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; }
.lb-next { right: 1rem; top: 50%; }
.lb-count { position: absolute; top: 1.4rem; left: 1.2rem; color: #9aa6ad; font-size: .85rem; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; font-size: .9rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
.footer-inner p { margin: 0; }
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
