/* cooky – smarter cooking */
:root {
  --green: #7fb32d;
  --green-dark: #5e8a1c;
  --lime: #c5d82a;
  --bg: #fbfcf8;
  --surface: #f1f5e8;
  --ink: #1e2a17;
  --muted: #5d6857;
  --line: #dde5cf;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(30, 42, 23, .06), 0 8px 24px rgba(30, 42, 23, .07);
  --radius: 16px;
  --wrap: 1140px;
  --font: ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12160f; --surface: #1a2015; --ink: #e9efe2; --muted: #a2ad98; --line: #2c3526; --card: #1d2418;
    --green: #93c843; --green-dark: #b5dc6e; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  }
}
:root[data-theme="dark"] {
  --bg: #12160f; --surface: #1a2015; --ink: #e9efe2; --muted: #a2ad98; --line: #2c3526; --card: #1d2418;
  --green: #93c843; --green-dark: #b5dc6e; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font: 400 17px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); }
h1, h2, h3 { line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }
[id] { scroll-margin-top: 80px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 24px; letter-spacing: -.02em; }
.brand img { width: 38px; height: 38px; }
.nav { display: flex; gap: 6px; list-style: none; }
.nav a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--surface); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font: 600 15px var(--font); color: var(--ink); cursor: pointer; }
@media (max-width: 820px) {
  .menu-btn { display: block; margin-left: auto; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { border-radius: 10px; padding: 12px 14px; }
}

/* Hero */
.hero { padding: 72px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--green-dark); }
.hero h1 { font-size: clamp(38px, 5vw, 58px); margin: 14px 0 20px; }
.hero h1 span { color: var(--green); }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 34em; }
.hero-img { border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-block; padding: 13px 24px; border-radius: 999px; font-weight: 700; text-decoration: none; background: var(--green); color: #fff; }
.btn:hover { background: var(--green-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--surface); color: var(--ink); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; gap: 36px; } .hero { padding-top: 48px; } }

/* Feature strip */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 8px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .ic { width: 60px; height: 60px; border-radius: 16px; background: var(--surface); display: grid; place-items: center; margin-bottom: 16px; }
.feature .ic svg { width: 34px; height: 34px; stroke: var(--green); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 18px; margin-bottom: 6px; }
.feature p { font-size: 15px; color: var(--muted); }
@media (max-width: 820px) { .features { grid-template-columns: 1fr; } }

/* Sections */
.section { padding: 88px 0; }
.section.alt { background: var(--surface); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); margin-top: 8px; }
.section-head p { color: var(--muted); max-width: 34em; }

