@font-face {
  font-family: "Iranian Sans";
  src: url("Iranian%20Sans.ttf") format("truetype");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f4efe5;
  --paper-soft: #fbf8f1;
  --paper-deep: #e7ddcc;
  --ink: #1f2c35;
  --muted: #69706c;
  --wood: #8a6748;
  --moss: #68705b;
  --clay: #b98567;
  --line: rgba(31, 44, 53, 0.14);
  --shadow: 0 24px 70px rgba(31, 44, 53, 0.12);
  --container: min(1120px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image: url("bg.png");
  background-repeat: repeat;
  background-size: auto;
  color: var(--ink);
  font-family: "Iranian Sans", Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.9;
}

body.home-page {
  background-image: url("homepagebg.png"), url("bg.png");
  background-position: top center, top left;
  background-repeat: no-repeat, repeat;
  background-size: 100% auto, auto;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  width: var(--container);
  min-height: 108px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 190px 1fr 150px;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.home-page .site-header {
  min-height: 190px;
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
  border-bottom: 0;
}

.home-page .brand img {
  width: 178px;
}

.home-page .main-nav {
  width: 100%;
  padding-top: 18px;
  border-top: 1px solid rgba(31, 44, 53, 0.1);
}

.home-page .quiet-link {
  display: none;
}

.brand img {
  width: 164px;
  height: auto;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 4vw, 48px);
  color: rgba(31, 44, 53, 0.72);
  font-size: 0.98rem;
}

.main-nav a,
.quiet-link {
  position: relative;
  white-space: nowrap;
}

.main-nav a[aria-current="page"],
.main-nav a:hover,
.quiet-link:hover {
  color: var(--ink);
}

.main-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  bottom: -12px;
  height: 1px;
  background: var(--wood);
}

.quiet-link {
  justify-self: end;
  color: var(--wood);
  font-weight: 600;
}

.hero {
  width: var(--container);
  margin: 44px auto 0;
}

.home-hero {
  min-height: calc(100svh - 190px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(56px, 11svh, 122px);
  padding-bottom: 210px;
  text-align: center;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.home-page .hero-copy {
  width: min(760px, 100%);
  margin-inline: auto;
}

.home-page .lead,
.home-page h1 {
  margin-right: auto;
  margin-left: auto;
}

.home-page .hero-actions {
  justify-content: center;
}

.eyebrow,
.section-kicker,
.book-meta {
  margin: 0 0 14px;
  color: var(--wood);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 24px;
  font-size: clamp(2.55rem, 4.2vw, 4.8rem);
  font-weight: 800;
  line-height: 1.28;
  max-width: 760px;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(1.65rem, 3vw, 3.2rem);
  line-height: 1.45;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
  line-height: 1.55;
}

.lead {
  max-width: 640px;
  color: rgba(31, 44, 53, 0.74);
  font-size: clamp(1.05rem, 1.4vw, 1.28rem);
  line-height: 2.1;
}

.hero-actions,
.component-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--ink);
  color: #fffaf0;
}

.button.ghost {
  background: transparent;
  color: var(--ink);
}

.intro-section,
.section,
.culture-section,
.closing-band,
.about-hero,
.book-detail,
.reading-section,
.values-section,
.timeline,
.system-page {
  width: var(--container);
  margin-right: auto;
  margin-left: auto;
}

.intro-section,
.section,
.culture-section {
  padding: 92px 0;
  border-top: 1px solid var(--line);
}

.intro-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(28px, 5vw, 90px);
  align-items: start;
}

