/* The Nook website. Colours from brand/tokens/tokens.css; layout after the owner's mockup (The Nook Website.dc.html). */
/* Fonts: self-hosted from brand/fonts (SIL OFL 1.1, /fonts/LICENSE.txt); nothing is loaded from another host. */
@font-face { font-family: "Fredoka"; src: url("/fonts/Fredoka-Medium.woff") format("woff"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("/fonts/Fredoka-SemiBold.woff") format("woff"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/Nunito-SemiBold.woff") format("woff"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/Nunito-ExtraBold.woff") format("woff"); font-weight: 800 900; font-display: swap; }
:root {
  --espresso: #3B2418;
  --cocoa: #6B4A38;
  --umber: #8A5A3C;
  --ledge: #B9623D;
  --terracotta: #E88A5E;
  --peach: #F8DCCB;
  --foam: #FFF4E2;
  --milk: #F1E0C8;
  --cream: #FBEBD8;
  --white: #FFFFFF;
  --honey: #F6CF5E;
  --display: "Fredoka", system-ui, sans-serif;
  --ui: "Nunito", system-ui, sans-serif;
  --shadow: 0 6px 0 rgba(59, 36, 24, .08);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--espresso);
  font: 600 18px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
  background-color: var(--foam);
  background-image: radial-gradient(var(--milk) 1.6px, transparent 2.2px);
  background-size: 30px 30px;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ledge); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--espresso); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.narrow { max-width: 820px; }
.center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.label { display: block; font-weight: 800; font-size: 14px; letter-spacing: .16em; text-transform: uppercase; color: var(--ledge); }

/* Awning: the stripe and its scallop */
.awning { position: relative; z-index: 21; }
.awning .stripes {
  height: 30px;
  background: repeating-linear-gradient(90deg, var(--terracotta) 0 56px, var(--cream) 56px 112px);
  box-shadow: inset 0 -3px 0 rgba(59, 36, 24, .08);
}
.awning .scallop {
  height: 28px;
  background:
    radial-gradient(circle at 28px 0, var(--terracotta) 27.5px, transparent 28px) 0 0 / 112px 28px repeat-x,
    radial-gradient(circle at 28px 0, var(--cream) 27.5px, transparent 28px) 56px 0 / 112px 28px repeat-x;
  filter: drop-shadow(0 4px 0 rgba(59, 36, 24, .07));
}

/* Header */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 244, 226, .92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--milk);
}
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.bar-logo img { height: 48px; width: auto; }
.nav { display: flex; gap: 6px; }
.nav a {
  padding: 9px 18px; border-radius: 999px; text-decoration: none;
  font: 600 18px/1.2 var(--display); color: var(--espresso);
}
.nav a:hover { background: var(--milk); }
.nav a[aria-current="page"] { background: var(--milk); }

