/*
 * Tesseract: visual identity of the skymed.app.br site (skymed.app.br/src/index.css).
 * Dark theme by default; light follows the system preference.
 * Fonts served locally (SIL Open Font License 1.1): no third-party requests.
 */

@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('fonts/sora.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/jetbrains-mono.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  --bg: #0B0F1A;
  --bg-hero: linear-gradient(135deg, #0B0F1A 0%, #0F172A 50%, #0B1628 100%);
  --card: #111827;
  --field: #0B0F1A;
  --teal: #00D4A1;
  --teal-hover: #00F0B5;
  --teal-muted: rgba(0, 212, 161, 0.1);
  --teal-text: #00D4A1;
  --on-teal: #0B0F1A;
  --text: #F8FAFC;
  --text-2: #94A3B8;
  --text-3: #64748B;
  /* small labels: #94A3B8 on dark to pass AA (the site's #64748B is ~3.5:1 on the card) */
  --label: #94A3B8;
  --border: rgba(148, 163, 184, 0.12);
  --border-hover: rgba(0, 212, 161, 0.3);
  --error-text: #F87171;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 60px rgba(0, 212, 161, 0.15);
  --glow: radial-gradient(ellipse at center, rgba(0, 212, 161, 0.08) 0%, transparent 70%);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #FFFFFF;
    --bg-hero: linear-gradient(135deg, #FFFFFF 0%, #F1F5F9 50%, #ECFDF5 100%);
    --card: #FFFFFF;
    --field: #F8FAFC;
    --teal-text: #00795C;
    --text: #0B0F1A;
    --text-2: #475569;
    --label: #64748B;
    --border: rgba(15, 23, 42, 0.10);
    --error-text: #DC2626;
    --shadow-card: 0 4px 24px rgba(15, 23, 42, 0.08);
  }
}

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

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--bg-hero);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  left: 50%;
  top: -10vh;
  width: 900px;
  max-width: 160vw;
  height: 70vh;
  transform: translateX(-50%);
  background: var(--glow);
  pointer-events: none;
}

.mono { font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace; }

.page {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: 56px 16px 40px;
}

/* ---- Brand ---- */

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 28px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
  border-radius: 6px;
}

.logo-sky {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.025em;
  color: var(--text);
}
.logo-sky span { color: var(--teal-text); }

.logo-tagline {
  margin-top: 2px;
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  line-height: 1;
}

.product {
  padding-left: 14px;
  border-left: 1px solid var(--border);
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-2);
}

/* ---- Card ---- */

.card {
  margin: 0;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.card > :last-child { margin-bottom: 0; }

h1 {
  margin: 0 0 22px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
}

.field { display: block; margin-bottom: 20px; }

.label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--label);
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.label-row .label { margin-bottom: 0; }

textarea, input[type='text'] {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { min-height: 148px; resize: vertical; }
input[type='text'] { font-size: 16px; letter-spacing: 0.04em; }

textarea::placeholder, input::placeholder { color: var(--text-3); opacity: 1; }

textarea:focus, input[type='text']:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 1px rgba(0, 212, 161, 0.5);
}

input[aria-invalid='true'] { border-color: var(--error-text); }

.value {
  margin: 0;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.value.link { font-size: 13px; }
.value.key { font-size: 17px; letter-spacing: 0.06em; color: var(--teal-text); }
.value.secret { white-space: pre-wrap; max-height: 320px; overflow: auto; }

/* ---- Buttons (variants of the site's Button.jsx) ---- */

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  color: var(--on-teal);
  text-decoration: none;
  background: var(--teal);
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.button:hover { background: var(--teal-hover); box-shadow: var(--shadow-glow); }
.button:disabled { opacity: 0.6; cursor: progress; box-shadow: none; }

.button.secondary {
  color: var(--text);
  background: transparent;
  border-color: var(--border);
}
.button.secondary:hover { color: var(--teal-text); border-color: var(--border-hover); box-shadow: none; }

.copy {
  padding: 5px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal-text);
  background: transparent;
  border: 1px solid var(--teal);
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.copy:hover { color: var(--on-teal); background: var(--teal); }
.copy.copied { color: var(--on-teal); background: var(--teal); }

.button:focus-visible, .copy:focus-visible, .logo:focus-visible {
  outline: 2px solid var(--teal-text);
  outline-offset: 3px;
}

/* ---- Messages ---- */

.note { margin: 0 0 22px; font-size: 13px; color: var(--text-2); }
.note.flush { margin: 0; font-size: 15px; }
.note time { font-variant-numeric: tabular-nums; color: var(--text); }

.error { margin: -6px 0 18px; font-size: 14px; font-weight: 500; color: var(--error-text); }

@media (max-width: 420px) {
  .page { padding-top: 32px; }
  .card { padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