.intro-grid p,
.book-card p,
.culture-grid p,
.values-section p,
.timeline p,
.mini-card p {
  color: rgba(31, 44, 53, 0.68);
}

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

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.book-card {
  display: grid;
  grid-template-columns: 136px 1fr;
  gap: 18px;
  align-items: end;
  min-height: 260px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.book-cover,
.large-cover {
  min-height: 214px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  color: #fffaf0;
  text-align: center;
  font-weight: 800;
  line-height: 1.65;
  box-shadow: 0 18px 42px rgba(31, 44, 53, 0.14);
}

.cover-photo {
  min-height: 214px;
  padding: 0;
  overflow: hidden;
  background: #172c2d;
}

.cover-photo img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.featured-book {
  grid-column: 1 / -1;
  grid-template-columns: minmax(190px, 260px) 1fr;
  align-items: center;
  min-height: 360px;
  padding: 28px;
  border: 1px solid var(--line);
  background: rgba(251, 248, 241, 0.58);
}

.featured-book .book-cover {
  width: min(100%, 260px);
  min-height: 360px;
}

.featured-book h3 {
  font-size: clamp(1.7rem, 3vw, 3.2rem);
}

.featured-book p:not(.book-meta) {
  max-width: 720px;
}

.cover-ink {
  background: linear-gradient(145deg, #1f2c35, #304653);
}

.cover-clay {
  background: linear-gradient(145deg, #8a6748, #c08a68);
}

.cover-moss {
  background: linear-gradient(145deg, #4f5b4c, #7c8469);
}

.culture-grid,
.values-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.culture-grid article,
.values-section article,
.mini-card,
.system-block {
  padding: 28px;
  border: 1px solid var(--line);
  background: rgba(251, 248, 241, 0.66);
}

.number {
  display: block;
  margin-bottom: 36px;
  color: var(--wood);
  font-size: 0.92rem;
  font-weight: 800;
}

.closing-band {
  margin-top: 36px;
  margin-bottom: 72px;
  padding: 48px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.closing-band p {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 700;
}

.site-footer {
  width: var(--container);
  margin: 0 auto;
  padding: 36px 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: rgba(31, 44, 53, 0.62);
  border-top: 1px solid var(--line);
}

.site-footer img {
  width: 130px;
}

.site-footer p {
  margin-bottom: 0;
}

.book-detail {
  padding: 74px 0 86px;
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
}

.large-cover {
  min-height: 560px;
  font-size: clamp(2rem, 4vw, 4.4rem);
  border-radius: 0 0 84px 0;
}

.large-cover.cover-photo img {
  border-radius: inherit;
}

.book-facts {
  margin: 34px 0 0;
  display: grid;
  gap: 12px;
}

.book-facts div {
  display: flex;
  gap: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.book-facts dt {
  min-width: 74px;
  color: var(--wood);
  font-weight: 800;
}

.book-facts dd {
  margin: 0;
  color: rgba(31, 44, 53, 0.72);
}

.reading-section {
  padding: 80px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

blockquote {
  max-width: 900px;
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 3rem);
  font-weight: 700;
  line-height: 1.85;
}

.about-hero {
  padding: 84px 0 72px;
}

.about-hero h1 {
  max-width: 920px;
}

.values-section,
.timeline {
  padding: 74px 0;
  border-top: 1px solid var(--line);
}

.timeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
}

.timeline span {
  color: var(--wood);
  font-weight: 800;
}

.contact-section {
  width: var(--container);
  margin: 0 auto 84px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.contact-card {
  min-height: 170px;
  padding: 30px;
  border: 1px solid var(--line);
  background: rgba(251, 248, 241, 0.72);
}

.contact-card span {
  display: block;
  margin-bottom: 18px;
  color: var(--wood);
  font-size: 0.88rem;
  font-weight: 800;
}

.contact-card p {
  margin-bottom: 0;
  color: rgba(31, 44, 53, 0.78);
  font-size: clamp(1.08rem, 1.6vw, 1.45rem);
  font-weight: 700;
  line-height: 2;
}

.system-page {
  margin-bottom: 80px;
}

.system-block {
  margin-bottom: 24px;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.swatches div {
  display: grid;
  gap: 8px;
}

.swatches span {
  height: 92px;
  border: 1px solid var(--line);
}

.swatches small {
  color: rgba(31, 44, 53, 0.58);
  direction: ltr;
  text-align: right;
}

.type-sample h3 {
  font-size: clamp(2rem, 4vw, 4.8rem);
}

.component-row {
  align-items: stretch;
}

.mini-card {
  max-width: 280px;
}

@media (max-width: 900px) {
  .site-header {
    min-height: auto;
    padding: 22px 0;
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .quiet-link {
    justify-self: center;
  }

  .home-hero,
  .intro-grid,
  .book-detail,
  .timeline {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: auto;
    margin-top: 42px;
  }

  .hero-copy {
    text-align: center;
  }

  .lead,
  h1 {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .book-grid,
  .culture-grid,
  .values-section,
  .contact-section,
  .swatches {
    grid-template-columns: 1fr;
  }

  .book-card {
    grid-template-columns: 120px 1fr;
  }

  .featured-book {
    grid-template-columns: 180px 1fr;
  }

  .featured-book .book-cover {
    min-height: 260px;
  }

  .large-cover {
    min-height: 420px;
  }

  .closing-band,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  :root {
    --container: min(100vw - 28px, 1120px);
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  h1 {
    font-size: 2.35rem;
  }

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

  .featured-book {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .book-cover {
    width: 152px;
  }

  .featured-book .book-cover,
  .large-cover.cover-photo {
    width: min(100%, 260px);
  }

  .intro-section,
  .section,
  .culture-section,
  .values-section,
  .timeline {
    padding: 58px 0;
  }
}
