/* ============================================================
   WebShapes — Design System
   ============================================================ */

:root {
  --navy:        #0f2d52;
  --navy-mid:    #1a4a7a;
  --blue:        #1a73e8;
  --blue-light:  #4fa3f7;
  --teal:        #0097a7;
  --teal-light:  #e0f7fa;
  --bg:          #f4f7fc;
  --surface:     #ffffff;
  --border:      #dde3ec;
  --text:        #1c2b3a;
  --text-muted:  #5a6e83;
  --success:     #1b8a5a;
  --success-bg:  #e8f6ef;
  --error:       #c0392b;
  --error-bg:    #fdecea;
  --radius:      8px;
  --shadow-sm:   0 1px 4px rgba(0,0,0,.08);
  --shadow:      0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.13);
  --transition:  .2s ease;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  margin: 0;
}

h1,h2,h3,h4 { font-weight: 700; line-height: 1.25; color: var(--text); }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.2rem; }
p  { margin-bottom: .85rem; margin-top: 0; }
a  { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navbar ───────────────────────────────────────────────── */
.ws-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 58px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-mid) 100%);
  display: flex;
  align-items: center;
  padding: 0 28px;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

.ws-nav__brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff !important;
  letter-spacing: .4px;
  text-decoration: none;
  margin-right: 36px;
  white-space: nowrap;
}
.ws-nav__brand span { color: var(--blue-light); }

.ws-nav__links { display: flex; gap: 4px; }
.ws-nav__links a {
  color: rgba(255,255,255,.82);
  font-size: .88rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.ws-nav__links a:hover  { background: rgba(255,255,255,.13); color: #fff; }
.ws-nav__links a.active { background: rgba(255,255,255,.2); color: #fff; }

/* ── Page wrapper ─────────────────────────────────────────── */
.ws-page { padding-top: 58px; }

/* ── Hero ─────────────────────────────────────────────────── */
.ws-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a4a7a 55%, #1565c0 100%);
  padding: 72px 40px 68px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.ws-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('img/graphPaper.jpg') repeat;
  opacity: .04;
  pointer-events: none;
}
.ws-hero__label {
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.9);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
}
.ws-hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: -.5px;
}
.ws-hero h1 span { color: var(--blue-light); }
.ws-hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,.8);
  max-width: 640px;
  margin: 0 auto 28px;
}
.ws-hero__cta {
  display: inline-block;
  background: var(--blue-light);
  color: var(--navy) !important;
  font-weight: 700;
  font-size: .95rem;
  padding: 13px 36px;
  border-radius: 8px;
  text-decoration: none !important;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(79,163,247,.4);
}
.ws-hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79,163,247,.5);
}

