/* Titope — editorial, warm. Cream paper, oxblood ink. */

:root {
  --paper: #f3eada;
  --paper-2: #eadfca;
  --ink: #1f1712;
  --ink-2: #5a4b3f;
  --ink-3: #3b2f27;
  --oxblood: #6b1220;
  --oxblood-2: #8a2233;
  --cream: #f6eddc;
  --tan: #b59a68;
  --hair: rgba(31, 23, 18, 0.32);

  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --text: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --max: 76rem;

  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--text);
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.2rem);
  line-height: 1.6;
  font-optical-sizing: auto;
  color: var(--ink);
  background-color: var(--paper);
  /* paper grain (inline SVG tile) + warm light pooling at the edges */
  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='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(120% 70% at 50% -10%, #faf4e8 0%, rgba(250, 244, 232, 0) 62%),
    radial-gradient(90% 60% at 100% 100%, rgba(150, 110, 60, 0.12), rgba(150, 110, 60, 0) 65%);
  background-attachment: scroll;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

svg {
  max-width: 100%;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 2px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--oxblood);
  color: var(--cream);
  text-decoration: none;
  font-size: 0.95rem;
}

.skip:focus {
  top: 1rem;
}

/* ---------- Shared small parts ---------- */

.kicker {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
}

.rule-thin {
  height: 0;
  border-top: 1px solid var(--ink);
}

.rule-double {
  height: 5px;
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.mark {
  display: block;
  width: 2.75rem;
  height: auto;
  color: var(--oxblood);
}

.label {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0;
  font-family: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--oxblood);
}

.label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
}

.label .num {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 1.05rem;
}

.biglink {
  display: inline-block;
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.45rem, 3.2vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
  text-decoration-color: currentColor;
  transition: text-underline-offset 0.25s ease, letter-spacing 0.25s ease;
}

.biglink::after {
  content: " \2192";
  content: " \2192" / "";
  display: inline-block;
  font-style: normal;
  transition: transform 0.25s ease;
}

.biglink:hover {
  text-underline-offset: 0.4em;
}

.biglink:hover::after {
  transform: translateX(0.2em);
}

.biglink--sm {
  font-size: 1.15rem;
}

/* ---------- Masthead ---------- */

.masthead {
  padding-top: clamp(0.5rem, 2vw, 1.25rem);
}

.bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-block: 0.85rem 0.9rem;
}

.bar > :last-child {
  justify-self: end;
  text-align: right;
}

.wordmark {
  margin: clamp(0.5rem, 2vw, 1.25rem) 0 clamp(0.2rem, 1vw, 0.75rem);
  padding-bottom: 0.2em;
  text-align: center;
  font-family: var(--display);
  font-weight: 350;
  font-size: clamp(4.5rem, 26vw, 19rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  color: var(--ink);
  font-optical-sizing: auto;
}

.wordmark .o {
  font-style: italic;
  color: var(--oxblood);
  padding-inline: 0.01em;
}

.tagline-row {
  display: grid;
  gap: 0.6rem 2rem;
  padding-block: 1.1rem 1.3rem;
  align-items: center;
  text-align: center;
}

.tagline {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.7rem, 3.8vw, 2.85rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.subline {
  margin: 0 auto;
  max-width: 34ch;
  color: var(--ink-2);
  font-size: 1.05rem;
  line-height: 1.5;
  text-wrap: pretty;
}

@media (min-width: 48rem) {
  .tagline-row {
    grid-template-columns: 1.25fr 1fr;
    text-align: left;
  }

  .subline {
    margin: 0;
    padding-left: 2rem;
    border-left: 1px solid var(--ink);
  }
}

/* ---------- About ---------- */

.about {
  display: grid;
  gap: 2.75rem;
  padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2.75rem, 7vw, 5.5rem);
}

.about__text .label {
  margin-bottom: 1.5rem;
}

.lede {
  margin: 0;
  font-size: clamp(1.3rem, 1rem + 1.25vw, 1.85rem);
  line-height: 1.5;
  text-wrap: pretty;
  hanging-punctuation: first;
}

.lede::first-letter {
  float: left;
  font-family: var(--display);
  font-weight: 500;
  font-size: 5.2em;
  line-height: 0.74;
  padding: 0.06em 0.09em 0 0;
  color: var(--oxblood);
}

.about__fig {
  margin: 0;
}

.about__fig svg {
  display: block;
  width: 100%;
  max-width: 24rem;
  height: auto;
}

.about__fig figcaption {
  max-width: 22rem;
  margin-top: 1.15rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--ink);
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  line-height: 1.25;
  color: var(--oxblood);
  text-wrap: balance;
}

