@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,800&family=Nunito:wght@400;600;800&display=swap');

.cv {
  --cream: 40 70% 95%;
  --card: 38 80% 97%;
  --choc: 20 55% 18%;
  --cocoa: 22 35% 34%;
  --orange: 26 85% 50%;
  --orange-deep: 22 85% 38%;
  --line: 30 40% 82%;
  font-family: 'Nunito', system-ui, sans-serif;
  color: hsl(var(--choc));
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  padding: clamp(2rem, 6vw, 5rem) 1rem;
}
.cv::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background: var(--cv-wall) center / cover no-repeat;
}
.cv::after {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, hsl(36 60% 92% / .55), hsl(30 50% 88% / .82));
}
.cv h1, .cv h2, .cv h3 { font-family: 'Fraunces', Georgia, serif; color: hsl(var(--choc)); letter-spacing: -.01em; }

/* ---------- Entrance ---------- */
.cv-gate {
  max-width: 540px; margin: 0 auto; text-align: center;
  background: hsl(var(--card)); border-radius: 28px;
  padding: 2.5rem clamp(1.25rem, 5vw, 2.75rem) 2.25rem;
  border: 2px solid hsl(var(--line));
  box-shadow: 0 2px 0 hsl(var(--orange) / .9), 0 24px 60px -24px hsl(var(--choc) / .45);
  animation: cv-rise .6s cubic-bezier(.2,.8,.2,1) both;
}
.cv-spy {
  width: clamp(150px, 40vw, 210px); height: auto; margin: -5.5rem auto .5rem; display: block;
  filter: drop-shadow(0 14px 16px hsl(var(--choc) / .3));
  animation: cv-bob 4s ease-in-out infinite;
}
.cv-kicker {
  display: inline-block; font-weight: 800; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: hsl(var(--orange-deep)); background: hsl(var(--orange) / .12);
  padding: .3rem .8rem; border-radius: 999px; margin-bottom: .9rem;
}
.cv-gate h1 { font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 800; line-height: 1.05; margin-bottom: .75rem; }
.cv-gate .cv-sub { font-size: 1.08rem; color: hsl(var(--cocoa)); margin-bottom: 1.75rem; }
.cv-form label { display: block; font-weight: 800; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .5rem; }
.cv-pin {
  width: 11rem; max-width: 100%; text-align: center; font-size: 2rem; letter-spacing: .6em; padding: .55rem 0 .55rem .6em;
  border: 3px dashed hsl(var(--orange)); border-radius: 16px; background: hsl(var(--cream));
  color: hsl(var(--choc)); font-family: 'Fraunces', serif; font-weight: 800;
  transition: border-color .2s, transform .2s;
}
.cv-pin:focus { outline: none; border-style: solid; border-color: hsl(var(--orange-deep)); transform: scale(1.03); }
.cv-btn {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.25rem;
  background: hsl(var(--orange-deep)); color: hsl(var(--card)); border: 0; border-radius: 999px;
  font-weight: 800; font-size: 1.05rem; padding: .85rem 1.6rem;
  box-shadow: 0 4px 0 hsl(var(--choc)); transition: transform .15s, box-shadow .15s, background .2s;
}
.cv-btn:hover { background: hsl(20 90% 34%); transform: translateY(-2px); box-shadow: 0 6px 0 hsl(var(--choc)); }
.cv-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 hsl(var(--choc)); }
.cv-btn:focus-visible, .cv-lock button:focus-visible { outline: 3px solid hsl(var(--choc)); outline-offset: 3px; }
.cv-error {
  margin: 0 auto 1.25rem; max-width: 26rem; padding: .75rem 1rem; border-radius: 14px;
  background: hsl(8 75% 94%); color: hsl(8 60% 32%); font-weight: 700; border-left: 5px solid hsl(8 70% 50%);
  animation: cv-shake .45s ease both;
}
.cv-unavail { margin-bottom: 1rem; font-weight: 700; color: hsl(var(--cocoa)); }

/* ---------- Recipe ---------- */
.cv-book { max-width: 860px; margin: 0 auto; }
.cv-head { text-align: center; margin-bottom: 2rem; animation: cv-rise .5s ease both; }
.cv-head h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); font-weight: 800; margin: 0; }
.cv-head p { font-family: 'Fraunces', serif; font-style: italic; font-size: 1.2rem; color: hsl(var(--orange-deep)); margin: .25rem 0 0; }
.cv-lock { display: flex; justify-content: flex-end; margin-bottom: .75rem; }
.cv-lock button {
  background: hsl(var(--card)); border: 2px solid hsl(var(--choc)); color: hsl(var(--choc));
  border-radius: 999px; font-weight: 800; font-size: .85rem; padding: .4rem 1rem; transition: background .2s, color .2s;
}
.cv-lock button:hover { background: hsl(var(--choc)); color: hsl(var(--card)); }

