:root {
  color-scheme: dark;
  --bg: #0f1115;
  --bg-soft: #12161b;
  --text: #e8e8e8;
  --muted: #9d9fa4;
  --quiet: #70747a;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(180deg, #0f1115 0%, #101319 54%, #0c0e12 100%);
  color: var(--text);
  font-family: "Times New Roman", "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0;
}

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

a {
  color: var(--text);
  text-decoration-color: rgba(232, 232, 232, 0.42);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

a:hover {
  color: #ffffff;
  text-decoration-color: rgba(255, 255, 255, 0.72);
}

a:focus-visible {
  outline: 1px solid rgba(232, 232, 232, 0.65);
  outline-offset: 0.45rem;
}

.hero {
  min-height: 78svh;
  display: flex;
  align-items: center;
  padding: 17vh 24px 12vh;
}

.hero__inner {
  width: min(100%, 980px);
  margin: 0 auto;
  animation: quietFade 1200ms ease forwards;
}

h1 {
  margin: 0;
  font-size: 3.35rem;
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0;
}

.hero p {
  margin: 1.25rem 0 0;
  color: #d8d8d8;
  font-size: 1.05rem;
}

.posts {
  display: grid;
  gap: 22vh;
  padding: 0 0 18vh;
}

.post {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 0 24px;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 900ms ease,
    transform 900ms ease;
}

.post.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.post figure {
  margin: 0;
}

.post img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--bg-soft);
  filter: saturate(0.82) brightness(0.82);
  opacity: 0;
  transition: opacity 700ms ease;
}

.post img.is-loaded {
  opacity: 1;
}

.post figcaption {
  margin-top: 1.55rem;
}

.post__title,
.post__text,
.post__location {
  margin: 0;
}

.post__title {
  font-size: 1.42rem;
  line-height: 1.4;
}

.post__text {
  margin-top: 0.6rem;
  color: #d6d6d6;
  font-size: 0.98rem;
}

.post__location {
  margin-top: 1.35rem;
  color: var(--quiet);
  font-size: 0.78rem;
  line-height: 1.5;
}

.post__location:empty {
  display: none;
}

.load-note {
  width: min(100%, 760px);
  margin: 0 auto 18vh;
  padding: 0 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.branches,
.functions {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 0 24px;
  color: var(--quiet);
  font-size: 0.84rem;
  line-height: 1.85;
}

.branches {
  padding-bottom: 9vh;
}

.functions {
  padding-bottom: 13vh;
}

.branches h2,
.functions h2 {
  margin: 0;
  color: #c9c9c9;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
}

.branches__lead,
.functions__lead {
  margin: 1.8rem 0 0;
  color: #a8aaae;
}

.branches__list,
.functions__list {
  display: grid;
  gap: 2.4rem;
  margin: 6vh 0 0;
  padding: 0;
  list-style: none;
}

.branches__link,
.functions__link {
  display: block;
  text-decoration: none;
}

.branches__name,
.branches__text,
.functions__name,
.functions__text {
  display: block;
}

.branches__name,
.functions__name {
  color: #d8d8d8;
  font-size: 1.08rem;
  line-height: 1.45;
}

.branches__text,
.functions__text {
  margin-top: 0.45rem;
  color: var(--quiet);
}

.branches__link:hover .branches__name,
.branches__link:hover .branches__text,
.functions__link:hover .functions__name,
.functions__link:hover .functions__text {
  color: #e1e1e1;
}

.footer {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 4vh 24px 11vh;
  color: var(--quiet);
  font-size: 0.78rem;
  line-height: 1.8;
}

.footer a {
  display: inline-block;
  margin-bottom: 2.5rem;
  color: #c9c9c9;
}

.footer p {
  margin: 0;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 720px) {
  .hero {
    min-height: 80vh;
    padding-right: 48px;
    padding-left: 48px;
  }

  h1 {
    font-size: 5.1rem;
  }

  .hero p {
    font-size: 1.18rem;
  }

  .posts {
    gap: 26vh;
  }

  .post {
    padding-right: 48px;
    padding-left: 48px;
  }

  .post:nth-child(even) {
    width: min(100%, 680px);
    margin-right: 8vw;
  }

  .post__title {
    font-size: 1.68rem;
  }

  .footer {
    padding-right: 48px;
    padding-left: 48px;
  }

  .branches,
  .functions {
    padding-right: 48px;
    padding-left: 48px;
  }
}

@media (min-width: 900px) {
  .hero {
    min-height: 76vh;
    padding-top: 15vh;
    padding-bottom: 10vh;
  }

  .posts {
    gap: 18vh;
    padding-bottom: 16vh;
  }

  .post {
    width: min(calc(100% - 96px), 720px);
    padding: 0;
  }

  .load-note,
  .branches,
  .functions,
  .footer {
    width: min(100%, 600px);
  }

  .branches,
  .functions {
    width: var(--footer-line-width, min(100%, 600px));
    margin-right: auto;
    margin-left: var(--footer-line-left, auto);
    padding-right: 0;
    padding-left: 0;
  }

  .branches {
    padding-bottom: 8vh;
  }

  .functions {
    padding-bottom: 11vh;
  }

  .footer {
    width: var(--footer-line-width, min(100%, 600px));
    margin-right: auto;
    margin-left: var(--footer-line-left, auto);
    padding-right: 0;
    padding-left: 0;
  }

  .post:nth-child(even) {
    width: min(calc(100% - 96px), 720px);
    margin-right: auto;
    margin-left: auto;
  }

  .post.post--landscape {
    width: min(calc(100% - 96px), 1040px);
  }

  .post.post--portrait {
    width: min(calc(100% - 96px), 680px);
  }

  .post.post--square {
    width: min(calc(100% - 96px), 760px);
  }

  .post figure {
    width: fit-content;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
  }

  .post img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 70vh;
    min-height: 0;
    aspect-ratio: auto;
    object-fit: contain;
  }

  .post.post--landscape img {
    max-height: 70vh;
  }

  .post.post--portrait img {
    max-height: 72vh;
  }

  .post.post--square img {
    max-height: 70vh;
  }

  .post figcaption {
    margin-top: 1.15rem;
  }

  .post__text {
    margin-top: 0.45rem;
  }

  .post__location {
    margin-top: 0.9rem;
  }
}

@media (min-width: 900px) and (max-height: 780px) {
  .posts {
    gap: 15vh;
  }
}

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

  .post {
    opacity: 1;
    transform: none;
  }
}
