:root {
  color-scheme: light;
  --navy: #0a172a;
  --ink: #13233b;
  --muted: #4c5970;
  --gold: #f6cc79;
  --paper: #f8f5ee;
  --line: #d9d9d3;
  --masthead-height: clamp(230px, 24vw, 326px);
  --nav-height: 48px;
  scroll-padding-top: calc(var(--masthead-height) + var(--nav-height) + 12px);
  font-family: "Instrument Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 3px solid #337fdd; outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
p, h1, h2, h3, figure { margin: 0; }
.shell { width: min(1120px, 100% - 64px); margin-inline: auto; }
.site-header, footer { background: var(--navy); color: #fcf7eb; }
.site-header { position: sticky; top: 0; z-index: 5; box-shadow: 0 4px 12px #0a172a2c; }
.masthead {
  display: grid;
  align-items: center;
  min-height: var(--masthead-height);
  background-color: #071527;
  background-image: linear-gradient(90deg, #071527 5%, #071527ee 40%, #07152750 69%, #07152700 88%), url("./assets/eems-construction.webp");
  background-position: center, right bottom;
  background-size: cover, auto 100%;
  background-repeat: no-repeat;
  border-bottom: 1px solid #f6cc7959;
}
.masthead-copy { padding-block: 15px; }
.wordmark {
  width: fit-content;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: clamp(1.25rem, 2.6vw, 2.35rem);
  line-height: 1;
  font-weight: 850;
  font-style: italic;
  letter-spacing: -.04em;
}
h1 {
  max-width: 27ch;
  font-size: clamp(1.55rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -.038em;
  text-wrap: balance;
  text-shadow: 0 2px 12px #0a172a;
}
h1 span { color: #ffe2a7; }
.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 4vw, 34px);
  min-height: var(--nav-height);
  font-size: .9rem;
}
.main-nav a { text-decoration: none; padding-block: 8px; }
.main-nav a:hover { text-decoration: underline; }
.nav-editions { margin-inline-start: auto; color: var(--gold); font-weight: 750; }
.section { padding-block: clamp(38px, 5vw, 72px); }
.book-preview { padding-block: clamp(24px, 4vw, 48px); background: #eaf0f5; border-bottom: 1px solid #dbe1e6; }
.book-preview .shell { max-width: 960px; }
.book-preview-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 14px; }
.book-preview h2 { font-size: clamp(1.65rem, 3.6vw, 2.45rem); }
.keynote-player { position: relative; }
.keynote-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
}
.keynote-play svg {
  width: clamp(72px, 13vw, 120px);
  height: auto;
  fill: currentColor;
  filter: drop-shadow(0 3px 9px #071527) drop-shadow(0 0 18px #071527c9);
}
.keynote-play:hover svg { color: #ffe2a7; }
.keynote-play.is-playing svg { visibility: hidden; }
.book-preview video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #071527; border-radius: 8px; box-shadow: 0 8px 24px #0715272a; }

.book-preview video::cue { color: #fff; background-color: #071527d9; font-size: clamp(.75rem, 1.8vw, .9rem); }

h2, h3 { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; letter-spacing: -.04em; }
h2 { font-size: clamp(2.3rem, 4.5vw, 4rem); line-height: 1.05; }
h3 { font-size: clamp(1.85rem, 3vw, 2.7rem); line-height: 1.1; }
.book-layout { display: grid; grid-template-columns: 1.25fr minmax(0, .9fr); gap: clamp(30px, 6vw, 78px); align-items: start; }
.book-copy { max-width: 66ch; }
.book-copy .book-subtitle { color: #174b91; font-size: clamp(1.15rem, 2vw, 1.35rem); font-weight: 750; line-height: 1.4; }
.book-copy p, .author-layout p { color: var(--muted); font-size: 1.06rem; line-height: 1.66; margin-top: 17px; }
.back-cover { width: min(100%, 460px); justify-self: center; }
.cover-link { display: block; border-radius: 4px; }
.back-cover img { width: 100%; border-radius: 4px; box-shadow: 0 12px 28px #0b19322e; }
figcaption { margin-top: 12px; text-align: center; font-size: .9rem; }
.author-section { background: #eaf0f5; border-block: 1px solid #dbe1e6; }
.author-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); gap: clamp(24px, 5vw, 64px); align-items: start; margin-top: 26px; }
.author-philosophy img { width: 100%; border-radius: 5px; }
.author-philosophy blockquote { margin: 24px 0 0; border-left: 3px solid #ac792e; padding-left: 16px; }
.author-philosophy blockquote p { font-style: italic; }
.author-links { display: flex; flex-wrap: wrap; gap: 16px; }
.author-layout p { max-width: 63ch; }
.edition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 26px; }
.edition { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fffdf8; }
.edition-art { height: clamp(168px, 22vw, 238px); display: grid; place-items: center; padding: 18px; background: #102341; }
.edition-art img { max-height: 100%; width: auto; object-fit: contain; min-height: 0; border: 1px solid #849abb70; box-shadow: 6px 9px 20px #030a1580; }
.hardback-art { background: #152a49; }
.edition-copy { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(18px, 3vw, 30px); gap: 9px; }
.format { color: var(--muted); font-weight: 700; font-size: .8rem; letter-spacing: .045em; }
.edition-copy > p { color: var(--muted); line-height: 1.6; }
.button { display: inline-flex; align-items: center; width: fit-content; min-height: 46px; padding: 10px 16px; border-radius: 5px; text-decoration: none; font-size: .9rem; font-weight: 750; }
.dark { background: #162a47; color: white; }
.dark:hover { background: #233f66; }
.edition-copy .button { margin-top: auto; }
.amazon-purchase { gap: 12px; border: 1px solid #b6c2d0; background: #fff; color: var(--ink); }
.amazon-purchase:hover { background: #eef4fa; }
.amazon-purchase img { width: 72px; height: auto; flex-shrink: 0; }
footer { padding-block: 23px; font-size: .88rem; }
footer .footer-details { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 3px 18px; }
.footer-isbn p { color: #c4d0e0; margin-bottom: 5px; }
.footer-isbn strong { font-size: clamp(1rem, 2vw, 1.2rem); font-variant-numeric: tabular-nums; white-space: nowrap; }
.footer-qr { display: grid; justify-items: center; gap: 7px; max-width: 145px; text-align: center; }
.footer-qr img { width: 112px; height: 112px; }
footer .footer-credit { display: flex; gap: 12px 26px; justify-content: space-between; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid #ffffff35; }
footer span { color: #c4d0e0; }
@media (max-width: 700px) {
  :root { --masthead-height: 182px; --nav-height: 44px; }
  .shell { width: calc(100% - 36px); }
  .book-layout, .edition-grid, .author-layout { grid-template-columns: 1fr; }
  .masthead { background-image: linear-gradient(90deg, #071527 5%, #071527e8 40%, #0715271a 90%), url("./assets/eems-construction.webp"); }
  h1 { max-width: 24ch; }
  .edition-art { height: 210px; }
}
@media (max-width: 360px) {
  .main-nav { font-size: .76rem; gap: 9px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  :root { --masthead-height: 95px; --nav-height: 38px; }
  h1 { font-size: clamp(1.25rem, 3.1vw, 2rem); }
  .masthead-copy { padding-block: 8px; }
  .wordmark { font-size: 1.1rem; }
}

.digital-art { grid-template-rows: minmax(0, 1fr); background: radial-gradient(ellipse at center, #244973, #102341 76%); }
.digital-preview {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(8px, 2.6vw, 26px);
  width: 100%;
  height: 100%;
  min-height: 0;
  padding-block: 4px;
  border-radius: 4px;
}
.reader-device {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  background: #11161d;
  border: 2px solid #c2cad3;
  box-shadow: 0 1px 0 #f1f5f9 inset, 4px 8px 14px #030a15a0;
}
.digital-preview .reader-device img { width: 100%; height: 100%; border: 0; box-shadow: none; }
.kindle-device {
  height: 64%;
  aspect-ratio: 108.6 / 157.8;
  padding: 7px 7px 14px;
  border-radius: 8px;
}
.kindle-device img { background: #ddd; filter: grayscale(1); }
.kindle-device span { position: absolute; inset: auto 0 3px; color: #c4c9ce; text-align: center; font-size: 7px; line-height: 1; }
.ipad-device {
  height: 100%;
  aspect-ratio: 179.5 / 248.6;
  padding: 7px;
  border-radius: 12px;
}
.ipad-device img { background: #071629; border-radius: 5px; }
.ipad-device::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 2px;
  width: 3px;
  aspect-ratio: 1;
  background: #647386;
  border-radius: 50%;
}
.handheld-iphone {
  display: grid;
  place-items: center;
  height: 83%;
  width: 29%;
  max-width: 150px;
  min-width: 0;
}
.digital-preview .handheld-iphone img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
  box-shadow: none;
  filter: drop-shadow(4px 8px 9px #030a1560);
}
.edition-cover-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 6px; }
.cover-viewer { background: var(--navy); color: #fcf7eb; }
.viewer-header { position: sticky; top: 0; z-index: 5; background: var(--navy); border-bottom: 1px solid #ffffff35; }
.viewer-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; padding-block: 10px; }
.viewer-back { display: inline-flex; min-height: 44px; align-items: center; padding: 8px 14px; border-radius: 5px; background: var(--gold); color: var(--navy); font-weight: 750; text-decoration: none; }
.viewer-back:hover { background: #ffdfa0; }
.viewer-bar h1 { font-size: 1.15rem; text-shadow: none; letter-spacing: normal; }
.viewer-main { width: min(calc(100% - 24px), 1600px); padding-block: 20px 36px; }
.viewer-main img { margin-inline: auto; }
@media (max-width: 380px) {
  .digital-preview { height: min(100%, 45vw); }
}

.share-button {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #ffffff35;
  border-radius: 7px;
  background: transparent;
  color: #fcf7eb;
  cursor: pointer;
}
.share-button[hidden] { display: none; }
.share-button:hover { background: #ffffff18; }
.share-button:focus-visible { outline: 3px solid #6ba8ff; outline-offset: 2px; }
.share-feedback { position: absolute; top: 100%; right: max(18px, calc((100% - 1120px) / 2)); width: min(325px, calc(100% - 36px)); background: var(--navy); color: #fcf7eb; border-radius: 0 0 7px 7px; }
#share-status:not(:empty) { padding: 10px 12px; font-size: .9rem; }
#share-url { width: calc(100% - 24px); margin: 0 12px 12px; padding: 6px; font: inherit; }
@media (max-width: 480px) {
  .main-nav { gap: clamp(6px, 2vw, 12px); line-height: 1.15; }
  .share-button { flex-basis: 36px; width: 36px; height: 36px; }
}
