/* LAYLA. Warm ivory, ink, hairlines and air. Words are few; the pieces speak. */

:root {
  --ground: #F3EEE6;
  --ink: #1D1A17;
  --soft: #6B645B;
  --hair: rgba(29, 26, 23, .22);
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --caps: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  --pad: clamp(20px, 4.2vw, 64px);
}
.ar {
  --serif: 'Amiri', 'Times New Roman', serif;
  --caps: 'Noto Kufi Arabic', 'Amiri', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.ar body, body.ar { font-size: 18px; line-height: 1.9; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2 { font-weight: 300; margin: 0; letter-spacing: .005em; }
body.ar h1, body.ar h2 { font-weight: 400; }

/* Small spaced capitals: every label, link and menu item. */
.label, .nav a, .menu summary, .line-link, .foot-nav a, .hero-caption .line-link {
  font-family: var(--caps);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: .24em;
  text-transform: uppercase;
  line-height: 1.6;
}
body.ar .label, body.ar .nav a, body.ar .menu summary, body.ar .line-link, body.ar .foot-nav a {
  letter-spacing: 0; font-size: 12.5px;
}
.label { margin: 0; }
.muted { color: var(--soft); }

/* Text link with a hairline, never a box. */
.line-link {
  display: inline-block;
  padding-bottom: 6px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size .5s ease;
}
.line-link:hover { background-size: 0 1px; background-position: 100% 100%; }
body.ar .line-link:hover { background-position: 0 100%; }

/* Header: menu left, wordmark centred, menu right. */
.top {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 28px var(--pad);
}
.top--over { position: absolute; inset: 0 0 auto 0; }
.nav { display: flex; gap: 38px; }
.nav-end { justify-content: flex-end; }
.nav a { opacity: .9; }
.nav a:hover { opacity: 1; }
.lang { margin-inline-start: 18px; }
.wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: .5em;
  margin-inline-end: -.5em; /* optical centre despite trailing tracking */
  line-height: 1;
}
body.ar .wordmark { font-family: 'Amiri', serif; letter-spacing: 0; margin: 0; font-size: 28px; }
.menu { display: none; }

/* Hero */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.hero picture, .hero img { width: 100%; height: 100%; }
.hero img { object-fit: cover; object-position: 50% 50%; }
.hero-caption {
  position: absolute; left: 0; right: 0; bottom: 6.5vh;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.hero-name { font-size: 26px; font-style: italic; font-weight: 300; }
body.ar .hero-name { font-style: normal; font-size: 28px; }

/* Intro line */
.intro { text-align: center; padding: clamp(96px, 14vw, 190px) var(--pad) clamp(72px, 10vw, 140px); }
.intro h1 { font-size: clamp(38px, 5.2vw, 72px); line-height: 1.08; margin: 26px auto 22px; max-width: 14em; }
.intro .quiet { color: var(--soft); font-style: italic; font-size: 21px; margin: 0; }
body.ar .intro .quiet { font-style: normal; }
.intro--page { padding-top: clamp(56px, 8vw, 110px); padding-bottom: clamp(48px, 7vw, 90px); }
.intro--page h1 { margin: 0 auto 18px; font-size: clamp(36px, 4.4vw, 60px); }

/* Pieces */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(56px, 7vw, 120px) clamp(16px, 2.2vw, 36px);
  padding: 0 var(--pad) clamp(110px, 12vw, 180px);
  max-width: 1500px;
  margin: 0 auto;
}
.grid--three { grid-template-columns: repeat(3, 1fr); padding: 0; }
.card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; margin-bottom: 26px; transition: opacity .6s ease; }
.card:hover img { opacity: .92; }
.card-name { font-size: 24px; font-weight: 300; margin-bottom: 6px; }
body.ar .card-name { font-weight: 400; }

/* Commission feature */
.feature { position: relative; }
.feature img { width: 100%; height: min(86vh, 56.25vw); object-fit: cover; }
.feature-text {
  text-align: center;
  padding: clamp(72px, 9vw, 130px) var(--pad) clamp(110px, 12vw, 170px);
}
.feature-text h2 { font-size: clamp(30px, 3.6vw, 50px); line-height: 1.15; margin: 22px auto 34px; max-width: 16em; }

