/* The landing site's one stylesheet: Saans for the interface, Georgia for the statements. */

@font-face {
  font-family: 'Saans';
  src: url('/font/Saans-Light.otf?v=077e0153') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Saans';
  src: url('/font/Saans-Regular.otf?v=c16bb0f2') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Saans';
  src: url('/font/Saans-Medium.otf?v=09d2feb4') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Saans';
  src: url('/font/Saans-SemiBold.otf?v=81687ae9') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Saans';
  src: url('/font/Saans-Bold.otf?v=622f831c') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color: #171717;
  background: #ffffff;
  font-family: 'Saans', ui-sans-serif, system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #ffffff;
}

body.menu-open {
  overflow: hidden;
}

/* Header: the mark on the left, Writings and About on the right. */

.site-header {
  position: relative;
  z-index: 10;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  width: 100%;
  padding: 18px 34px 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
}

.brand-mark {
  display: block;
  width: 54px;
  height: auto;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 32px;
}

.header-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: #25252a;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.header-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

.mobile-menu {
  display: none;
}

/* Pages */

.landing-page {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 124px 24px 80px;
  text-align: center;
}

.landing-page.home-page {
  justify-content: center;
  padding-top: 80px;
}

.blank-page {
  flex: 1 1 auto;
}

/* A post's page opens on a band of its artwork, 40% of the window tall, with the header laid over
   it. The artwork sits on the cards' pale square colour; being tall, it is shown narrow and cut
   off top and bottom, its middle (the leaves and the spiral) in view. */
.post-hero {
  position: relative;
  flex: 0 0 auto;
  height: 40vh;
  min-height: 260px;
  overflow: hidden;
  background: #f4f4f2;
}

.post-hero img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: auto;
  height: 160%;
  transform: translate(-50%, -46%);
  mix-blend-mode: multiply;
  filter: contrast(1.1) brightness(1.02);
}

.post-page .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
}

/* Writings: a large heading, then the posts three to a row, each a square of art over its title. */

.writings-page {
  flex: 1 1 auto;
  width: 100%;
  padding: 124px 34px 96px;
}

