/* ─── Page body ──────────────────────────────────────────── */

body {
  font-size: 1.25rem;
  padding: 0;
}

h2, h3 {
  font-size: 2.25rem;
  margin-bottom: 2rem;
  line-height: 1.2;
}

p { margin: 0 0 1.25rem; }

/* ─── Container ──────────────────────────────────────────── */

.page-container {
  max-width: 60rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 1350px) {
  .page-container { max-width: 1270px; }
}

/* ─── Header ─────────────────────────────────────────────── */

.header { padding: 1.75rem 0 3.5rem; }
@media (min-width: 768px) {
  .header { padding: 2.75rem 0; }
}
.header .header-wrapper {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.header .header-logo { flex: 0 1 7.5rem; }
@media (min-width: 768px) {
  .header .header-logo { flex: 0 1 10rem; }
}
.header-logo svg,
.header-logo img {
  display: block;
  width: 100%;
  height: auto;
  fill: var(--color-text);
}
.header .header-hire { flex: 0 0 auto; }

.header-logo:hover #hat {
  animation: wave-hat 1.5s ease-in-out forwards;
}

/* ─── Hero / Book ────────────────────────────────────────── */

.book {
  background: transparent url("../assets/img/book_4k.jpg") no-repeat center;
  background-size: cover;
  height: 31.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
@media (min-width: 768px) {
  .book { background-size: contain; height: 56vw; }
}
@media (min-width: 992px) {
  .book { background-size: contain; height: 50vw; }
}
.book-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 0 0 18.75rem;
}
@media (min-width: 768px) {
  .book-wrapper { flex: 0 0 30.25vw; }
}
.book-title {
  font-size: 2rem;
  line-height: 1.05;
  color: #fff;
  text-align: center;
  margin: 0;
  text-shadow: #000 0 0 1.375rem;
}
@media (min-width: 768px) {
  .book-title { font-size: 2.875rem; }
}
.book-scroll {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 0 0 11.25rem;
}
@media (min-width: 768px) { .book-scroll { flex: 0 0 30.25vw; } }
@media (min-width: 992px) { .book-scroll { flex: 0 0 10vw; } }
.book-scroll::before {
  content: "";
  display: block;
  background: transparent url("../assets/img/scroll.svg") no-repeat center;
  width: 2.5rem;
  height: 3.125rem;
}

/* ─── Content ────────────────────────────────────────────── */

.content {
  padding-left: 1rem;
  padding-right: 1rem;
  max-width: 60rem;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 1350px) {
  .content { max-width: 1270px; }
}
@media (min-width: 992px) {
  .content { position: relative; top: -6.25rem; }
}

.content > h2 { text-align: center; }

/* ─── Intro text ─────────────────────────────────────────── */

.intro { text-align: center; margin-bottom: 0; }

/* ─── Font helpers ───────────────────────────────────────── */

.font-alternative { font-family: var(--font-alt); }
.font-italic      { font-style: italic; }

/* ─── Two-column section ─────────────────────────────────── */

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 6.25rem;
}
@media (min-width: 992px) {
  .two-col { grid-template-columns: 1fr 1fr; align-items: start; }
}
.two-col .col-heading { text-align: left; }
@media (min-width: 768px) {
  .two-col .col-heading { text-align: right; }
}
.two-col .col-heading h2 { font-weight: 400; margin-bottom: 3.75rem; }
@media (min-width: 768px) {
  .two-col .col-heading h2 { margin-bottom: 2rem; }
}

/* ─── Decorative services box ────────────────────────────── */

.decorative {
  border: 1px solid var(--color-border);
  padding: 5.25rem;
  margin-bottom: 7.5rem;
  position: relative;
}
.decorative-title {
  position: absolute;
  top: -0.3125rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-bg);
  padding: 0 1.25rem;
  font-size: 2.125rem;
  font-family: var(--font-base);
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  margin: 0;
  text-align: center;
}
@media (min-width: 768px) {
  .decorative-title { top: -1.25rem; padding: 0 1.5rem; }
}
.decorative-ornament-left,
.decorative-ornament-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
}
.decorative-ornament-left  { left: 0; }
.decorative-ornament-right { right: 0; }
.decorative-ornament-left::before,
.decorative-ornament-left::after,
.decorative-ornament-right::before,
.decorative-ornament-right::after {
  content: "";
  position: absolute;
  width: 5rem;
  height: 5rem;
  background-color: var(--color-bg);
  background-size: 3.75rem;
  background-repeat: no-repeat;
  background-position: center;
}
.decorative-ornament-left::before {
  top: -1.5rem;
  left: -1.5rem;
  background-image: url("../assets/img/decorative_left_top.svg");
}
.decorative-ornament-left::after {
  bottom: -1.5rem;
  left: -1.5rem;
  background-image: url("../assets/img/decorative_left_bottom.svg");
}
.decorative-ornament-right::before {
  top: -1.5rem;
  right: -1rem;
  background-image: url("../assets/img/decorative_right_top.svg");
}
.decorative-ornament-right::after {
  bottom: -1.5rem;
  right: -1rem;
  background-image: url("../assets/img/decorative_right_bottom.svg");
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 768px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .services-grid { grid-template-columns: 1fr 1fr 1fr; } }
.services-grid h3 { text-align: center; margin-bottom: 2rem; }
.clear-list {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}
.clear-list li:not(:last-child) { margin-bottom: 1.25rem; line-height: 1; }

