/* Shared styling for the marketing/account pages (home, login, signup,
   mypage, settings). Deliberately separate from app.css so the existing
   /map screen's styling is never touched by changes here. */
:root {
  --bg: #eef2f6;
  --panel: #ffffff;
  --panel-2: #f6f8fb;
  --line: #d5dce6;
  --line-strong: #b8c3d2;
  --text: #1f2937;
  --muted: #627084;
  --accent: #1667c2;
  --accent-2: #0f55a7;
  --ok: #16803a;
  --warn: #a15c00;
  --danger: #c7352b;
  --chip: #edf2f8;
  --shadow: rgba(15, 23, 42, .14);
}

[hidden] { display: none !important; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.site {
  background:
    radial-gradient(circle at 50% 8%, rgba(22, 103, 194, 0.08), transparent 34%),
    linear-gradient(180deg, #f3f7fb 0%, #eaf0f6 52%, #eef2f6 100%);
  color: var(--text);
  font-family: "Segoe UI", "Apple SD Gothic Neo", Arial, sans-serif;
  font-size: 14px;
  min-height: 100vh;
}
.site a { color: var(--accent); text-decoration: none; }
.site a:hover { text-decoration: underline; }

/* Top nav, shared across site pages */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.site-nav__brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); text-decoration: none; }
.site-nav__brand:hover { color: var(--accent); text-decoration: none; }
.site-nav__brand .mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: url("/static/landformstudio.png") center / contain no-repeat;
  color: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  overflow: hidden;
}
.site-nav__links { display: flex; align-items: center; gap: 16px; font-size: 13px; }

.nav-menu { position: relative; }
.nav-menu__toggle { padding: 8px 12px; font-size: 15px; line-height: 1; }
.nav-menu__dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px var(--shadow); min-width: 170px; padding: 6px; z-index: 20;
}
.nav-menu__dropdown a {
  display: block; padding: 8px 10px; border-radius: 6px; color: var(--text); font-size: 13px;
}
.nav-menu__dropdown a:hover { background: var(--panel-2); text-decoration: none; }
.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.language-switch select {
  height: 34px;
  min-width: 92px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  outline: none;
}
.language-switch select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 103, 194, 0.14);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 18px; border-radius: 6px; border: 1px solid var(--line-strong);
  background: var(--panel); color: var(--text); cursor: pointer; font-size: 13px;
  text-decoration: none;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.site .btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.site .btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Hero */
.hero {
  max-width: 1080px; margin: 0 auto; padding: 76px 24px 54px;
  text-align: center;
}
.hero__kicker {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: var(--chip); color: var(--accent-2); font-size: 12px; font-weight: 600;
  margin-bottom: 16px;
}
.hero h1 { font-size: 36px; line-height: 1.3; margin: 0 0 12px; color: var(--text); }
.hero p.lead { font-size: 16px; color: var(--muted); max-width: 640px; margin: 0 auto 28px; }
.hero__cta { display: flex; gap: 12px; justify-content: center; align-items: center; }
.hero__cta .btn {
  min-height: 46px;
  padding: 0 26px;
  font-size: 14px;
  font-weight: 700;
}
.hero__cta .btn-primary {
  min-width: 220px;
  min-height: 56px;
  border-radius: 9px;
  font-size: 16px;
  box-shadow: 0 14px 28px rgba(22, 103, 194, 0.22);
}

/* Global coverage map (decorative, marketing-only) */
.coverage {
  max-width: 1180px; margin: 0 auto; padding: 34px 24px 64px; text-align: center;
}
.coverage__card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.coverage__card h2 { font-size: 26px; margin: 0 0 14px; color: var(--text); }
.coverage__map {
  position: relative; margin-top: 24px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, #0b1726 0%, #16263d 100%);
  border: 0;
  height: 660px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}
@media (max-width: 700px) {
  .coverage__map { height: 420px; }
}
.coverage__globe { position: absolute; inset: 0; }
.coverage__globe canvas { cursor: grab; display: block; }
.coverage__globe canvas:active { cursor: grabbing; }
.coverage__credit {
  position: absolute; right: 12px; bottom: 8px; margin: 0;
  font-size: 10px; color: rgba(205, 217, 236, 0.55); letter-spacing: 0.02em;
  pointer-events: none;
}

/* Fallback panel shown if WebGL/globe.gl is unavailable (see globe.js):
   a static flat image of the same NASA texture, never an empty box. */
