/* nicolemariapezza.com
   Colors and fonts live in the variables below. */
:root {
  --cream: #FFF7EB;
  --cream-85: rgba(255, 247, 235, .85);
  --cream-60: rgba(255, 247, 235, .6);
  --cream-20: rgba(255, 247, 235, .2);
  --red: #860912;
  --red-hover: #a10d18;
  --field: #F1EAE0;
  --bg: #120708;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Parkinsans", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  background-color: var(--bg);
  /* The flower painting, darkened so text and the book stand out */
  background-image:
    radial-gradient(ellipse at 70% 30%, rgba(18, 7, 8, .15), rgba(18, 7, 8, .7) 70%),
    linear-gradient(180deg, rgba(18, 7, 8, .35) 0%, rgba(18, 7, 8, .6) 40%, var(--bg) 100%),
    url("../images/background.jpg");
  background-position: center top;
  background-size: cover, cover, cover;
  background-repeat: no-repeat;
  color: var(--cream-85);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
em { font-style: italic; }
figure { margin: 0; }

:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }

/* Top bar */
.topbar {
  max-width: var(--wrap); margin: 0 auto;
  padding: 24px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.topbar .mark { width: 34px; height: 34px; flex: none; }
.topbar .name {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-style: italic; font-size: 22px;
  color: var(--cream); text-decoration: none; letter-spacing: -0.3px;
}
.lang { display: flex; border: 1px solid var(--cream-20); border-radius: 0 30px 30px 0; overflow: hidden; }
.lang a {
  font-size: 14px; font-weight: 400; letter-spacing: .5px;
  text-decoration: none; padding: 7px 14px; color: var(--cream-85);
}
.lang a[aria-current="true"] { background: var(--cream); color: var(--red); }

/* Hero */
.hero {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(24px, 6vw, 72px) var(--gutter) clamp(72px, 10vw, 140px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "head book" "body book";
  grid-template-rows: auto 1fr;
  column-gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.hero-head { grid-area: head; }
.hero-body { grid-area: body; }
.hero-book { grid-area: book; align-self: center; justify-self: center; position: relative; }

.kicker {
  margin: 0 0 14px;
  font-size: 14px; font-weight: 400; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--cream-60);
}
.hero h1 {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(48px, 7.4vw, 104px); line-height: .98; letter-spacing: -0.02em;
  color: var(--cream); margin: 0 0 32px;
}

/* The book: big, sharp, lit from behind */
.hero-book::before {
  content: ""; position: absolute; inset: 8% -6% 4%;
  background: radial-gradient(closest-side, rgba(134, 9, 18, .45), rgba(134, 9, 18, 0));
  filter: blur(30px); z-index: -1;
}
.hero-book img {
  width: min(460px, 100%);
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .65)) drop-shadow(0 6px 10px rgba(0, 0, 0, .4));
}

.blurb { max-width: 470px; font-size: 19px; line-height: 1.6; }
.blurb p { margin: 0 0 18px; }
.blurb p:first-child { color: var(--cream); }

/* Preorder form */
.preorder { margin-top: 36px; max-width: 500px; position: relative; }
.preorder h2 {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 30px; line-height: 1.15; color: var(--cream); margin: 0 0 14px;
}
.preorder .row { display: flex; }
.preorder input[type="email"] {
  flex: 1; min-width: 0; border: 0; border-radius: 0;
  background: var(--field); color: #2a1416;
  font-family: var(--sans); font-size: 18px; font-weight: 300;
  padding: 15px 16px;
}
.preorder input[type="email"]::placeholder { color: #8a7f78; }
.preorder .note { font-size: 14px; color: var(--cream-60); margin: 12px 0 0; }
.preorder .error { color: var(--cream); font-size: 15px; margin: 8px 0 0; }
.preorder .error:empty { display: none; }
.hp { position: absolute; left: -9999px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 18px; font-weight: 300; letter-spacing: -0.2px;
  text-decoration: none; border: 0; cursor: pointer; white-space: nowrap;
  border-radius: 0 40px 40px 0; padding: 15px 30px 15px 24px;
  transition: background-color .2s, transform .2s;
}
.btn b { font-weight: 500; }
.btn-red { background: var(--red); color: var(--cream); }
.btn-red:hover { background: var(--red-hover); }
.btn-cream { background: var(--cream); color: var(--red); }
.btn-cream:hover { background: #fff; }
.btn:disabled { opacity: .6; cursor: wait; }

/* About */
.about {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(56px, 8vw, 110px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 88px); align-items: center;
  border-top: 1px solid var(--cream-20);
}
.portrait img { width: 100%; max-width: 440px; margin: 0 auto; filter: drop-shadow(0 20px 30px rgba(0,0,0,.5)); }
.about h2 {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(40px, 5vw, 60px); line-height: 1; letter-spacing: -0.02em;
  color: var(--cream); margin: 0 0 28px;
}
.bio { font-size: 18px; line-height: 1.65; }
.bio p { margin: 0 0 18px; }
.links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Footer */
footer {
  border-top: 1px solid var(--cream-20);
  padding: 32px var(--gutter); text-align: center;
  font-size: 15px; color: var(--cream-60);
}
footer p { margin: 0 0 10px; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
footer nav a { text-decoration: none; }
footer nav a:hover { color: var(--cream); text-decoration: underline; }

/* Thank-you overlay */
.thanks {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 4, 5, .88);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.thanks.open { display: flex; }
.thanks .card { position: relative; max-width: 520px; text-align: center; }
.thanks h2 {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  color: var(--cream); font-size: clamp(26px, 4vw, 36px); line-height: 1.2; margin: 24px 0 0;
}
.thanks img { margin: 0 auto; max-height: 50vh; width: auto; }
.thanks .close {
  position: absolute; top: -12px; right: -12px;
  background: var(--cream); color: var(--red); border: 0; cursor: pointer;
  font-size: 22px; width: 40px; height: 40px; border-radius: 50%;
}

/* Simple text pages (privacy policy) */
.text-page { max-width: 760px; margin: 0 auto; padding: 40px var(--gutter) 80px; font-size: 18px; line-height: 1.6; }
.text-page h1 { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--cream); font-size: clamp(40px, 6vw, 64px); line-height: 1; margin: 0 0 32px; }
.text-page h2 { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--cream); font-size: 28px; margin: 36px 0 10px; }
.text-page a { color: var(--cream); }

/* Tablet and phone: one column, book right under the title */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "book" "body";
    grid-template-rows: auto;
    text-align: center;
  }
  .hero h1 { margin-bottom: 28px; }
  .hero-book { margin-bottom: 36px; }
  .hero-book img { width: min(360px, 82vw); }
  .blurb, .preorder { margin-left: auto; margin-right: auto; }
  .blurb { font-size: 17px; }
  .about { grid-template-columns: 1fr; text-align: center; }
  .bio { text-align: left; max-width: 560px; margin: 0 auto; }
  .portrait img { max-width: 320px; }
  .links { justify-content: center; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .topbar { padding-top: 16px; padding-bottom: 16px; }
  .topbar .name { font-size: 18px; }
  .kicker { font-size: 12px; letter-spacing: 2px; }
  .blurb { font-size: 16px; }
  .preorder h2 { font-size: 26px; }
  .preorder .row { flex-direction: column; gap: 10px; }
  .preorder .btn { border-radius: 0 40px 40px 0; width: 100%; }
  .bio { font-size: 16px; }
  .links .btn { width: 100%; }
}
