/* Flex EMS - landing page and prices. Tokens come from style.css. */

body.site { font-size: 17px; line-height: 1.55; }
.site h1, .site h2, .site h3 { font-family: var(--display); color: var(--ink); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.site main { max-width: none; padding: 0; margin: 0; }

/* ---------------------------------------------------------------- header */
.sh { position: sticky; top: 0; z-index: 20; background: rgba(237, 241, 243, .92);
  backdrop-filter: saturate(140%) blur(8px); border-bottom: 1px solid rgba(19, 33, 44, .07); }
.sh-in { max-width: 1160px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 20px; }
.sh-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.sh-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nl { color: var(--ink-2); text-decoration: none; font-size: 15px; padding: 8px 10px; border-radius: 6px; }
.nl:hover { color: var(--ink); background: rgba(19, 33, 44, .05); }
.nl.on { color: var(--ink); font-weight: 600; }
.sh-nav .btn { margin-left: 6px; padding: 9px 16px; }

/* ---------------------------------------------------------------- buttons on the public pages */
.site .btn.big { font-size: 17px; padding: 14px 24px; border-radius: 9px; }
.btn.ghost { background: transparent; border-color: var(--line-2); }
.btn.ghost:hover { background: rgba(19, 33, 44, .04); border-color: var(--ink-3); }
.btn.gold { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.btn.gold:hover { background: #dcc767; border-color: #dcc767; }
.btn.ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn.ghost-light:hover { background: rgba(255, 255, 255, .08); border-color: #fff; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 64px 0 40px; }
.hero h1 { font-size: clamp(2.3rem, 4.8vw, 4.2rem); line-height: 1.03; font-weight: 700; letter-spacing: -.012em;
  max-width: 21ch; margin: 0 0 22px; }
.hero-lead { font-size: 19px; color: var(--ink-2); max-width: 60ch; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 26px; padding: 0; margin: 22px 0 0; color: var(--ink-2); font-size: 15px; }
.facts li { display: flex; align-items: center; gap: 9px; }
.facts li::before { content: ""; width: 8px; height: 8px; background: var(--sun); border-radius: 2px; box-shadow: 0 0 0 3px rgba(210, 186, 80, .25); }

/* ---------------------------------------------------------------- hero chart */
.chart-card { margin: 44px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 26px 16px; }
.chart-head { font-family: var(--display); font-weight: 600; font-size: 19px; margin-bottom: 6px; }
.chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chart { display: block; width: 100%; min-width: 620px; height: auto; }
.chart-note { font-size: 13.5px; color: var(--ink-3); margin: 6px 0 0; }
.chart text { font-family: var(--display); }
.ch-grid { stroke: #e3e9ed; stroke-width: 1; }
.ch-zero { stroke: var(--ink-3); stroke-width: 1.3; }
.ch-base { stroke: var(--line-2); stroke-width: 1; }
.ch-tick { fill: var(--ink-3); font-size: 12.5px; }
.ch-axis { fill: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.ch-small { fill: var(--sun-deep); font-size: 12.5px; }
.ch-negband { fill: rgba(181, 57, 47, .07); }
.ch-neglabel { fill: var(--neg); font-size: 13.5px; font-weight: 600; }
.ch-negarea { fill: rgba(181, 57, 47, .24); }
.ch-price { fill: none; stroke: var(--price); stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 0; }
.ch-feed { fill: var(--sun); opacity: .92; }
.ch-would { fill: none; stroke: var(--sun-deep); stroke-width: 1.6; stroke-dasharray: 4 4; }
.ch-cmdline { stroke: var(--ink); stroke-width: 1.4; stroke-dasharray: 3 4; }
.ch-dot { fill: var(--sun); stroke: var(--ink); stroke-width: 2.2; }
.ch-pulse { fill: none; stroke: var(--sun); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.ch-cmdt { fill: var(--ink); font-size: 15px; font-weight: 700; }
.ch-cmds { fill: var(--ink-2); font-size: 13.5px; }

/* the one orchestrated moment: the day's price is drawn, then the two commands appear */
@media (prefers-reduced-motion: no-preference) {
  .ch-price { stroke-dashoffset: 1; animation: draw 2.2s cubic-bezier(.4, 0, .2, 1) .25s forwards; }
  .ch-cmd { opacity: 0; animation: appear .45s ease-out forwards; }
  .ch-cmd.c1 { animation-delay: 1.35s; }
  .ch-cmd.c2 { animation-delay: 1.95s; }
  .ch-cmd .ch-pulse { animation: pulse 1.8s ease-out 3; }
  .ch-cmd.c1 .ch-pulse { animation-delay: 1.5s; }
  .ch-cmd.c2 .ch-pulse { animation-delay: 2.1s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }
@keyframes pulse { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }

/* ---------------------------------------------------------------- sections */
.how, .brands-sec { background: var(--surface); }
.how, .market, .brands-sec { padding: 84px 0; }
.site h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.1; font-weight: 700; margin: 0 0 12px; letter-spacing: -.005em; }
.sec-lead { color: var(--ink-2); font-size: 18px; max-width: 58ch; margin: 0 0 40px; }

/* how it works: a real sequence -> numbered timeline */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; position: relative; }
.timeline::before { content: ""; position: absolute; top: 21px; left: 22px; right: 12%; height: 2px; background: var(--line); }
.timeline li { position: relative; }
.tl-n { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); font-family: var(--display); font-weight: 700; font-size: 19px; }
.timeline li:last-child .tl-n { background: var(--sun); border-color: var(--ink); }
.timeline h3 { font-size: 20px; margin: 16px 0 6px; }
.timeline p { color: var(--ink-2); margin: 0; font-size: 16px; }

/* swiss electricity market + calculator */
.market-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: start; }
.mstats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 18px; }
.mstat { display: flex; flex-direction: column; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; }
.mstat-y { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--ink-3); }
.mstat-v { font-family: var(--display); font-weight: 700; font-size: 54px; line-height: 1.05; color: var(--neg);
  font-variant-numeric: tabular-nums; }
.mstat-l { font-weight: 600; color: var(--ink); }
.mstat-s { font-size: 14px; color: var(--ink-3); margin-top: 2px; }
.mshare { color: var(--ink-2); font-size: 17px; margin: 0 0 22px; max-width: 58ch; }
.mchart-box { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 8px; }
.mchart-box figcaption { font-family: var(--display); font-weight: 600; font-size: 17px; margin-bottom: 2px; }
.mchart { display: block; width: 100%; height: auto; }
.mc-grid { stroke: #e3e9ed; stroke-width: 1; }
.mc-base { stroke: var(--line-2); stroke-width: 1.2; }
.mc-tick, .mc-month { fill: var(--ink-3); font-size: 12.5px; }
.mc-leg { fill: var(--ink-2); font-size: 13px; font-weight: 600; }
.mc-bar.y0 { fill: #9fbbd2; }
.mc-bar.y1 { fill: var(--price); }
.calc { position: sticky; top: 92px; background: var(--ink); color: #fff; border-radius: 16px; padding: 28px 28px 24px;
  box-shadow: inset 0 4px 0 var(--sun); }
.calc h3 { font-family: var(--display); font-size: 24px; line-height: 1.2; margin: 0 0 20px; color: #fff; }
.calc label { display: block; font-weight: 600; font-size: 14px; color: #c9d3da; margin-bottom: 6px; }
.calc-in { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.calc-in input { width: 150px; font: 600 26px/1.2 var(--display); color: var(--ink); background: #fff; border: 2px solid #fff;
  border-radius: 10px; padding: 8px 12px; font-variant-numeric: tabular-nums; }
.calc-in input:focus { outline: 3px solid var(--sun); outline-offset: 2px; }
.calc-in span { font-family: var(--display); font-size: 20px; color: #c9d3da; }
.calc-out { display: flex; flex-direction: column; gap: 2px; padding: 18px 0 16px; border-top: 1px solid rgba(255, 255, 255, .14);
  border-bottom: 1px solid rgba(255, 255, 255, .14); }
.calc-h { font-size: 15px; font-weight: 600; color: #c9d3da; }
.calc-v { font-family: var(--display); font-size: 26px; font-weight: 600; color: #fff; white-space: nowrap; }
.calc-v output { font-size: 52px; line-height: 1.1; color: var(--sun); font-variant-numeric: tabular-nums; }
.calc-note { font-size: 13px; color: #9fb0bc; margin: 12px 0 0; }

/* manufacturers */
.brandgrid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.brandgrid li { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 22px 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; min-height: 128px; text-align: center; }
.blogo { height: 60px; display: flex; align-items: center; justify-content: center; width: 100%; }
.blogo img { max-height: 58px; max-width: min(150px, 100%); width: auto; height: auto; display: block; }
.bname { font-family: var(--display); font-weight: 700; font-size: 21px; color: var(--ink); }
.bportal { font-size: 13.5px; color: var(--ink-3); }
.fine { font-size: 13px; color: var(--ink-3); margin: 16px 0 0; }

/* closing call to action */
.cta-band { background: var(--ink); color: #fff; padding: 88px 0; }
.cta-band h2 { color: #fff; font-size: clamp(2rem, 4vw, 3.2rem); }
.cta-band p { color: #c9d3da; font-size: 18px; max-width: 56ch; margin: 0 0 30px; }

/* footer */
.sf { padding: 36px 0 48px; }
.sf-in { max-width: 1160px; margin: 0 auto; padding: 0 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 40px; }
.sf-brand p { margin: 6px 0 0; color: var(--ink-3); font-size: 14px; }
.sf-nav { margin-left: auto; display: flex; gap: 20px; flex-wrap: wrap; }
.sf-nav a { color: var(--ink-2); font-size: 14.5px; }

/* ---------------------------------------------------------------- prices */
.page-head { padding: 64px 0 24px; }
.page-head h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin: 0 0 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tiers-sec { padding: 24px 0 88px; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tier { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px 26px 26px; display: flex; flex-direction: column; }
.tier h2 { font-size: 24px; margin: 0 0 8px; }
.tier p { color: var(--ink-2); margin: 0 0 18px; }
.tier .prices { list-style: none; padding: 0; margin: auto 0 0; display: grid; gap: 14px; }
.tier .prices li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.tier .amount { font-family: var(--display); font-size: 34px; font-weight: 600; color: var(--ink); line-height: 1.1;
  font-variant-numeric: tabular-nums; }
.tier .amount .cur { font-size: 18px; font-weight: 600; color: var(--ink-2); }
.tier .amount.small { font-size: 24px; }
.tier .unit { font-size: 15px; color: var(--ink-2); }
.tier .cond { flex-basis: 100%; font-size: 14px; color: var(--ink-3); margin: 2px 0 0; }
.tier .prices.contact { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 14px;
  border-top: 1px solid var(--line); }
.tier .prices.contact .cond { margin: 0; }
.included { margin-top: 48px; padding: 32px 0 0; border-top: 1px solid var(--line-2); }
.included h2 { font-size: 26px; }
.ticks { list-style: none; padding: 0; margin: 0 0 30px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }
.ticks li { display: flex; gap: 12px; color: var(--ink-2); }
.ticks li::before { content: "✓"; color: var(--sun-deep); font-weight: 700; }

/* ---------------------------------------------------------------- smaller screens */
@media (max-width: 1000px) {
  .brandgrid { grid-template-columns: repeat(3, 1fr); }
  .market-grid { grid-template-columns: 1fr; gap: 36px; }
  .calc { position: static; }
}
@media (max-width: 760px) {
  body.site { font-size: 16px; }
  .wrap, .sh-in, .sf-in { padding-left: 16px; padding-right: 16px; }
  .sh-in { gap: 10px; }
  .hide-s { display: none; }
  .nl { padding: 8px 6px; font-size: 14.5px; }
  .sh-nav .btn { padding: 8px 12px; font-size: 14px; margin-left: 2px; }
  .wordmark { font-size: 19px; }
  .hero { padding: 36px 0 28px; }
  .hero-lead { font-size: 17px; }
  .hero-actions .btn { flex: 1 1 auto; text-align: center; }
  .chart-card { padding: 16px 14px 12px; margin-top: 32px; border-radius: 12px; }
  .how, .market, .brands-sec { padding: 56px 0; }
  .mc-tick, .mc-month { font-size: 19px; }
  .mc-leg { font-size: 20px; }
  .mchart-box { padding: 14px 12px 6px; }
  .mstat-v { font-size: 42px; }
  .mstats { gap: 10px; }
  .mstat { padding: 14px 14px; }
  .timeline { grid-template-columns: 1fr; gap: 22px; }
  .timeline::before { top: 22px; bottom: 22px; left: 21px; right: auto; width: 2px; height: auto; }
  .timeline li { padding-left: 62px; }
  .tl-n { position: absolute; left: 0; top: 0; }
  .timeline h3 { margin-top: 8px; }
  .brandgrid { grid-template-columns: repeat(2, 1fr); }
  .cta-band { padding: 60px 0; }
  .tiers { grid-template-columns: 1fr; }
  .ticks { grid-template-columns: 1fr; }
  .sf-nav { margin-left: 0; }
}
@media (max-width: 400px) {
  .sh-brand .mark { display: none; }
}

/* ---------------------------------------------------------------- privacy policy (long text) */
.prose-sec { padding: 8px 0 72px; }
.prose { max-width: 820px; }
.prose h2 { font-size: 20px; margin: 34px 0 10px; }
.prose p, .prose li { color: var(--ink-2); font-size: 16px; line-height: 1.65; }
.prose ul { padding-left: 20px; margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--ink); }
.prose .stand { margin-top: 36px; font-size: 14px; color: var(--ink-3); }
