/* Site-ul Zent: același sistem de design ca aplicația (theme.js): culori, gradientul de sus, carduri rotunjite,
   butoane-pastilă, titluri groase. Tema întunecată urmează setarea sistemului, ca opțiunea „Phone" din aplicație. */
:root {
  --primary: #2da1ff;
  --primary-pressed: #1e8fea;
  --primary-soft: #d8eeff;
  --tint: #e4f4ff;
  --ink: #111111;
  --ink-soft: #4a5361;
  --muted: #8a94a3;
  --line: #dce7f2;
  --surface: #ffffff;
  --background: #f3f8fd;
  --canvas: #ffffff;
  --success: #2fbf71;
  --danger: #ff4b40;
  --danger-soft: #ffeceb;
  --warning-soft: #fff6e5;
  --inverse: #111111;
  --on-inverse: #ffffff;
  --glass: rgba(255, 255, 255, 0.85);
  --shadow-card: 0 4px 12px rgba(11, 59, 102, 0.06);
  --shadow-float: 0 8px 18px rgba(11, 59, 102, 0.12);
  --hero: linear-gradient(180deg, #2da1ff 0%, #6ac2ff 300px, #c2ecff 640px, #ffffff 880px);
  /* jaluzeaua */
  --frame: #8a8a7e;
  --slat: #38b4ff;
  --slat-light: #8bd2ff;
  --rail: #1e8fea;
  --sky-top: #9ed8ff;
  --sky-bottom: #f4fbff;
  --sun: #ffd45c;
  --sun-glow: #fff6d6;
  --cloud: #ffffff;
  --hill: #bfe6a8;
  --hill-front: #9fd67f;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #3aa8ff;
    --primary-pressed: #2b93ea;
    --primary-soft: #173450;
    --tint: #142638;
    --ink: #f2f5f9;
    --ink-soft: #b8c2cf;
    --muted: #7f8b9b;
    --line: #253549;
    --surface: #17212e;
    --background: #0b121b;
    --canvas: #0b121b;
    --success: #3bd083;
    --danger: #ff5a50;
    --danger-soft: #3a1b1b;
    --warning-soft: #3a2e14;
    --inverse: #f2f5f9;
    --on-inverse: #0b121b;
    --glass: rgba(23, 33, 46, 0.85);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-float: 0 8px 18px rgba(0, 0, 0, 0.5);
    --hero: linear-gradient(180deg, #0e4a80 0%, #103a63 300px, #0e1d2e 640px, #0b121b 880px);
    --frame: #5c5c54;
    --slat: #2a8fd6;
    --slat-light: #5bb4ee;
    --rail: #1b6fb5;
    --sky-top: #0f1f3d;
    --sky-bottom: #28406b;
    --sun: #e9eef7;
    --sun-glow: #3a5078;
    --cloud: #5d7096;
    --hill: #2e5a3a;
    --hill-front: #25492f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--hero) no-repeat, var(--canvas);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); }

.page { max-width: 1040px; margin: 0 auto; padding: 0 20px 64px; }
.narrow { max-width: 720px; }

/* Bara de sus */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 900; letter-spacing: -0.8px; color: var(--ink); text-decoration: none; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.topbar nav { display: flex; align-items: center; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px;
  background: var(--glass); color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; border: 0; cursor: pointer;
  font-family: inherit;
}
.pill:hover { opacity: 0.85; }
.pill.active { background: var(--inverse); color: var(--on-inverse); }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 10px;
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase;
}

/* Începutul paginii */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 24px; padding: 24px 0 36px; }
.hero h1 { font-size: clamp(42px, 7vw, 68px); font-weight: 900; letter-spacing: -2px; line-height: 1.02; margin: 0; }
.hero p { font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-soft); line-height: 1.5; margin: 18px 0 26px; max-width: 520px; }
.hero .house { width: 100%; max-width: 420px; justify-self: center; animation: float 4s ease-in-out infinite; filter: drop-shadow(0 18px 24px rgba(11, 59, 102, 0.18)); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

@keyframes float { 50% { transform: translateY(-14px); } }

/* Titluri de secțiune, ca în aplicație */
.label { font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.section-title { font-size: clamp(28px, 4vw, 38px); font-weight: 900; letter-spacing: -1px; margin: 6px 0 18px; }
.section { margin-top: 56px; }

/* Carduri */
.card { background: var(--surface); border-radius: 24px; padding: 24px; box-shadow: var(--shadow-card); }
.card + .card { margin-top: 18px; }
.card h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; margin: 0 0 6px; }
.card > p { color: var(--ink-soft); line-height: 1.55; margin: 0 0 16px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.feature { background: var(--surface); border-radius: 24px; padding: 22px; box-shadow: var(--shadow-card); }
.feature .icon { width: 46px; height: 46px; border-radius: 15px; background: var(--tint); display: grid; place-items: center; font-size: 22px; margin-bottom: 14px; }
.feature h3 { font-size: 18px; font-weight: 800; margin: 0 0 6px; }
.feature p { color: var(--ink-soft); line-height: 1.5; margin: 0; font-size: 15px; }

/* Jaluzeaua animată (ca BlindView din aplicație) */
.showcase { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 28px; align-items: center; }
.blind {
  position: relative; aspect-ratio: 765 / 1198; width: 100%; max-width: 300px; justify-self: center;
  background: var(--frame); border-radius: 22px; padding: 12px; box-shadow: var(--shadow-float);
}
.blind .window { position: relative; height: 100%; border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom)); }
.blind .sun { position: absolute; top: 30%; right: 14%; width: 20%; aspect-ratio: 1; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 14px var(--sun-glow); }
.blind .cloud { position: absolute; height: 5%; border-radius: 999px; background: var(--cloud); opacity: 0.9; }
.blind .cloud.one { top: 47%; left: 10%; width: 34%; }
.blind .cloud.two { top: 55%; left: 50%; width: 22%; }
.blind .hill { position: absolute; width: 130%; aspect-ratio: 1.45; border-radius: 50%; background: var(--hill); left: -50%; top: 80%; }
.blind .hill.front { background: var(--hill-front); left: auto; right: -55%; top: 86%; width: 120%; }
.blind .slats {
  position: absolute; top: 0; left: 0; right: 0; height: var(--closed, 30%);
  background: repeating-linear-gradient(180deg, var(--slat) 0 9px, var(--slat-light) 9px 12px, var(--rail) 12px 13px);
  border-bottom: 10px solid var(--rail); transition: height 2.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.blind .slats::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 16px; background: var(--rail); }

