:root {
  --bg: #f3f3f1;
  --surface: #f7f7f5;
  --line: #dfdfda;
  --line-soft: #e8e8e3;
  --text: #202124;
  --muted: #6b6d72;
  --muted-soft: #8b8d92;
  --radius: 22px;
  --radius-sm: 16px;
  --content: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.page {
  max-width: calc(var(--content) + 96px);
  margin: 40px auto;
  padding: 0 24px;
}

.shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px 34px 24px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: sticky;
  top: 16px;
  z-index: 20;
  padding: 10px 14px;
  margin: -8px -8px 0;
  border-radius: 22px;
  background: rgba(247, 247, 245, 0.88);
  backdrop-filter: blur(12px);
}

section[id] {
  scroll-margin-top: 110px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--muted-soft);
  border-radius: 2px;
  flex: 0 0 auto;
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.nav-toggle-button span {
  position: absolute;
  width: 16px;
  height: 1.5px;
  background: var(--text);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.nav-toggle-button span:nth-child(1) {
  transform: translateY(-5px);
}

.nav-toggle-button span:nth-child(3) {
  transform: translateY(5px);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  color: var(--muted);
  font-size: 0.95rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.button:hover {
  background: #efefeb;
  border-color: #cfcfc9;
  transform: translateY(-1px);
}

.nav-contact {
  min-width: 48px;
}

.nav-contact-text {
  display: inline;
}

.nav-contact svg {
  display: none;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.site-main {
  padding: 88px 0 28px;
}

.site-main--narrow {
  padding: 88px 0 28px;
}

.hero {
  padding: 132px 0 120px;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.75rem);
  line-height: 0.96;
  font-weight: 500;
  letter-spacing: -0.05em;
}

h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.045em;
}

h3 {
  margin: 0;
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.04em;
}

h4 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 500;
}

p {
  margin: 18px auto 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.04rem;
}

hr {
  margin: 28px auto 0;
  border: none;
  border-top: 1px solid var(--line-soft);
}

strong {
  color: var(--text);
  font-weight: normal;
}

.hero-copy {
  max-width: 720px;
  margin: 22px auto 0;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-actions {
  margin-top: 38px;
}

section {
  padding: 28px 0 34px;
}

.content,
article {
  max-width: 760px;
  margin: 0 auto;
}

.content.center {
  text-align: center;
}

article section {
  padding: 30px 0 0;
}

.section-label {
  display: flex;
  justify-content: center;
  margin: 0 0 34px;
  font-size: 0.96rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted-soft);

  animation: section-label-reveal both;
  animation-timeline: view();
  animation-range: entry 8% cover 20%;
}

