/* Maya Gammel — author site. The palette and type come from the cover of Same Time Next Week. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/fraunces-normal-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/fraunces-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("/fonts/jost-normal-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --asphalt: #111821;   /* wet asphalt: the page */
  --line: #2a3848;      /* field borders and rules */
  --cream: #fbf3e4;     /* the title and the text */
  --mist: #a9b6c4;      /* secondary text, the colour of the rain */
  --amber: #f5a54a;     /* her name, the buttons */
  --leaf: #d9542b;      /* link underlines only */
  --measure: 34rem;
  --gutter: clamp(1rem, 4vw, 3rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--asphalt);
  color: var(--cream);
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-variation-settings: "opsz" 14;
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--leaf); text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
a:hover { color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.label {
  font-family: "Jost", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.skip {
  position: absolute; left: var(--gutter); top: -3rem; z-index: 10;
  background: var(--amber); color: var(--asphalt); padding: 0.5rem 0.9rem; border-radius: 3px;
}
.skip:focus { top: 1rem; }

/* ---------- Top bar ---------- */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem var(--gutter);
  background: linear-gradient(to bottom, rgba(9, 13, 19, 0.72), rgba(9, 13, 19, 0));
}
.top .name { color: var(--amber); text-decoration: none; }
.top nav { display: flex; gap: clamp(0.9rem, 2.5vw, 2rem); }
.top nav a { color: var(--cream); text-decoration: none; }
.top nav a:hover { color: var(--amber); }
@media (max-width: 640px) { .top nav { display: none; } }

/* ---------- Hero: the lot, from above ---------- */
.hero { position: relative; }
.hero-art {
  position: relative;
  height: clamp(30rem, 88vh, 58rem);
  overflow: hidden;
}
.hero-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.hero-art::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--asphalt) 0%, rgba(17, 24, 33, 0.82) 22%, rgba(17, 24, 33, 0) 52%),
    linear-gradient(to right, rgba(17, 24, 33, 0.7) 0%, rgba(17, 24, 33, 0) 45%);
}
.hero-text {
  position: absolute; left: var(--gutter); bottom: clamp(2.5rem, 7vh, 5rem); z-index: 2;
  max-width: 40rem;
}
.hero h1 {
  margin: 0;
  font-weight: 800;
  font-variation-settings: "opsz" 144;
  font-size: clamp(3.3rem, 8vw, 7.25rem);
  line-height: 0.88;
  letter-spacing: -0.02em;
  text-shadow: 0 0.06em 0.4em rgba(4, 8, 14, 0.6);
}
.hero h1 span { display: block; }
.byline { margin: 1.2rem 0 0; font-style: italic; font-size: 1.3rem; color: var(--cream); }
.byline .label { font-style: normal; color: var(--amber); font-size: 1.05rem; letter-spacing: 0.2em; margin-left: 0.25em; }
.status { margin: 0.5rem 0 0; color: var(--mist); }

@media (max-width: 760px) {
  .hero-art { height: 70vh; min-height: 26rem; }
  .hero-art img { object-position: 50% 20%; }
  .hero-art::after { background: linear-gradient(to top, var(--asphalt) 0%, rgba(17, 24, 33, 0.55) 30%, rgba(17, 24, 33, 0) 60%); }
  .hero-text { position: relative; left: auto; bottom: auto; margin: -6.5rem var(--gutter) 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-text { animation: rise 1.1s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(0.6rem); } to { opacity: 1; transform: none; } }
}

/* ---------- Sections ---------- */
main > section { padding: clamp(4rem, 10vw, 7.5rem) var(--gutter); }
.wrap { max-width: 68rem; margin: 0 auto; }
h2 {
  margin: 0 0 1.4rem;
  font-weight: 600;
  font-variation-settings: "opsz" 72;
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.kicker { color: var(--amber); margin: 0 0 0.9rem; }
p { margin: 0 0 1.05em; }

/* The book */
.book .wrap {
  display: grid;
  grid-template-columns: minmax(14rem, 22rem) minmax(0, var(--measure));
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
  justify-content: center;
}
.book .cover img {
  width: 100%; height: auto;
  border-radius: 2px;
  box-shadow: 0 1.8rem 3.5rem -1rem rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.book h2 { font-style: italic; font-weight: 600; font-variation-settings: "opsz" 48; font-size: clamp(1.6rem, 2.8vw, 2.15rem); }
.book .closing { font-style: italic; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }
.soon { color: var(--mist); }
@media (max-width: 760px) {
  .book .wrap { grid-template-columns: 1fr; }
  .book .cover { max-width: 17rem; }
}

.button {
  display: inline-block;
  font-family: "Jost", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600; font-size: 0.95rem; letter-spacing: 0.06em;
  color: var(--asphalt); background: var(--amber);
  border: 0; border-radius: 3px;
  padding: 0.85rem 1.4rem;
  text-decoration: none; cursor: pointer;
}
.button:hover { color: var(--asphalt); background: #ffb866; }

/* About */
.about .wrap {
  display: grid;
  grid-template-columns: minmax(12rem, 18rem) minmax(0, var(--measure));
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  justify-content: center;
}
.about .photo img { width: 100%; height: auto; border-radius: 4px; filter: saturate(0.92); }
@media (max-width: 760px) {
  .about .wrap { grid-template-columns: 1fr; }
  .about .photo { max-width: 15rem; }
}

/* Contact */
.contact .wrap { max-width: var(--measure); }
.contact .actions { margin-top: 1.6rem; }

/* Footer */
footer {
  padding: 2.5rem var(--gutter) 3rem;
  border-top: 1px solid var(--line);
  color: var(--mist);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
}
footer a { color: var(--mist); }

/* Simple pages (the 404) */
.page { max-width: var(--measure); margin: 0 auto; padding: clamp(6rem, 12vw, 8rem) var(--gutter) 4rem; }
.page h1 { font-weight: 700; font-variation-settings: "opsz" 96; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.05; margin: 0 0 1rem; }