.globe-fallback .globe-fallback__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.55; filter: saturate(0.9) brightness(0.8);
}
.globe-fallback .globe-fallback__overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(11,23,38,0.35) 0%, rgba(11,23,38,0.75) 100%);
}
.globe-fallback p { font-size: 14px; letter-spacing: 0.04em; color: #e6edf7; font-weight: 600; }

/* Supported file formats */
.formats {
  max-width: 1080px; margin: 0 auto; padding: 8px 24px 64px; text-align: center;
}
.formats h2 { font-size: 26px; margin: 0 0 8px; color: var(--text); }
.formats__lead { margin-bottom: 28px; }
.format-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px; max-width: 680px; margin: 0 auto;
}
.format-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 28px 24px; text-align: left; box-shadow: 0 1px 2px var(--shadow);
}
.format-card__icon {
  width: 48px; height: 48px; border-radius: 10px; background: var(--chip);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.format-card__icon svg { width: 26px; height: 26px; }
.format-card__icon img { width: 34px; height: 34px; object-fit: contain; display: block; }
.format-card__icon--rhino { background: #111; padding: 4px; }
.format-card__icon--rhino img { width: 40px; height: 40px; }
.format-card h3 { font-size: 17px; margin: 0 0 4px; color: var(--text); }
.format-card__tag {
  display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent-2);
  background: var(--chip); padding: 2px 8px; border-radius: 999px; margin-bottom: 12px;
}
.format-card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.formats__more { margin-top: 24px; font-size: 12px; color: var(--muted); }
.site-footer { text-align: center; color: var(--muted); font-size: 12px; padding: 24px; }

/* Feature grid */
.features {
  display: none !important;
  max-width: 1080px; margin: 0 auto; padding: 8px 24px 72px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
}
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 20px; box-shadow: 0 1px 2px var(--shadow);
}
.card h3 { margin: 8px 0 6px; font-size: 15px; color: var(--text); }
.card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.card .icon {
  width: 36px; height: 36px; border-radius: 8px; background: var(--chip);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
}

/* Auth forms */
.auth-wrap {
  max-width: 400px; margin: 64px auto; padding: 32px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 1px 2px var(--shadow);
}
.auth-wrap h1 { font-size: 20px; margin: 0 0 4px; }
.auth-wrap p.sub { color: var(--muted); font-size: 13px; margin: 0 0 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--line-strong);
  font-size: 14px; background: var(--panel-2); color: var(--text);
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-error {
  background: #fdecea; border: 1px solid #f5c2bd; color: var(--danger);
  padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 16px;
}
.form-actions { margin-top: 24px; }
.form-actions .btn { width: 100%; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }
.btn-google {
  width: 100%;
  min-height: 42px;
  gap: 10px;
  margin: 22px 0 0;
  background: #fff;
  color: var(--text);
  font-weight: 700;
}
.google-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4285f4;
  background: #f7f9fc;
  border: 1px solid var(--line);
  font-weight: 800;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

/* Dashboard (mypage/settings) */
.dashboard {
  max-width: 1080px; margin: 0 auto; padding: 32px 24px 72px;
}
.dashboard__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.dashboard__head h1 { font-size: 22px; margin: 0; }
.dashboard__head p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }

.project-table {
  width: 100%; border-collapse: collapse; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.project-table th, .project-table td {
  text-align: left; padding: 12px 14px; font-size: 13px; border-bottom: 1px solid var(--line);
}
.project-table th { background: var(--panel-2); color: var(--muted); font-weight: 600; }
.project-table tr:last-child td { border-bottom: none; }

.status-badge {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.status-badge.queued, .status-badge.running { background: #fff4e0; color: var(--warn); }
.status-badge.completed { background: #e6f4ea; color: var(--ok); }
.status-badge.failed { background: #fdecea; color: var(--danger); }

.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions .btn { padding: 6px 10px; font-size: 12px; }

.empty-state {
  background: var(--panel); border: 1px dashed var(--line-strong); border-radius: 10px;
  padding: 48px 24px; text-align: center; color: var(--muted);
}

.settings-card { max-width: 480px; }

.dashboard-wide { max-width: 1120px; }
.nav-user { color: var(--muted); font-size: 13px; }
.account-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.summary-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.summary-title { text-align: center; font-weight: 800; font-size: 16px; margin-bottom: 8px; }
.quota-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quota-grid div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: #fff;
}
.quota-grid strong { display: block; font-size: 12px; margin-bottom: 6px; }
.quota-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  border-top: 5px solid #754638;
  padding-top: 5px;
}
.account-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px;
  margin-bottom: 22px;
}
.account-tab {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  color: var(--muted);
}
.account-tab.active {
  background: #191c21;
  color: #fff;
}
.section-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
}
.section-card h2 { margin: 0 0 6px; font-size: 20px; }
.section-note { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.project-list { display: flex; flex-direction: column; gap: 10px; }
.project-row-card {
  display: grid;
  grid-template-columns: 1.6fr 1fr .8fr .7fr .9fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff;
}
.project-cell strong { display: block; font-size: 12px; color: var(--text); margin-bottom: 4px; }
.project-cell span { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
.project-name strong { font-size: 13px; }
.project-actions { display: flex; gap: 8px; justify-content: flex-end; }
.btn-dark { background: #191c21; border-color: #191c21; color: #fff; }
.btn-dark:hover { background: #0f1115; color: #fff; }
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.success-box {
  background: #e6f4ea;
  border-color: #bfe3c9;
  color: var(--ok);
}
.auth-dot { color: var(--muted); margin: 0 6px; }

@media (max-width: 860px) {
  .account-summary, .settings-grid { grid-template-columns: 1fr; }
  .project-row-card { grid-template-columns: 1fr; }
  .project-actions { justify-content: stretch; flex-wrap: wrap; }
  .project-actions .btn { flex: 1; }
}