.writings-title {
  margin: 0 0 44px;
  color: #171717;
  font-size: 64px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* The categories: the chosen one dark, the rest grey; on narrow screens the row scrolls sideways. */
.post-tabs {
  display: flex;
  gap: 32px;
  margin: 0 0 80px;
  overflow-x: auto;
  scrollbar-width: none;
}

.post-tabs::-webkit-scrollbar {
  display: none;
}

.post-tab {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #a0a0a6;
  font-family: inherit;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: color 150ms ease;
}

.post-tab:hover,
.post-tab[aria-pressed='true'] {
  color: #171717;
}

.post-tab:focus-visible {
  outline: 2px solid #17171c;
  outline-offset: 4px;
  border-radius: 2px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Each post's artwork, whole and centred on a pale square; multiply drops the images' white. */
/* The art and title open the post; the title dims a little on hover. */
.post-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.post-card-link:focus-visible {
  outline: 2px solid #17171c;
  outline-offset: 4px;
  border-radius: 4px;
}

.post-card-link:hover .post-card-title {
  color: #5c5c63;
}

.post-card-art {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 9%;
  border-radius: 4px;
  background: #f4f4f2;
}

.post-card-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: contrast(1.1) brightness(1.02);
}

/* The title and date share one line; a title too long for it fades out before the date. */
.post-card-row {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin: 24px 0 0;
}

.post-card-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #171717;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.3;
  white-space: nowrap;
  mask-image: linear-gradient(to left, transparent, #000 48px);
}

.post-card-row time {
  flex: 0 0 auto;
  color: #8a8a90;
  font-size: 16px;
  line-height: 1.4;
}

.hero-statement {
  width: min(100%, 760px);
  margin: 0;
  color: #212121;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 27px;
  font-weight: 400;
  letter-spacing: 0;
  word-spacing: 0.06em;
  line-height: 1.4;
  text-align: left;
}

.hero-statement em {
  font-weight: 400;
}

.home-headline {
  width: min(100%, 680px);
  font-size: 40px;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}

/* The dark pill from the old site; on hover a warm glow shows from under its left side. */
.contact-link {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 38px;
  padding: 0 17px;
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

/* Solid dark pill: above the hover glow, below the label. */
.contact-link::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #17171c;
  z-index: 1;
  content: '';
}

/* Hover glow: tucked below the left side of the pill. */
.contact-link::after {
  position: absolute;
  top: 18px;
  right: 26px;
  bottom: -3px;
  left: 0;
  border-radius: inherit;
  background: linear-gradient(100deg, #ff7759 0%, #d08ee2 80%);
  filter: blur(7px);
  opacity: 0;
  transform: translateZ(0);
  transition: opacity 200ms ease;
  pointer-events: none;
  z-index: 0;
  content: '';
}

.contact-link:hover::after {
  opacity: 1;
}

.contact-link:hover::before {
  background: #000000;
}

.contact-link:focus-visible {
  outline: 2px solid #17171c;
  outline-offset: 3px;
}

.contact-label {
  position: relative;
  z-index: 2;
}

/* Get started, under the home headline: opens the app in a new tab. */
.get-started {
  margin-top: 36px;
}

.landing-preview-frame {
  display: block;
  flex: 0 0 auto;
  width: min(100%, 560px);
  margin-top: 52px;
  pointer-events: none;
}

.landing-preview {
  display: block;
  width: 100%;
  height: auto;
  filter: contrast(1.1) brightness(1.02);
}

/* Footer */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  padding: 0 34px 28px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #17171c;
}

.social-icon {
  display: block;
  width: 18px;
  height: 18px;
}

@media (min-width: 561px) and (max-width: 900px) {
  .landing-page {
    padding-top: 116px;
  }

  .writings-page {
    padding-top: 96px;
  }

  .writings-title {
    margin-bottom: 36px;
    font-size: 52px;
  }

  .post-tabs {
    margin-bottom: 64px;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-page.home-page {
    padding-top: 80px;
  }

  .hero-statement {
    font-size: 25px;
  }

  .home-headline {
    font-size: 34px;
  }
}

/* Phones: the links move into a menu behind a toggle. */

@media (max-width: 560px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 16px 20px 0;
    background: #ffffff;
  }

  .header-actions {
    display: none;
  }

  .mobile-menu {
    display: block;
    justify-self: end;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #17171c;
    cursor: pointer;
  }

  .menu-toggle:focus-visible,
  .mobile-navigation a:focus-visible {
    outline: 2px solid #17171c;
    outline-offset: 3px;
  }

  .menu-toggle-lines {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 23px;
    height: 17px;
  }

  .menu-toggle-lines span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition:
      transform 250ms ease,
      opacity 250ms ease;
  }

  .menu-toggle[aria-expanded='true'] .menu-toggle-lines span:first-child {
    transform: translateY(7.5px) rotate(45deg);
  }

  .menu-toggle[aria-expanded='true'] .menu-toggle-lines span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded='true'] .menu-toggle-lines span:last-child {
    transform: translateY(-7.5px) rotate(-45deg);
  }

  .mobile-navigation {
    position: fixed;
    top: 70px;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: calc(100dvh - 70px);
    padding: 32px 16px 0;
    background: #ffffff;
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    pointer-events: none;
    transition:
      clip-path 500ms cubic-bezier(0.4, 0, 0.2, 1),
      visibility 0s linear 500ms;
  }

  .mobile-navigation[data-open='true'] {
    clip-path: inset(0 0 0 0);
    visibility: visible;
    pointer-events: auto;
    transition:
      clip-path 500ms cubic-bezier(0.4, 0, 0.2, 1),
      visibility 0s;
  }

  .mobile-navigation a {
    display: flex;
    align-items: center;
    min-height: 44px;
    width: 100%;
    color: #17171c;
    font-size: 24px;
    font-weight: 400;
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
    transition:
      opacity 500ms ease-out,
      transform 500ms ease-out;
  }

  .mobile-navigation[data-open='true'] a {
    opacity: 1;
    transform: translateY(0);
  }

  .mobile-navigation[data-open='true'] a:nth-child(2) {
    transition-delay: 50ms;
  }

  .landing-page {
    padding: 148px 20px 64px;
  }

  .landing-page.home-page {
    padding-top: 64px;
  }

  .hero-statement {
    font-size: 20px;
  }

  .home-headline {
    font-size: 28px;
  }

  .get-started {
    margin-top: 28px;
  }

  .landing-preview-frame {
    width: min(100%, 420px);
    margin-top: 32px;
  }

  .writings-page {
    padding: 64px 20px 72px;
  }

  .writings-title {
    margin-bottom: 28px;
    font-size: 44px;
  }

  .post-tabs {
    gap: 24px;
    margin: 0 -20px 44px;
    padding: 0 20px;
  }

  .post-tab {
    font-size: 18px;
  }

  .post-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .post-card-row {
    margin-top: 20px;
  }

  .post-card-title {
    font-size: 20px;
  }

  .post-card-row time {
    font-size: 15px;
  }

  .site-footer {
    padding: 0 20px 20px;
  }
}

@media (max-width: 560px) and (prefers-reduced-motion: reduce) {
  .menu-toggle-lines span,
  .mobile-navigation,
  .mobile-navigation a {
    transition: none;
  }
}
