/* QWIQ Studio — small-press catalogue aesthetic.
   Warm paper, ink, one vermilion accent. Fraunces (display) + Atkinson Hyperlegible (body),
   self-hosted: this site makes no third-party requests, and the privacy page says so. */

:root {
    --paper: #F7F1E5;
    --paper-deep: #EFE5D0;
    --ink: #211C16;
    --ink-soft: #5F5546;
    --vermilion: #C0391B;
    --rule: #D9CCB2;
    --display: "Fraunces", Georgia, serif;
    --body: "Atkinson Hyperlegible", "Gill Sans", "Segoe UI", sans-serif;
    --measure: 64ch;
    --gutter: clamp(1.25rem, 5vw, 4rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.65;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* paper grain */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="240" height="240"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2"/><feColorMatrix values="0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.035 0"/></filter><rect width="240" height="240" filter="url(%23n)"/></svg>');
}

main { flex: 1; position: relative; z-index: 2; }

a { color: var(--vermilion); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

h1:focus { outline: none; }

::selection { background: var(--vermilion); color: var(--paper); }

/* ---------- masthead ---------- */

.masthead {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 1.4rem var(--gutter) 1.1rem;
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 3px 0 -2px var(--rule); /* double hairline */
}

.wordmark {
    font-family: var(--display);
    font-weight: 900;
    font-size: 1.55rem;
    letter-spacing: 0.01em;
    color: var(--ink);
    text-decoration: none;
}

.wordmark-rest { font-weight: 400; font-style: italic; }
.wordmark-dot { color: var(--vermilion); }

.masthead-nav a {
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    text-decoration: none;
    margin-left: 1.75rem;
}

.masthead-nav a:hover { color: var(--vermilion); }

/* ---------- hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(4rem, 10vw, 7.5rem) var(--gutter) clamp(3rem, 7vw, 5.5rem);
}

.hero-art {
    position: absolute;
    top: 50%;
    right: clamp(1rem, 6vw, 6rem);
    transform: translateY(-50%);
    width: clamp(15rem, 28vw, 25rem);
    pointer-events: none;
    user-select: none;
}

.hero-art svg { display: block; width: 100%; height: auto; }

.mark-bolt { animation: bolt-glow 3.2s ease-in-out infinite; }

@keyframes bolt-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
    .mark-bolt { animation: none; }
}

@media (max-width: 920px) {
    .hero-art { opacity: 0.14; right: -2rem; width: 20rem; }
}

.kicker {
    font-size: 0.85rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--vermilion);
    margin-bottom: 1.4rem;
}

.hero h1 {
    font-family: var(--display);
    font-optical-sizing: auto;
    font-weight: 900;
    font-size: clamp(2.6rem, 7.5vw, 5.4rem);
    line-height: 1.04;
    letter-spacing: -0.015em;
    max-width: 14ch;
}

.hero h1 em {
    font-style: italic;
    font-weight: 400;
    color: var(--vermilion);
}

.hero-sub {
    margin-top: 1.8rem;
    max-width: 52ch;
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    color: var(--ink-soft);
}

/* staggered load reveal */
.reveal { opacity: 0; transform: translateY(14px); animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.r1 { animation-delay: 0.05s; }
.r2 { animation-delay: 0.18s; }
.r3 { animation-delay: 0.34s; }
.r4 { animation-delay: 0.5s; }

@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .reveal { animation: none; opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}

/* ---------- principles ---------- */

.principles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 2.5rem;
    padding: 2.8rem var(--gutter);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background: var(--paper-deep);
}

.principle { padding: 0.4rem 0; }

.principle-num {
    display: block;
    font-family: var(--display);
    font-style: italic;
    font-weight: 400;
    font-size: 1.5rem;
    color: var(--vermilion);
    margin-bottom: 0.5rem;
}

.principle h2 {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.22rem;
    line-height: 1.25;
    margin-bottom: 0.6rem;
}

.principle p { font-size: 0.97rem; color: var(--ink-soft); }

@media (max-width: 760px) {
    .principles { grid-template-columns: 1fr; gap: 2rem 0; }
}

/* ---------- catalogue ---------- */

.catalogue { padding: clamp(3rem, 7vw, 5rem) var(--gutter); }

.catalogue-head {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2.2rem;
}

.catalogue h2,
.contact-band h2 {
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    letter-spacing: -0.01em;
}

.catalogue-note { font-style: italic; color: var(--ink-soft); }

.title-card {
    max-width: 34rem;
    padding: 1.6rem 1.8rem;
    margin-bottom: 1.25rem;
    background: var(--paper-deep);
    border: 1px solid var(--rule);
}

.title-card.forthcoming {
    background: transparent;
    border: 1.5px dashed var(--rule);
}

.title-no {
    font-family: var(--display);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--vermilion);
}

.title-card h3 {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.35rem;
    margin: 0.3rem 0 0.45rem;
}

.title-card.forthcoming h3 { color: var(--ink-soft); }

.title-card p { font-size: 0.97rem; color: var(--ink-soft); }

.title-links { margin-top: 0.7rem; }

/* ---------- contact band ---------- */

.contact-band {
    padding: 2.6rem var(--gutter) 3.2rem;
    border-top: 1px solid var(--rule);
}

.contact-band p { margin-top: 0.7rem; color: var(--ink-soft); }

/* ---------- prose pages ---------- */

.prose {
    max-width: var(--measure);
    padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) 4rem;
}

.prose h1 {
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    letter-spacing: -0.01em;
    margin-bottom: 0.4rem;
}

.prose-date {
    font-style: italic;
    color: var(--vermilion);
    margin-bottom: 2rem;
}

.prose h2 {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.3rem;
    margin: 2rem 0 0.6rem;
}

.prose p { margin-bottom: 0.9rem; }

/* ---------- colophon ---------- */

.colophon {
    position: relative;
    z-index: 2;
    padding: 1.6rem var(--gutter) 2rem;
    border-top: 1px solid var(--rule);
    box-shadow: 0 -3px 0 -2px var(--rule); /* double hairline */
    font-size: 0.88rem;
    color: var(--ink-soft);
}

.colophon-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.colophon-nav a { color: var(--ink-soft); margin-left: 1.25rem; }
.colophon-nav a:first-child { margin-left: 0; }
.colophon-nav a:hover { color: var(--vermilion); }

.colophon-note {
    margin-top: 0.8rem;
    font-style: italic;
    font-size: 0.82rem;
    opacity: 0.85;
}
