/* ==========================================================================
   Permission to Rest — Landing Page Styles
   Cover-matched palette and typography for dorirandazzo.com
   ========================================================================== */

/* --- CSS Variables (design tokens) --- */
:root {
  --color-bg: #fef9f3;
  --color-bg-alt: #f3e8df;
  --color-text: #2d3436;
  --color-text-muted: #5c6468;
  --color-accent: #c07a7f;
  --color-accent-light: #d08e92;
  --color-rose: #d9a08b;
  --color-mist: #a9c5d3;
  --color-gold: #f7d560;
  --color-white: #ffffff;
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Montserrat", system-ui, -apple-system, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --max-width: 72rem;
  --narrow-width: 42rem;
  --radius: 6px;
  --shadow: 0 4px 24px rgba(45, 52, 54, 0.1);
  --transition: 0.2s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-light);
}

h1, h2, h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  margin: 0 0 var(--space-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  margin: 0 0 var(--space-md);
  letter-spacing: 0.06em;
}

p {
  margin: 0 0 var(--space-sm);
}

em {
  font-style: italic;
}

/* --- Accessibility --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  z-index: 1000;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: var(--radius);
  font-family: var(--font-sans);
}

.skip-link:focus {
  top: var(--space-sm);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.narrow {
  max-width: var(--narrow-width);
}

.section {
  padding: var(--space-xl) 0;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(254, 249, 243, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(45, 52, 54, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
}

.logo {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-text);
  text-decoration: none;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  font-family: var(--font-sans);
}

.nav-list a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  text-decoration: none;
}

.nav-list a:hover {
  color: var(--color-accent);
}

.nav-cta {
  padding: 0.4rem 1rem;
  background: var(--color-accent);
  color: var(--color-white) !important;
  border-radius: var(--radius);
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--color-accent-light);
  color: var(--color-white) !important;
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: var(--space-xl) 0 var(--space-2xl);
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(247, 213, 96, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 20%, rgba(217, 160, 139, 0.2) 0%, transparent 50%),
    linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
  justify-items: center;
}

.hero-book {
  width: 100%;
  max-width: 17.5rem;
  animation: hero-rise 0.9s ease both;
}

.book-mockup {
  margin: 0;
  perspective: 1200px;
}

/* Whole book (spine + cover + pages) transforms together on hover */
.book-3d {
  position: relative;
  display: block;
  transform-style: preserve-3d;
  transform: rotateY(-14deg) rotateX(3deg);
  transform-origin: center center;
  transition: transform 0.45s ease, filter 0.45s ease;
  filter: drop-shadow(0 18px 28px rgba(45, 52, 54, 0.22))
    drop-shadow(0 6px 10px rgba(45, 52, 54, 0.12));
}

.book-mockup:hover .book-3d {
  transform: rotateY(-8deg) rotateX(2deg) translateY(-6px);
  filter: drop-shadow(0 26px 36px rgba(45, 52, 54, 0.26))
    drop-shadow(0 10px 14px rgba(45, 52, 54, 0.14));
}

.book-cover {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 1px 3px 3px 1px;
  box-shadow:
    inset 0 0 0 1px rgba(45, 52, 54, 0.06),
    inset 8px 0 14px -10px rgba(0, 0, 0, 0.35);
}

/* Soft spine edge — reads as depth, not a floating bar */
.book-spine {
  position: absolute;
  left: 0;
  top: 0.4%;
  bottom: 0.4%;
  width: 4.5%;
  z-index: 3;
  border-radius: 2px 0 0 2px;
  background: linear-gradient(
    90deg,
    rgba(20, 28, 34, 0.55) 0%,
    rgba(45, 52, 54, 0.25) 45%,
    rgba(255, 255, 255, 0.08) 78%,
    transparent 100%
  );
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.12);
  pointer-events: none;
  transform: translateZ(1px);
}

/* Page block on the open edge */
.book-pages {
  position: absolute;
  top: 0.6%;
  right: 0;
  bottom: 0.6%;
  width: 3.5%;
  z-index: 1;
  border-radius: 0 2px 2px 0;
  background: repeating-linear-gradient(
    to right,
    #f7f2ea 0px,
    #f7f2ea 1px,
    #e8e0d4 1px,
    #e8e0d4 2px
  );
  box-shadow: 1px 0 2px rgba(45, 52, 54, 0.12);
  transform: translateX(70%) translateZ(-2px);
  pointer-events: none;
}

.hero-content {
  width: 100%;
  max-width: 28rem;
  text-align: center;
}