.savings { background: var(--card); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 1.3fr; gap: 32px; align-items: center; }
.savings h3 { font-size: 26px; margin-bottom: 10px; }
.savings p { color: var(--muted); }
.savings img { background: #fff; border-radius: 12px; padding: 12px; }
@media (max-width: 820px) { .savings { grid-template-columns: 1fr; } }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cards.four { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .thumb { aspect-ratio: 16 / 10; background: #fff; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .thumb.contain img { object-fit: contain; padding: 18px; }
.card .body { padding: 20px 22px 24px; }
.card h3 { font-size: 20px; margin-bottom: 6px; }
.card p { font-size: 15px; color: var(--muted); }
.card .more { display: inline-block; margin-top: 12px; font-weight: 700; font-size: 14px; color: var(--green-dark); }
@media (max-width: 900px) { .cards, .cards.four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cards, .cards.four { grid-template-columns: 1fr; } }

/* Video (loads YouTube only after a click) */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video button { position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer; background: center / cover no-repeat; color: #fff; font: 700 16px var(--font); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.video button::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.video button > * { position: relative; }
.video .play { width: 76px; height: 76px; border-radius: 50%; background: var(--green); display: grid; place-items: center; }
.video .play svg { width: 30px; height: 30px; fill: #fff; margin-left: 4px; }
.video small { font-weight: 400; font-size: 13px; opacity: .85; max-width: 30em; text-align: center; padding: 0 16px; }

/* Article pages */
.page-head { padding: 64px 0 32px; }
.page-head h1 { font-size: clamp(36px, 5vw, 56px); margin-top: 10px; }
.page-head p { font-size: 19px; color: var(--muted); max-width: 40em; margin-top: 14px; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.article { padding-bottom: 88px; }
.prose { max-width: 760px; }
.prose > * + * { margin-top: 18px; }
.prose h2 { font-size: 28px; margin-top: 48px; }
.prose h3 { font-size: 21px; margin-top: 32px; }
.prose ul { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose li strong { color: var(--ink); }
.figure { margin: 32px 0; }
.figure img { border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
.figure figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; text-align: center; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.gallery img { border-radius: 12px; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: var(--shadow); }
@media (max-width: 600px) { .gallery { grid-template-columns: 1fr; } }
.specs { width: 100%; border-collapse: collapse; font-size: 15px; }
.specs th, .specs td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { width: 34%; font-weight: 700; }
@media (max-width: 600px) {
  .specs, .specs tbody, .specs tr, .specs th, .specs td { display: block; width: 100%; }
  .specs th { border-bottom: 0; padding: 14px 0 2px; }
  .specs td { padding: 0 0 14px; }
}
.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; display: grid; place-items: center; }
.callout { background: var(--surface); border-left: 4px solid var(--green); border-radius: 0 12px 12px 0; padding: 18px 22px; }
.related { border-top: 1px solid var(--line); padding-top: 40px; margin-top: 64px; }
.related h2 { font-size: 22px; margin-bottom: 20px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0; font-size: 15px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: center; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .brand { font-size: 20px; }
.site-footer .brand img { width: 30px; height: 30px; }

/* ---------- Animations ---------- */

/* Signal dots over the hero photo: pulse one after another from pot to phone */
.hero-img { position: relative; }
.signal { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.signal circle { fill: #e4f04a; opacity: 0; transform-box: fill-box; transform-origin: center; animation: signal 2.6s ease-out infinite; animation-delay: calc(var(--i) * .12s); }
@keyframes signal {
  0%   { opacity: 0; transform: scale(.6); }
  12%  { opacity: .95; transform: scale(1.25); }
  30%  { opacity: 0; transform: scale(1.6); }
  100% { opacity: 0; transform: scale(1.6); }
}

/* Mascot: little hop every few seconds, wave on hover */
.mascot { transform-origin: 50% 90%; animation: hop 7s ease-in-out infinite; }
.brand:hover .mascot { animation: wave .9s ease-in-out; }
@keyframes hop {
  0%, 86%, 100% { transform: translateY(0) rotate(0); }
  89% { transform: translateY(-5px) rotate(-6deg); }
  92% { transform: translateY(0) rotate(4deg); }
  95% { transform: translateY(-2px) rotate(-2deg); }
}
@keyframes wave {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-14deg); }
  40% { transform: rotate(12deg); }
  60% { transform: rotate(-8deg); }
  80% { transform: rotate(5deg); }
}

/* Live temperature chart */
.live-section { padding-top: 24px; }
.live { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: center; }
.live h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 8px 0 14px; }
.live p { color: var(--muted); }
.live-card { position: relative; background: #161b13; color: #eef3e6; border-radius: 22px; padding: 22px 22px 18px; box-shadow: var(--shadow); overflow: hidden; }
.live-top { display: flex; justify-content: space-between; align-items: end; margin-bottom: 14px; }
.live-label { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #9fb08f; }
.live-temp { font-size: clamp(34px, 5vw, 46px); font-weight: 800; color: #9fd34a; font-variant-numeric: tabular-nums; line-height: 1.1; }
.live-time { text-align: right; }
.live-time strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.live-chart { width: 100%; height: 200px; display: block; }
.live-chart .band { fill: rgba(127, 179, 45, .22); }
.live-chart .grid line { stroke: rgba(255,255,255,.08); stroke-width: 1; vector-effect: non-scaling-stroke; }
.live-chart .line { fill: none; stroke: #9fd34a; stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.live-chart .area { fill: rgba(159, 211, 74, .14); }
.live-chart .dot { fill: #fff; stroke: #9fd34a; stroke-width: 3; vector-effect: non-scaling-stroke; }
.live-axis { display: flex; justify-content: space-between; font-size: 12px; color: #9fb08f; margin-top: 6px; }
.live-toast { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; gap: 10px; align-items: center; background: #fff; color: #1e2a17; font-weight: 700; font-size: 15px; padding: 12px 16px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35); transform: translateY(140%); opacity: 0; transition: transform .45s cubic-bezier(.2,.9,.3,1.2), opacity .3s; }
.live-toast.show { transform: translateY(0); opacity: 1; }
.live-toast .bell { display: inline-block; animation: ring 1s ease-in-out 2; }
@keyframes ring { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-18deg); } 75% { transform: rotate(18deg); } }
@media (max-width: 900px) { .live { grid-template-columns: 1fr; gap: 28px; } .live-chart { height: 170px; } }

/* No motion for visitors who asked for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .signal, .mascot, .brand:hover .mascot { display: block; animation: none !important; }
  .signal { display: none; }
  .live-toast, .live-toast .bell { transition: none; animation: none; }
}

/* Scroll reveal (only when JS runs, so content never stays hidden) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* Savings charts */
.savings-chart { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pie { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.pie-ring { position: relative; width: min(170px, 100%); aspect-ratio: 1; }
.pie-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pie .track { fill: none; stroke: var(--surface); stroke-width: 16; }
.pie .slice { fill: none; stroke: var(--green); stroke-width: 16; stroke-linecap: round; stroke-dasharray: var(--p) 100; }
.js .pie .slice { stroke-dasharray: 0 100; transition: stroke-dasharray 1.6s cubic-bezier(.3,.7,.2,1) .2s; }
.js .savings-chart.in .pie .slice { stroke-dasharray: var(--p) 100; }
.pie-num { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 38%; font-weight: 800; font-size: 38px; line-height: 1; color: var(--green-dark); font-variant-numeric: tabular-nums; }
.pie-num small { font-size: 16px; margin-left: 3px; }
.pie figcaption { font-size: 14px; color: var(--muted); }
.pie figcaption strong { display: block; font-size: 16px; color: var(--ink); }
.prose .savings-chart { margin: 32px 0; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .pie .slice { stroke-dasharray: var(--p) 100; transition: none; }
}

/* Antennae of the little mascot in the hero photo wiggle (cut out of the photo) */
.hero-img > img:first-child { width: 100%; }
.antenna { position: absolute; height: auto; pointer-events: none; animation: feeler-l 2.8s ease-in-out infinite; }
.antenna-right { animation-name: feeler-r; animation-duration: 3.3s; animation-delay: -.7s; }
@keyframes feeler-l {
  0%, 100% { transform: rotate(-9deg); }
  40% { transform: rotate(8deg); }
  48% { transform: rotate(4deg); }
  56% { transform: rotate(9deg); }
}
@keyframes feeler-r {
  0%, 100% { transform: rotate(8deg); }
  45% { transform: rotate(-9deg); }
  53% { transform: rotate(-4deg); }
  61% { transform: rotate(-10deg); }
}
@media (prefers-reduced-motion: reduce) { .antenna { animation: none; } }

/* The mascot in the hero photo blinks with both eyes every few seconds */
.wink { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wink .lid { transform-box: fill-box; transform-origin: top; transform: scaleY(0); animation: lid 4.5s ease-in-out infinite 1.5s; }
.wink .lash { opacity: 0; animation: lash 4.5s ease-in-out infinite 1.5s; }
@keyframes lid {
  0%, 88%, 100% { transform: scaleY(0); }
  91%, 95% { transform: scaleY(1); }
}
@keyframes lash {
  0%, 89%, 97%, 100% { opacity: 0; }
  91%, 95% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .wink { display: none; } }

/* The green LED on the device blinks */
.led { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.led-off { opacity: 0; animation: led-off 1.4s steps(1, end) infinite; }
.led-glow { opacity: 0; animation: led-glow 1.4s ease-out infinite; }
@keyframes led-off {
  0% { opacity: 0; }
  55% { opacity: 1; }
  100% { opacity: 1; }
}
@keyframes led-glow {
  0% { opacity: .9; }
  45% { opacity: .5; }
  55%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .led { display: none; } }