/* Home */
.hero { padding-top: 40px; padding-bottom: 24px; display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.hero-logo { width: min(440px, 80vw); }
.tagline { max-width: 620px; font-size: 21px; line-height: 1.55; color: var(--cocoa); }
.frame {
  margin: 0; overflow: hidden; background: var(--espresso);
  border: 6px solid var(--white); border-radius: 28px;
  box-shadow: 0 10px 0 rgba(59, 36, 24, .12), 0 24px 60px rgba(59, 36, 24, .14);
}
.frame img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.hero-shot { width: 100%; max-width: 960px; }
.video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.launch {
  margin-top: 12px; padding: 26px 34px; max-width: 640px;
  background: var(--white); border: 3px solid var(--milk); border-radius: 28px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.launch-main { font: 600 clamp(24px, 3.6vw, 32px)/1.2 var(--display); text-wrap: balance; }
.launch-sub { color: var(--umber); font-weight: 700; }
.intro { padding-top: 56px; padding-bottom: 16px; max-width: 760px; text-align: center; }
.intro { display: flex; flex-direction: column; gap: 14px; }
.intro p { font-size: 21px; line-height: 1.6; color: var(--cocoa); }
.intro .intro-lead { font: 600 clamp(26px, 3.4vw, 34px)/1.25 var(--display); color: var(--espresso); text-wrap: balance; }
.features { padding-top: 40px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 72px; }
.feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.feature.flip .frame { order: 2; }
.feature-text { display: flex; flex-direction: column; gap: 12px; }
.feature-text h2 { font-size: clamp(30px, 3.6vw, 40px); }
.feature-text p { font-size: 18px; color: var(--cocoa); }
.tilt-l { transform: rotate(-1.2deg); }
.tilt-r { transform: rotate(1.2deg); }
.closing { padding-top: 24px; padding-bottom: 104px; max-width: 680px; text-align: center; display: flex; flex-direction: column; gap: 16px; }
.closing p { font-size: 19px; color: var(--cocoa); }
.closing { max-width: 760px; }
.store-card { text-align: left; display: flex; flex-direction: column; gap: 6px; }
.store-card p { font-size: 18px; }
.closing .closing-line { margin-top: 12px; font: 600 clamp(24px, 3vw, 30px)/1.3 var(--display); color: var(--ledge); text-wrap: balance; }

/* Inner pages */
.page { padding-top: 48px; padding-bottom: 104px; display: flex; flex-direction: column; gap: 18px; }
.page h1 { font-size: clamp(36px, 6vw, 52px); }
.lead { font-size: 20px; color: var(--cocoa); }
.card { background: var(--white); border: 3px solid var(--milk); border-radius: 28px; padding: 28px 32px; box-shadow: var(--shadow); }
.card h2 { font-size: 26px; margin-bottom: 10px; }
.plain { margin: 0; padding-left: 1.2em; color: var(--cocoa); }
.faq-title { font-size: 30px; margin-top: 18px; }
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details { overflow-wrap: anywhere; background: var(--white); border: 3px solid var(--milk); border-radius: 22px; box-shadow: var(--shadow); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 56px 18px 24px; position: relative;
  font: 600 20px/1.3 var(--display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; background: var(--peach); color: var(--ledge);
  display: grid; place-items: center; font: 600 22px/1 var(--display);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 24px 20px; color: var(--cocoa); }
.faq details .plain { margin: -8px 24px 16px; padding-left: 1.3em; }
.faq details .plain li { margin-bottom: 6px; }
.version { color: var(--umber); font-weight: 700; }
.note { color: var(--cocoa); }
.toc ol { margin: 0; padding-left: 1.4em; columns: 2; column-gap: 32px; }
.toc li { break-inside: avoid; padding: 2px 0; }
.legal h2 { font-size: 24px; margin: 30px 0 10px; scroll-margin-top: 100px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal ul { color: var(--cocoa); margin: 0 0 12px; }
.legal ul { padding-left: 1.3em; }
.legal li { margin-bottom: 6px; }
.legal .store { border-left: 4px solid var(--terracotta); padding-left: 16px; }
.lost { width: 160px; margin-bottom: 8px; }
.button {
  display: inline-block; margin-top: 12px; padding: 14px 28px; border-radius: 18px; text-decoration: none;
  background: var(--terracotta); color: var(--white); font: 600 20px/1 var(--display); box-shadow: 0 6px 0 var(--ledge);
}
.button:hover { color: var(--white); background: var(--ledge); }

/* Footer, with its scallop */
.foot { position: relative; background: var(--espresso); color: var(--milk); margin-top: 28px; }
.foot::before {
  content: ""; position: absolute; left: 0; right: 0; top: -28px; height: 28px;
  background: radial-gradient(circle at 28px 28px, var(--espresso) 27.5px, transparent 28px) 0 0 / 56px 28px repeat-x;
}
.foot-in { padding-top: 40px; padding-bottom: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.foot-brand { display: flex; align-items: center; gap: 16px; }
.foot-brand img { width: 64px; }
.foot-name { display: block; font: 600 20px/1.2 var(--display); color: var(--foam); }
.foot-copy { display: block; font-size: 15px; font-weight: 700; }
.foot a { color: var(--milk); }
.foot a:hover { color: var(--honey); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 700; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .bar-logo img { height: 40px; }
  .nav a { padding: 8px 12px; font-size: 17px; }
  .hero { padding-top: 24px; gap: 22px; }
  .tagline, .intro p { font-size: 19px; }
  .frame { border-width: 4px; border-radius: 20px; }
  .launch { padding: 22px 20px; }
  .features { gap: 48px; }
  .feature { grid-template-columns: 1fr; gap: 22px; }
  .feature.flip .frame { order: 0; }
  .card { padding: 22px 20px; border-radius: 22px; }
  .toc ol { columns: 1; }
  .faq summary { font-size: 18px; padding-left: 18px; }
  .faq details p { padding: 0 18px 18px; }
  .faq details .plain { margin: -8px 18px 14px; }
  .foot-in { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
