/* maxlworks.com - one stylesheet for every page except the generated docs. */

@font-face {
  font-family: "EB Garamond";
  src: url("fonts/EBGaramond-VariableFont_wght.latin.woff2") format("woff2"), url("fonts/EBGaramond-VariableFont_wght.ttf") format("truetype");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("fonts/EBGaramond-Italic-VariableFont_wght.latin.woff2") format("woff2"), url("fonts/EBGaramond-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #141e32;
  --ink-2: #1b2842;
  --navy: #34507e;
  --paper: #efe9dc;
  --paper-2: #e5ddcc;
  --cream: #efe9dc;
  --muted: #c8c0b0;
  --muted-paper: #4f5869;
  --orange: #f6a83a;
  --orange-deep: #ef8d22;
  --line: rgba(239, 233, 220, 0.16);
  --line-paper: rgba(27, 40, 66, 0.16);
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  text-rendering: optimizeLegibility;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-weight: 480; line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.005em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
a { color: var(--orange); text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { color: var(--cream); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 2px; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.85em; background: rgba(239, 233, 220, 0.1); padding: 0.05em 0.35em; border-radius: 3px; }
.skip { position: absolute; left: -999px; top: 0; z-index: 50; background: var(--orange); color: var(--ink); padding: 0.5rem 1rem; }
.skip:focus { left: 16px; top: 16px; }

.container { width: 100%; max-width: 76rem; margin: 0 auto; padding: 0 var(--gutter); }
.measure > * { max-width: 40rem; }
.eyebrow {
  display: block;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.14em;
  font-size: 1.1rem;
  color: var(--orange);
  margin-bottom: 0.8rem;
}
.lead { font-size: clamp(1.3rem, 2.2vw, 1.55rem); line-height: 1.45; }
.muted { color: var(--muted); }

/* Sections: dark stage and light paper alternate. */
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.section.tight { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.paper { background: var(--paper); color: var(--ink-2); }
.paper a { color: var(--navy); }
.paper a:hover { color: var(--orange-deep); }
.paper .eyebrow { color: var(--navy); }
.paper .muted { color: var(--muted-paper); }
.paper code { background: rgba(27, 40, 66, 0.08); }
.stage { background: var(--ink-2); }

/* Header */
header.site { position: relative; z-index: 20; background: var(--ink); }
.has-hero header.site { position: absolute; top: 0; left: 0; right: 0; background: transparent; }
header.site .container { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 5rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--cream); text-decoration: none; font-size: 1.45rem; font-weight: 540; letter-spacing: 0.02em; }
.brand img { width: 38px; height: 38px; }
.brand:hover { color: var(--cream); }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { color: var(--cream); text-decoration: none; font-variant-caps: all-small-caps; letter-spacing: 0.12em; font-size: 1.15rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--orange); }
.nav .lang { color: var(--muted); }
.nav .btn { font-variant-caps: normal; letter-spacing: 0; font-size: 1.02rem; }
.nav .btn-primary { color: var(--ink); }
.nav .btn-primary:hover { color: var(--ink); }
.menu { display: none; position: relative; }
.menu summary {
  list-style: none; cursor: pointer; color: var(--cream);
  font-variant-caps: all-small-caps; letter-spacing: 0.12em; font-size: 1.15rem;
  border: 1px solid rgba(239, 233, 220, 0.45); border-radius: 999px; padding: 0.3rem 1rem;
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--cream); color: var(--ink); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 0.6rem); min-width: 13rem;
  background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.6rem 0; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.menu-panel a { display: block; padding: 0.55rem 1.2rem; color: var(--cream); text-decoration: none; }
.menu-panel a:hover, .menu-panel a[aria-current="page"] { color: var(--orange); }
@media (max-width: 860px) {
  .nav { display: none; }
  .menu { display: block; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.62rem 1.35rem; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: 1.08rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--orange); color: var(--ink); }
.btn-primary:hover { background: var(--cream); color: var(--ink); }
.btn-ghost { border-color: rgba(239, 233, 220, 0.55); color: var(--cream); }
.btn-ghost:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.paper .btn-ghost { border-color: rgba(27, 40, 66, 0.4); color: var(--ink-2); }
.paper .btn-ghost:hover { background: var(--ink-2); color: var(--cream); border-color: var(--ink-2); }
.paper .btn-primary { color: var(--ink); }
.paper .btn-primary:hover { background: var(--ink-2); color: var(--cream); }
.btn.is-pending { border: 1px dashed rgba(239, 233, 220, 0.5); color: var(--muted); cursor: default; }
.paper .btn.is-pending { border-color: rgba(27, 40, 66, 0.35); color: var(--muted-paper); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.6rem 0 0; }

/* Hero with the season switch */
.hero { position: relative; min-height: min(100svh, 68rem); display: flex; align-items: flex-end; overflow: hidden; background: var(--ink); }
.hero.short { min-height: min(82svh, 56rem); }
.hero > .container { position: relative; z-index: 1; }
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 42% 50%;
  opacity: 0; transition: opacity 1.4s ease;
}
.hero-media img.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hero-media img { transition: none; } }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(20, 30, 50, 0.6) 0%, rgba(20, 30, 50, 0) 22%),
    linear-gradient(90deg, rgba(20, 30, 50, 0.6) 0%, rgba(20, 30, 50, 0) 55%),
    linear-gradient(0deg, rgba(20, 30, 50, 0.94) 0%, rgba(20, 30, 50, 0.72) 30%, rgba(20, 30, 50, 0) 62%);
}
.hero-inner { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); padding-top: 7rem; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.hero-row > :first-child { flex: 1 1 30rem; min-width: 0; }
.hero-row > .seasons { flex: 0 0 auto; }
.hero h1 { font-size: clamp(2.9rem, 7.4vw, 6.2rem); font-weight: 440; line-height: 1; margin: 0 0 1rem; max-width: 14ch; }
.hero.short h1 { font-size: clamp(2.6rem, 5.6vw, 4.8rem); max-width: 17ch; }
.hero .sub { font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-style: italic; color: var(--muted); margin: 0; max-width: 34rem; }
.hero .actions { margin-top: 2rem; }
.seasons { display: flex; flex-direction: column; align-items: flex-end; gap: 0.6rem; }
.season-switch { display: flex; gap: 0.25rem; padding: 0.25rem; border: 1px solid rgba(239, 233, 220, 0.35); border-radius: 999px; background: rgba(20, 30, 50, 0.45); }
.season-switch[hidden] { display: none; }
.season-switch button {
  font: inherit; font-variant-caps: all-small-caps; letter-spacing: 0.12em; font-size: 1.12rem;
  color: var(--cream); background: transparent; border: 0; border-radius: 999px; padding: 0.3rem 0.95rem; cursor: pointer;
}
.season-switch button:hover { color: var(--orange); }
.season-switch button[aria-pressed="true"] { background: var(--cream); color: var(--ink); }
.seasons .note { font-size: 0.98rem; color: var(--muted); font-style: italic; margin: 0; }
@media (max-width: 700px) {
  .hero-row > .seasons { flex: 1 1 100%; align-items: stretch; }
  .season-switch button { flex: 1 1 0; padding: 0.3rem 0.2rem; letter-spacing: 0.06em; font-size: 1.05rem; }
}

