/*-------------------------*/
/*-- Setting up the foundation --*/
/*-------------------------*/

* {
  box-sizing: border-box;
}

:root {
  color-scheme: light dark;
  --content-width: 980px;
  --hover-easing: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --easing-in-out: cubic-bezier(0.455, 0.03, 0.515, 0.955);
  --spacing-base: 85;
  --spacing-base-px: calc(var(--spacing-base) * 1px);
  --spacing-base-vw: calc(var(--spacing-base) * 0.079653vw);
  --spacing-section-padding-block: min(
    calc(var(--spacing-base-px) * 0.75),
    calc(var(--spacing-base-vw) * 0.75)
  );
  --spacing-section-padding-block-2: min(
    calc(var(--spacing-base-px) * 0.875),
    calc(var(--spacing-base-vw) * 0.875)
  );
  --spacing-section-padding-block-3: min(
    calc(var(--spacing-base-px) * 0.75),
    calc(var(--spacing-base-vw) * 0.75)
  );
  --spacing-section-padding-block-4: min(
    calc(var(--spacing-base-px) * 0.3),
    calc(var(--spacing-base-vw) * 0.3)
  );
  --spacing-section-padding-block-5: min(
    calc(var(--spacing-base-px) * 0.375),
    calc(var(--spacing-base-vw) * 0.375)
  );
}

html {
  --12px: 0.75rem;
  --14px: 0.875rem;
  --15px: 0.9375rem;
  --16px: 1rem;
  --17px: 1.0625rem;
  --18px: 1.125rem;
  --19px: 1.1875rem;
  --20px: 1.25rem;
  --21px: 1.3125rem;
  --22px: 1.375rem;
  --24px: 1.5rem;
  --26px: 1.625rem;
  --28px: 1.75rem;
  --30px: 1.875rem;
  --32px: 2rem;
  --34px: 2.125rem;
  --36px: 2.25rem;
  --37px: 2.313rem;

  height: 100vh;
  display: grid;
  place-items: center;
}

@media screen and (max-width: 960px) {
  :root {
    --spacing-base: 150;
  }
}

@media screen and (max-width: 480px) {
  :root {
    --spacing-base: 200;
  }
}

@media (prefers-color-scheme: light) {
  :root {
    --color-bg-surface-1: #fff;
    --color-bg-surface-2: #f1f5f8;
    --color-bg-surface-3: #fff;
    --color-bg-token: #eaf1f5;
    --color-accent: #b63e3e;

    --color-text-primary: #383f42;
    --color-text-secondary: #5d707d;
    --color-text-tertiary: #42474a;
    --color-text-token: #344248;
    --color-text-interactive: var(--color-text-secondary);
    --color-text-interactive-hover: var(--color-accent);

    --color-border-primary: rgba(93, 112, 125, 0.4);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg-surface-1: #565657;
    --color-bg-surface-2: #1b1e20;
    --color-bg-surface-3: #222627;
    --color-bg-token: #293339;
    --color-accent: #e35050;

    --color-text-primary: #ffffff;
    --color-text-secondary: #c6c8c9;
    --color-text-tertiary: #e6eef3;
    --color-text-token: #c3d8dd;
    --color-text-interactive: var(--color-text-secondary);
    --color-text-interactive-hover: var(--color-accent);

    --color-border-primary: rgba(93, 112, 125, 0.4);
  }
}

/*-------------------------*/
/*-- Begin generic styles --*/
/*-------------------------*/

a {
  color: var(--color-text-interactive);
}

a:hover {
  color: var(--color-text-interactive-hover);
}

body {
  margin-block: 0;
  margin-inline: 0;
  padding-block: 32px;
  font-family: "Assistant", sans-serif;
  background-color: var(--color-bg-surface-1);
}

.hero-header {
  margin-inline: auto;
  inline-size: min(85%, var(--content-width));
}

main > * {
  margin-inline: auto;
  inline-size: min(85%, var(--content-width));
}

.hero-heading {
  font-family: "Crimson Pro", serif;
  font-weight: 300;
  font-size: min(var(--37px), 6vw);
  line-height: 130%;
  color: var(--color-text-tertiary);
  margin-block-start: 0;
  margin-block-end: min(16px, 2vw);
}

p {
  color: var(--color-text-secondary);
}

.hero-description {
  column-count: 1;
  column-gap: 24px;
}

.hero-description p {
  display: contents;
  line-height: 28px;
  font-size: min(var(--18px), 4vw);
}

.superfluous-description {
  display: contents;
}

.social-media-links {
  display: flex;
  margin-block: 0;
  padding-inline: 0;
  padding-block: 0;
  list-style-type: none;
}

.social-media-link {
  display: inline;
  transition: 0.1s transform var(--hover-easing);
  font-family: "crimson pro";
  font-style: italic;
  font-weight: 300;
}

.social-media-links li:after {
  margin-inline: 3px 5px;
  content: "·";
  text-decoration: none;
  pointer-events: none;
  color: var(--color-text-secondary);
}

.social-media-links li:last-child:after {
  display: none;
}

.work-heading {
  margin-block: 0;
  margin-block-end: 6px;
  font-weight: 800;
  font-size: var(--12px);
  line-height: 140%;
  letter-spacing: 0.175em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.work-examples-container {
  padding-block: var(--spacing-section-padding-block);
}

.work-examples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: min(24px, 5vw);
  grid-template-rows: auto;
}

