/* Modern layer over site.css and company.css */
nav .portal-link { background: var(--copper-dark); border-color: var(--copper-dark); color: #fff; padding: .45rem .95rem; border-radius: 999px; }
nav .portal-link:hover, nav .portal-link:focus-visible { background: #6d3a14; color: #fff; text-decoration: none; }

.showcase { background: radial-gradient(900px 500px at 80% 20%, #b8753355, transparent 70%), linear-gradient(135deg, #1d1c1f, #34322f); color: #fff; overflow: hidden; }
.showcase-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.showcase h1 { font-size: clamp(2.7rem, 5.2vw, 4.8rem); }
.showcase h1 em { display: block; color: #e59a4f; }
.showcase .eyebrow { color: #f0b57b; }
.showcase-lede { margin-top: 1.2rem; max-width: 36ch; font-size: 1.15rem; color: #ded8d1; }
.showcase .actions { margin-top: 1.8rem; gap: 1.4rem; flex-wrap: wrap; }
.showcase .button { background: #e59a4f; border-color: #e59a4f; color: #1d1c1f; }
.showcase .textlink { color: #fff; }
.showcase-art { display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(2, clamp(130px, 17vw, 215px)); gap: .8rem; }
.shot { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; border: 1px solid #ffffff26; box-shadow: 0 18px 40px #0008; min-width: 0; min-height: 0; }
.shot-1 { grid-column: 1 / 5; }
.shot-2 { grid-column: 5 / 7; }
.shot-3 { grid-column: 1 / 3; background: #fff; }
.shot-4 { grid-column: 3 / 7; }

.service-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; margin-top: 2rem; }
.service-cards > div { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.6rem 1.3rem; text-align: center; box-shadow: 0 10px 30px -18px #4a362055; }
.service-cards p { margin-top: .7rem; color: var(--text); font-size: .95rem; }

.work { background: #1f1e21; color: #fff; }
.work .eyebrow { color: #f0b57b; }
.mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 230px; grid-auto-flow: dense; gap: .85rem; margin-top: 2rem; }
.tile { position: relative; overflow: hidden; border-radius: 14px; background: #fff; }
.tile.big { grid-column: span 2; grid-row: span 2; }
.tile.wide { grid-column: span 2; }
.tile img { position: absolute; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
/* drawings and charts are shown whole */
.tile:is([href$="cap.webp"], [href$="schematic.webp"], [href$="assembly-drawing.webp"], [href*="ml-"], [href$="ring.webp"], [href$="character.webp"]) img { object-fit: contain; padding: .5rem .5rem 2.2rem; }
.tile[href$="character.webp"] { background: #414141; }
.tile span { position: absolute; inset: auto 0 0; padding: 1.6rem .9rem .6rem; background: linear-gradient(transparent, #000d); color: #fff; font-weight: 650; font-size: .9rem; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.05); }

.lightbox { border: 0; border-radius: 14px; padding: 1rem; max-width: min(92vw, 900px); background: #fff; color: var(--ink); }
.lightbox::backdrop { background: #000c; }
.lightbox img { display: block; width: min(80vw, 820px); max-height: 72vh; object-fit: contain; }
.lightbox figcaption { margin-top: .6rem; font-weight: 650; }
.lightbox form { text-align: right; }
.lightbox button { border: 1px solid var(--line); background: var(--sand); border-radius: 999px; padding: .35rem 1rem; }

.category-photo { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin-bottom: 1rem; }
.flow { margin-bottom: 2rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1rem; }
.flow img { display: block; width: 100%; height: auto; }

.portalbox { border-radius: 16px; box-shadow: 0 20px 50px -30px #4a362066; }
.portalbox.wide { max-width: 62rem; }
.crumbs { overflow-wrap: anywhere; }
.entries { list-style: none; padding: 0; margin: 1.2rem 0; border-top: 1px solid var(--line); }
.entries li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem .2rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.readme { margin-top: 2rem; overflow-wrap: anywhere; }
.readme h1 { font-size: 2rem; letter-spacing: -.02em; }
.readme h2 { font-size: 1.5rem; }
.readme :is(h1, h2, h3, p, ul, ol, table, pre) { margin-block: .9rem; }
.readme img { max-width: 100%; height: auto; }
.readme pre, .readme table { display: block; overflow-x: auto; }
.readme td, .readme th { border: 1px solid var(--line); padding: .35rem .6rem; }

@media (max-width: 940px) {
  .showcase-inner { grid-template-columns: 1fr; }
  .service-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 190px; }
  nav .portal-link { order: -1; }
}
@media (max-width: 520px) {
  .service-cards { grid-template-columns: 1fr; }
  .mosaic { grid-auto-rows: 140px; gap: .5rem; }
  .tile span { font-size: .75rem; padding-inline: .5rem; }
}
@media (prefers-reduced-motion: reduce) { .tile img { transition: none; } .tile:hover img { transform: none; } }
.tile[href$="laser.webp"] img { object-position: right center; }
.tile[href$="figures.webp"] img { object-position: center bottom; }