/* Plain page head for pages without a hero */
.page-head { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 3.5rem); }
.page-head h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 450; margin: 0 0 0.6rem; }
.page-head .lead { color: var(--muted); margin: 0; max-width: 40rem; }

/* Big intro statement */
.statement { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.28; font-weight: 420; max-width: 56rem; margin: 0; }
.statement em { color: var(--navy); }

/* Split image / text */
.split { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split figure { margin: 0; }
.split img { width: 100%; border-radius: var(--radius); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.price { font-size: 1.5rem; margin: 0.4rem 0 0; }
.status { display: inline-block; font-variant-caps: all-small-caps; letter-spacing: 0.1em; font-size: 1.02rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.05rem 0.75rem; color: var(--muted); }
.paper .status { border-color: var(--line-paper); color: var(--muted-paper); }
.facts { list-style: none; padding: 0; margin: 1.4rem 0 0; border-top: 1px solid var(--line); }
.facts li { padding: 0.55rem 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; }
.facts li span:first-child { color: var(--muted); }
.facts li span:last-child { text-align: right; }
.paper .facts, .paper .facts li { border-color: var(--line-paper); }
.paper .facts li span:first-child { color: var(--muted-paper); }

/* Three features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: 3rem; }
.features img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.2rem; }
.features p { margin: 0; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }

/* Gallery and lightbox */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 2rem 0 0.75rem; }
.gallery a { display: block; overflow: hidden; border-radius: var(--radius); background: var(--ink-2); }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.6s ease; }
.gallery a:hover img { transform: scale(1.035); }
@media (max-width: 700px) { .gallery { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; } }
.caption { font-size: 1rem; font-style: italic; color: var(--muted); margin: 0.6rem 0 0; }
.paper .caption { color: var(--muted-paper); }
.lightbox {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(10, 15, 26, 0.96); color: var(--cream); overflow: hidden;
}
.lightbox::backdrop { background: rgba(10, 15, 26, 0.96); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; padding: 3.5rem 4.5rem 1rem; display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 9rem); max-height: calc(100dvh - 9rem); width: auto; height: auto; object-fit: contain; }
.lightbox figcaption { margin-top: 0.8rem; font-style: italic; color: var(--muted); text-align: center; }
.lightbox button {
  position: absolute; font: inherit; font-size: 1.6rem; line-height: 1; color: var(--cream);
  background: rgba(20, 30, 50, 0.7); border: 1px solid var(--line); border-radius: 999px;
  width: 3rem; height: 3rem; cursor: pointer;
}
.lightbox button:hover { background: var(--cream); color: var(--ink); }
.lightbox .lb-close { top: 1rem; right: 1rem; }
.lightbox .lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) {
  .lightbox figure { padding: 4rem 0.5rem 5rem; }
  .lightbox img { max-height: calc(100vh - 13rem); max-height: calc(100dvh - 13rem); }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 1rem; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery img, .card img { transition: none; }
  .gallery a:hover img, .card > a:hover img { transform: none; }
}

