@import url("/assets/index-BPxsl05Y-base.css");

/*
 * Wordmark optical alignment:
 * move only the upper K down while preserving the lower copper K.
 */
.wordmark {
  color: transparent;
  text-shadow: 0 2px 0 var(--ivory);
}

.wordmark span {
  text-shadow: none;
}

.wordmark:hover,
.wordmark:focus-visible {
  color: transparent;
  text-shadow: 0 2px 0 var(--ink);
}

/* Tekijä: kirjailijamuotokuva */
.author-copy {
  grid-template-columns: minmax(0, 0.85fr) minmax(14rem, 0.65fr) minmax(0, 0.78fr);
  gap: clamp(2.5rem, 5vw, 5.5rem);
  align-items: end;
}

.author-portrait {
  margin: 0;
  border: 1px solid rgb(180 129 98 / 34%);
  box-shadow: 0 2rem 4.5rem rgb(0 0 0 / 34%);
  overflow: hidden;
}

.author-portrait img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.82) contrast(1.03);
}

.author-copy > div p + p {
  margin-top: 1.35em;
}

/* Yhteys */
.contact-main {
  width: min(1280px, 100% - 64px);
  margin: 0 auto;
  padding: clamp(5rem, 9vw, 9rem) 0 clamp(7rem, 12vw, 12rem);
}

.contact-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(22rem, 0.78fr);
  gap: clamp(4rem, 9vw, 10rem);
  align-items: start;
}

.contact-heading h1 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: clamp(4.5rem, 9vw, 9rem);
  font-weight: 400;
  line-height: 0.82;
  letter-spacing: -0.07em;
}

.contact-heading > p:last-child {
  max-width: 35rem;
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  color: rgb(222 212 199 / 82%);
  font-size: 1rem;
  line-height: 1.8;
}

.contact-form-panel {
  border: 1px solid rgb(180 129 98 / 32%);
  background: rgb(36 20 31 / 58%);
  padding: clamp(2rem, 5vw, 4rem);
  box-shadow: 0 2rem 6rem rgb(0 0 0 / 25%);
}

.contact-form {
  position: relative;
}

.form-field + .form-field {
  margin-top: 2rem;
}

.form-field label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.form-field label span {
  color: rgb(243 238 228 / 42%);
  font-size: 0.62rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgb(16 11 15 / 55%);
  color: var(--ivory);
  padding: 0.95rem 1rem;
  outline: 0;
  transition: border-color 180ms ease, background 180ms ease;
}

.form-field textarea {
  min-height: 13rem;
  line-height: 1.65;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--copper);
  background: rgb(16 11 15 / 88%);
}

.form-submit-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  margin-top: 2.5rem;
}

.form-submit-row .button {
  border: 0;
  cursor: pointer;
}

.form-submit-row .button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.form-submit-row p {
  margin: 0;
  color: rgb(243 238 228 / 48%);
  font-size: 0.7rem;
  line-height: 1.55;
}

.form-status {
  min-height: 1.5rem;
  margin: 1.5rem 0 0;
  color: var(--paper);
  font-size: 0.82rem;
  line-height: 1.6;
}

.form-status.is-success {
  color: var(--ivory);
}

.form-status.is-error {
  color: #e4a5aa;
}