@keyframes section-label-reveal {
  from {
    opacity: 0;
    letter-spacing: 1em;
    animation-timing-function: ease-in;
  }

  to {
    opacity: 1;
    letter-spacing: 0.28em;
  }
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head .section-label {
  margin: 0;
  justify-content: flex-start;
}

.section-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* Testing animations */

.section-grid > * {
  opacity: 0;
  transform: translateY(45%);
  animation: section-grid-reveal both;
  animation-timeline: view();
  animation-range: entry 8% cover 24%;
}

.section-grid > *:nth-child(2) {
  animation-range: entry 10% cover 26%;
}

.section-grid > *:nth-child(3) {
  animation-range: entry 12% cover 28%;
}

.section-grid > *:nth-child(4) {
  animation-range: entry 14% cover 30%;
}

@keyframes section-grid-reveal {
  from {
    opacity: 0;
    transform: translateY(45%);
    animation-timing-function: ease-in;
  }

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

.flyin {
  animation: flyin-reveal both;
  animation-timeline: view();
  animation-range: entry 10% cover 34%;
}

.kids-flyin > * {
  animation: flyin-reveal both;
  animation-timeline: view();
  animation-range: entry 10% cover 34%;
}

@keyframes flyin-reveal {
  from {
    opacity: 0;
    transform: translateY(45%);
    animation-timing-function: cubic-bezier(0.12, 0.78, 0.22, 1);
  }

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

/* End testing animations */

.section-grid.small {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0;
  min-width: 0;
}

.card-icon {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 26px;
}

.card h3 {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 500;
}

.card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.98rem;
}

.card-link,
.card-meta {
  display: inline-block;
  margin-top: 20px;
  color: var(--text);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-meta {
  padding: 0 4px;
}

.card-copy {
  padding: 0 4px;
  min-width: 0;
}

.card:focus-visible {
  outline: 2px solid #bcbcb5;
  outline-offset: 6px;
  border-radius: var(--radius-sm);
}

.card-visual {
  display: block;
  aspect-ratio: 4 / 2.4;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.01)),
    radial-gradient(circle at 35% 35%, rgba(0, 0, 0, 0.07), transparent 24%),
    radial-gradient(circle at 70% 55%, rgba(0, 0, 0, 0.05), transparent 22%),
    linear-gradient(135deg, #ecece8, #f7f7f5);
  border: 1px solid var(--line-soft);
}

.card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(0.94) brightness(1.02);
}

.card-visual-link {
  display: block;
  overflow: hidden;
}

.card-visual-link:hover {
  filter: saturate(0.88) contrast(0.96) brightness(1.14);
}

.video-play {
  position: absolute;
  inset: auto auto 16px 16px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(16, 17, 19, 0.34);
  backdrop-filter: blur(6px);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.video-play::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 15px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid #f7f7f5;
}

.project h3,
.project p,
.video-card h3,
.video-card p {
  overflow-wrap: anywhere;
  hyphens: auto;
}

.section-layout-right {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  align-items: center;
  gap: 34px;
}

.section-layout-left {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  align-items: center;
  gap: 34px;
}

.section-image {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #ecece8;
}

.figure {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #ecece8;
}

.section-layout-right .section-image {
  animation: section-layout-right-image-reveal both;
  animation-timeline: view();
  animation-range: entry 0% cover 20%;
}

.section-layout-left .section-image {
  animation: section-layout-left-image-reveal both;
  animation-timeline: view();
  animation-range: entry 0% cover 20%;
}

@keyframes section-layout-left-image-reveal {
  from {
    opacity: 0;
    transform: translateX(5%);
    animation-timing-function: ease-in;
  }

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

@keyframes section-layout-right-image-reveal {
  from {
    opacity: 0;
    transform: translateX(-5%);
    animation-timing-function: ease-in;
  }

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

.section-image img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.86) contrast(0.96);
}

.meta p {
  margin: 10px 0 0;
  font-size: 0.98rem;
  line-height: 1.7;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0 6px;
  color: var(--muted-soft);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-social,
.footer-meta {
  display: flex;
  align-items: center;
}

.footer-social {
  gap: 10px;
}

.footer-meta {
  gap: 22px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.social-link svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.social-link:hover {
  background: #efefeb;
  border-color: #cfcfc9;
  transform: translateY(-1px);
}

.footer-copy {
  color: var(--muted);
}

.footer a:hover,
.nav-links a:hover {
  color: var(--text);
}

@media (max-width: 1040px) {
  .nav {
    flex-wrap: wrap;
  }

  .nav-links {
    display: none;
    order: 4;
    width: 100%;
    padding-top: 10px;
    gap: 14px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .nav-toggle-button {
    display: inline-flex;
    position: relative;
    margin-left: auto;
  }

  .nav-contact {
    padding: 0;
  }

  .nav-contact-text {
    display: none;
  }

  .nav-contact svg {
    display: block;
  }

  .nav-toggle:checked + .nav-toggle-button + .nav-links {
    display: flex;
  }

  .nav-toggle:checked + .nav-toggle-button span:nth-child(1) {
    transform: rotate(45deg);
  }

  .nav-toggle:checked + .nav-toggle-button span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle:checked + .nav-toggle-button span:nth-child(3) {
    transform: rotate(-45deg);
  }

  .section-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .section-grid > * {
    width: 100%;
    max-width: none;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer {
    flex-direction: column;
    justify-content: center;
  }

  .section-layout-right,
  .section-layout-left {
    grid-template-columns: 1fr;
  }

  .section-image img {
    width: 100%;
    aspect-ratio: 16 /9;
    object-fit: cover;
    object-position: center top;
    filter: saturate(0.86) contrast(0.96);
  }
}

@media (max-width: 720px) {
  .page {
    margin: 18px auto;
    padding: 0 12px;
  }

  .shell {
    padding: 20px 18px 18px;
    border-radius: 22px;
  }

  .nav {
    align-items: center;
    justify-content: space-between;
    top: 10px;
    padding: 10px 10px 8px;
    margin: -4px -4px 0;
  }

  .nav-links {
    font-size: 0.9rem;
  }

  .hero {
    padding: 96px 0 84px;
  }

  .about {
    padding: 54px 0 60px;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .site-main {
    padding: 68px 0 18px;
  }

  .site-main--narrow {
    padding: 68px 0 18px;
  }

  .footer-meta {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 18px;
  }
}