.cv-card {
  background: hsl(var(--card)); border-radius: 26px; overflow: hidden;
  border: 2px solid hsl(var(--line));
  box-shadow: 0 30px 70px -30px hsl(var(--choc) / .5);
  animation: cv-rise .7s .1s cubic-bezier(.2,.8,.2,1) both;
  background-image: repeating-linear-gradient(180deg, transparent 0 35px, hsl(var(--line) / .35) 35px 36px);
}
.cv-hero {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 1rem; align-items: center;
  background: hsl(var(--orange-deep)); color: hsl(var(--card)); padding: 2rem clamp(1.25rem, 4vw, 2.5rem);
  border-bottom: 6px dotted hsl(var(--choc));
}
.cv-hero .cv-tag { font-weight: 800; letter-spacing: .16em; font-size: .72rem; text-transform: uppercase; }
.cv-hero h2 { color: hsl(var(--card)); font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; line-height: 1.05; margin: .3rem 0 .8rem; }
.cv-hero p { font-weight: 600; font-size: 1.08rem; margin: 0; line-height: 1.5; }
.cv-hero img { width: 100%; max-width: 300px; justify-self: center; filter: drop-shadow(0 12px 14px hsl(var(--choc) / .35)); }
.cv-badges { display: flex; flex-wrap: wrap; gap: .6rem; padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem) 0; }
.cv-badge {
  display: inline-flex; align-items: center; gap: .45rem; font-weight: 800; font-size: 1rem;
  background: hsl(var(--choc)); color: hsl(var(--card)); padding: .5rem 1rem; border-radius: 999px;
}
.cv-badge i { color: hsl(var(--orange)); }
.cv-body { padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem) 2.5rem; }
.cv-tip {
  display: grid; grid-template-columns: 140px 1fr; gap: 1.25rem; align-items: center;
  background: hsl(var(--orange) / .12); border: 3px solid hsl(var(--orange)); border-radius: 20px;
  padding: 1rem; margin-bottom: 2rem; transform: rotate(-.6deg);
}
.cv-tip img { width: 140px; height: 140px; object-fit: cover; border-radius: 14px; border: 3px solid hsl(var(--card)); box-shadow: 0 8px 18px -8px hsl(var(--choc) / .5); }
.cv-tip strong.cv-tip-h { display: block; font-family: 'Fraunces', serif; font-size: 1.3rem; color: hsl(var(--orange-deep)); margin-bottom: .25rem; }
.cv-tip p { margin: 0; font-size: 1.08rem; line-height: 1.5; }
.cv-cols { display: grid; grid-template-columns: 1fr 1.35fr; gap: 2.25rem; }
.cv h3 { font-size: 1.6rem; font-weight: 800; margin-bottom: 1rem; padding-bottom: .4rem; border-bottom: 3px solid hsl(var(--orange)); display: inline-block; }
.cv-group { margin-bottom: 1.25rem; }
.cv-group h4 { font-family: 'Nunito', sans-serif; font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: hsl(var(--orange-deep)); margin-bottom: .4rem; }
.cv-group ul { list-style: none; padding: 0; margin: 0; }
.cv-group li { font-size: 1.15rem; line-height: 1.45; padding: .35rem 0 .35rem 1.4rem; position: relative; }
.cv-group li::before { content: ""; position: absolute; left: .1rem; top: .85rem; width: .6rem; height: .6rem; border-radius: 50%; background: hsl(var(--choc)); }
.cv-steps { list-style: none; counter-reset: s; padding: 0; margin: 0; }
.cv-steps li { counter-increment: s; position: relative; padding: 0 0 1.25rem 3.2rem; font-size: 1.15rem; line-height: 1.55; }
.cv-steps li::before {
  content: counter(s); position: absolute; left: 0; top: -.1rem; width: 2.3rem; height: 2.3rem; border-radius: 50%;
  background: hsl(var(--orange)); color: hsl(var(--card)); font-family: 'Fraunces', serif; font-weight: 800;
  display: grid; place-items: center; font-size: 1.15rem;
}
.cv-steps strong { color: hsl(var(--choc)); }
.cv-still { display: block; width: min(260px, 70%); margin: 1rem auto 0; }

@keyframes cv-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes cv-bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
@keyframes cv-shake { 0%,100% { transform: none; } 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }

@media (max-width: 767px) {
  /* Only loaded on cookbook pages: leave room for the existing mobile menu. */
  .main-nav .header-logo { height: 130px; width: auto; margin-top: -8px; margin-bottom: -33px; }
  .main-nav .navbar-toggler { flex-shrink: 0; }
  .cv-form .cv-btn { max-width: 100%; justify-content: center; }
  .cv-hero, .cv-cols { grid-template-columns: 1fr; }
  .cv-hero img { max-width: 200px; }
  .cv-tip { grid-template-columns: 1fr; transform: none; text-align: center; }
  .cv-tip img { margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .cv *, .cv *::before, .cv { animation: none !important; transition: none !important; }
}