/* Formulare */
form { display: grid; gap: 12px; }
input {
  width: 100%; height: 56px; padding: 0 18px; font-size: 16px; font-family: inherit; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; outline: none;
}
input::placeholder { color: var(--muted); }
input:focus { border-color: var(--primary); }

button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 800; text-decoration: none;
  background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(45, 161, 255, 0.3);
  transition: transform 0.15s ease, background 0.15s ease;
}
button:hover, .button:hover { background: var(--primary-pressed); }
button:active, .button:active { transform: scale(0.97); }
button:disabled { opacity: 0.45; cursor: default; box-shadow: none; transform: none; }
.secondary { background: var(--primary-soft) !important; color: var(--ink) !important; box-shadow: none !important; }
.danger { background: var(--danger-soft) !important; color: var(--danger) !important; box-shadow: none !important; }
button.link { background: none; color: var(--primary); box-shadow: none; padding: 0; min-height: 0; }
button.link:hover { background: none; text-decoration: underline; }
button.small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.forgot { justify-self: center; font-weight: 700; }

.error { color: var(--danger); font-weight: 600; margin: 0; }
.ok { color: var(--success); font-weight: 700; margin: 0; }
.meta { color: var(--muted); font-size: 14px; }
.hidden { display: none !important; }

/* Dispozitivele contului */
.signed-in { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--ink-soft); flex-wrap: wrap; }
.devices { display: grid; gap: 10px; }
.device { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: var(--tint); flex-wrap: wrap; }
.device .mini { width: 54px; aspect-ratio: 236 / 175; border-radius: 8px; background: var(--frame); padding: 4px; flex-shrink: 0; }
.device .mini span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(180deg, var(--slat) 0 40%, var(--sky-top) 40%, var(--sky-bottom)); }
.device .info { flex: 1; min-width: 160px; }
.device .name { font-weight: 800; font-size: 17px; }
.device .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 4px; margin-right: 6px; vertical-align: middle; }
.dot.on { background: var(--primary); }
.dot.saving { background: var(--success); }
.dot.off { background: var(--danger); }
.status { font-size: 14px; font-weight: 700; color: var(--primary); margin-top: 2px; }
.status.failed { color: var(--danger); }
.status.done { color: var(--success); }

.version { font-size: 36px; font-weight: 900; letter-spacing: -1px; margin: 4px 0; }
.notes { background: var(--tint); border-radius: 14px; padding: 12px 14px; color: var(--ink-soft); margin-top: 12px; font-size: 15px; }
ol { padding-left: 20px; color: var(--ink-soft); line-height: 1.65; margin: 0 0 18px; }
.warning { display: block; background: var(--warning-soft); color: var(--ink); border-radius: 14px; padding: 12px 14px; font-weight: 600; }
esp-web-install-button button { width: 100%; }
/* Jaluzea sau lumină, la instalarea prin USB */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 6px; }
.choice__option { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 0; padding: 14px 16px; border-radius: 18px; background: var(--tint); color: var(--ink); box-shadow: none; text-align: left; border: 2px solid transparent; }
.choice__option:hover { background: var(--primary-soft); }
.choice__option span { font-size: 13px; font-weight: 600; color: var(--muted); }
.choice__option--on { border-color: var(--primary); background: var(--primary-soft); }

footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); }
footer a { color: var(--muted); font-weight: 700; text-decoration: none; }
footer a:hover { color: var(--primary); }

/* Elementele apar când ajung pe ecran (ca în magazinul din aplicație) */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .hero, .showcase { grid-template-columns: 1fr; }
  .hero .house { max-width: 300px; order: -1; }
  .blind { max-width: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero .house { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .blind .slats { transition: none; }
}