/* ─── Testimonials ───────────────────────────────────────── */

.testimonials {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 0;
  margin-left: -1rem;
  margin-right: -1rem;
}
.testimonials p { margin-bottom: 0; }
.testimonials > div {
  width: 100%;
  padding: 0 1rem 2rem;
}
@media (min-width: 768px) {
  .testimonials > div { width: 50%; }
  .testimonials > div:nth-child(1) { text-align: right; }
  .testimonials > div:nth-child(2) { text-align: left; }
  .testimonials > div:nth-child(3) { text-align: right; }
  .testimonials > div:nth-child(4) { text-align: left; }
}

/* ─── Dividers ───────────────────────────────────────────── */

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  margin: 0;
  padding: 7.5rem 0;
}
.divider::before {
  content: "";
  background: transparent url("../assets/img/divider.svg") no-repeat center;
  width: 6.5rem;
  height: 1.75rem;
}
.divider-end { padding: 7.5rem 0 3.25rem; }
.divider-end::before {
  background: transparent url("../assets/img/divider_end.svg") no-repeat center;
}
.divider-custom { padding: 7.5rem 0; }

/* ─── About section ──────────────────────────────────────── */

.about-text { text-align: center; margin-bottom: 0.625rem; }

.tags { text-align: center; margin-bottom: 3.125rem; }
.tags a { text-decoration: none; }

.cta { text-align: center; margin-bottom: 0; }

/* ─── Button ─────────────────────────────────────────────── */

.btn {
  display: inline-block;
  font-family: inherit;
  background: transparent;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 20px;
  border-radius: 0;
  border: 1px solid var(--color-border);
  position: relative;
  line-height: 1;
  padding: 1.5rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--color-text);
  transition: color 0.15s ease-in-out;
}
.btn:hover { color: var(--color-accent-hover); }

.btn .dots {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0.75rem;
}
.btn .dots::before,
.btn .dots::after {
  content: "";
  position: absolute;
  display: flex;
  top: -0.375rem;
  left: -0.375rem;
  width: 0.75rem;
  height: 0.75rem;
  background: var(--color-text);
  border: 5px solid var(--color-bg);
}
.btn .dots.dots-left  { left: 0; }
.btn .dots.dots-left::after  { top: auto; bottom: -0.375rem; }
.btn .dots.dots-right { right: 0; }
.btn .dots.dots-right::before,
.btn .dots.dots-right::after  { left: auto; right: -0.375rem; }
.btn .dots.dots-right::after  { top: auto; bottom: -0.375rem; }

.btn:hover .dots::before,
.btn:hover .dots::after,
.btn:focus .dots::before,
.btn:focus .dots::after {
  border: 0px solid var(--color-bg);
  width: 0;
  height: 0;
  transition: border 0.5s, width 0.5s, height 0.5s;
}

/* ─── Dark mode ──────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
  /* Book hero: no image in dark mode until replacement found */
  .book { background-image: none; height: auto; padding: 2.5rem 0; }
  .book-wrapper { flex: 0 0 auto; }
  .book-title { color: var(--color-text); text-shadow: none; }
  /* Remove content overlap — no hero image to overlap into */
  .content { top: 0; }

  /* Scroll arrow: black SVG → white */
  .book-scroll::before { filter: invert(1); }

  /* Divider SVGs: black → white */
  .divider::before,
  .divider-end::before { filter: invert(1); }

  /* Corner ornaments: invert SVG, clear bg so dark bg shows through */
  .decorative-ornament-left::before,
  .decorative-ornament-left::after,
  .decorative-ornament-right::before,
  .decorative-ornament-right::after {
    background-color: transparent;
    filter: invert(1);
  }
}
