@font-face {
  font-family: 'DM Sans';
  src: url('assets/dm-sans.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('assets/instrument-serif.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('assets/instrument-serif-italic.woff2') format('woff2');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --forest: #101b19;
  --paper: #f7f4eb;
  --ink: #182622;
  --green: #dceb9b;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem / 1.6 var(--sans); }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #457963; outline-offset: 5px; }
.site-header :focus-visible, .hero :focus-visible, .games-section :focus-visible, .site-footer :focus-visible { outline-color: var(--green); }

.wrap { width: min(100% - 112px, 1216px); margin-inline: auto; }
.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus { position: absolute; top: 12px; left: 12px; z-index: 10; background: var(--paper); padding: 8px 16px; }

.site-header { position: relative; background: var(--forest); color: var(--paper); z-index: 1; }
.header-inner { display: flex; justify-content: space-between; align-items: center; min-height: 79px; border-bottom: 1px solid #ffffff27; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; white-space: nowrap; font-weight: 650; letter-spacing: -.02em; }
.brand img { flex-shrink: 0; }
.header-inner nav, .footer-inner nav { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(16px, 3vw, 44px); }
.header-inner nav a, .footer-inner nav a { padding-block: 8px; color: #d9dfd5; text-decoration: none; font-size: .94rem; }
.header-inner nav a:hover, .footer-inner nav a:hover { color: var(--green); }

.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--forest); color: var(--paper); }
.hero::before {
  position: absolute;
  z-index: -1;
  content: '';
  inset: 0 0 0 35%;
  background:
    linear-gradient(90deg, var(--forest), #101b1936 48%, #101b1962),
    linear-gradient(0deg, var(--forest), #101b194f 60%, #101b1920),
    url('assets/earth-horizon.webp') center 40% / cover;
}
.hero-inner {
  min-height: 540px;
  display: grid;
  grid-template-columns: 1fr minmax(360px, .905fr);
  gap: 24px;
  align-items: center;
  padding-block: 74px 83px;
}
.hero-copy { position: relative; z-index: 1; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 15px; font-size: .72rem; font-weight: 700; letter-spacing: .145em; line-height: 1.55; text-transform: uppercase; }
.eyebrow span { width: 16px; height: 1px; background: currentColor; flex-shrink: 0; }
.hero .eyebrow, .games-section .eyebrow { color: var(--green); }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; }
.hero h1 { font-size: clamp(60px, 6.35vw, 100px); line-height: .96; letter-spacing: -.035em; }
.hero h1 em { color: var(--green); font-weight: 400; }
.hero-intro { max-width: 380px; margin: 23px 0 0; color: #d9e1d9; font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 28px; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  min-height: 49px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 7px;
  text-decoration: none;
  font-size: .91rem;
  line-height: 1.2;
  font-weight: 700;
  transition: background-color .2s, color .2s, border-color .2s;
}
.arrow { display: inline-block; position: relative; flex: none; width: 14px; height: 14px; }
.arrow::before {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
}
.arrow::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 1.5px;
  background: currentColor;
  transform: rotate(-45deg);
  transform-origin: right center;
}
.arrow-down { transform: rotate(90deg); }
.button-primary { background: var(--green); color: var(--ink); }
.button-primary:hover { background: #edf6b9; }
.button-outline { color: var(--paper); border-color: #b8c9b780; background: #101b1940; }
.button-outline:hover { color: var(--green); border-color: var(--green); }

.hero-gallery { position: relative; isolation: isolate; height: clamp(312px, 29.5vw, 422px); }
.hero-gallery::before {
  position: absolute;
  content: '';
  inset: 4% 4% 1% 1%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #bdd78630, transparent 70%);
  transform: rotate(-21deg);
}
.featured-book, .featured-game { display: block; position: absolute; transition: transform .25s ease-out; }
.featured-book {
  top: 0;
  left: 8%;
  width: 43%;
  transform: rotate(-8deg);
  border-radius: 3px 6px 6px 3px;
  box-shadow: -9px 15px 35px #000a, -3px 3px 0 #233b38;
}
.featured-book img { width: 100%; height: auto; border-radius: inherit; }
.featured-book:hover, .featured-book:focus-visible { transform: rotate(-5deg) translateY(-5px); }
.featured-game {
  right: 2%;
  bottom: 2%;
  width: 59%;
  border: 1px solid #dceb9b6b;
  border-radius: 11px;
  box-shadow: 6px 18px 40px #0009;
  transform: rotate(8deg);
  background: #0f2322;
}
.featured-game img { width: 100%; height: auto; border-radius: inherit; }
.featured-game:hover, .featured-game:focus-visible { transform: rotate(4deg) translateY(-5px); }
.featured-arrow {
  display: grid;
  place-items: center;
  position: absolute;
  bottom: 9px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: var(--ink);
  font-size: 1.05rem;
}

.books-section, .games-section { padding-block: 71px 82px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px 28px; margin-bottom: 27px; }
.books-section .eyebrow, .about-section .eyebrow { color: #3d6650; }
.section-head h2, .about-section h2 { font-size: clamp(48px, 5.4vw, 76px); line-height: .98; letter-spacing: -.018em; }
.section-link {
  display: inline-flex;
  align-items: center;
  align-self: start;
  gap: 10px;
  text-underline-offset: .35em;
  text-decoration-color: #40775a90;
  text-decoration-thickness: 1px;
  font-size: .91rem;
  font-weight: 700;
}
.section-head .section-link { align-self: end; padding-block: 7px 4px; }
.section-link:hover { text-decoration-color: currentColor; }
.section-link span { flex-shrink: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 21px; }
.filters button {
  border: 1px solid #cccfc1;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  min-height: 42px;
  padding: 5px 15px;
  border-radius: 100px;
  font-size: .86rem;
  line-height: 1.15;
  font-weight: 600;
}
.filters button:hover { background: #e8e9dc; }
.filters button[aria-pressed='true'] { background: var(--forest); border-color: var(--forest); color: var(--paper); }
.book-grid, .game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 23px; }
.book-card, .game-card { min-width: 0; }
.book-card, .book-link { display: flex; flex-direction: column; }
.book-link { flex: 1; color: inherit; text-decoration: none; border-radius: 9px 9px 0 0; }
.book-art {
  height: clamp(180px, 18.4vw, 258px);
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 9px;
  background: var(--art);
  text-decoration: none;
}
.book-art::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse at 52% 30%, #ffffff88, transparent 64%), linear-gradient(154deg, #ffffff25, #12252320);
}
.earth-art { --art: #bbccd4; }
.war-art { --art: #d6c7b6; }
.cipher-art { --art: #bdcfc7; }
.canada-art { --art: #cbcad7; }
.classroom-art { --art: #cbd0ae; }
.tasneem-art { --art: #eddcc3; }
.book-art img {
  width: auto;
  height: 78%;
  max-width: 83%;
  position: absolute;
  inset: 0;
  margin: auto;
  object-fit: contain;
  border-radius: 1px 3px 3px 1px;
  box-shadow: 2px 3px 1px #17201f30, 9px 13px 20px #17201f48;
  transition: transform .22s ease-out;
}
.book-card:hover img, .book-card:focus-within img { transform: translateY(-3px) rotate(-1.2deg); }
.book-copy { padding: 15px 0 10px; flex: 1; border-bottom: 1px solid #d8d8cb; }
.genre { margin: 0 0 5px; color: #426351; font-size: .68rem; font-weight: 700; letter-spacing: .12em; line-height: 1.5; text-transform: uppercase; }
.book-copy h3, .game-copy h3 { font-size: clamp(27px, 2.85vw, 39px); line-height: 1.02; }
.book-link:hover h3 { text-decoration: underline; text-underline-offset: .13em; text-decoration-thickness: 1px; }
.book-copy > p:last-child, .game-copy > p:not(.genre) { margin: 8px 0 6px; font-size: .92rem; line-height: 1.55; }
.book-copy > p:last-child { color: #495950; }

.games-section { background: var(--forest); color: var(--paper); }
.games-section .section-link, .game-link { color: var(--green); text-decoration-color: #dceb9b70; }
.game-card { display: flex; flex-direction: column; border: 1px solid #ffffff28; border-radius: 11px; overflow: hidden; background: #1a2824; }
.game-card > img { width: 100%; height: auto; aspect-ratio: 630 / 500; object-fit: cover; background: #1b3330; }
.game-copy { display: flex; flex-direction: column; flex: 1; padding: 18px 19px 19px; }
.game-copy .genre { color: #becda5; }
.game-copy > p:not(.genre) { color: #d3dbd0; }
.game-link { display: inline-flex; align-items: center; align-self: start; gap: 9px; margin-top: auto; padding-top: 12px; font-weight: 700; font-size: .88rem; text-underline-offset: .34em; }
.game-link:hover { text-decoration-color: currentColor; }

.about-section { padding-block: 64px 69px; background: #e6e9d9; }
.about-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 25px 40px; }
.about-copy > p { max-width: 500px; margin: 0 0 12px; color: #314339; }
.site-footer { background: #101b19; color: var(--paper); }
.footer-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 28px; padding-block: 16px; }

@media (max-width: 1120px) {
  .wrap { width: min(100% - 72px, 1216px); }
  .hero-inner { min-height: 482px; grid-template-columns: 1fr minmax(300px, .85fr); gap: 18px; }
  .hero h1 { font-size: clamp(55px, 7.2vw, 87px); }
  .featured-book { left: 3%; width: 45%; }
  .featured-game { right: 3%; bottom: 8%; }
}

@media (max-width: 840px) {
  .wrap { width: calc(100% - 48px); }
  .hero-inner { min-height: auto; padding-block: 54px 67px; }
  .hero h1 { font-size: clamp(54px, 8.5vw, 71px); }
  .hero-gallery { height: 300px; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-art { height: clamp(196px, 28vw, 250px); }
  .game-grid { gap: 12px; }
  .game-copy { padding: 14px; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { min-height: 65px; }
  .brand { font-size: .88rem; gap: 7px; }
  .brand img { width: 30px; height: 30px; }
  .header-inner nav { gap: clamp(9px, 3vw, 19px); }
  .header-inner nav a { font-size: .82rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 31px; padding-block: 47px 27px; }
  .hero h1 { font-size: clamp(50px, 11vw, 72px); }
  .hero-intro { margin-top: 17px; }
  .hero-actions { margin-top: 21px; }
  .hero::before {
    inset: 18% 0 0;
    background:
      linear-gradient(180deg, var(--forest), #101b19b8 24%, #101b194f 64%, #101b1980),
      url('assets/earth-horizon.webp') center bottom / cover;
  }
  .hero-gallery { width: min(100%, 425px); margin-inline: auto; height: auto; aspect-ratio: 1.42; }
  .featured-book { left: 10%; width: 39%; }
  .featured-game { right: 5%; width: 56%; bottom: 9%; }
  .books-section, .games-section { padding-block: 47px 54px; }
  .section-head { align-items: start; flex-direction: column; margin-bottom: 20px; }
  .section-head .section-link { align-self: start; padding-block: 0; }
  .filters button { padding-inline: 10px; font-size: .84rem; }
  .book-grid { gap: 17px 11px; }
  .book-art { height: clamp(141px, 40vw, 230px); }
  .book-copy { padding-top: 10px; }
  .book-copy h3 { font-size: clamp(26px, 6vw, 38px); }
  .book-copy > p:last-child { font-size: .83rem; }
  .game-grid { grid-template-columns: 1fr; gap: 16px; }
  .game-card > img { max-height: 310px; object-position: top; }
  .game-copy { padding: 17px; }
  .about-section { padding-block: 43px 48px; }
  .about-inner { grid-template-columns: 1fr; gap: 13px; }
  .footer-inner nav { gap: 7px 18px; }
  .footer-inner nav a { font-size: .82rem; }
}

@media (max-width: 375px) {
  .wrap { width: calc(100% - 28px); }
  .header-inner { gap: 10px; }
  .hero h1 { font-size: clamp(43px, 13.2vw, 50px); }
  .hero-actions { gap: 7px; }
  .button { gap: 9px; padding-inline: 12px; font-size: .86rem; }
  .filters { gap: 5px; }
  .filters button { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
