/* Touringsedan — black, silver, chrome. */

@font-face { font-family: "Orbitron"; src: url(/fonts/orbitron.woff2) format("woff2"); font-weight: 400 900; font-display: block; }
@font-face { font-family: "Michroma"; src: url(/fonts/michroma.woff2) format("woff2"); font-weight: 400; font-display: block; }

:root {
  color-scheme: dark;
  --black: #030304;
  --panel: rgba(6, 7, 9, 0.86);
  --text: #d4d8de;
  --muted: #8b929c;
  --silver: #c9ced6;
  --chrome: linear-gradient(180deg, #ffffff 0%, #e4e7eb 18%, #9aa2ac 44%, #1d2126 50%, #5c646e 53%, #c3c9d0 70%, #ffffff 86%, #8d949d 100%);
  /* For buttons with dark text on them: bright chrome without the dark horizon band behind the label. */
  --chrome-button: linear-gradient(180deg, #ffffff 0%, #eef0f2 30%, #cfd4d9 52%, #b9bfc6 56%, #dde1e5 82%, #f7f8f9 100%);
  --chrome-edge: linear-gradient(135deg, #ffffff 0%, #5a616a 22%, #f2f4f6 45%, #2a2e33 62%, #d8dce1 82%, #7d848d 100%);
  --sheen: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, 0.95) 50%, transparent 62%);
  --display: "Orbitron", "Avenir Next", system-ui, sans-serif;
  --wide: "Michroma", "Avenir Next", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--black); scrollbar-gutter: stable; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 17px/1.65 "Avenir Next", "Helvetica Neue", system-ui, sans-serif;
  overflow-x: hidden;
}
::selection { background: #e8ebef; color: #000; }

/* ------------------------------------------------------------------ backdrop */

.fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }

/* Studio lights overhead, plus a spotlight that follows the pointer (fx.js sets --mx/--my). */
.fx::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(38vmax 38vmax at var(--mx, 50%) var(--my, 25%), rgba(230, 236, 245, 0.10), transparent 70%),
    radial-gradient(ellipse 70% 45% at 50% -8%, rgba(225, 230, 240, 0.30), transparent 70%),
    radial-gradient(ellipse 35% 30% at 8% 18%, rgba(160, 170, 185, 0.12), transparent 70%),
    radial-gradient(ellipse 35% 30% at 92% 22%, rgba(160, 170, 185, 0.12), transparent 70%);
}

/* Film grain over everything behind the content. */
.fx::after {
  content: ""; position: absolute; inset: 0; opacity: 0.09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Light rays fanning down from above, turning slowly. */
.rays {
  position: absolute; left: 50%; top: -120vmax; width: 240vmax; height: 240vmax; margin-left: -120vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.10) 0deg 1.6deg, transparent 1.6deg 7deg);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 38%, #000 44%, transparent 62%);
          mask-image: radial-gradient(circle at 50% 50%, transparent 38%, #000 44%, transparent 62%);
  animation: rays 140s linear infinite;
}
@keyframes rays { to { transform: rotate(360deg); } }

/* Chrome grid floor gliding toward the viewer, like a showroom floor under the lights.
   The plane is drawn once and moved with transform, which the GPU filters smoothly.
   Animating background-position instead re-rasterised the grid every frame and the
   thin, foreshortened lines flickered. */
.floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 45vh; overflow: hidden;
  perspective: 360px; perspective-origin: 50% 0;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.7) 40%, transparent 88%);
          mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.7) 40%, transparent 88%);
}
.floor::before {
  content: ""; position: absolute; left: -150%; right: -150%; top: 0; height: 400%;
  transform-origin: 50% 0;
  background-image:
    linear-gradient(transparent 0, rgba(225, 230, 240, 0.35) 1px, rgba(235, 240, 248, 0.8) 2px, rgba(225, 230, 240, 0.35) 3px, transparent 4px),
    linear-gradient(90deg, transparent 0, rgba(225, 230, 240, 0.35) 1px, rgba(235, 240, 248, 0.8) 2px, rgba(225, 230, 240, 0.35) 3px, transparent 4px);
  background-size: 90px 90px;
  transform: rotateX(80deg) translateY(-90px);
  will-change: transform;
  animation: floor 5s linear infinite;
}
@keyframes floor { to { transform: rotateX(80deg) translateY(0); } }

