/* Colours sampled from the cover artwork. Headings use Gilda Display, a free
   lookalike of Celima (the cover font, which needs a paid web licence) */
:root {
  --color-bg: #fff5e8;
  --color-text: #4a3a36;
  --color-rose: #b06a64;
  --color-rose-dark: #8f504b;
  --color-teal: #435857;
  --color-gold: #9a7a3c;
  --font-heading: "Gilda Display", Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
  --hero-ratio: 2400 / 1791;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.5;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header: sits over the top-right corner of the hero */
.site-header {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
  padding: clamp(0.75rem, 2vw, 1.5rem);
}

/* Hero: the cover spans the full width and fills the screen height.
   The top 4.5% of the artwork (empty space above "Sing Along") is always trimmed,
   the author banner (from 86% down) is never shown, and at least 70% is kept. */
.hero {
  --cover-height: calc(100vw / (var(--hero-ratio)));
  --crop-top: 0.045;
  height: clamp(var(--cover-height) * 0.7, 100svh, var(--cover-height) * (0.86 - var(--crop-top)));
  overflow: hidden;
}

.hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center calc(var(--cover-height) * var(--crop-top) * -1);
}

/* Order section: heading on top, book photo on the left, ordering options on the right */
/* At least one screen tall, so "Order Now" brings it to the top of the screen */
.order {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 8vw, 6rem) 1rem;
}

.order h2 {
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 400;
  line-height: 1.15;
  text-align: center;
  color: var(--color-teal);
}

.order-layout {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: clamp(2rem, 4vw, 3rem);
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .order-layout {
    grid-template-columns: 1.4fr 1fr;
  }
}

/* Crops the portrait photo to a near-square frame showing the book and the stack */
.order-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 603 / 532;
  object-fit: cover;
  object-position: center 92%;
  border-radius: 1rem;
}

.order-options {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 2.5rem);
  max-width: 28rem;
}

.order-option h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.125rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-rose);
}

.order-option p {
  margin: 0 0 1.25rem;
  font-size: 1.0625rem;
}

.order-option .btn {
  display: block;
  width: 100%;
  padding-inline: 1rem;
  border-radius: 0.5rem;
}

.order-option .btn + .btn {
  margin-top: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border: 2px solid var(--color-rose);
  border-radius: 999px;
  background: var(--color-rose);
  color: #fff;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgb(74 58 54 / 0.15);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.btn:hover {
  background: var(--color-rose-dark);
  border-color: var(--color-rose-dark);
}

.btn:focus-visible {
  outline: 3px solid var(--color-teal);
  outline-offset: 3px;
}

.btn-secondary {
  background: transparent;
  color: var(--color-rose);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--color-rose);
  border-color: var(--color-rose);
  color: #fff;
}

.site-header .btn {
  padding: 0.6rem 1.4rem;
}

@media (max-width: 480px) {
  .site-header .btn {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
  }
}

.site-footer {
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-teal);
}

.site-footer p {
  margin: 0;
}
