@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 560;
  font-display: swap;
  src: url("fonts/newsreader.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400 560;
  font-display: swap;
  src: url("fonts/newsreader-italic.woff2") format("woff2");
}

:root {
  --paper: #f3eee6;
  --ink: #082840;
  --wine: #583840;
  --paper-muted: rgb(243 238 230 / 0.68);
  --ink-muted: rgb(8 40 64 / 0.62);
  --pad-y: clamp(2rem, 7vh, 4.75rem);
  --pad-x: clamp(1.5rem, 4vw, 3.75rem);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  color: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Newsreader", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  font-weight: 400;
  font-optical-sizing: auto;
  font-variant-numeric: oldstyle-nums;
  text-rendering: optimizeLegibility;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(17rem, 5fr) minmax(20rem, 7fr);
}

header,
main {
  display: flex;
  flex-direction: column;
  padding: var(--pad-y) var(--pad-x);
}

p,
ul {
  margin: 0;
}

/* Header */

h1 {
  margin: 0;
  color: var(--paper);
  font-weight: 500;
  font-size: clamp(3.4rem, 5.6vw, 6.25rem);
  letter-spacing: -0.035em;
  line-height: 0.92;
}

.tagline {
  margin-top: 1.1rem;
  color: var(--paper-muted);
  font-style: italic;
  font-size: clamp(1.2rem, 1.6vw, 1.45rem);
  line-height: 1.35;
}

header {
  overflow: hidden;
}

.mark {
  flex: 1;
  display: flex;
  align-items: flex-end;
  margin-top: 2.5rem;
}

.house {
  display: block;
  width: 100%;
  max-width: 22rem;
  overflow: visible;
  color: var(--paper);
}

.house .line {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.6;
  stroke-width: 1;
  stroke-linejoin: round;
}

.house .trim {
  fill: none;
  stroke: #a3616b;
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.house .trim-heavy {
  stroke-width: 2.2;
}

.house .solid {
  fill: var(--ink);
}

.house .glass {
  fill: rgb(243 222 190 / 0.09);
}

.house .cream {
  fill: rgb(243 238 230 / 0.16);
}

.cat-fur {
  fill: #7f8893;
}

.cat-white {
  fill: var(--paper);
}

.cat-nose {
  fill: #2c3138;
}

.cat-tail {
  fill: none;
  stroke: #7f8893;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.cat-eyes {
  fill: #c3c75c;
  transform-box: fill-box;
  transform-origin: center;
}

.since {
  margin-top: 0.9rem;
  color: var(--paper-muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Main */

main {
  position: relative;
  isolation: isolate;
  background: var(--paper);
  color: var(--ink);
}

main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35  0 0 0 0 0.3  0 0 0 0 0.25  0 0 0 0.22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.lede {
  max-width: 24ch;
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
}

section {
  margin-top: clamp(2.5rem, 7vh, 4rem);
}

h2 {
  margin: 0 0 0.9rem;
  color: var(--wine);
  font-size: 0.8rem;
  font-weight: 560;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.services {
  padding: 0;
  list-style: none;
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
  line-height: 1.5;
}

.services li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.services li::before {
  content: "";
  flex: none;
  width: 1rem;
  height: 1px;
  background: var(--wine);
  transform: translateY(-0.3em);
}

.contact {
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
}

footer {
  margin-top: auto;
  padding-top: clamp(3rem, 8vh, 5rem);
  color: var(--ink-muted);
  font-size: 0.9rem;
}

/* Links */

a {
  color: var(--wine);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: text-decoration-thickness 150ms ease, text-underline-offset 150ms ease;
}

a:visited {
  color: var(--wine);
}

a:hover {
  text-decoration-thickness: 2px;
  text-underline-offset: 0.24em;
}

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

::selection {
  background: #e6d6d4;
  color: var(--ink);
}

/* Entrance */

@media (prefers-reduced-motion: no-preference) {
  .masthead,
  .since,
  .lede,
  section,
  footer {
    animation: rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .lede {
    animation-delay: 120ms;
  }

  section:nth-of-type(1) {
    animation-delay: 240ms;
  }

  section:nth-of-type(2) {
    animation-delay: 360ms;
  }

  .since,
  footer {
    animation-delay: 480ms;
  }

  .house [pathLength] {
    stroke-dasharray: 1;
    animation: draw 1.8s cubic-bezier(0.6, 0.1, 0.3, 1) 300ms both;
  }

  .house .glass,
  .house .cream {
    animation:
      draw 1.8s cubic-bezier(0.6, 0.1, 0.3, 1) 300ms both,
      fill-in 1s ease 1.4s both;
  }

  .house .texture {
    animation: fade 1.2s ease 1.3s both;
  }

  .cat {
    animation: fade 0.8s ease 2s both;
  }

  .cat-eyes {
    animation: blink 7s ease-in-out 4s infinite;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes fill-in {
  from {
    fill-opacity: 0;
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes blink {
  0%,
  90%,
  99%,
  100% {
    transform: scaleY(1);
  }
  94%,
  95.5% {
    transform: scaleY(0.1);
  }
}

/* Small screens */

@media (max-width: 720px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .mark {
    flex: none;
    margin-top: 2rem;
  }

  .house {
    max-width: 15rem;
  }
}