/* ── Section ──────────────────────────────────────────────── */
.ws-section {
  padding: 60px 40px;
}
.ws-section--alt { background: #fff; }
.ws-section--dark {
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  color: #fff;
}
.ws-section--dark h2 { color: #fff; }
.ws-section--dark p  { color: rgba(255,255,255,.75); }

.ws-section__title {
  text-align: center;
  margin-bottom: 44px;
}
.ws-section__title h2 { margin-bottom: 10px; }
.ws-section__title p  { color: var(--text-muted); max-width: 560px; margin: 0 auto; }
.ws-section__divider  {
  width: 48px; height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  border-radius: 2px;
  margin: 12px auto 0;
}
.ws-section--dark .ws-section__divider { background: linear-gradient(90deg, var(--blue-light), #80deea); }

/* ── Cards grid ───────────────────────────────────────────── */
.ws-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
  max-width: 1100px;
  margin: 0 auto;
}
.ws-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.ws-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.ws-card__icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.ws-card__icon--blue { background: #e8f0fd; color: var(--blue); }
.ws-card__icon--teal { background: var(--teal-light); color: var(--teal); }
.ws-card__icon--navy { background: #e8edf5; color: var(--navy); }
.ws-card h3 { font-size: 1rem; margin-bottom: 7px; }
.ws-card p  { font-size: .88rem; color: var(--text-muted); margin: 0; }

/* ── Steps ────────────────────────────────────────────────── */
.ws-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  counter-reset: step;
}
.ws-step {
  text-align: center;
  padding: 28px 16px 22px;
  background: rgba(255,255,255,.08);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.12);
  position: relative;
}
.ws-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 28px;
  background: var(--blue-light);
  color: var(--navy);
  font-size: .8rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 28px;
  text-align: center;
}
.ws-step h3 { font-size: .92rem; color: rgba(255,255,255,.92); margin-bottom: 6px; }
.ws-step p  { font-size: .83rem; color: rgba(255,255,255,.62); margin: 0; }

/* ── Fitting cards ────────────────────────────────────────── */
.ws-fitting-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.ws-fitting-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.ws-fitting-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.ws-fitting-card img   { width: 100%; height: 180px; object-fit: cover; display: block; background: var(--bg); }
.ws-fitting-card__body { padding: 18px 20px; }
.ws-fitting-card__body h3 { font-size: 1rem; margin-bottom: 6px; }
.ws-fitting-card__body p  { font-size: .88rem; color: var(--text-muted); margin: 0; }

/* ── Team ─────────────────────────────────────────────────── */
.ws-team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 22px;
  max-width: 960px;
  margin: 0 auto;
}
.ws-team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.ws-team-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.ws-team-card img {
  width: 88px; height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  margin-bottom: 12px;
}
.ws-team-card h3   { font-size: .98rem; margin-bottom: 3px; }
.ws-team-card .role { font-size: .79rem; color: var(--blue); font-weight: 600; margin-bottom: 8px; }
.ws-team-card p    { font-size: .82rem; color: var(--text-muted); margin: 0; line-height: 1.5; }
.ws-team-card a    { color: var(--blue); }

/* ── Footer ───────────────────────────────────────────────── */
.ws-footer {
  background: var(--navy);
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 22px 40px;
  font-size: .82rem;
}
.ws-footer a { color: var(--blue-light); }

/* ── Viz page ─────────────────────────────────────────────── */
.vs-layout {
  display: flex;
  min-height: calc(100vh - 58px);
}

.vs-sidebar {
  width: 300px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(0,0,0,.06);
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  overflow-y: auto;
}

.vs-sidebar__header {
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  padding: 18px 18px 16px;
  color: #fff;
  flex-shrink: 0;
}
.vs-sidebar__header h2 { font-size: .95rem; color: #fff; margin-bottom: 2px; }
.vs-sidebar__header p  { font-size: .76rem; color: rgba(255,255,255,.65); margin: 0; }

.vs-sidebar__body { padding: 16px 16px 8px; flex: 1; overflow-y: auto; }

.vs-field { margin-bottom: 12px; }
.vs-field label {
  display: block;
  font-size: .74rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 4px;
}
.vs-field select {
  width: 100%;
  padding: 8px 28px 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .86rem;
  color: var(--text);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%235a6e83' d='M5 7L0 2h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.vs-field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,115,232,.12);
}

.vs-upload-area {
  display: none;
  margin-top: 8px;
  border: 2px dashed var(--border);
  border-radius: 6px;
  padding: 12px;
  background: var(--bg);
}
.vs-upload-area p {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-align: center;
}
.vs-upload-area input[type=file] {
  width: 100%;
  font-size: .82rem;
  margin-bottom: 8px;
  display: block;
}
.vs-upload-submit {
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 7px 16px;
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background var(--transition);
}
.vs-upload-submit:hover { background: var(--navy-mid); }

.vs-hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

.vs-sidebar__actions {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.vs-btn {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}
.vs-btn--primary {
  background: linear-gradient(135deg, var(--blue) 0%, #1558c0 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(26,115,232,.3);
}
.vs-btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26,115,232,.42);
  color: #fff;
  text-decoration: none;
}
.vs-btn--primary:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none; }
.vs-btn--secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  display: none;
}
.vs-btn--secondary:hover { background: #e8edf5; text-decoration: none; color: var(--text); }

/* Main content */
.vs-main {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  overflow-y: auto;
}

.vs-welcome {
  padding: 48px 48px 36px;
  max-width: 760px;
}
.vs-welcome h2 { margin-bottom: 6px; }
.vs-welcome .subtitle { color: var(--text-muted); margin-bottom: 28px; font-size: .95rem; }

.vs-welcome-steps {
  counter-reset: ws;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}
.vs-welcome-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.vs-welcome-step::before {
  counter-increment: ws;
  content: counter(ws);
  flex-shrink: 0;
  width: 26px; height: 26px;
  background: var(--blue);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.vs-welcome-step p { margin: 0; font-size: .9rem; color: var(--text-muted); }
.vs-welcome-step strong { color: var(--text); }

.vs-sample-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.vs-sample-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 14px;
  font-size: .84rem;
  color: var(--text);
  transition: background var(--transition), border-color var(--transition);
  text-decoration: none;
}
.vs-sample-link:hover { background: #e8f0fd; border-color: var(--blue); color: var(--blue); text-decoration: none; }

/* Progress section */
.vs-progress-area { display: none; padding: 36px 48px 28px; }

.vs-progress-steps {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.vs-progress-step {
  flex: 1;
  padding: 9px 8px;
  font-size: .75rem;
  font-weight: 600;
  text-align: center;
  background: #fff;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  transition: background .3s, color .3s;
  letter-spacing: .2px;
}
.vs-progress-step:last-child { border-right: none; }
.vs-progress-step.active { background: var(--blue); color: #fff; }
.vs-progress-step.done   { background: var(--success); color: #fff; }
.vs-progress-step.error  { background: var(--error); color: #fff; }

.vs-status-msg {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 7px;
  font-size: .9rem;
  font-weight: 500;
}
.vs-status-msg.info    { background: #e8f0fd; color: #1a4a7a; }
.vs-status-msg.success { background: var(--success-bg); color: var(--success); }
.vs-status-msg.error   { background: var(--error-bg); color: var(--error); }

/* Result */
.vs-result-area { display: none; padding: 0 48px 48px; }
.vs-result-area img {
  max-width: 100%;
  max-height: 520px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: block;
}
.vs-result-meta {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.vs-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: .77rem;
  color: var(--text-muted);
  font-weight: 500;
}
.vs-badge--blue { background: #e8f0fd; color: var(--blue); border-color: #c5d9f8; }

/* Spinner */
.spinner {
  display: inline-block;
  width: 15px; height: 15px;
  border: 2.5px solid rgba(26,115,232,.2);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
.spinner--white {
  border-color: rgba(255,255,255,.3);
  border-top-color: #fff;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* About page */
.ws-about-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 56px 40px 48px;
  text-align: center;
  color: #fff;
}
.ws-about-hero h1 { font-size: 2.2rem; color: #fff; margin-bottom: 12px; }
.ws-about-hero p  { color: rgba(255,255,255,.72); max-width: 580px; margin: 0 auto; }

/* Info block on about page */
.ws-info-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px;
  max-width: 820px;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
}
.ws-info-block h2 { margin-bottom: 16px; }
.ws-info-block p  { color: var(--text-muted); }

@media (max-width: 768px) {
  .ws-hero h1 { font-size: 2rem; }
  .ws-hero    { padding: 50px 24px 44px; }
  .vs-layout  { flex-direction: column; }
  .vs-sidebar { width: 100%; height: auto; position: static; }
  .ws-section { padding: 40px 20px; }
  .vs-welcome, .vs-progress-area, .vs-result-area { padding-left: 20px; padding-right: 20px; }
}