/* A glinting horizon line where the floor meets the dark. */
.horizon {
  position: absolute; left: 0; right: 0; bottom: 45vh; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.0) 10%, #fff 50%, rgba(255, 255, 255, 0) 90%, transparent);
  box-shadow: 0 0 18px 2px rgba(220, 228, 240, 0.35), 0 0 80px 10px rgba(200, 210, 225, 0.12);
  opacity: 0.9;
}

/* A bright band of light that sweeps across the whole page now and then. */
.sweep {
  position: absolute; inset: -50% -100%;
  background: linear-gradient(115deg, transparent 46%, rgba(255, 255, 255, 0.07) 48.5%, rgba(255, 255, 255, 0.22) 50%, rgba(255, 255, 255, 0.07) 51.5%, transparent 54%);
  animation: sweep 11s cubic-bezier(.6, 0, .4, 1) infinite;
}
@keyframes sweep { 0%, 55% { transform: translateX(-45%); } 100% { transform: translateX(45%); } }

/* ------------------------------------------------------------------ chrome type */

.chrome {
  background: var(--sheen), var(--chrome);
  background-size: 260% 100%, 100% 100%;
  background-repeat: no-repeat;
  background-position: 150% 0, 0 0;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: glint 7s ease-in-out infinite;
}
@keyframes glint { 0%, 60% { background-position: 150% 0, 0 0; } 100% { background-position: -60% 0, 0 0; } }

/* ------------------------------------------------------------------ layout */

header, main, footer { width: min(1180px, 100% - 32px); margin-inline: auto; }

header { padding: 28px 0 22px; position: relative; }
header .site {
  display: inline-block; text-decoration: none;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 22px rgba(210, 220, 235, 0.22));
}
header .site:hover { text-shadow: none; }

/* The real rear badge off the car (images/touringsedan-badge.png, cut from a photo of it).
   A band of light runs across it now and then, masked to the badge so only the metal glints. */
.badge { position: relative; display: block; width: 300px; max-width: 100%; container-type: inline-size; }
.badge > img { display: block; width: 100%; height: auto; }
.badge::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, 0.75) 50%, transparent 60%) no-repeat;
  background-size: 260% 100%; background-position: 160% 0;
  -webkit-mask: url(/images/touringsedan-badge.png) 0 0 / 100% 100%;
          mask: url(/images/touringsedan-badge.png) 0 0 / 100% 100%;
  mix-blend-mode: overlay;
  animation: badge-glint 7s ease-in-out infinite;
}
@keyframes badge-glint { 0%, 60% { background-position: 160% 0; } 100% { background-position: -60% 0; } }

header p {
  margin: 10px 0 0; font: 0.62rem/1.8 var(--wide); letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted);
}
header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #6b727b 12%, #fff 50%, #6b727b 88%, transparent);
  box-shadow: 0 0 14px rgba(230, 235, 245, 0.45);
}

/* Site navigation: top right of every header. */
.site-nav { position: absolute; top: 30px; right: 0; display: flex; gap: 6px; z-index: 2; }
.site-nav a {
  position: relative; padding: 10px 14px;
  font: 0.62rem/1 var(--wide); letter-spacing: 0.26em; text-transform: uppercase; text-decoration: none; color: var(--silver);
}
.site-nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 1px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  transform: scaleX(0); transition: transform .35s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: #fff; }
body:has(.posts) .site-nav { top: 22px; }
@media (max-width: 700px) {
  .site-nav { position: static; justify-content: center; margin: -8px 0 14px; }
  .site-nav a { padding: 8px 10px; letter-spacing: 0.18em; }
}

/* The home page gets the full-size marquee. */
body:has(.posts) header { padding: clamp(56px, 12vh, 130px) 0 48px; text-align: center; }
body:has(.posts) header .site { display: block; }
body:has(.posts) .badge { width: min(980px, 100%); margin-inline: auto; }
body:has(.posts) header p { max-width: 46em; margin: 44px auto 0; font-size: clamp(0.58rem, 1.3vw, 0.74rem); color: var(--silver); }

/* Troféo: level and centred under "Touring" (whose letters span ~0.3–54% of the badge),
   beside the Oldsmobile plate. Home page marquee only; sized in cqw so it scales with the badge. */