/* Piece page */
.piece { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.piece-image img { width: 100%; height: 100%; max-height: 100vh; object-fit: cover; position: sticky; top: 0; }
.piece-text {
  display: flex; flex-direction: column; justify-content: center;
  padding: 80px clamp(32px, 6vw, 110px);
  max-width: 620px;
}
.piece-text h1 { font-size: clamp(40px, 4.2vw, 64px); line-height: 1.05; margin: 22px 0 26px; }
.poem { font-style: italic; font-size: 22px; line-height: 1.55; color: #3d3832; margin: 0 0 40px; max-width: 22em; }
body.ar .poem { font-style: normal; }
.piece-text hr { border: 0; border-top: 1px solid var(--hair); width: 64px; margin: 0 0 34px; }
.piece-text .line-link { align-self: flex-start; margin: 22px 0 54px; }
.piece-page .top { border-bottom: 1px solid transparent; }
.more { padding: clamp(90px, 10vw, 150px) var(--pad) clamp(100px, 10vw, 160px); max-width: 1500px; margin: 0 auto; }
.more > .label { text-align: center; margin-bottom: 56px; }

/* Text pages */
.page-image { width: 100%; height: min(78vh, 56.25vw); object-fit: cover; }
.text { max-width: 620px; margin: 0 auto; padding: clamp(80px, 10vw, 150px) var(--pad) clamp(110px, 12vw, 180px); text-align: center; }
.text h1 { font-size: clamp(40px, 4.6vw, 64px); margin-bottom: 36px; }
.text p { font-size: 21px; margin: 0 0 18px; }
.text .line-link { margin-top: 34px; }

/* Footer */
.foot {
  border-top: 1px solid var(--hair);
  margin: 0 var(--pad);
  padding: 64px 0 56px;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  text-align: center;
}
.wordmark--foot { font-size: 18px; }
.foot-nav { display: flex; gap: 34px; flex-wrap: wrap; justify-content: center; }

/* Phone */
@media (max-width: 760px) {
  body { font-size: 18px; }
  .top { padding: 18px 20px; grid-template-columns: 1fr auto 1fr; }
  .nav-start { display: none; }
  .nav-end a:not(.lang) { display: none; }
  .lang { margin: 0; }
  .wordmark { font-size: 19px; letter-spacing: .42em; margin-inline-end: -.42em; }
  .menu { display: block; }
  .menu summary { list-style: none; cursor: pointer; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu[open] .menu-panel {
    position: fixed; inset: 0; z-index: -1;
    background: var(--ground); color: var(--ink);
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 30px;
  }
  .menu[open] summary { position: relative; z-index: 2; color: var(--ink); }
  .menu-panel { display: none; }
  .menu-panel a { font-family: var(--serif); font-size: 32px; font-weight: 300; }
  .menu-panel .lang { font-family: var(--caps); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; margin-top: 18px; }
  .hero-caption { bottom: 9vh; }
  .grid { grid-template-columns: 1fr; gap: 72px; padding-left: 0; padding-right: 0; }
  .card img { margin-bottom: 20px; }
  .grid--three { grid-template-columns: 1fr 1fr; gap: 40px 8px; }
  .grid--three .card:nth-child(3) { display: none; }
  .grid--three .card-name { font-size: 19px; }
  .feature img, .page-image { height: 62vh; }
  .piece { grid-template-columns: 1fr; min-height: 0; }
  .piece-image img { position: static; max-height: none; height: auto; }
  .piece-text { padding: 48px 26px 30px; align-items: center; text-align: center; max-width: none; }
  .piece-text hr { margin-left: auto; margin-right: auto; }
  .piece-text .line-link { align-self: center; }
  .more { padding-left: 16px; padding-right: 16px; }
  .foot-nav { gap: 20px 26px; }
}

/* Over the hero: ivory type on the photograph. */
.top--over, .home .hero-caption { color: #F3EEE6; }
.top--over .menu[open] summary { color: var(--ink); }
.card--solo { grid-column: 1 / -1; justify-self: center; width: calc(50% - clamp(8px, 1.1vw, 18px)); }
@media (max-width: 760px) { .card--solo { width: 100%; } }