.hero-content .eyebrow,
.hero-content #hero-title,
.hero-content .tagline,
.hero-content .hero-author,
.hero-content .btn {
  animation: hero-rise 0.9s ease both;
}

.hero-content #hero-title {
  animation-delay: 0.1s;
  color: var(--color-text);
}

.hero-content .tagline {
  animation-delay: 0.2s;
}

.hero-content .hero-author {
  animation-delay: 0.28s;
}

.hero-content .btn {
  animation-delay: 0.38s;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.tagline {
  font-family: var(--font-sans);
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.hero-author {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.hero-author strong {
  color: var(--color-text);
  font-weight: 600;
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .hero {
    padding: var(--space-2xl) 0;
    min-height: min(86vh, 44rem);
    display: flex;
    align-items: center;
  }

  .hero-layout {
    grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
    gap: var(--space-xl);
    justify-items: stretch;
  }

  .hero-book {
    max-width: 20rem;
    justify-self: end;
  }

  .hero-content {
    text-align: left;
    justify-self: start;
    max-width: 32rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-book,
  .hero-content .eyebrow,
  .hero-content #hero-title,
  .hero-content .tagline,
  .hero-content .hero-author,
  .hero-content .btn {
    animation: none;
  }

  .book-3d,
  .book-mockup:hover .book-3d {
    transition: none;
    transform: none;
    filter: drop-shadow(0 14px 24px rgba(45, 52, 54, 0.2));
  }
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background var(--transition), transform var(--transition);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-accent-light);
  color: var(--color-white);
  transform: translateY(-1px);
}

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

/* --- Placeholder notices --- */
.placeholder-notice {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  border-left: 3px solid var(--color-rose);
  padding: var(--space-xs) var(--space-sm);
  margin-bottom: var(--space-md);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.placeholder-label {
  font-family: var(--font-sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  color: var(--color-rose);
}

.lead {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.6;
  color: var(--color-text);
}

.book-closing {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--color-accent);
  margin-top: var(--space-md);
  margin-bottom: 0;
}

/* --- Author section --- */
.author-section {
  background: var(--color-bg-alt);
}

.author-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

/* --- Signup / JotForm --- */
.signup-section {
  background: var(--color-white);
  border-top: 1px solid rgba(45, 52, 54, 0.08);
  border-bottom: 1px solid rgba(45, 52, 54, 0.08);
}

.signup-intro {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.signup-privacy {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.signup-privacy a {
  font-weight: 600;
}

.jotform-wrapper {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: var(--space-sm);
  box-shadow: var(--shadow);
}

.jotform-iframe {
  width: 100%;
  min-height: 560px;
  border: none;
  display: block;
}

/* --- Reviews --- */
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

@media (min-width: 640px) {
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .reviews-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.review-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--shadow);
  border-top: 3px solid var(--color-rose);
}

.review-quote {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.6;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.review-quote::before {
  content: "\201C";
  font-size: 2rem;
  line-height: 0;
  vertical-align: -0.4em;
  color: var(--color-rose);
  margin-right: 0.1em;
}

.review-meta {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  margin-left: 75%;
}

.review-meta::before {
  content: "- ";
}

.review-name {
  font-weight: 600;
  color: var(--color-accent);
}

.reviews-empty {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--color-text-muted);
  margin-top: var(--space-lg);
}

/* --- Footer --- */
.site-footer {
  padding: var(--space-lg) 0;
  background: var(--color-text);
  color: rgba(254, 249, 243, 0.9);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-sm);
}

.site-footer a {
  color: var(--color-rose);
}

.site-footer p {
  margin: 0;
}

/* --- Legal / Privacy page --- */
.legal-section {
  padding-top: var(--space-xl);
}

.legal-content h1 {
  margin-bottom: var(--space-sm);
}

.legal-content h2 {
  font-size: 1.2rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.legal-updated {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.legal-content ul {
  padding-left: 1.25rem;
  margin-bottom: var(--space-sm);
}

.legal-content li {
  margin-bottom: 0.35rem;
}

.legal-back {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(45, 52, 54, 0.12);
  font-family: var(--font-sans);
}

.footer-links {
  margin: 0;
}

/* --- Mobile nav --- */
@media (max-width: 640px) {
  .nav-list {
    gap: var(--space-xs) var(--space-sm);
  }

  .nav-list a {
    font-size: 0.75rem;
  }

  .nav-cta {
    padding: 0.35rem 0.75rem;
  }

  .hero-book {
    max-width: 14.5rem;
  }
}
