/* GangJam web — minimal dark theme. Palette mirrors SwmixLookAndFeel
   in the desktop client so the brand looks consistent across surfaces.
   --bg-dark / --bg-panel match kBgDark / kBgPanel; --accent matches
   the green used on the active CONNECTED button. */

:root {
  --bg-dark:   #1a1c20;
  --bg-panel:  #232629;
  --bg-card:   #2a2d31;
  --text:      #e5e7ea;
  --text-dim:  #9aa0a6;
  --accent:    #4caf50;     /* the same green as the CONNECTED pill */
  --accent-hi: #66bb6a;
  --danger:    #e57373;
  --border:    #3a3d42;
  --radius:    10px;
  --max-w:     960px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-dark);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--accent-hi); }

/* ----- top bar ----- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
}
.brand {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--text);
}
.brand:hover { color: var(--accent); }
.topbar nav a {
  margin-left: 18px;
  color: var(--text-dim);
}
.topbar nav a:hover { color: var(--text); }
.topbar nav a.cta {
  color: var(--bg-dark);
  background: var(--accent);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-weight: 600;
}
.topbar nav a.cta:hover { background: var(--accent-hi); color: var(--bg-dark); }

/* ----- main ----- */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.hero {
  text-align: center;
  padding: 32px 0 56px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.15;
  margin: 0 0 18px;
  letter-spacing: -1px;
}
.hero h1 .accent { color: var(--accent); }
.hero .lead {
  max-width: 640px;
  margin: 0 auto 28px;
  color: var(--text-dim);
  font-size: 1.1rem;
}
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hero .meta {
  margin-top: 28px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.cta {
  display: inline-block;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.cta.primary {
  background: var(--accent);
  color: var(--bg-dark);
}
.cta.primary:hover { background: var(--accent-hi); color: var(--bg-dark); }

.cta.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.cta.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ----- features grid ----- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.features article {
  background: var(--bg-panel);
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.features h3 {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 1.1rem;
}
.features p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* ----- auth card ----- */
main.auth {
  display: flex;
  justify-content: center;
}
.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 460px;
}
.card h1 {
  margin: 0 0 8px;
  font-size: 1.6rem;
  color: var(--text);
}
.card .lead {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 0 0 24px;
}

form label {
  display: block;
  margin-bottom: 14px;
}
form label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-dim);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
form input[type="email"],
form input[type="password"],
form input[type="text"] {
  width: 100%;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease;
}
form input:focus {
  border-color: var(--accent);
}

/* M17 v2.16: password-with-eye-toggle wrapper. The input fills the
   row as before; the button overlays the right edge of the field
   and toggles between password/text on click. */
.pwd-wrap {
  position: relative;
}
.pwd-wrap input {
  padding-right: 44px !important;
}
.pwd-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color .15s ease, background-color .15s ease;
}
.pwd-toggle:hover  { color: var(--text); background: rgba(255,255,255,0.04); }
.pwd-toggle:focus  { outline: none; color: var(--accent); }
.pwd-toggle svg    { display: block; }

form button.cta {
  width: 100%;
  margin-top: 8px;
}

.status {
  margin-top: 16px;
  min-height: 22px;
  font-size: 0.92rem;
}
.status.error { color: var(--danger); }
.status.ok    { color: var(--accent); }

.alt {
  margin: 22px 0 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ----- callout strip ----- */
.callout {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-top: 36px;
}
.callout h2 {
  margin: 0 0 10px;
  font-size: 1.3rem;
  color: var(--text);
}
.callout p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.97rem;
}

/* ----- downloads grid ----- */
.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 16px;
}
.dl-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dl-card.available {
  border-color: var(--accent);
}
.dl-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.2rem;
}
.dl-card p { margin: 0; color: var(--text-dim); font-size: 0.95rem; }
.dl-card .badge {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.dl-card .badge.soon {
  background: var(--bg-card);
  color: var(--text-dim);
}
.dl-card .cta {
  align-self: flex-start;
  margin-top: 6px;
}
.dl-card .cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.dl-card .meta {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ----- contact form textarea ----- */
form textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  resize: vertical;
  transition: border-color .15s ease;
}
form textarea:focus { border-color: var(--accent); }

/* ----- footer ----- */
footer {
  margin-top: 60px;
  padding: 24px;
  text-align: center;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}
footer a { color: var(--text-dim); }
footer a:hover { color: var(--accent); }
