/* Salteau Marine Technologies — R&D demo */
:root {
  --navy:    #0E2A4A;
  --navy-2:  #14385f;
  --cyan:    #22B7E0;
  --cyan-2:  #5fd1f0;
  --ink:     #0a1f38;
  --muted:   #5b7390;
  --bg:      #f4f8fb;
  --card:    #ffffff;
  --line:    #e3ebf2;
  --good:    #1f9d55;
  --weak:    #c0392b;
  --shadow:  0 12px 40px -12px rgba(14, 42, 74, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  min-height: 100vh;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Ocean gradient background — mimics the brand sign-in screen */
body.ocean {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(95,209,240,0.55) 0%, rgba(95,209,240,0) 60%),
    radial-gradient(1000px 700px at 110% 110%, rgba(34,183,224,0.45) 0%, rgba(34,183,224,0) 60%),
    linear-gradient(160deg, #1d6fb8 0%, #2c8fd0 35%, #4cb1de 70%, #74cfe7 100%);
  background-attachment: fixed;
}
body.ocean::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    repeating-linear-gradient(115deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(75deg,  rgba(255,255,255,0.04) 0 1px, transparent 1px 14px);
  pointer-events: none;
  z-index: 0;
}

.centered { display: grid; place-items: center; padding: 24px; min-height: 100vh; }

/* ===== Sign-in card (index.html) ===== */
.card {
  position: relative;
  z-index: 1;
  width: 100%; max-width: 420px;
  background: var(--card);
  border-radius: 14px;
  padding: 36px 32px 28px;
  box-shadow: var(--shadow);
  text-align: center;
}
.logo { width: 200px; max-width: 70%; height: auto; margin: 0 auto 18px; display: block; }
.title { margin: 4px 0 4px; color: var(--navy); font-size: 18px; font-weight: 600; letter-spacing: 0.2px; }
.subtitle { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.status { color: var(--muted); margin: 14px 0 0; font-size: 13px; }
.error { color: var(--weak); }

.spinner {
  width: 32px; height: 32px;
  margin: 8px auto 0;
  border-radius: 50%;
  border: 3px solid rgba(34,183,224,0.18);
  border-top-color: var(--cyan);
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Top bar (callback.html) ===== */
.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-logo { height: 28px; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--navy);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-ghost:hover { background: var(--bg); border-color: var(--cyan); color: var(--navy); }

.btn {
  display: inline-block;
  background: var(--navy); color: white;
  text-decoration: none;
  padding: 10px 18px; border-radius: 8px;
  font-size: 14px; font-weight: 600;
}
.btn:hover { background: var(--navy-2); }

/* ===== Page + hero card (callback.html) ===== */
.page {
  position: relative; z-index: 1;
  max-width: 940px;
  margin: 40px auto 24px;
  padding: 0 24px;
}

.hero-card {
  background: var(--card);
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: var(--shadow);
  text-align: center;
  animation: rise 0.5s ease-out both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hero-title {
  margin: 18px 0 6px;
  color: var(--navy);
  font-size: 26px; font-weight: 700; letter-spacing: -0.2px;
}
.hero-sub {
  margin: 0 auto 28px;
  max-width: 620px;
  color: var(--muted);
  font-size: 15px;
}

/* Check mark animation */
.check-wrap { display: inline-block; }
.check { width: 72px; height: 72px; }
.check-circle {
  stroke: var(--good);
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: drawCircle 0.7s ease-out 0.1s forwards;
}
.check-mark {
  stroke: var(--good);
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: drawCheck 0.4s ease-out 0.7s forwards;
}
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck  { to { stroke-dashoffset: 0; } }

/* ===== Grid + panels ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin: 6px 0 22px;
  text-align: left;
}
.panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 18px;
}
.panel-title {
  margin: 0 0 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
}

/* Identity */
.identity { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--cyan));
  color: white;
  display: grid; place-items: center;
  font-weight: 700; font-size: 18px;
  flex-shrink: 0;
}
.name { font-weight: 600; color: var(--navy); font-size: 16px; }
.email { color: var(--muted); font-size: 13px; }

/* Claims chips */
.claims { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink);
}
.chip-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.chip.good .chip-dot { background: var(--good); }
.chip.weak .chip-dot { background: var(--weak); }
.chip-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  padding: 1px 5px;
  border-radius: 4px;
}

/* Meta */
.meta {
  display: grid; grid-template-columns: 1fr; gap: 10px;
  margin: 16px 0 0;
}
.meta > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.meta dt { color: var(--muted); margin: 0; }
.meta dd { margin: 0; color: var(--ink); font-weight: 500; }

/* Raw token */
.raw {
  margin-top: 18px;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
}
.raw summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.raw pre {
  margin: 12px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-all;
}

/* Footer */
.footer {
  position: relative; z-index: 1;
  text-align: center;
  padding: 24px;
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  letter-spacing: 0.05em;
}

/* Responsive tweaks */
@media (max-width: 540px) {
  .hero-card { padding: 30px 22px; }
  .hero-title { font-size: 22px; }
  .topbar { padding: 12px 16px; }
}
