/* Energi App – landing page. Brand: green #14805E, bolt yellow #FFD23F, Inter (self-hosted). */

@font-face { font-family: "Inter"; src: url("/fonts/inter-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-semibold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-extrabold.woff") format("woff"); font-weight: 800; font-display: swap; }

:root {
  --paper: #F4FAF7;
  --sheet: #FFFFFF;
  --ink: #10241B;
  --muted: #4C6358;
  --line: #D3E3DA;
  --green: #14805E;
  --green-2: #4E9C7F;
  --green-3: #8CC3AB;
  --green-4: #BFDDCF;
  --green-5: #DCEEE5;
  --bolt: #FFD23F;
  --cheap: #2E7D32;
  --normal: #E0A800;
  --expensive: #C62828;
  --focus: #0B5FFF;
  --measure: 34rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
}
a { color: var(--green); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 72rem; margin: 0 auto; padding-inline: 1.5rem; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding-block: 1.25rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand img { width: 2.25rem; height: 2.25rem; }
.lang { font-weight: 600; font-size: 0.95rem; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 4rem; align-items: center; padding-block: 3rem 5rem; }
.hero h1 {
  font-weight: 800; font-size: clamp(2.6rem, 5.4vw, 4.4rem); line-height: 1.02; letter-spacing: -0.035em;
  margin: 0 0 1.5rem; max-width: 12ch;
}
.lead { font-size: 1.25rem; line-height: 1.5; color: var(--muted); max-width: var(--measure); margin: 0 0 2rem; }
.cta { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; }
.button {
  display: inline-block; background: var(--green); color: #fff; text-decoration: none; font-weight: 600;
  padding: 0.85rem 1.4rem; border-radius: 999px;
}
.button:hover { background: var(--ink); color: #fff; }
.note { color: var(--muted); font-size: 0.95rem; }

/* The receipt: the price built layer by layer */
.receipt {
  position: relative; margin: 0; background: var(--sheet); padding: 1.75rem 1.75rem 2.5rem;
  border-radius: 6px 6px 0 0; box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(16, 36, 27, 0.35);
  --tear: 14px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--tear) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--tear) 100%;
}
.receipt h2 { font-size: 1rem; font-weight: 600; margin: 0; }
.receipt .meta { color: var(--muted); font-size: 0.85rem; margin: 0.15rem 0 1.25rem; }
.stack { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1.25rem; }
.bar { display: flex; flex-direction: column; height: 19rem; border-radius: 6px; overflow: hidden; background: var(--green-5); }
.bar span { display: block; flex: none; transform-origin: top; }
.rows { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.rows li { display: grid; grid-template-columns: 0.75rem 1fr auto; gap: 0.6rem; align-items: baseline; padding: 0.42rem 0; border-top: 1px dashed var(--line); font-size: 0.95rem; }
.rows li:first-child { border-top: none; }
.rows i { width: 0.75rem; height: 0.75rem; border-radius: 3px; align-self: center; }
.rows b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 1rem; padding-top: 1rem; border-top: 2px solid var(--ink); }
.total span { font-weight: 600; }
.total strong { font-weight: 800; font-size: 2.4rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.spotonly { color: var(--muted); font-size: 0.9rem; margin: 0.4rem 0 0; }

.c-spot { background: var(--green); }
.c-markup { background: var(--green-2); }
.c-grid { background: var(--green-3); }
.c-energinet { background: var(--green-4); }
.c-tax { background: #9FB8AC; }
.c-vat { background: var(--bolt); }

/* One orchestrated moment: the receipt prints from the spot price down to the total. */
@media (prefers-reduced-motion: no-preference) {
  .bar span { animation: grow 0.6s cubic-bezier(.2, .7, .2, 1) both; }
  .rows li { animation: appear 0.4s ease-out both; }
  .bar span:nth-child(1), .rows li:nth-child(1) { animation-delay: 0.15s; }
  .bar span:nth-child(2), .rows li:nth-child(2) { animation-delay: 0.45s; }
  .bar span:nth-child(3), .rows li:nth-child(3) { animation-delay: 0.65s; }
  .bar span:nth-child(4), .rows li:nth-child(4) { animation-delay: 0.85s; }
  .bar span:nth-child(5), .rows li:nth-child(5) { animation-delay: 1.0s; }
  .bar span:nth-child(6), .rows li:nth-child(6) { animation-delay: 1.15s; }
  .total { animation: appear 0.4s ease-out 1.55s both; }
}
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }

/* Sections */
.section { padding: 4.5rem 0; border-top: 1px solid var(--line); }
.section h2 { font-weight: 800; font-size: clamp(1.8rem, 3.2vw, 2.5rem); line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 1rem; max-width: 20ch; }
.section > .wrap > p { max-width: var(--measure); color: var(--muted); margin: 0 0 2.5rem; font-size: 1.125rem; }

/* A day of prices */
.day { background: var(--sheet); border-radius: 10px; padding: 1.75rem 1.5rem 1.25rem; box-shadow: 0 1px 0 var(--line); }
.day-bars { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; align-items: end; height: 13rem; }
.day-bars span { display: block; border-radius: 3px 3px 0 0; position: relative; }
.day-bars .cheap { background: var(--cheap); }
.day-bars .normal { background: var(--normal); }
.day-bars .expensive { background: var(--expensive); }
.day-bars .best { outline: 3px solid var(--ink); outline-offset: 2px; z-index: 1; }
.day-bars .best::after {
  content: attr(data-label); position: absolute; bottom: calc(100% + 0.6rem); left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 0.85rem; font-weight: 600; background: var(--ink); color: #fff; padding: 0.25rem 0.55rem; border-radius: 4px;
}
.hours { overflow: visible; display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; margin-top: 0.5rem; color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.hours span:nth-child(6n+2), .hours span:nth-child(6n+3), .hours span:nth-child(6n+4),
.hours span:nth-child(6n+5), .hours span:nth-child(6n+6) { visibility: hidden; }
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 1.25rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.9rem; }
.legend li { display: flex; align-items: center; gap: 0.45rem; }
.legend i { width: 0.7rem; height: 0.7rem; border-radius: 50%; }

/* Features: a plain list, not cards */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 4rem; margin: 0; padding: 0; list-style: none; }
.features h3 { font-size: 1.15rem; font-weight: 600; margin: 0 0 0.35rem; letter-spacing: -0.01em; }
.features p { margin: 0; color: var(--muted); max-width: var(--measure); }

/* Get it */
.get { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
.get h2 { margin-bottom: 0.75rem; }
.get p { margin: 0; color: var(--muted); max-width: var(--measure); font-size: 1.125rem; }
.get .playicon { width: 7rem; height: 7rem; border-radius: 22%; }

/* Footer */
.foot { padding-block: 2.5rem 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin-bottom: 1rem; }
.foot nav a { font-weight: 600; }
.foot p { margin: 0.35rem 0; max-width: 46rem; }

/* Small screens */
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding-block: 1.5rem 3.5rem; }
  .features { grid-template-columns: 1fr; gap: 1.75rem; }
  .get { grid-template-columns: 1fr; }
  .get .playicon { display: none; }
  .bar { height: 16rem; }
}
@media (max-width: 520px) {
  .wrap { padding-inline: 1rem; }
  .day { padding: 1.25rem 0.75rem 1rem; }
  .day-bars { gap: 2px; height: 10rem; }
  .hours { gap: 2px; font-size: 0.7rem; }
  .receipt { padding: 1.25rem 1.1rem 2.25rem; }
  .stack { grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.75rem; }
  .rows li { font-size: 0.9rem; gap: 0.45rem; }
  .total strong { font-size: 2rem; }
}
