:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #6b6a64;
  --border: #e3e1da;
  --accent: #1c1b19;
  --radius: 14px;
  color-scheme: light;
}

/* Σκούρο: ό,τι διάλεξε ο χρήστης (data-theme), αλλιώς το θέμα του συστήματος (και χωρίς JavaScript). */
:root[data-theme="dark"] {
  --bg: #141413;
  --surface: #1e1e1c;
  --text: #efeee9;
  --muted: #9c9b94;
  --border: #34332f;
  --accent: #efeee9;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #141413;
    --surface: #1e1e1c;
    --text: #efeee9;
    --muted: #9c9b94;
    --border: #34332f;
    --accent: #efeee9;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: inherit; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

.bar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 16px; }
.lang { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface); }
.lang button { padding: 4px 12px; border: 0; background: none; color: var(--muted); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.theme { width: 44px; height: 26px; padding: 0; position: relative; flex: none; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.theme::after { content: "☀️"; position: absolute; top: 1px; left: 2px; width: 22px; height: 22px; font-size: 14px; line-height: 22px;
  text-align: center; border-radius: 50%; background: var(--border); transition: transform .2s; }
:root[data-theme="dark"] .theme::after { content: "🌙"; transform: translateX(18px); }
:is(a, button):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.hero { padding: clamp(32px, 10vh, 96px) 0 40px; }
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.4rem, 10vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.hero h1 span { color: var(--muted); font-weight: 500; }
.lead { margin: 0; max-width: 34em; color: var(--muted); font-size: 1.1rem; }

.app-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.app-card {
  --tint: var(--accent);
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--tint);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: transform .15s, border-color .15s;
}
.app-card:hover, .app-card:focus-visible { border-color: var(--tint); transform: translateY(-2px); }
.app-card .icon { font-size: 2rem; line-height: 1; margin-bottom: 12px; }
.app-card h2 { margin: 0 0 6px; font-size: 1.2rem; }
.app-card h2 span { color: var(--muted); font-weight: 500; }
.app-card p { margin: 0 0 16px; color: var(--muted); font-size: .95rem; }
.app-card .host { margin-top: auto; color: var(--tint); font-size: .85rem; font-weight: 600; }

/* One tint per app (matches the app's own accent colour). */
.app-card.cooking { --tint: #c4552d; }
.app-card.office { --tint: #2457d6; }
:root[data-theme="dark"] .app-card.cooking { --tint: #e0714a; }
:root[data-theme="dark"] .app-card.office { --tint: #6c93f5; }

.actions { margin: 24px 0 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 16px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-weight: 500; text-decoration: none; }
.btn:hover { border-color: var(--muted); }

.foot { padding-top: 56px; padding-bottom: 32px; color: var(--muted); font-size: .85rem; }
.foot p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .app-card, .theme::after { transition: none; }
  .app-card:hover, .app-card:focus-visible { transform: none; }
}
