/* JTEA site styles.
   Layout idea: white page, heavy type, and the product itself as the picture.
   The tokens in :root are the JTEA kit colours. A Home Assistant theme should reuse the same values. */
:root {
  color-scheme: light;
  --white: #FFFFFF;
  --mist: #F4F6F7;         /* alternate band, and the dashboard background */
  --ink: #263238;          /* brand slate, used as the black */
  --soft: #5A6870;         /* secondary text */
  --line: #DDE3E6;
  --signal: #0B7A75;       /* the one accent: links, focus, secured and running states */
  --lamp: #FFBD59;         /* the amber from the JTE.A logo: a light that is on */
  --cool: #2B7FD9;         /* air conditioning running */
  --warn: #C8501E;         /* unlocked or left open */
  --bezel: #14191C;        /* device frame */
  --face: "Manrope", "Segoe UI", Helvetica, Arial, sans-serif;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --max: 74rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--face); font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; }
a { color: var(--signal); text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.06; letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 1.1rem + 4.8vw, 4.75rem); }
h2 { font-size: clamp(1.7rem, 1.1rem + 2.4vw, 3rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* Utility strip */
.strip { background: var(--ink); color: #E8EEF0; font-size: 0.9rem; }
.strip .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1.5rem; padding-block: 0.5rem; }
.strip a { color: #fff; font-weight: 600; text-decoration: none; }
.strip a:hover { text-decoration: underline; }
.strip a:focus-visible { outline-color: #fff; }

/* Header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 2rem; padding-block: 1rem; }
.mark { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.97rem; display: inline-block; padding-block: 0.3rem; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--signal); }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); font-weight: 600; }

/* Buttons */
.btn { display: inline-block; font: 600 1rem var(--face); text-decoration: none; cursor: pointer; padding: 0.8rem 1.4rem; border-radius: 999px; border: 2px solid var(--ink); background: var(--ink); color: #fff; }
.btn:hover { background: #111A1E; }
.btn.quiet { background: transparent; color: var(--ink); }
.btn.quiet:hover { background: var(--mist); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Home hero */
.hero { padding-block: clamp(2rem, 1rem + 4vw, 4.5rem) 0; text-align: center; }
.hero .wrap { display: grid; gap: 1.5rem; justify-items: center; }
.hero h1 { max-width: 15ch; }
.hero .lede { max-width: 56ch; font-size: 1.2rem; color: var(--soft); }
.hero .actions { justify-content: center; }

/* Inner page hero */
.page-hero { padding-block: clamp(2rem, 1rem + 4vw, 4.5rem); }
.page-hero .wrap { display: grid; gap: 1.25rem; }
.page-hero h1 { font-size: clamp(2.1rem, 1.2rem + 3.6vw, 3.9rem); max-width: 18ch; }
.page-hero .lede { max-width: 60ch; font-size: 1.18rem; color: var(--soft); }

/* Demo stage */
.stage { background: linear-gradient(to bottom, var(--white) 0, var(--white) 60%, var(--mist) 60%); padding-block: clamp(2rem, 1rem + 3vw, 3.5rem) clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.stage .wrap { display: grid; gap: 1.5rem; justify-items: center; }
.day { width: 100%; max-width: 62rem; display: grid; gap: 1rem; justify-items: center; }
.moments { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.moment { appearance: none; cursor: pointer; font: 600 0.95rem var(--face); color: var(--ink); background: var(--white); border: 2px solid var(--line); border-radius: 999px; padding: 0.55rem 1.1rem; display: inline-flex; gap: 0.5rem; align-items: baseline; }
.moment small { font-weight: 500; font-size: 0.8rem; color: var(--soft); font-variant-numeric: tabular-nums; }
.moment:hover { border-color: var(--ink); }
.moment[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.moment[aria-pressed="true"] small { color: #C9D4D9; }
.story { min-height: 3.3em; max-width: 58ch; text-align: center; font-size: 1.08rem; font-weight: 500; }
.alert-slot { min-height: 3.8rem; display: grid; align-items: start; justify-items: center; width: 100%; }
.alert { width: min(24rem, 100%); background: #fff; border-radius: 16px; padding: 0.7rem 0.95rem; text-align: left; box-shadow: 0 14px 30px -18px rgba(20, 25, 28, 0.55), 0 0 0 1px rgba(20, 25, 28, 0.1); display: grid; gap: 0.1rem; font-size: 0.9rem; }
.alert[hidden] { display: none; }
.alert b { font-weight: 800; font-size: 0.78rem; color: var(--signal); }
@media (prefers-reduced-motion: no-preference) {
  .alert:not([hidden]) { animation: rise 0.35s ease-out; }
  @keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
}
.caption { font-size: 0.88rem; color: var(--soft); text-align: center; }

/* Tablet frame */
.tablet { width: 100%; max-width: 62rem; background: var(--bezel); border-radius: clamp(16px, 2.4vw, 30px); padding: clamp(8px, 1.3vw, 16px); box-shadow: 0 40px 70px -40px rgba(20, 25, 28, 0.55); }

/* Home Assistant style dashboard. Sizes follow the stock sections layout: header, badges, then titled sections of tile cards. */
.ha { background: var(--mist); border-radius: clamp(10px, 1.6vw, 18px); color: #1C2428; text-align: left; overflow: hidden; font-size: 0.9rem; }
.ha svg { width: 1.25rem; height: 1.25rem; flex: none; }
.ha-top { display: flex; justify-content: space-between; align-items: center; padding: 0.7rem clamp(0.8rem, 0.5rem + 1.2vw, 1.4rem); background: #fff; border-bottom: 1px solid var(--line); }
.ha-title { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 600; font-size: 1.05rem; }
.ha-tools { display: inline-flex; gap: 0.9rem; color: var(--soft); }
.ha-clock { font-variant-numeric: tabular-nums; }
.ha-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.45rem; padding: 0.9rem clamp(0.8rem, 0.5rem + 1.2vw, 1.4rem) 0.2rem; }
.ha-badge { display: inline-flex; align-items: center; gap: 0.4rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.75rem 0.3rem 0.5rem; font-weight: 500; font-size: 0.82rem; font-variant-numeric: tabular-nums; color: #3B474D; }
.ha-badge svg { width: 1.05rem; height: 1.05rem; color: var(--soft); }
.ha-badge.is-lamp svg { color: #B37B00; }
.ha-badge.is-ok svg { color: var(--signal); }
.ha-grid { display: grid; gap: 1rem clamp(0.8rem, 0.5rem + 1.2vw, 1.4rem); padding: 0.9rem clamp(0.8rem, 0.5rem + 1.2vw, 1.4rem) clamp(0.9rem, 0.6rem + 1.2vw, 1.5rem); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 44rem) {
  .ha-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ha-power { grid-column: 1 / -1; }
}
@media (min-width: 62rem) {
  .ha-grid { grid-template-columns: 1.15fr 1fr 1fr; grid-template-areas: "lights climate security" "lights energy energy" "cams energy energy"; grid-template-rows: auto auto 1fr; }
  .ha-s0 { grid-area: lights; } .ha-s1 { grid-area: climate; } .ha-s2 { grid-area: security; }
  .ha-cams { grid-area: cams; } .ha-power { grid-area: energy; }
  .ha-s1 .ha-tiles, .ha-s2 .ha-tiles { grid-template-columns: minmax(0, 1fr); }
}
.ha-sec { display: grid; gap: 0.55rem; align-content: start; min-width: 0; }
.ha-sec h4 { margin: 0; display: flex; align-items: center; gap: 0.45rem; font-size: 0.9rem; font-weight: 600; color: #3B474D; }
.ha-sec h4 svg { width: 1.05rem; height: 1.05rem; color: var(--soft); }
.ha-mode { color: var(--signal); font-weight: 600; }
.ha-tiles { display: grid; gap: 0.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ha-tile { appearance: none; cursor: pointer; font: inherit; color: inherit; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0.6rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.45rem 0.6rem; align-items: center; min-width: 0; --tone: #8A979E; --tint: #EDF0F2; }
.ha-tile:hover { border-color: #B9C4CA; }
.ha-ic { width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-content: center; background: var(--tint); color: var(--tone); transition: background-color 0.2s, color 0.2s; }
.ha-txt { display: grid; min-width: 0; line-height: 1.25; }
.ha-txt b { font-weight: 600; font-size: 0.88rem; overflow-wrap: break-word; }
.ha-state { font-size: 0.78rem; color: var(--soft); font-variant-numeric: tabular-nums; }
.ha-bar { grid-column: 1 / -1; height: 0.55rem; border-radius: 999px; background: var(--tint); overflow: hidden; }
.ha-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--tone); transition: width 0.3s; }
.ha-tile.is-lamp { --tone: #C98A00; --tint: #FFF1CC; }
.ha-tile.is-lamp .ha-bar i { background: var(--lamp); }
.ha-tile.is-ok { --tone: var(--signal); --tint: #DCF0EE; }
.ha-tile.is-cool { --tone: var(--cool); --tint: #DDEBFA; }
.ha-tile.is-warn { --tone: var(--warn); --tint: #FBE5DA; }
.ha-tile.is-warn .ha-state { color: var(--warn); font-weight: 600; }
.ha-feed { list-style: none; margin: 0; padding: 0.15rem 0.8rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.ha-feed li { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.5rem; border-top: 1px solid #EEF1F3; font-size: 0.86rem; }
.ha-feed li:first-child { border-top: 0; }
.ha-feed b { font-weight: 600; }
.ha-when { color: var(--soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Power flow card, modelled on Power Flow Card Plus */
.ha-flow { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0.6rem; min-width: 0; }
.pf, .ha svg.pf { display: block; width: 100%; max-width: 27rem; margin-inline: auto; aspect-ratio: 320 / 300; height: auto; font-family: var(--face); overflow: visible; }
.pf-line { fill: none; stroke-width: 2; stroke-linecap: round; }
.pf-idle { stroke: #DDE3E6; }
.pf-bus { stroke: #C5CED3; }
.pf-node circle { fill: #fff; stroke-width: 2.5; }
.pf-node { color: #3B474D; }
.pf-val { font-size: 10.5px; font-weight: 700; text-anchor: middle; fill: #1C2428; stroke: none; font-variant-numeric: tabular-nums; }
.pf-lab { font-size: 9.5px; font-weight: 500; text-anchor: middle; fill: #5A6870; stroke: none; }
.pf-solar { stroke: #F2A52B; } .pf-node.pf-solar { color: #C98A00; }
.pf-grid { stroke: #6B7F8C; } .pf-node.pf-grid { color: #4A5B66; }
.pf-home circle { stroke: #263238; }
.pf-general { stroke: #636363; } .pf-node.pf-general { color: #636363; }
.pf-air { stroke: #2B7FD9; } .pf-node.pf-air { color: #2B7FD9; }
.pf-lights { stroke: #F2A52B; } .pf-node.pf-lights { color: #C98A00; }
.pf-dryer { stroke: #E5788A; } .pf-node.pf-dryer { color: #C4556A; }
.pf-node.pf-off circle { stroke: #DDE3E6; } .pf-node.pf-off { color: #9AA7AE; } .pf-off .pf-val { fill: #8A979E; }
.pf-dot { stroke: none; } .pf-dot.pf-solar { fill: #F2A52B; } .pf-dot.pf-grid { fill: #6B7F8C; }
/* Small example screens on the inner pages */
.ha-mini-tiles { display: grid; gap: 0.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0.7rem 0.8rem 0.9rem; }
.ha-mini-tiles .ha-tile { cursor: default; }
.phones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(0.75rem, 0.4rem + 1.5vw, 1.5rem); align-items: start; }
.phone { margin: 0; display: grid; gap: 0.5rem; }
.phone .shell { background: var(--bezel); border-radius: 26px; padding: 7px; }
.phone .ha { border-radius: 20px; font-size: 0.82rem; }
.phone .ha-mini-tiles { grid-template-columns: minmax(0, 1fr); }
.phone figcaption, .example figcaption { font-size: 0.88rem; color: var(--soft); text-align: center; }
.example { margin: 0; display: grid; gap: 0.6rem; }
.example .shell { background: var(--bezel); border-radius: 18px; padding: 9px; }
.example .ha { border-radius: 10px; }
.camcard { background: var(--mist); border: 1px solid var(--line); border-radius: 16px; padding: clamp(0.6rem, 0.4rem + 1vw, 1rem); display: grid; gap: 0.6rem; }
.cam { display: block; width: 100%; height: auto; border-radius: 10px; font-family: var(--face); }
.frame.photo.tall { max-width: 24rem; justify-self: center; width: 100%; }
.frame.photo.tall img { aspect-ratio: 3 / 4; }
.flowframe { background: var(--mist); border: 1px solid var(--line); border-radius: 16px; padding: clamp(0.75rem, 0.5rem + 1vw, 1.25rem); display: grid; gap: 0.6rem; }
.flowframe .ha-flow { border-radius: 12px; }
.flowframe figcaption, .flownote { font-size: 0.88rem; color: var(--soft); text-align: center; }
@media (prefers-reduced-motion: reduce) { .ha-ic, .ha-bar i { transition: none; } }

/* Bands */
.band { padding-block: clamp(3rem, 1.5rem + 5vw, 6rem); }
.band.mist { background: var(--mist); }
.band > .wrap { display: grid; gap: clamp(2rem, 1rem + 3vw, 3.5rem); }
.intro { display: grid; gap: 1rem; max-width: 46rem; }
.intro p { color: var(--soft); font-size: 1.12rem; }

/* Ruled lists: benefits and plain item grids */
.benefits { display: grid; gap: 2rem clamp(1.5rem, 1rem + 2vw, 3rem); grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin: 0; padding: 0; list-style: none; }
.benefits li { display: grid; gap: 0.45rem; align-content: start; border-top: 2px solid var(--ink); padding-top: 1rem; }
.benefits p { color: var(--soft); font-size: 0.99rem; }

/* Feature rows */
.feature { display: grid; gap: 1.5rem clamp(2rem, 1rem + 4vw, 5rem); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 52rem) {
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .feature.flip .words { order: 2; }
}
.words { display: grid; gap: 1rem; }
.words p { color: var(--soft); max-width: 52ch; }
.words ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.45rem; font-weight: 500; font-size: 0.98rem; }
.words li { padding-left: 1.4rem; position: relative; }
.words li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.6rem; height: 2px; background: var(--signal); }
.words .more { font-weight: 600; }
.frame { background: var(--bezel); border-radius: 18px; padding: 9px; }
.frame .slot { aspect-ratio: 16 / 10; border-radius: 10px; background: #EEF1F3; display: grid; place-content: center; text-align: center; gap: 0.3rem; padding: 1.25rem; color: #5A6870; font-size: 0.93rem; }
.frame .slot b { color: #1D2428; font-weight: 600; }
.frame.plain { background: transparent; padding: 0; }
.frame.plain .slot { border: 2px dashed #B6C1C7; background: transparent; }
.slot-name { font-size: 0.78rem; color: #8A979E; font-variant-numeric: tabular-nums; }
.frame img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; }
.frame.photo { background: transparent; padding: 0; }
.frame.photo img { border-radius: 16px; aspect-ratio: 4 / 3; }
@media (min-width: 52rem) { .feature.solo { grid-template-columns: minmax(0, 1fr); } }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.pair figure { margin: 0; display: grid; gap: 0.4rem; }
.pair img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; }
.pair figcaption { font-size: 0.88rem; font-weight: 600; color: var(--soft); }
.logo { display: block; height: 3.5rem; width: auto; }

/* Process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem 1.5rem; grid-template-columns: minmax(0, 1fr); counter-reset: step; }
@media (min-width: 34rem) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 52rem) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 76rem) { .steps.six { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.steps li { counter-increment: step; display: grid; gap: 0.4rem; align-content: start; border-top: 2px solid var(--ink); padding-top: 0.9rem; }
.steps li::before { content: counter(step); font-weight: 800; font-size: 0.95rem; color: var(--signal); font-variant-numeric: tabular-nums; }
.steps p { font-size: 0.96rem; color: var(--soft); }

/* Closing call to action */
.cta { display: grid; gap: 1.25rem; justify-items: start; }
.cta p { color: var(--soft); max-width: 52ch; font-size: 1.1rem; }

/* Enquiry */
.enquire { display: grid; gap: 2rem clamp(2rem, 1rem + 4vw, 5rem); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 52rem) { .enquire { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
.enquire-copy { display: grid; gap: 1.1rem; }
.enquire-copy > p { color: var(--soft); max-width: 44ch; }
.contact { margin: 0; display: grid; gap: 0.2rem; }
.contact dt { color: var(--soft); font-size: 0.88rem; }
.contact dd { margin: 0 0 0.7rem; font-weight: 600; font-size: 1.1rem; }
.formslot { border: 2px dashed #B6C1C7; border-radius: 16px; background: var(--white); padding: clamp(1.25rem, 1rem + 1.5vw, 2rem); display: grid; gap: 1rem; min-height: 18rem; align-content: center; }
.formslot p { color: var(--soft); font-size: 0.97rem; max-width: 50ch; }
.formslot.live { border: 1px solid var(--line); padding: 0; overflow: hidden; }
.formslot.live iframe { display: block; width: 100%; height: 73rem; border: 0; }
@media (min-width: 30rem) { .formslot.live iframe { height: 70rem; } }

footer { border-top: 1px solid var(--line); padding-block: 1.75rem; font-size: 0.93rem; color: var(--soft); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 0.4rem 2.5rem; justify-content: space-between; }
footer strong { color: var(--ink); font-weight: 800; }
