/* laaiqah.com. Tokens and sources in ../../DESIGN.md */

:root {
  --loch: #006870;
  --sand-deep: #D3AF74;
  --paper: #FAF4E8;

  --display: "Gilda Display", Georgia, serif;
  --text: "Jost", "Helvetica Neue", Arial, sans-serif;

  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 40px;
  --s5: 64px;
  --s6: 104px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--text);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  background: var(--paper);
  color: var(--loch);
}

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

a { color: inherit; }

.links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s4);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.links a {
  text-decoration: none;
  padding: var(--s1) 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.links a:hover,
.links a:focus-visible { border-bottom-color: currentColor; outline: none; }

/* ---------- home: the card ---------- */

.card {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--s5) var(--s3);
}

/* the mark surfaces: it rises from behind a clipped edge, like out of water */
.card .surface {
  overflow: hidden;
  padding-top: var(--s1);
  margin-bottom: var(--s4);
}

.card .mark {
  width: 56px;
  height: 56px;
  animation:
    surface 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both,
    bob 6s ease-in-out 1.6s infinite;
}

.name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(39px, 8vw, 61px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
}

.route {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin: var(--s2) 0 0;
}

.card .links {
  position: relative;
  justify-content: center;
  margin-top: var(--s4);
  padding-top: var(--s3);
  min-width: min(420px, 100%);
}

/* the gold line draws out from the centre */
.card .links::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--sand-deep);
  transform-origin: 50% 50%;
  animation: draw 0.9s cubic-bezier(0.65, 0, 0.35, 1) 1.1s both;
}

.card .name  { animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both; }
.card .route { animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.8s both; }
.card .links li { animation: fade 0.7s ease 1.5s both; }
.card .links li:nth-child(2) { animation-delay: 1.6s; }
.card .links li:nth-child(3) { animation-delay: 1.7s; }
.card .links li:nth-child(4) { animation-delay: 1.8s; }

@keyframes surface {
  from { transform: translateY(110%); }
  to   { transform: translateY(0); }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes draw {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .card .mark,
  .card .name,
  .card .route,
  .card .links::before,
  .card .links li,
  .home-mark,
  .portrait,
  .portrait img,
  .about h1,
  .about p,
  .about .links::before,
  .about .links li { animation: none; }
}

/* ---------- about ---------- */

.paper-head {
  max-width: 1040px;
  margin: 0 auto;
  padding: var(--s3);
}

.home-mark img { width: 40px; height: 40px; }

.about {
  max-width: 1040px;
  margin: 0 auto;
  padding: var(--s4) var(--s3) var(--s6);
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: var(--s5);
  align-items: center;
}

.portrait {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  /* arched top: the same arch as the humps in her mark */
  border-radius: 999px 999px 0 0;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.about h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 39px;
  line-height: 1.15;
  margin: 0 0 var(--s3);
}

.about p {
  font-size: 20px;
  line-height: 1.6;
  margin: 0 0 var(--s3);
  max-width: 34em;
}

.about .weakness { font-size: 16px; }

.about .weakness span { font-weight: 400; }

.about .links {
  position: relative;
  margin-top: var(--s4);
  padding-top: var(--s3);
}

.about .links::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--sand-deep);
  transform-origin: 0 50%;
  animation: draw 0.9s cubic-bezier(0.65, 0, 0.35, 1) 1.2s both;
}

/* about entrance: the portrait surfaces from its bottom edge, then the words follow */
.home-mark { display: inline-block; animation: fade 0.8s ease 0.1s both; }

.portrait { animation: reveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both; }
.portrait img { animation: settle 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both; }

.about h1          { animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both; }
.about p           { animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.65s both; }
.about p + p       { animation-delay: 0.8s; }
.about .weakness   { animation-delay: 0.95s; }
.about .links li   { animation: fade 0.7s ease 1.6s both; }
.about .links li:nth-child(2) { animation-delay: 1.7s; }
.about .links li:nth-child(3) { animation-delay: 1.8s; }

@keyframes reveal {
  from { clip-path: inset(100% 0 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

@keyframes settle {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

@media (max-width: 760px) {
  .about {
    grid-template-columns: 1fr;
    gap: var(--s4);
    padding-top: var(--s2);
  }
  .portrait { max-width: 360px; width: 100%; margin: 0 auto; }
  .about p { font-size: 16px; }
}