.trofeo { display: none; }
body:has(.posts) .trofeo {
  display: block;
  position: absolute; left: 25.3cqw; bottom: 1cqw; z-index: 1; transform: translateX(-50%);
  line-height: 1;
}
.trofeo img {
  width: 30cqw; min-width: 96px; height: auto; display: block;
  filter: grayscale(1) brightness(1.25) contrast(1.1) drop-shadow(0 0 1px rgba(235, 240, 250, 0.7)) drop-shadow(0 0 10px rgba(235, 240, 250, 0.35));
}
a { color: var(--silver); text-decoration-color: rgba(201, 206, 214, 0.35); text-underline-offset: 3px; transition: color .2s, text-shadow .2s; }
a:hover { color: #fff; text-shadow: 0 0 12px rgba(255, 255, 255, 0.6); }

main { padding: 44px 0 20px; }

.label {
  display: flex; align-items: center; gap: 18px; margin: 0 0 30px;
  font: 0.7rem/1 var(--wide); letter-spacing: 0.42em; text-transform: uppercase; color: var(--silver);
}
.label::before, .label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #9aa2ac, transparent); }

/* ------------------------------------------------------------------ post cards */

.posts {
  list-style: none; padding: 0; margin: 0; counter-reset: card;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 30px;
}
.posts li { counter-increment: card; perspective: 900px; }

.card {
  --rx: 0deg; --ry: 0deg;
  position: relative; display: flex; flex-direction: column; height: 100%;
  text-decoration: none; color: var(--text);
  border: 2px solid transparent; border-radius: 6px; overflow: hidden;
  background: linear-gradient(#0a0b0e, #07080a) padding-box, var(--chrome-edge) border-box;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
}
.card:hover {
  color: #fff; text-shadow: none;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.8), 0 0 42px rgba(215, 222, 235, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.card .thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #000; }
.card .thumb img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; display: block;
  filter: grayscale(1) contrast(1.2) brightness(0.68);
  transform: scale(1.02); transition: filter .5s, transform .8s cubic-bezier(.2, .8, .2, 1);
}
.card:hover .thumb img { filter: none; transform: scale(1.09); }
.card .thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, #07080a 2%, transparent 45%), var(--sheen);
  background-size: 100% 100%, 260% 100%; background-repeat: no-repeat; background-position: 0 0, 160% 0;
  transition: background-position .9s ease;
}
.card:hover .thumb::after { background-position: 0 0, -70% 0; }

.card .num {
  position: absolute; top: 12px; left: 14px; z-index: 1;
  font: 900 1.9rem/1 var(--display);
  filter: drop-shadow(0 0 3px #000) drop-shadow(0 0 10px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 2px #000);
}
.card .num::before { content: counter(card, decimal-leading-zero); }
.card .body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h2 { margin: 0; font: 700 1.02rem/1.3 var(--display); letter-spacing: 0.03em; text-transform: uppercase; }
.card time { margin-top: auto; }

time { font: 0.62rem/1.6 var(--wide); letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }

/* ------------------------------------------------------------------ post pages */

article {
  position: relative; padding: clamp(22px, 5vw, 56px);
  border: 2px solid transparent; border-radius: 8px;
  background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--chrome-edge) border-box;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85), 0 0 50px rgba(200, 210, 225, 0.08);
}
article h1 {
  margin: 0 0 12px; font: 900 clamp(1.6rem, 4.6vw, 3.2rem)/1.08 var(--display);
  text-transform: uppercase; letter-spacing: 0.02em;
  filter: drop-shadow(0 0 16px rgba(210, 220, 235, 0.22));
}
.post { margin-top: 30px; }
.post .separator { text-align: center; }
/* Blogger floated its images with inline styles; stack them as a gallery instead. */
.post a[style] { float: none !important; margin: 0 !important; }
.post a:has(img) { display: block; }
.post img {
  display: block; max-width: 100%; height: auto; margin: 28px auto;
  border: 3px solid; border-image: var(--chrome-edge) 1;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(210, 220, 235, 0.12);
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s;
}
.post a:hover img { transform: scale(1.015); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.85), 0 0 46px rgba(225, 232, 245, 0.3); }

.back { margin: 40px 0 0; }
.back a {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  font: 0.68rem/1 var(--wide); letter-spacing: 0.3em; text-transform: uppercase; text-decoration: none; color: #0a0b0d;
  background: var(--chrome-button);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), inset 0 1px 0 #fff, inset 0 -1px 0 rgba(0, 0, 0, 0.4);
  transition: box-shadow .3s, transform .3s;
}
.back a:hover { color: #000; text-shadow: none; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 26px rgba(235, 240, 250, 0.5), inset 0 1px 0 #fff; }

footer {
  padding: 60px 0 40px; text-align: center;
  font: 0.6rem/1 var(--wide); letter-spacing: 0.4em; text-transform: uppercase; color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card { transform: none; }
}