.work-example {
  display: flex;
  flex-direction: column;
}

.work-examples-header {
  margin-inline: 0;
  margin-block-end: var(--spacing-section-padding-block-4);
}

.work-example-heading {
  font-family: "Crimson Pro", serif;
  font-size: var(--20px);
  font-weight: 400;
  margin-block: 0;
  margin-block-end: 6px;
}

.work-example-heading a {
  transition: 0.1s color ease-out;
  color: var(--color-text-primary);
  text-decoration: none;
}

.work-example-heading a:hover {
  color: var(--color-accent);
}

.work-example-description {
  margin: 0;
  font-size: var(--16px);
  line-height: 143%;
  color: var(--color-text-secondary);
}

.heading-content {
  padding-inline: 16px;
}

.work-example-preview {
  object-fit: cover;
  inline-size: 100%;
  flex-grow: 1;
  transition: 0.2125s transform var(--hover-easing);
}

.work-example:hover .work-example-preview {
  transform: scale(1.005) translateY(-3px);
}

.one-core-toolbox-preview:hover .work-example-preview {
  transform: scale(0.905) translateY(-1px);
}

.one-core-toolbox-preview .work-example-preview {
  margin-inline: auto;
  transform: scale(0.9) translateY(4px);
  position: relative;
  top: 8px;
}

/*-------------------------*/
/*-- Responsive media queries --*/
/*-------------------------*/

@media screen and (max-width: 800px) {
  .hero-heading {
    line-height: 125%;
    font-weight: 400;
  }

  .hero-description {
    column-count: 1;
  }

  .superfluous-description {
    display: none;
  }
}

@media screen and (max-width: 724px) {
  .hero-heading {
    line-height: 120%;
  }

  .work-examples {
    display: flex;
    flex-direction: column;
  }
}

@media screen and (max-width: 480px) {
  .hero-heading {
    line-height: 135%;
    margin-block-end: min(24px, 3vw);
    font-size: min(var(--37px), var(--22px));
  }

  :root {
    --hover-easing: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .social-media-links {
    margin-block-start: 24px;
  }

  .hero-description p {
    line-height: 145%;
    font-size: var(--16px);
  }
}

/*-------------------------*/
/*-- Animations --*/
/*-------------------------*/

body {
  --animation-start: 0.15s;
  --animation-sequence: 0.06s;
  --animation-scale: 0.98;
  --animation-translate-y: 30px;
}

@keyframes animate-content-in {
  0% {
    opacity: 0;
    transform: translateY(var(--animation-translate-y))
      scale(var(--animation-scale));
  }
}

:where(.hero-header, .work-examples-header, .work-heading, .work-examples) > * {
  animation: animate-content-in 0.875s var(--hover-easing) backwards;
}

.hero-header :nth-child(1) {
  animation-delay: calc(var(--animation-start) + var(--animation-sequence));
}

.hero-header :nth-child(2) {
  animation-delay: calc(var(--animation-start) + var(--animation-sequence) * 2);
}

.hero-header :nth-child(3) {
  animation-delay: calc(var(--animation-start) + var(--animation-sequence) * 3);
}

.work-heading {
  --animation-translate-y: 15px;
  --animation-scale: 1;
  animation-delay: calc(
    var(--animation-start) + var(--animation-sequence) * 6.125
  );
}

.work-example:nth-child(1) {
  --animation-translate-y: 10px;
  --animation-scale: 1;
  animation-delay: calc(
    var(--animation-start) + var(--animation-sequence) * 7.5
  );
}

.work-example:nth-child(2) {
  --animation-translate-y: 10px;
  --animation-scale: 1;
  animation-delay: calc(
    var(--animation-start) + var(--animation-sequence) * 8.5
  );
}

.work-example:nth-child(3) {
  --animation-translate-y: 10px;
  --animation-scale: 1;
  animation-delay: calc(
    var(--animation-start) + var(--animation-sequence) * 8.5
  );
}

.work-example:nth-child(4) {
  --animation-translate-y: 10px;
  --animation-scale: 1;
  animation-delay: calc(
    var(--animation-start) + var(--animation-sequence) * 9.5
  );
}

@media screen and (max-width: 480px) {
  .work-examples,
  .work-examples-header {
    animation-delay: calc(
      var(--animation-start) + var(--animation-sequence) * 8
    );
  }
}

.social-media-links > * {
  --animation-translate-y: 10px;
  --animation-sequence: 0.075s;
  animation: animate-content-in 0.75s var(--hover-easing) backwards;
}

.social-media-links :nth-child(1) {
  animation-delay: calc(var(--animation-start) + var(--animation-sequence) * 8);
}

.social-media-links :nth-child(2) {
  animation-delay: calc(
    var(--animation-start) + var(--animation-sequence) * 8.25
  );
}

.social-media-links :nth-child(3) {
  animation-delay: calc(
    var(--animation-start) + var(--animation-sequence) * 8.5
  );
}

.social-media-links :nth-child(4) {
  animation-delay: calc(
    var(--animation-start) + var(--animation-sequence) * 8.75
  );
}

.social-media-links :nth-child(5) {
  animation-delay: calc(var(--animation-start) + var(--animation-sequence) * 9);
}

img {
max-width: 100%;
display: block;
max-height: 160px;
margin: -40px auto;
}