@media (min-width: 56rem) {
  .about {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: start;
  }

  .about__fig {
    margin-top: 2.6rem;
  }
}

/* ---------- On the nightstand ---------- */

.shelf {
  padding-bottom: clamp(3.5rem, 9vw, 7rem);
}

.shelf__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--ink);
}

.shelf__head h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.7rem, 7.5vw, 5.75rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.shelf__head h2 em {
  font-weight: 300;
  color: var(--oxblood);
}

.shelf__head .kicker {
  padding-bottom: 0.4rem;
}

.shelf__list {
  display: grid;
  margin: clamp(1.75rem, 4vw, 3rem) 0 0;
  padding: 0;
  list-style: none;
}

.entry {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  column-gap: 1rem;
  padding-block: 1.75rem 2rem;
  border-top: 1px solid var(--hair);
}

.entry__num {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 3rem;
  line-height: 0.9;
  color: var(--oxblood);
}

.entry__body {
  min-width: 0;
}

.entry__genre {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--oxblood);
}

.entry h3 {
  margin: 0.4rem 0 0.8rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.55rem, 2.3vw, 2.05rem);
  line-height: 1.12;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.entry__text {
  margin: 0 0 1.1rem;
  color: var(--ink-3);
  text-wrap: pretty;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.status::before {
  content: "";
  width: 0.62em;
  height: 1.15em;
  background: var(--tan);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%);
}

.status--now {
  color: var(--oxblood);
}

.status--now::before {
  background: var(--oxblood);
}

@media (min-width: 60rem) {
  .shelf__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .entry {
    display: block;
    padding: 0.25rem clamp(1.25rem, 2.6vw, 2.75rem) 1rem;
    border-top: 0;
    border-left: 1px solid var(--hair);
  }

  .entry:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .entry:last-child {
    padding-right: 0;
  }

  .entry:nth-child(2) {
    margin-top: 2.75rem;
  }

  .entry:nth-child(3) {
    margin-top: 5.5rem;
  }

  .entry__num {
    display: block;
    margin-bottom: 0.9rem;
    font-size: 3.6rem;
  }
}

/* ---------- Coming soon band ---------- */

.soon {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--oxblood);
  color: var(--cream);
}

.soon__inner {
  display: grid;
  gap: 1.1rem;
  max-width: 48rem;
  padding-block: clamp(3.5rem, 9vw, 7rem);
}

.soon .kicker {
  color: #e6d3bd;
}

.soon h2 {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2.3rem, 6.4vw, 4.9rem);
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.soon p {
  margin: 0;
}

.soon__copy {
  max-width: 38ch;
  color: #ecdcc8;
  text-wrap: pretty;
}

.soon .biglink {
  justify-self: start;
  margin-top: 0.6rem;
}

.bgmark {
  position: absolute;
  z-index: -1;
  right: -8%;
  bottom: -14%;
  width: min(62vw, 36rem);
  height: auto;
  color: var(--cream);
  opacity: 0.08;
  pointer-events: none;
}

/* ---------- Footer ---------- */

.foot {
  padding-bottom: 2rem;
}

.soon + .foot {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
}

.foot__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-top: 1.25rem;
}

.foot__row .copy {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-2);
}

.foot__row .biglink {
  justify-self: end;
}

.foot--top .rule-double {
  margin-top: clamp(2rem, 5vw, 3.5rem);
}

@media (max-width: 31.99rem) {
  .foot__row {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.75rem;
    text-align: center;
  }

  .foot__row .biglink {
    justify-self: center;
  }
}

/* ---------- 404 ---------- */

.lost {
  display: grid;
  justify-items: center;
  gap: 1.1rem;
  padding-bottom: clamp(2.5rem, 7vw, 5rem);
  text-align: center;
}

.lost .rule-thin {
  width: 100%;
}

.lost .tagline {
  margin-top: 0.9rem;
}

.lost .subline {
  margin: 0 auto;
  padding: 0;
  border: 0;
}

.lost .biglink {
  margin-top: 0.6rem;
}

/* ---------- Motion ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes flicker {
  0%, 100% { transform: scale(1, 1) rotate(0deg); }
  25% { transform: scale(0.94, 1.07) rotate(-1.5deg); }
  50% { transform: scale(1.04, 0.96) rotate(1deg); }
  75% { transform: scale(0.97, 1.04) rotate(-0.5deg); }
}

@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.78; }
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: rise 0.95s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 120ms);
  }

  .flame {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: flicker 3.2s ease-in-out infinite;
  }

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

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .scroll-in {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 55%;
    }
  }
}

@media print {
  body {
    background: #fff;
  }

  .soon {
    background: none;
    color: var(--ink);
  }

  .bgmark {
    display: none;
  }
}
