:root {
  --blue: #2877e5;
  --blue-dark: #1763cc;
  --black: #1d1d1f;
  --text: #252525;
  --muted: #6e7177;
  --line: #e6e7e9;
  --soft: #f5f6f7;
  --white: #fff;
  --radius: 18px;
  --font: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--white); font-family: var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.wrap { width: min(1210px, calc(100% - 48px)); margin-inline: auto; }
.topbar { background: #f1f1ef; color: #515151; font-size: 12px; }
.topbar .wrap { min-height: 34px; display: flex; align-items: center; justify-content: space-between; }
.site-header { background: rgba(255,255,255,.95); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(230,231,233,.75); backdrop-filter: blur(16px); }
.header-inner { height: 100px; display: flex; align-items: center; justify-content: space-between; }
.logo img { display: block; width: 170px; height: auto; }
nav { display: flex; align-items: center; gap: 34px; }
nav a { text-decoration: none; font-size: 14px; font-weight: 500; }
.nav-cta { background: var(--black); color: white; border-radius: 999px; padding: 15px 22px; display: inline-flex; gap: 16px; align-items: center; }
.nav-cta span { font-size: 17px; }
.hero { margin-top: 32px; min-height: 570px; border-radius: 20px; overflow: hidden; background: #111115; color: white; display: grid; grid-template-columns: 1.05fr .95fr; }
.hero-content { padding: clamp(48px, 6vw, 82px); align-self: center; position: relative; z-index: 2; }
.status { display: inline-flex; align-items: center; gap: 9px; border: 1px solid #55545a; border-radius: 999px; padding: 8px 13px; font-size: 12px; color: #d1d1d4; margin-bottom: 30px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: #67c97a; box-shadow: 0 0 0 4px rgba(103,201,122,.12); }
.hero h1 { max-width: 680px; font-size: clamp(46px, 5.2vw, 72px); line-height: 1.02; letter-spacing: -.055em; margin: 0; font-weight: 500; }
.hero-content > p { color: #c5c5ca; max-width: 570px; font-size: 17px; line-height: 1.6; margin: 28px 0 34px; }
.hero-actions { display: flex; align-items: center; gap: 25px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; gap: 28px; border-radius: 999px; padding: 16px 22px; text-decoration: none; font-weight: 500; font-size: 14px; }
.button-blue { background: var(--blue); color: white; }
.button-blue:hover { background: var(--blue-dark); }
.hero-note { color: #888990; font-size: 12px; }
.hero-image { position: relative; overflow: hidden; min-height: 500px; }
.hero-image:after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #111115 0%, transparent 30%); pointer-events: none; }
.hero-image img { position: absolute; width: 125%; height: 100%; object-fit: cover; object-position: center; right: -13%; }
.intro { padding: 110px 0 70px; }
.overline { text-transform: uppercase; color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .13em; }
.intro h2, .process h2 { font-size: clamp(38px, 4.5vw, 58px); line-height: 1.04; letter-spacing: -.05em; font-weight: 500; margin: 15px 0; }
.intro p { color: var(--muted); font-size: 17px; margin: 0; }
.installer-section { background: var(--soft); padding: 64px 0 90px; }
.installer-wrap { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 70px; align-items: start; }
.installer-aside { position: sticky; top: 135px; }
.installer-aside h2 { font-size: 34px; line-height: 1.08; letter-spacing: -.04em; margin: 15px 0 18px; }
.installer-aside > p { color: var(--muted); font-size: 14px; line-height: 1.65; }
.aside-help { margin-top: 38px; padding: 22px; background: white; border-radius: 14px; display: grid; gap: 9px; }
.aside-help strong { font-size: 14px; }
.aside-help span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.aside-help a { color: var(--blue); font-size: 12px; font-weight: 600; text-decoration: none; margin-top: 5px; }
.configurator { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: 0 16px 50px rgba(25,35,45,.06); }
.config-step { padding: 42px; border-bottom: 1px solid var(--line); }
.last-step { border-bottom: 0; }
.step-heading { display: flex; gap: 17px; align-items: flex-start; margin-bottom: 28px; }
.step-heading > span { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--black); color: white; font-size: 13px; font-weight: 600; }
.step-heading h3 { font-size: 22px; letter-spacing: -.025em; margin: 1px 0 4px; }
.step-heading p { color: var(--muted); font-size: 13px; margin: 0; }
.device-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.software-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.select-card { appearance: none; position: relative; text-align: left; padding: 20px; min-height: 105px; background: white; color: var(--text); border: 1px solid var(--line); border-radius: 12px; font-family: var(--font); cursor: pointer; transition: .18s ease; }
.select-card:hover:not(:disabled) { border-color: #aeb2b7; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.04); }
.select-card.selected { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: #f8fbff; }
.select-card.selected:after { content: "✓"; position: absolute; right: 12px; top: 12px; display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: var(--blue); color: white; font-size: 11px; font-weight: 700; }
.select-card b { display: block; font-size: 13px; margin-bottom: 13px; letter-spacing: -.01em; }
.select-card span { display: block; color: var(--muted); font-size: 11px; line-height: 1.45; }
.select-card:disabled { opacity: .43; cursor: not-allowed; background: #f4f4f4; }
.select-card:disabled:after { content: "Niedostępne"; position: absolute; right: 11px; bottom: 10px; font-size: 8px; color: #7d8084; text-transform: uppercase; letter-spacing: .08em; }
.software-card { min-height: 130px; }
.software-card .sw-logo { font-size: 21px; font-weight: 700; margin-bottom: 22px; letter-spacing: -.035em; }
.software-card[data-id="supla"] .sw-logo { color: #2374b9; }
.software-card[data-id="esphome"] .sw-logo { color: #6c55bb; }
.install-panel { background: var(--black); color: white; border-radius: 14px; padding: 25px; display: grid; grid-template-columns: minmax(230px,1fr) auto auto; align-items: center; gap: 24px; }
.selection-summary { min-width: 0; display: flex; align-items: center; gap: 15px; }
.summary-icon { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: #67c97a; color: #102614; font-weight: 700; }
.selection-summary span, .selection-summary small { display: block; color: #98999d; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; }
.selection-summary strong { display: block; font-size: 15px; margin: 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.install-button, esp-web-install-button::part(activate) { appearance: none; border: 0; border-radius: 999px; background: var(--blue); color: white; padding: 15px 21px; font: 600 12px var(--font); cursor: pointer; white-space: nowrap; }
.install-button:hover, esp-web-install-button::part(activate):hover { background: var(--blue-dark); }
.install-button.disabled { background: #44454a; color: #999a9d; cursor: not-allowed; }
.unavailable { max-width: 260px; color: #ffcfad; font-size: 11px; line-height: 1.45; text-align: right; }
.warning { margin-top: 16px; padding: 17px 19px; display: flex; gap: 13px; background: #fff8ed; border: 1px solid #f2dfc3; border-radius: 12px; color: #79572b; }
.warning > span { width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #f0c57c; color: #503614; font-size: 12px; font-weight: 700; }
.warning p { font-size: 11px; line-height: 1.55; margin: 2px 0 0; }
.process { padding: 110px 0; display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; }
.process ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.process li { border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.process li > span { color: var(--blue); font-size: 11px; font-weight: 700; }
.process li strong { display: block; margin: 25px 0 10px; font-size: 15px; }
.process li p { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 0; }
footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 100px; display: flex; align-items: center; gap: 30px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.footer-inner img { width: 135px; margin-right: auto; }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .hero-image { min-height: 330px; }
  .hero-image:after { background: linear-gradient(180deg,#111115,transparent 45%); }
  .hero-image img { width: 100%; right: 0; }
  .installer-wrap { grid-template-columns: 1fr; gap: 35px; }
  .installer-aside { position: static; display: grid; grid-template-columns: 1fr 300px; gap: 30px; }
  .installer-aside .overline { grid-column: 1; }
  .installer-aside h2 { grid-column: 1; margin-top: -8px; }
  .installer-aside > p { grid-column: 1; }
  .aside-help { grid-column: 2; grid-row: 1 / 4; margin: 0; }
  .process { grid-template-columns: 1fr; gap: 35px; }
}

@media (max-width: 720px) {
  .wrap { width: min(100% - 28px, 1210px); }
  .topbar .wrap span:last-child, nav > a:not(.nav-cta) { display: none; }
  .header-inner { height: 78px; }
  .logo img { width: 145px; }
  .nav-cta { padding: 12px 16px; font-size: 12px; }
  .hero { margin-top: 14px; min-height: 0; }
  .hero-content { padding: 38px 26px; }
  .hero h1 { font-size: 42px; }
  .hero-image { min-height: 260px; }
  .hero-image img { height: 115%; }
  .intro { padding: 75px 0 45px; }
  .installer-section { padding: 60px 0; }
  .installer-aside { display: block; }
  .aside-help { margin-top: 25px; }
  .config-step { padding: 27px 20px; }
  .device-grid, .software-grid { grid-template-columns: 1fr; }
  .select-card { min-height: 92px; }
  .install-panel { grid-template-columns: 1fr; align-items: stretch; }
  .selection-summary strong { white-space: normal; }
  .install-action, .install-button, esp-web-install-button::part(activate) { width: 100%; }
  .unavailable { max-width: none; text-align: left; }
  .process { padding: 75px 0; }
  .process ol { grid-template-columns: 1fr; }
  .process li strong { margin-top: 14px; }
  .footer-inner { padding: 30px 0; flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-inner img { margin-bottom: 15px; }
}
