@font-face {
  font-family: "Almarai";
  src: url("/assets/fonts/almarai-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Libre Baskerville";
  src: url("/assets/fonts/libre-baskerville-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f6f3ec;
  --ink: #36302a;
  --gutter: clamp(24px, 6vw, 120px);
  font-family: "Almarai", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
}

#app {
  max-width: 1600px;
  margin-inline: auto;
}

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

a:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 5px;
}

.skip-link {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  transform: translateY(-160%);
  color: var(--paper);
  background: var(--ink);
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 3vw var(--gutter);
}

.site-name {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(19px, 2.16vw, 34px);
  line-height: 1.2;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2vw, 38px);
  font-size: clamp(14px, 1.56vw, 24px);
  line-height: 1.5;
}

.site-nav a {
  border-bottom: 1px solid transparent;
}

.site-nav a[aria-current="page"] {
  border-bottom-color: currentColor;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7.5vw;
  margin: 2vw var(--gutter) 0;
}

.home-card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #e7e2d9;
}

.home-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms ease;
}

.home-card:hover img,
.home-card:focus-visible img {
  transform: scale(1.015);
}

.home-card h2 {
  position: absolute;
  inset: 50% 12px auto;
  margin: 0;
  transform: translateY(-50%);
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(34px, 3.25vw, 58px);
  font-weight: 400;
  line-height: 1.1;
  text-align: center;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 2.5vw;
  margin: 2.5vw var(--gutter) 0;
}

.portfolio-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-grid figure {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  margin: 0;
}

.text-page {
  min-height: 76vh;
  margin: 5vw auto 0;
  padding: 0 var(--gutter);
  text-align: center;
}

.text-page h1 {
  margin: 0 0 32px;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(30px, 3.72vw, 56px);
  font-weight: 400;
  line-height: 1.114;
}

.not-found-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.not-found-page p {
  margin: 0 0 24px;
}

.not-found-page .not-found-code {
  font-size: 14px;
  letter-spacing: 0.12em;
}

.not-found-page .not-found-home {
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.about-page {
  width: min(668px, calc(100% - 2 * var(--gutter)));
  max-width: none;
  margin-top: 6.5vw;
  padding: 0;
}

.about-intro {
  margin: 32px 0;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(20px, 3vw, 42px);
  line-height: 1.142;
}

.client-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(20px, 3vw, 42px);
  line-height: 1.142;
}

.client-label {
  margin: 32px 0;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(20px, 3vw, 42px);
  line-height: 1.142;
}

.contact-page {
  display: flex;
  min-height: 84vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 0;
}

.contact-page h1 {
  margin-bottom: 32px;
}

.contact-details {
  display: grid;
  gap: 16px;
  font-size: 16px;
  line-height: 24px;
}

.contact-details p {
  margin: 0;
}

.contact-instagram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.contact-instagram svg {
  width: 20px;
  height: 20px;
}

.contact-details a:hover,
.social-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.page-turn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 6vw var(--gutter) 0;
  font-family: "Libre Baskerville", Georgia, serif;
}

.page-turn a {
  display: grid;
  gap: 8px;
  max-width: 50%;
}

.page-turn a:last-child {
  margin-left: auto;
  text-align: right;
}

.page-turn span {
  font-family: "Almarai", Arial, sans-serif;
  font-size: 14px;
}

.page-turn strong {
  font-size: clamp(22px, 2.5vw, 36px);
  font-weight: 400;
}

.site-footer {
  display: flex;
  min-height: 277px;
  align-items: center;
  justify-content: center;
  padding: 64px var(--gutter);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

.loading-message,
.error-message {
  margin: 15vh auto;
  padding: 0 var(--gutter);
  text-align: center;
}

@media (max-width: 700px) {
  :root {
    --gutter: 22px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
    padding: 24px var(--gutter);
  }

  .site-name {
    font-size: 22px;
  }

  .site-nav {
    gap: 22px;
    font-size: 16px;
  }

  .home-grid {
    grid-template-columns: 1fr;
    gap: 22px;
    margin: 28px var(--gutter) 0;
  }

  .home-card h2 {
    font-size: clamp(36px, 12vw, 52px);
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 24px var(--gutter) 0;
  }

  .text-page {
    min-height: 54vh;
    margin-top: 42px;
  }

  .contact-page {
    margin-top: 0;
  }

  .about-intro {
    margin-block: 24px;
  }

  .about-page {
    margin-top: 42px;
  }

  .client-list,
  .client-label {
    font-size: clamp(20px, 6vw, 30px);
  }

  .client-list {
    gap: 24px;
  }

  .page-turn {
    margin-top: 42px;
  }

  .site-footer {
    min-height: 150px;
    padding-block: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
