/* ── tap-aws.link — NFC Digital Business Card ── */
/* AWS rebrand: dark theme, no orange, Amazon Ember */

:root {
  --bg-primary: #0a0e17;
  --bg-card: #131a2b;
  --bg-input: #1a2236;
  --bg-hover: #1f2b42;
  --border: #243049;
  --border-focus: #539fe5;
  --text-primary: #f2f3f5;
  --text-secondary: #8d99ae;
  --text-muted: #5a6577;
  --accent: #539fe5;
  --accent-hover: #6cb1f0;
  --accent-subtle: rgba(83,159,229,0.12);
  --success: #2ecc71;
  --danger: #e74c3c;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --font: 'Amazon Ember', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.container { max-width: 520px; margin: 0 auto; padding: 32px 20px 60px; }

/* ── Header ── */
.header { text-align: center; margin-bottom: 32px; }
.header .logo {
  font-size: 14px; font-weight: 500; letter-spacing: 2px;
  color: var(--accent); margin-bottom: 6px; text-transform: uppercase;
}
.header h1 { font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.header p { font-size: 13px; color: var(--text-secondary); }

/* ── Card ── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 16px;
}
.card-title {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--accent); margin-bottom: 16px; text-transform: uppercase;
}

/* ── Form ── */
label {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 4px;
}
.optional { color: var(--text-muted); font-weight: 400; }
input, textarea {
  width: 100%; padding: 10px 14px; font-size: 14px; font-family: var(--font);
  background: var(--bg-input); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  outline: none; margin-bottom: 14px; transition: border-color 0.2s;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:focus, textarea:focus { border-color: var(--border-focus); }
textarea { resize: vertical; min-height: 70px; }

.row { display: flex; gap: 12px; }
.row > div { flex: 1; }

/* ── Photo upload ── */
.photo-upload {
  display: flex; align-items: center; gap: 16px; margin-bottom: 14px;
}
.photo-preview {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--bg-input); border: 2px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0; cursor: pointer; transition: border-color 0.2s;
}
.photo-preview:hover { border-color: var(--accent); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview .placeholder { font-size: 24px; color: var(--text-muted); }
.photo-upload input[type="file"] { display: none; }
.photo-upload .upload-text { font-size: 12px; color: var(--text-secondary); }
.photo-upload .upload-text span { color: var(--accent); cursor: pointer; }
.photo-upload .upload-text span:hover { text-decoration: underline; }

/* ── Buttons ── */
.btn {
  width: 100%; padding: 13px; font-size: 15px; font-weight: 600;
  font-family: var(--font); border: none; border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.2s;
}
.btn-primary {
  background: var(--accent); color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-secondary {
  background: transparent; color: var(--accent);
  border: 1px solid var(--border); margin-top: 10px;
}
.btn-secondary:hover { background: var(--accent-subtle); }

/* ── Preview Card ── */
#preview { display: none; }
#preview.show { display: block; }

.preview-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 16px;
}
.preview-banner {
  height: 80px;
  background: linear-gradient(135deg, #131a2b 0%, #1a2a4a 50%, #243049 100%);
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
}
.preview-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid rgba(83,159,229,0.4); background: var(--bg-input);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.preview-avatar img { width: 100%; height: 100%; object-fit: cover; }
.preview-avatar .initials {
  font-size: 18px; font-weight: 700; color: var(--accent);
}
.preview-banner-info { display: flex; flex-direction: column; }
.preview-banner-name { font-size: 16px; font-weight: 700; color: #fff; }
.preview-banner-title { font-size: 12px; color: #8e8e93; margin-top: 1px; }
.preview-banner-company { font-size: 12px; color: var(--accent); margin-top: 1px; }
.preview-body { padding: 16px 24px 24px; }
.preview-name { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.preview-title { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.preview-company { font-size: 13px; color: var(--accent); margin-top: 1px; }

.preview-links { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.preview-link {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--bg-input); border-radius: var(--radius-sm);
  text-decoration: none; color: var(--text-primary); font-size: 14px;
  border: 1px solid transparent; transition: all 0.2s;
}
.preview-link:hover { border-color: var(--accent); background: var(--bg-hover); }
.preview-link .icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.preview-link .link-label { font-size: 11px; color: var(--text-muted); }
.preview-link .link-value { font-size: 14px; color: var(--text-primary); word-break: break-all; }
.preview-link-info { display: flex; flex-direction: column; }

/* ── Actions bar ── */
.actions { display: flex; gap: 10px; margin-top: 16px; }
.actions .btn { flex: 1; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--success); color: #fff; padding: 10px 24px;
  border-radius: 20px; font-size: 13px; font-weight: 500;
  opacity: 0; transition: opacity 0.3s; pointer-events: none; z-index: 100;
}
.toast.show { opacity: 1; }

/* ── Footer ── */
.footer {
  text-align: center; padding: 24px 0; font-size: 11px; color: var(--text-muted);
}
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 480px) {
  .container { padding: 20px 16px 40px; }
  .row { flex-direction: column; gap: 0; }
  .preview-name { font-size: 18px; }
}
