/* shlom.pro */

/* Fonts: Barlow and Barlow Condensed, SIL Open Font License (fonts/OFL.txt) */

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

@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* Tokens */

:root {
  --ink: #0E1B2C;
  --ground: #EEF1F4;
  --paper: #FFFFFF;
  --text-2: #3F4F63;
  --text-3: #4A5A6D;
  --line: #C9D3DE;
  --on-ink: #E6ECF2;
  --on-ink-2: #93A3B5;
  --focus: #3D6FD9;

  --font-text: "Barlow", system-ui, sans-serif;
  --font-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: 40px;
}

/* Base */

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 18px/1.55 var(--font-text);
  -webkit-font-smoothing: antialiased;
}

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

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
  border-radius: 2px;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.title {
  margin-bottom: 40px;
  font: 600 44px/1.05 var(--font-display);
}

.subtitle {
  font: 600 26px/1.2 var(--font-display);
}

/* Links: a faint rule in the text colour, drawn over in full on hover */

.ln {
  padding: 8px 0;
  color: inherit;
  text-decoration: none;
  background:
    linear-gradient(currentColor, currentColor) 0 100% / 0% 1px no-repeat,
    linear-gradient(rgb(14 27 44 / .22), rgb(14 27 44 / .22)) 0 100% / 100% 1px no-repeat;
  background-origin: content-box;
  transition: background-size .35s var(--ease);
}

.ln:hover {
  background-size: 100% 1px, 100% 1px;
}

.skip {
  position: absolute;
  top: -64px;
  left: 16px;
  z-index: 30;
  padding: 10px 16px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* Header: sticky, frosted */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgb(14 27 44 / .07);
  background: rgb(238 241 244 / .72);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
}

.bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font: 600 20px/1 var(--font-display);
}

.brand img {
  border-radius: 5px;
}

.contacts {
  display: flex;
  gap: 28px;
  font-size: 16px;
  font-weight: 500;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
}

/* Faint engineering grid, fading out from the upper right, drifting slowly */
.hero__grid {
  position: absolute;
  inset: -48px;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(14 27 44 / .07) 1px, transparent 1px),
    linear-gradient(90deg, rgb(14 27 44 / .07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 78% 35%, #000, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 70% at 78% 35%, #000, transparent 72%);
  animation: drift 40s linear infinite;
}

.hero__inner {
  position: relative;
  padding-top: 112px;
  padding-bottom: 128px;
}

.hero__name {
  margin-bottom: 48px;
  font: 700 176px/.86 var(--font-display);
  letter-spacing: -.02em;
}

/* Each line rises out of its own mask on load */
.hero__line {
  display: block;
  overflow: hidden;
  padding-bottom: .16em;
  margin-bottom: -.12em;
}

.hero__line > span {
  display: block;
  animation: rise 1s cubic-bezier(.16, .84, .24, 1) both;
}

.hero__line + .hero__line > span {
  animation-delay: .12s;
}

.hero__text {
  animation: settle .8s ease-out .55s both;
}

.hero__statement {
  max-width: 22em;
  margin-bottom: 16px;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.3;
}

.hero__role {
  color: var(--text-3);
}

/* Selected work */

.work {
  padding: 96px 0;
  background: var(--paper);
}

.work__row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 8px 64px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.work__row p {
  max-width: 46em;
}

/* The row's rule is drawn over in ink on hover */
.work__row::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}

.work__row:hover::after {
  transform: scaleX(1);
}

/* Practice */

.practice {
  padding-top: 96px;
  padding-bottom: 112px;
}

.practice__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 48px;
}

.practice__col {
  padding-top: 20px;
  border-top: 3px solid var(--ink);
}

.practice__col .subtitle {
  margin-bottom: 10px;
}

.practice__col p {
  color: var(--text-2);
}

/* Footer */

.footer {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--on-ink);
}

/* The hero grid again, in light lines, rising from the lower right */
.footer__grid {
  position: absolute;
  inset: -48px;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(230 236 242 / .08) 1px, transparent 1px),
    linear-gradient(90deg, rgb(230 236 242 / .08) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 50% 130% at 85% 100%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse 50% 130% at 85% 100%, #000, transparent 70%);
  animation: drift 40s linear infinite reverse;
}

.footer__inner {
  position: relative;
  padding-top: 96px;
  padding-bottom: 40px;
}

.footer .ln {
  background-image:
    linear-gradient(currentColor, currentColor),
    linear-gradient(rgb(230 236 242 / .28), rgb(230 236 242 / .28));
}

.footer__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 32px;
  margin-bottom: 48px;
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.3;
}

.footer__note {
  color: var(--on-ink-2);
  font-size: 14px;
}

/* 404 */

.missing {
  padding-top: 120px;
  padding-bottom: 120px;
}

.missing p {
  color: var(--text-2);
}

/* Motion */

@keyframes drift {
  to { transform: translate(48px, 48px); }
}

@keyframes rise {
  from { transform: translateY(105%); }
}

@keyframes settle {
  from { opacity: 0; transform: translateY(10px); }
}

/* Content settles in as it scrolls into view, where the browser supports it */
@supports (animation-timeline: view()) {
  .reveal {
    animation: settle linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__grid,
  .footer__grid,
  .hero__line > span,
  .hero__text,
  .reveal {
    animation: none;
  }

  .ln,
  .work__row::after {
    transition: none;
  }
}

/* Smaller screens */

@media (max-width: 900px) {
  .hero__name {
    font-size: 104px;
  }

  .work__row,
  .practice__cols {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Stacked, the practice areas read like the work rows: a rule under each */
  .practice__cols {
    gap: 0;
  }

  .practice__col {
    padding: 28px 0;
    border-top: 0;
    border-bottom: 1px solid var(--line);
  }

  .practice__col:first-child {
    padding-top: 0;
  }
}

@media (max-width: 560px) {
  :root {
    --gutter: 20px;
  }

  .hero__inner {
    padding-top: 72px;
    padding-bottom: 88px;
  }

  .hero__name {
    font-size: 68px;
  }

  .hero__statement {
    font-size: 22px;
  }

  .contacts {
    gap: 18px;
  }

  .contacts__mail {
    display: none;
  }
}
