:root {
  --navy: #0b1c3d;
  --navy-dark: #061126;
  --navy-soft: #17315f;
  --yellow: #f0b800;
  --yellow-dark: #d49f00;
  --cream: #f7f4ea;
  --white: #ffffff;
  --ink: #152039;
  --muted: #596275;
  --line: #ddd7c8;
  --shadow: 0 18px 45px rgba(11, 28, 61, 0.12);
  --radius: 18px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(
      circle at 8% 8%,
      rgba(240, 184, 0, 0.11),
      transparent 28rem
    ),
    radial-gradient(
      circle at 92% 34%,
      rgba(23, 49, 95, 0.08),
      transparent 32rem
    );
  content: "";
  pointer-events: none;
}

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

a {
  color: inherit;
}

p,
h1,
h2,
h3 {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--navy);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

p:last-child {
  margin-bottom: 0;
}

.wrap {
  width: min(100% - 40px, 1180px);
  margin-inline: auto;
}

/* Accessibility */

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--yellow);
  color: var(--navy-dark);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

/* Header */

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 4px solid var(--yellow);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 20px rgba(11, 28, 61, 0.08);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: contain;
}

.main-navigation {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.main-navigation a {
  padding: 9px 13px;
  border-radius: 8px;
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 750;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.main-navigation a:hover {
  background: var(--navy);
  color: var(--white);
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 86px;
}

.hero::after {
  position: absolute;
  z-index: -1;
  right: -140px;
  bottom: -190px;
  width: 480px;
  height: 480px;
  border: 80px solid rgba(240, 184, 0, 0.14);
  border-radius: 50%;
  content: "";
}

.hero-inner {
  display: grid;
  grid-template-columns:
    minmax(0, 1.6fr)
    minmax(260px, 0.65fr);
  align-items: center;
  gap: clamp(42px, 8vw, 100px);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--yellow-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  margin-bottom: 24px;
  font-size: clamp(2.75rem, 7vw, 5.7rem);
  letter-spacing: -0.055em;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 680px;
  margin-bottom: 15px;
  color: #3e485a;
  font-size: clamp(1rem, 1.8vw, 1.18rem);
}

.hero-actions,
.store-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

/* Buttons */

.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 19px;
  border: 2px solid var(--yellow);
  border-radius: 8px;
  background: var(--yellow);
  color: var(--navy-dark);
  font-size: 0.95rem;
  font-weight: 850;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  border-color: var(--yellow-dark);
  background: var(--yellow-dark);
  box-shadow: 0 10px 20px rgba(240, 184, 0, 0.22);
  transform: translateY(-2px);
}

.btn-secondary {
  border-color: var(--navy);
  background: transparent;
  color: var(--navy);
}

.btn-secondary:hover {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 10px 20px rgba(11, 28, 61, 0.16);
}

/* Hero information card */

.hero-note {
  position: relative;
  padding: 32px 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: var(--navy);
  box-shadow: var(--shadow);
  color: var(--white);
  transform: rotate(2deg);
}

.hero-note::before {
  position: absolute;
  top: -10px;
  left: 24px;
  width: 72px;
  height: 20px;
  background: rgba(240, 184, 0, 0.88);
  content: "";
  transform: rotate(-5deg);
}

.hero-note p {
  position: relative;
  margin: 0;
  padding: 15px 0 15px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 750;
}

.hero-note p:last-child {
  border-bottom: 0;
}

.hero-note p::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--yellow);
  content: "";
  transform: translateY(-50%);
}

/* Ebook section */

.guides {
  padding: 88px 0 100px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 38px;
}

.section-heading h2,
.stores h2,
.about h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.section-heading > p:not(.eyebrow),
.stores p,
.about-copy > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
}

/* Ebook grid */

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 8px 28px rgba(11, 28, 61, 0.08);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.card:hover {
  border-color: rgba(240, 184, 0, 0.72);
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

/*
  Keeps portrait, square and landscape ebook covers visible
  without cutting off their titles.
*/

.card > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 18px;
  background: linear-gradient(145deg, #eef1f7, #f9f7ee);
  object-fit: contain;
  object-position: center;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 23px;
}

.store-label {
  display: inline-block;
  margin-bottom: 13px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2f9;
  color: var(--navy-soft);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card h3 {
  margin-bottom: 10px;
  font-size: 1.35rem;
}

.card p {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.94rem;
}

.card .price {
  width: 100%;
  margin-top: auto;
  margin-bottom: 15px;
  padding-top: 15px;
  border-top: 1px solid #ece8de;
  color: var(--navy);
  font-size: 0.87rem;
  font-weight: 850;
}

.card .btn {
  width: 100%;
}

/* Store links section */

.stores {
  padding: 84px 0;
  background: var(--navy);
  color: var(--white);
}

.stores-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto;
  align-items: center;
  gap: 50px;
}

.stores h2 {
  color: var(--white);
}

.stores p {
  max-width: 680px;
  color: #cbd3e3;
}

.stores .eyebrow {
  color: var(--yellow);
}

.stores .store-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.stores .btn-secondary {
  border-color: var(--white);
  color: var(--white);
}

.stores .btn-secondary:hover {
  border-color: var(--white);
  background: var(--white);
  color: var(--navy);
}

/* About section */

.about {
  padding: 92px 0;
}

.about-inner {
  display: grid;
  grid-template-columns:
    minmax(230px, 0.55fr)
    minmax(0, 1.35fr);
  align-items: start;
  gap: clamp(40px, 8vw, 100px);
}

.about-copy {
  max-width: 720px;
}

.about-copy a:not(.btn) {
  color: var(--navy);
  font-weight: 800;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

/* Footer */

.site-footer {
  padding: 34px 0;
  border-top: 4px solid var(--yellow);
  background: var(--navy-dark);
  color: #c7cede;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer p {
  margin: 0;
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
}

.footer-links a {
  color: var(--white);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--yellow);
}

.copyright {
  color: #aeb8ca;
}

/* Tablet */

@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns:
      minmax(0, 1.3fr)
      minmax(230px, 0.7fr);
    gap: 45px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stores-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .stores .store-actions {
    justify-content: flex-start;
  }
}

/* Mobile */

@media (max-width: 760px) {
  .header-inner {
    min-height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .brand img {
    width: 52px;
    height: 52px;
  }

  .main-navigation {
    width: 100%;
    justify-content: flex-start;
    gap: 2px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .main-navigation a {
    flex: 0 0 auto;
    padding: 7px 10px;
    font-size: 0.88rem;
  }

  .hero {
    padding: 58px 0 64px;
  }

  .hero-inner,
  .about-inner {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(2.65rem, 13vw, 4.6rem);
  }

  .hero-note {
    max-width: 460px;
    transform: none;
  }

  .guides,
  .about {
    padding: 68px 0;
  }

  .stores {
    padding: 64px 0;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

/* Small phones */

@media (max-width: 560px) {
  .wrap {
    width: min(100% - 30px, 1180px);
  }

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

  .hero-actions,
  .store-actions {
    flex-direction: column;
  }

  .hero-actions .btn,
  .store-actions .btn {
    width: 100%;
  }

  .card > img {
    aspect-ratio: 16 / 12;
    padding: 14px;
  }

  .card-body {
    padding: 20px;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}