.contact-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (width <= 820px) {
  .contact-hero {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
}

@media (width <= 720px) {
  .main-nav a[href$="#tekija"] {
    display: none;
  }

  .contact-main {
    width: min(100% - 36px, 1280px);
    padding: 5rem 0 6rem;
  }

  .contact-form-panel {
    margin-inline: -18px;
    border-right: 0;
    border-left: 0;
    padding: 2rem 24px;
  }

  .form-submit-row {
    grid-template-columns: 1fr;
  }

  .form-submit-row .button {
    justify-self: start;
  }
}

@media (width <= 460px) {
  .main-nav a:last-child {
    display: block;
  }

  .contact-heading h1 {
    font-size: clamp(4rem, 20vw, 6rem);
  }
}

/* Varaslähtö: homepage feature */
.novel {
  grid-template-columns: minmax(7.5rem, 0.28fr) minmax(0, 1fr) minmax(13rem, 19rem);
  gap: clamp(2.5rem, 5vw, 5.5rem);
}

.novel-main,
.novel-label,
.novel-cover-link {
  position: relative;
  z-index: 1;
}

.novel-main {
  min-width: 0;
  z-index: 2;
}

.novel h2 {
  font-size: clamp(4.75rem, 7.2vw, 7.5rem);
  white-space: nowrap;
}

.novel-cover-link {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgb(243 238 228 / 24%);
  box-shadow: 0 2rem 4.5rem rgb(16 11 15 / 42%);
}

.novel-cover-link img,
.book-cover img {
  display: block;
  width: 100%;
  height: auto;
}

.novel-cover-link:focus-visible {
  outline: 2px solid var(--ivory);
  outline-offset: 0.4rem;
}

/* Varaslähtö: book page */
.book-main {
  width: min(1280px, 100% - 64px);
  margin: 0 auto;
  padding: clamp(5rem, 9vw, 9rem) 0 clamp(7rem, 12vw, 12rem);
}

.book-hero {
  display: grid;
  grid-template-columns: minmax(16rem, 24rem) minmax(0, 1fr);
  gap: clamp(4rem, 8vw, 9rem);
  align-items: start;
}

.book-cover {
  margin: 0;
  border: 1px solid rgb(180 129 98 / 38%);
  box-shadow: 0 2.5rem 6rem rgb(0 0 0 / 42%);
}

.book-copy {
  min-width: 0;
  padding-top: clamp(1rem, 3vw, 3rem);
}

.book-copy h1,
.book-reading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.book-copy h1 {
  font-size: clamp(5rem, 11vw, 10.5rem);
  line-height: 0.82;
  letter-spacing: -0.07em;
}

.book-tagline {
  max-width: 31ch;
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  line-height: 1.25;
}

.book-blurb {
  max-width: 44rem;
  margin-top: clamp(3rem, 6vw, 5rem);
  color: rgb(222 212 199 / 88%);
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  line-height: 1.85;
}

.book-blurb p {
  margin: 0 0 1.5em;
}

.book-blurb p:last-child {
  margin-bottom: 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  color: var(--ivory);
}

.book-reading {
  display: grid;
  grid-template-columns: minmax(15rem, 0.7fr) minmax(0, 1fr);
  gap: clamp(3rem, 8vw, 8rem);
  margin-top: clamp(7rem, 13vw, 13rem);
  padding-top: clamp(5rem, 9vw, 8rem);
  border-top: 1px solid var(--line);
}

.book-reading h2 {
  max-width: 8ch;
  font-size: clamp(3.75rem, 8vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.chapter-list {
  align-self: end;
  min-height: 12rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.reading-empty {
  max-width: 30rem;
  margin: 0;
  color: rgb(222 212 199 / 70%);
  font-size: 0.9rem;
  line-height: 1.75;
}

.chapter-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1;
  transition: color 180ms ease;
}

.chapter-card:last-child {
  border-bottom: 0;
}

.chapter-card:hover,
.chapter-card:focus-visible {
  color: var(--ivory);
}

.chapter-card span:last-child {
  color: var(--copper);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
}

/* Varaslähtö: reading pages */
.reading-main {
  width: min(100% - 64px, 1280px);
  margin: 0 auto;
  padding: clamp(5rem, 10vw, 9rem) 0 clamp(7rem, 12vw, 12rem);
}

.reading-page {
  width: min(100%, 47rem);
  margin: 0 auto;
}

.reading-header {
  margin-bottom: clamp(4rem, 9vw, 7rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
  border-bottom: 1px solid var(--line);
}

.reading-header .eyebrow a {
  color: inherit;
}

.reading-header h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.5rem, 12vw, 8rem);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: -0.055em;
}

.reading-prose {
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.125rem, 1.6vw, 1.25rem);
  line-height: 1.9;
}

.reading-prose p {
  margin: 0 0 1.55em;
}

.reading-prose p:last-child {
  margin-bottom: 0;
}

.chapter-pagination {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(5rem, 10vw, 8rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.chapter-pagination a {
  color: var(--paper);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 700;
}

.chapter-pagination a:last-child {
  margin-left: auto;
}

.main-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

@media (max-width: 1120px) {
  .novel {
    grid-template-columns: minmax(7rem, 0.25fr) minmax(0, 1fr);
  }

  .novel-cover-link {
    grid-column: 2;
    width: min(19rem, 72%);
  }

  .book-hero {
    grid-template-columns: minmax(14rem, 19rem) minmax(0, 1fr);
    gap: clamp(3rem, 6vw, 5rem);
  }

  .book-reading {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .author-copy {
    grid-template-columns: minmax(13rem, 0.68fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 6vw, 4rem);
  }

  .author-copy h2 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .reading-main {
    width: min(100% - 36px, 1280px);
    padding-top: 4.5rem;
  }

  .reading-prose {
    font-size: 1.08rem;
    line-height: 1.82;
  }

  .chapter-pagination {
    align-items: flex-start;
  }

  .novel {
    grid-template-columns: 1fr;
  }

  .novel-cover-link {
    grid-column: auto;
    width: min(18rem, 76%);
    justify-self: end;
  }

  .novel h2 {
    font-size: clamp(3.5rem, 18vw, 4.625rem);
  }

  .book-main {
    width: min(100% - 36px, 1280px);
    padding-top: 4.5rem;
  }

  .book-hero {
    grid-template-columns: 1fr;
  }

  .book-cover {
    width: min(19rem, 78%);
    margin: 0 auto;
  }

  .book-copy {
    padding-top: 1rem;
  }

  .book-copy h1 {
    max-width: 100%;
    font-size: clamp(3rem, 17vw, 4.25rem);
    white-space: nowrap;
  }

  .book-tagline,
  .book-blurb {
    max-width: 100%;
  }

  .author-copy {
    grid-template-columns: 1fr;
  }

  .author-copy h2 {
    grid-column: auto;
  }

  .author-portrait {
    width: min(22rem, 88%);
    margin-inline: auto;
  }
}