/* Ruled list ("What's next") */
.rows { list-style: none; padding: 0; margin: 2.5rem 0 0; border-top: 1px solid var(--line); }
.rows li { display: grid; grid-template-columns: 16rem 1fr auto; gap: 1.5rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.rows h3 { margin: 0; font-size: 1.5rem; }
.rows p { margin: 0; }
.paper .rows, .paper .rows li { border-color: var(--line-paper); }
@media (max-width: 700px) { .rows li { grid-template-columns: 1fr; gap: 0.3rem; } .rows .status { justify-self: start; } }

/* Cards (asset overview) */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.card { display: flex; flex-direction: column; }
.card > a { display: block; overflow: hidden; border-radius: var(--radius); }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.6s ease; }
.card > a:hover img { transform: scale(1.03); }
.card h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 1.2rem 0 0.4rem; }
.card h2 a { color: inherit; text-decoration: none; }
.card h2 a:hover { color: var(--orange-deep); }
.card .meta { margin: 0.8rem 0 0; }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }

/* Product page: text and a buy box that stays in view */
.product-layout { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.product-layout article > section { margin-bottom: clamp(3rem, 6vw, 4.5rem); scroll-margin-top: 1.5rem; }
.product-layout article > section:last-child { margin-bottom: 0; }
.product-layout article h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.buybox { position: sticky; top: 1.5rem; border: 1px solid var(--line-paper); border-radius: var(--radius); padding: 1.6rem; background: var(--paper-2); }
.buybox h2 { font-size: 1.55rem; margin: 0 0 0.2rem; }
.buybox .price { margin: 0.8rem 0 1.1rem; }
.buybox .btn { width: 100%; justify-content: center; margin-bottom: 0.6rem; }
.buybox .facts { margin-top: 1rem; font-size: 1.02rem; }
@media (max-width: 960px) {
  .product-layout { grid-template-columns: 1fr; }
  .buybox { position: static; order: -1; }
}
.prose ul { padding-left: 1.2rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.45rem; }
.prose h3 { margin-top: 1.8rem; }
.table-scroll { overflow-x: auto; }
table.specs { border-collapse: collapse; width: 100%; font-size: 1.05rem; }
table.specs th, table.specs td { text-align: left; vertical-align: top; padding: 0.65rem 0.8rem 0.65rem 0; border-bottom: 1px solid var(--line-paper); }
table.specs th { font-weight: 560; white-space: nowrap; padding-right: 1.5rem; }
.wide-shot { width: 100%; border-radius: var(--radius); margin: 1.5rem 0 0; }

/* Legal and other long text pages */
.legal h2 { font-size: 1.6rem; margin-top: 2.2rem; }
.legal address { font-style: normal; margin: 0 0 1em; }
.faq h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); margin-top: 1rem; }
.faq h3 { margin-top: 2.2rem; }

/* Contact band */
.contact { text-align: center; }
.contact h2 { margin-bottom: 0.8rem; }
.contact .lead { margin: 0 auto; max-width: 36rem; color: var(--muted); }
.contact .actions { justify-content: center; }

/* Footer */
footer.site { background: var(--ink); border-top: 1px solid var(--line); padding: 3rem 0 2.5rem; font-size: 1.02rem; color: var(--muted); }
footer.site .container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
footer.site .brand { font-size: 1.3rem; margin-bottom: 0.6rem; }
footer.site p { margin: 0; }
footer.site h2 { font-size: 1.05rem; font-variant-caps: all-small-caps; letter-spacing: 0.14em; color: var(--cream); font-weight: 500; margin: 0 0 0.6rem; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin-bottom: 0.3rem; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--orange); }
footer.site .copy { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 1.5rem; margin-top: 0.5rem; font-size: 0.95rem; }
@media (max-width: 700px) { footer.site .container { grid-template-columns: 1fr 1fr; } footer.site .about { grid-column: 1 / -1; } }

/* 404 */
.notfound { min-height: 70vh; display: flex; align-items: center; }
.notfound h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 450; }

/* Spacing helpers */
.mt { margin-top: 1.2rem; }
.mt-s { margin-top: 0.8rem; }
.mt-l { margin-top: 4rem; }
