@import url('https://fonts.googleapis.com/css2?family=Ovo&family=Quattrocento:wght@400;700&family=Sorts+Mill+Goudy:ital@0;1&display=swap');

/* marqaroll.com — global foundation */
:root {
  --black: #000;
  --near-black: #080808;
  --panel: #101010;
  --panel-2: #161616;
  --white: #fff;
  --paper: #f0f0ed;
  --muted: #b8b8b8;
  --dim: #777;
  --line: #343434;
  --orange: #ff6600;
  --frame: 1480px;
  --display: "Sorts Mill Goudy", Georgia, "Times New Roman", serif;
  --body: "Ovo", Georgia, "Times New Roman", serif;
  --ui: "Quattrocento", Georgia, "Times New Roman", serif;
  --serif: var(--body);
  --sans: var(--ui);
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 300px;
  color: var(--paper);
  font-family: var(--body);
  line-height: 1.6;
  background:
    linear-gradient(rgba(0,0,0,.76), rgba(0,0,0,.76)),
    repeating-linear-gradient(90deg, #000 0 72px, #eee 72px 144px);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .16;
  background-image:
    linear-gradient(90deg, transparent 49.5%, rgba(255,255,255,.18) 50%, transparent 50.5%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 4px);
}

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: .7rem 1rem;
  background: var(--orange);
  color: #000;
  font-family: var(--sans);
  font-weight: 800;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.site-frame {
  width: min(calc(100% - 64px), var(--frame));
  min-height: 100vh;
  margin-inline: auto;
  background: rgba(3,3,3,.93);
  border-inline: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 0 70px #000;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,.96);
}
.identity {
  display: flex;
  min-height: 142px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.identity::before, .identity::after {
  content: "";
  position: absolute;
  width: 28%;
  height: 1px;
  top: 50%;
  background: linear-gradient(90deg, transparent, #555);
}
.identity::before { left: 2%; }
.identity::after { right: 2%; transform: rotate(180deg); }
.identity__name {
  font-size: clamp(2.6rem, 5vw, 5.2rem);
  line-height: .92;
  letter-spacing: -.055em;
  text-shadow: 0 3px 18px #000;
}
.identity__name b { font-weight: 400; color: var(--orange); }
.identity__tagline {
  margin-top: .9rem;
  color: #aaa;
  font: 700 .7rem/1 var(--sans);
  letter-spacing: .34em;
}
.identity__tagline i { color: var(--orange); font-style: normal; padding: 0 .7em; }

.site-nav {
  display: flex;
  justify-content: center;
  border-top: 1px solid #1e1e1e;
}
.site-nav a {
  position: relative;
  padding: 1rem clamp(.7rem, 1.55vw, 1.55rem);
  color: #bbb;
  text-decoration: none;
  text-transform: uppercase;
  font: 800 .68rem/1 var(--sans);
  letter-spacing: .15em;
  border-inline-start: 1px solid #181818;
  transition: color .18s ease, background .18s ease;
}
.site-nav a:last-child { border-inline-end: 1px solid #181818; }
.site-nav a:hover, .site-nav a.is-active { color: #fff; background: #111; }
.site-nav a.is-active::after {
  content: "";
  position: absolute;
  height: 3px;
  inset: auto 22% -1px;
  background: var(--orange);
}
.nav-toggle { display: none; }

main { padding: 0 clamp(24px, 4vw, 72px) 70px; }
.ruled-section { border-bottom: 1px solid var(--line); }
.eyebrow {
  color: var(--orange);
  font: 800 .67rem/1.2 var(--sans);
  letter-spacing: .25em;
  text-transform: uppercase;
}
.ornament { display: flex; align-items: center; gap: 12px; width: min(380px, 80%); margin: 1.7rem auto; }
.ornament span { height: 1px; flex: 1; background: linear-gradient(90deg, transparent, #666); }
.ornament span:last-child { transform: rotate(180deg); }
.ornament b { color: var(--orange); font-size: .72rem; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}
.section-heading h2 { margin: .25rem 0 0; font-size: clamp(2rem, 3.2vw, 3.6rem); line-height: 1; font-weight: 400; }
.section-heading > a {
  color: #aaa;
  font: 800 .66rem/1 var(--sans);
  letter-spacing: .15em;
  text-decoration: none;
}
.section-heading > a:hover { color: var(--orange); }

.kicker {
  display: flex;
  gap: .8rem;
  color: var(--orange);
  font: 800 .64rem/1.2 var(--sans);
  letter-spacing: .16em;
}
.kicker time { color: #777; }

.button-link {
  display: inline-block;
  padding: .72rem .95rem;
  border: 1px solid #555;
  color: #fff;
  font: 800 .65rem/1 var(--sans);
  letter-spacing: .14em;
  text-decoration: none;
}
.button-link:hover { border-color: var(--orange); background: var(--orange); color: #000; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 30px clamp(24px, 4vw, 72px);
  border-top: 1px solid #444;
  background: #020202;
  font-family: var(--sans);
}
.site-footer > div { display: flex; flex-direction: column; }
.site-footer strong { color: var(--orange); letter-spacing: .16em; font-size: .8rem; }
.site-footer span { color: #777; font-size: .72rem; margin-top: .35rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.site-footer nav a { color: #aaa; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; text-decoration: none; }
.site-footer nav a:hover { color: var(--orange); }

@media (max-width: 900px) {
  .site-frame { width: calc(100% - 24px); }
  .identity { min-height: 115px; }
  .identity::before, .identity::after { display: none; }
  .nav-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .9rem 1.2rem;
    border: 0;
    border-top: 1px solid #222;
    background: #080808;
    color: #fff;
    font: 800 .7rem/1 var(--sans);
    letter-spacing: .18em;
    cursor: pointer;
  }
  .site-nav { display: none; flex-direction: column; }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 1rem 1.2rem; border: 0; border-top: 1px solid #181818; }
  .site-nav a.is-active::after { inset: 0 auto 0 0; width: 3px; height: auto; }
}
@media (max-width: 600px) {
  body {
    background:
      linear-gradient(rgba(0,0,0,.78), rgba(0,0,0,.78)),
      repeating-linear-gradient(90deg, #000 0 28px, #eee 28px 56px);
  }
  .site-frame { width: calc(100% - 12px); }
  .identity__name { font-size: clamp(2.35rem, 14vw, 4rem); }
  .identity__tagline { font-size: .56rem; letter-spacing: .2em; }
  main { padding-inline: 18px; }
  .section-heading { align-items: start; flex-direction: column; gap: 1rem; }
  .site-footer { align-items: start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}


/* Typography system v2
   Sorts Mill Goudy = display / literary identity
   Ovo = body prose
   Quattrocento = navigation / metadata / interface
*/
h1, h2, h3,
.identity__name,
.project-card strong,
.cover-placeholder b {
  font-family: var(--display);
  font-weight: 400;
}

.site-nav,
.nav-toggle,
.eyebrow,
.kicker,
.button-link,
.text-link,
.section-heading > a,
.site-footer,
.identity__tagline {
  font-family: var(--ui);
}

p, li, blockquote {
  font-family: var(--body);
}

.identity__name {
  letter-spacing: -.035em;
}

.identity__tagline,
.site-nav a,
.eyebrow,
.kicker {
  letter-spacing: .12em;
}

@media (max-width: 600px) {
  .identity__tagline { letter-spacing: .1em; }
}


/* =========================================================
   V4 ORNAMENTAL LANGUAGE
   Stripes = structure • swirls = identity • damask = depth
   fades = atmosphere • orange = attention
   ========================================================= */

main {
  position: relative;
  overflow: hidden;
}

/* Reusable curling flourish made entirely in CSS. */
.ruled-section {
  position: relative;
  border-bottom: 0;
}
.ruled-section::after {
  content: "";
  display: block;
  width: min(680px, 82%);
  height: 42px;
  margin: 34px auto 0;
  opacity: .58;
  background:
    radial-gradient(ellipse at 50% 0%, transparent 0 45%, rgba(255,255,255,.35) 46% 47%, transparent 48%) center 6px / 150px 30px no-repeat,
    radial-gradient(ellipse at 100% 50%, transparent 0 45%, rgba(255,255,255,.28) 46% 47%, transparent 48%) left center / 50% 34px no-repeat,
    radial-gradient(ellipse at 0% 50%, transparent 0 45%, rgba(255,255,255,.28) 46% 47%, transparent 48%) right center / 50% 34px no-repeat,
    linear-gradient(90deg, transparent, rgba(255,255,255,.3) 28%, transparent 47%, transparent 53%, rgba(255,255,255,.3) 72%, transparent) center / 100% 1px no-repeat;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

/* Heading ornament fades out instead of closing content in a rectangle. */
.section-heading {
  position: relative;
  padding-bottom: 1.25rem;
}
.section-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(560px, 72%);
  height: 1px;
  background: linear-gradient(90deg, var(--orange), rgba(255,255,255,.4) 18%, transparent);
}
.section-heading::before {
  content: "❧";
  position: absolute;
  left: min(545px, 69%);
  bottom: -.72rem;
  color: rgba(255,255,255,.38);
  font: 400 1.4rem/1 var(--display);
}

/* Footer now emerges from a fade rather than a hard rule. */
.site-footer {
  position: relative;
  border-top: 0;
  margin-top: 70px;
  background:
    linear-gradient(180deg, transparent 0, rgba(2,2,2,.82) 34%, #020202 70%);
  padding-top: 74px;
}
.site-footer::before {
  content: "❦";
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.28);
  font: 400 1.6rem/1 var(--display);
}

/* Small active-nav curl. */
.site-nav a.is-active::before {
  content: "•";
  position: absolute;
  top: .18rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--orange);
  font-size: .7rem;
}


/* =========================================================
   V5 CLEAN ORNAMENT PASS
   Preserve V4's open/faded geometry, but remove temporary
   CSS-generated swirls/damasks until real iconography/art exists.
   ========================================================= */

.ruled-section::after,
.section-heading::before,
.site-footer::before,
.site-nav a.is-active::before {
  content: none !important;
  display: none !important;
}

/* Keep understated fading rules as structural separators. */
.ruled-section::after {
  content: "" !important;
  display: block !important;
  width: min(720px, 82%);
  height: 1px;
  margin: 48px auto 0;
  opacity: 1;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22) 32%, rgba(255,102,0,.45) 50%, rgba(255,255,255,.22) 68%, transparent);
  mask-image: none;
}


/* =========================================================
   V13 — W5 CUSTOM CURSOR SYSTEM
   Browser-sized derivatives live in assets/cursors/.
   Native cursor keywords remain as fallbacks.
   ========================================================= */

html, body {
  cursor: url("../assets/cursors/default.png") 3 3, auto;
}

a, button, [role="button"], summary, label[for] {
  cursor: url("../assets/cursors/link.png") 5 4, pointer;
}

a:hover, button:hover, [role="button"]:hover, summary:hover {
  cursor: url("../assets/cursors/link-hover.png") 5 4, pointer;
}

input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="password"],
textarea,
[contenteditable="true"] {
  cursor: url("../assets/cursors/text.png") 24 24, text;
}

[aria-disabled="true"],
:disabled,
.book-action--disabled,
.gallery-cover--disabled {
  cursor: url("../assets/cursors/forbidden.png") 24 24, not-allowed;
}

[title][data-help],
.help-cursor {
  cursor: url("../assets/cursors/help.png") 5 4, help;
}

.wait-cursor,
[aria-busy="true"] {
  cursor: url("../assets/cursors/wait.png") 24 24, wait;
}

@media (pointer: coarse) {
  html, body, a, button, input, textarea, [role="button"] {
    cursor: auto;
  }
}


/* =========================================================
   V18 — GLOBAL RETURN TO TOP
   Injected by main.js on every W5 page.
   ========================================================= */
.global-return-top {
  position: fixed;
  z-index: 80;
  right: clamp(14px, 2vw, 30px);
  bottom: clamp(14px, 2vw, 28px);
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 50%;
  background: rgba(5,5,5,.78);
  box-shadow: 0 12px 30px rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, border-color .18s ease, background .18s ease;
}

.global-return-top.is-visible {
  opacity: .78;
  transform: none;
  pointer-events: auto;
}

.global-return-top:hover,
.global-return-top:focus-visible {
  opacity: 1;
  border-color: rgba(255,102,0,.5);
  background: radial-gradient(circle at 50% 20%, rgba(255,102,0,.14), rgba(5,5,5,.94) 70%);
}

.global-return-top img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin-top: -5px;
}

@media (max-width: 600px) {
  .global-return-top {
    width: 52px;
    height: 52px;
    right: 12px;
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .global-return-top { transition: none; }
}
