@font-face {
  font-family: "Young Serif";
  src: url("../fonts/young-serif-latin-ext-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Young Serif";
  src: url("../fonts/young-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Materials from the facade plan: Tondach Pilis natural brick-red tile, broken white plaster, Klinker brick, reseda joinery and gutters, natural oak, light grey flashing. */
:root {
  --sand: #e4d6bd;
  --whitewash: #f6f2e8;
  --shade: #ded8ca;
  --steel: #c9cbc9;
  --tile: #b5533a;
  --tile-dark: #8f3f2b;
  --brick: #7a3b2a;
  --oak: #b08850;
  --oak-dark: #6e4f2a;
  --reseda: #6c7c59;
  --reseda-dark: #3f4c33;
  --glass: #2f3a33;
  --umber: #33251a;
  --gutter: clamp(1rem, 5vw, 5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--sand);
  color: var(--umber);
  font-family: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  height: 100svh;
  min-height: 26rem;
  margin: 0;
  overflow-x: clip;
}

.notice {
  flex: none;
  padding: clamp(1rem, 5svh, 4rem) var(--gutter) clamp(0.75rem, 3svh, 2rem);
}

h1 {
  margin: 0;
  color: var(--reseda-dark);
  font-family: "Young Serif", Georgia, serif;
  font-size: clamp(2.75rem, min(10vw, 17svh), 10rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}

p {
  margin: 0.9em 0 0;
  font-size: clamp(1.125rem, min(2.4vw, 4svh), 2rem);
  font-weight: 500;
  line-height: 1.3;
  text-wrap: balance;
}

.house {
  display: block;
  flex: 1 1 0;
  width: 100%;
  min-height: 0;
}

.tile-base { fill: var(--tile); }
.tile-edge { fill: none; stroke: var(--tile-dark); stroke-width: 1; }
.tiles rect { fill: url("#tile"); }
.tiles .ridge { fill: var(--tile-dark); }
.brick-base { fill: var(--brick); }
.brick-joint { fill: none; stroke: #5d2c1f; stroke-width: 1; }
.roof-frame rect, .cladding, .eave-board { fill: var(--oak); }
.wall, .post, .surround { fill: var(--whitewash); }
.surround, .post { stroke: var(--shade); stroke-width: 1.5; }
.recess { fill: var(--shade); }
.gutter, .pipe { fill: var(--reseda); }
.chimney { fill: #7d8280; }
.plinth { fill: url("#brick"); }
.sash { fill: var(--reseda); }
.glass { fill: var(--glass); }
.panel {  fill: none; stroke: var(--reseda-dark); stroke-width: 2; }
.sill { fill: var(--steel); }
.pediment, .beam { fill: var(--oak); }
.beam { fill: var(--oak-dark); }
.slats { fill: none; stroke: var(--oak-dark); stroke-width: 1.5; }
.barge { fill: none; stroke: var(--oak-dark); stroke-width: 7; stroke-linejoin: miter; }
.crown, .bush { fill: var(--reseda-dark); }
.trunk { fill: var(--oak-dark); }
.ground { fill: var(--reseda); }

.tiles {
  animation: lay-tiles 3.2s 0.3s steps(22) both;
}

@keyframes lay-tiles {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@media (max-aspect-ratio: 4/5) {
  .notice {
    margin-block: auto;
  }

  .house {
    flex: none;
    width: 210vw;
    height: auto;
    margin-left: -55vw;
    aspect-ratio: 1600 / 380;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tiles {
    animation: none;
  }
}
