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

/* Registered so the page turn can animate one length across clip-path and flap size. */
@property --turn { syntax: "<length>"; inherits: true; initial-value: 0px; }

:root {
  --green: rgb(37, 74, 56);
  --cream: rgb(241, 233, 210);
  --fold: rgb(232, 221, 194);
  --rest: clamp(290px, 52vmin, 560px);
}
* { box-sizing: border-box; }
body {
  --turn: var(--rest);
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--green);
  color: var(--green);
  font: 400 1.2rem/1.55 Karla, sans-serif;
  animation: turn-page 1.1s 0.25s cubic-bezier(0.3, 0.7, 0.2, 1) backwards;
  transition: --turn 0.45s cubic-bezier(0.3, 0.7, 0.2, 1);
}
body:has(.shop:hover), body:has(.shop:focus-visible) { --turn: calc(var(--rest) + 48px); }
@keyframes turn-page { from { --turn: 0px; } }

.sheet {
  position: absolute;
  inset: 0;
  background: var(--cream);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--turn)), calc(100% - var(--turn)) 100%, 0 100%);
}
.flap {
  position: absolute;
  right: var(--turn);
  bottom: var(--turn);
  width: var(--turn);
  height: var(--turn);
  transform: translate(100%, 100%);
  filter: drop-shadow(-10px -10px 18px rgba(37, 74, 56, 0.22));
  pointer-events: none;
}
.flap svg { display: block; width: 100%; height: 100%; }

main {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: clamp(28px, 6vmin, 64px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark { height: 52px; width: auto; }
.brand .name { height: 38px; width: auto; }
h1 {
  max-width: 9.5em;
  margin: auto 0 0;
  font: 400 clamp(3rem, 12.5vmin, 7.75rem)/1.02 "Young Serif", serif;
  letter-spacing: -0.015em;
}
.intro { max-width: 30em; margin: 1.5rem 0 0; text-wrap: pretty; }
.contact { margin: 1.25rem 0 auto; padding-bottom: 1rem; }
.contact a { color: inherit; text-underline-offset: 0.2em; }

.shop {
  align-self: flex-start;
  margin-top: 1.75rem;
  padding: 1rem 2.25rem;
  border-radius: 999px;
  background: var(--green);
  color: var(--cream);
  font-size: 1.3rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.shop:hover { background: rgb(24, 52, 39); }
a:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

@media (max-width: 760px) {
  :root { --rest: 250px; }
  main { padding-bottom: 270px; }
  h1 { margin-top: 3.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  body { animation: none; transition: none; }
}
