/* Artbeat Pre-Flight – Premium minimalist (Apple / Everlane style) */
/* Deep Charcoal primary; Brand Red <20% as accent. No shadows, no swooshes. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #1a1a1a;
  --fg: #fafafa;
  --border: #2d2d2d;
  --muted: #a3a3a3;
  --muted-bg: #262626;
  --brand-red: #c41e3a;
  --brand-red-hover: #e02445;
  --radius: 0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

.hidden {
  display: none !important;
}

.page {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Header */
header {
  border-bottom: 1px solid var(--border);
}

header .inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-artbeat {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--brand-red);
}

.logo-studios {
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--muted);
  margin-left: 0.25rem;
}

.header-tag {
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

/* Main */
main {
  padding: 3rem 0 4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.state-panel {
  animation: fadeIn 0.3s ease;
}

.state-panel-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intake-content {
  width: 100%;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--fg);
}

.hero p {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 28rem;
  margin: 0 auto;
  line-height: 1.6;
}

/* Alerts */
.alert {
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  border: 1px solid;
}

.alert-success {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.4);
  transition: opacity 0.5s ease, margin 0.5s ease;
}

.alert-success.fade-out {
  opacity: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

/* Drop zone */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--muted);
  background: var(--muted-bg);
}

.dropzone-icon {
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.dropzone-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--muted);
}

.dropzone:hover .dropzone-icon,
.dropzone.dragover .dropzone-icon {
  border-color: var(--fg);
}

.dropzone:hover .dropzone-icon svg,
.dropzone.dragover .dropzone-icon svg {
  color: var(--fg);
}

.dropzone p {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
}

.dropzone .hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.dropzone input[type="file"] {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

/* Processing – geometric animation */
.processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
}

.processing-rings {
  position: relative;
  width: 5rem;
  height: 5rem;
  margin-bottom: 2rem;
}

.ring {
  position: absolute;
  border: 1px solid var(--muted);
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.ring-1 { animation: spin 4s linear infinite; }
.ring-2 { inset: 0.5rem; animation: spin 6s linear infinite reverse; }
.ring-3 { inset: 1rem; animation: spin 3s linear infinite; }

.ring-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.5rem;
  height: 0.5rem;
  margin: -0.25rem 0 0 -0.25rem;
  background: var(--brand-red);
  border-radius: 50%;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.processing-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin: 0 0 1rem;
}

.processing-status {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 1rem 0 0;
  min-height: 1.5em;
}

.processing-bar {
  width: 12rem;
  height: 1px;
  background: var(--border);
  overflow: hidden;
}

.processing-bar-fill {
  height: 100%;
  width: 33%;
  background: var(--fg);
  animation: barMove 1.5s ease-in-out infinite;
}

@keyframes barMove {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

/* Results */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.results-header h2 {
  font-size: 1.125rem;
  font-weight: 500;
  margin: 0;
  color: var(--fg);
}

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.25rem 0;
}

.link-btn:hover {
  color: var(--fg);
}

/* Comparison slider */
.comparison {
  margin-bottom: 3rem;
}

.comparison-labels {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.comparison-tag {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.comparison-tag-after {
  color: var(--brand-red);
}

.comparison-desc {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0.25rem 0 0;
}

.comparison-labels-after {
  text-align: right;
}

/* Before/After: layered images with draggable middle line (split-view) */
.slider-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: col-resize;
  user-select: none;
}

.slider-download-hint {
  display: block;
  position: relative;
  z-index: 20;
  width: 100%;
  margin: 0.75rem 0 1rem 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(163, 163, 163, 0.98);
  text-align: center;
}

.slider-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* fill the full slider width */
  pointer-events: none;
}

.slider-img-after {
  z-index: 0;
}

.slider-img-before {
  z-index: 1;
  clip-path: inset(0 50% 0 0);
}

.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--fg);
  z-index: 10;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-handle::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2rem;
  height: 2rem;
  margin: -1rem 0 0 -1rem;
  border: 1px solid var(--fg);
  background: var(--bg);
}

.slider-handle::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 0.75rem;
  margin: -0.375rem 0 0 -1px;
  background: var(--fg);
  box-shadow: 3px 0 0 var(--fg);
}

.slider-dim {
  position: absolute;
  bottom: 0.75rem;
  padding: 0.25rem 0.5rem;
  font-size: 10px;
  z-index: 10;
}

.slider-dim-original {
  left: 0.75rem;
  background: rgba(0,0,0,0.8);
  color: var(--fg);
}

.slider-dim-enhanced {
  right: 0.75rem;
  background: var(--brand-red);
  color: #fff;
}

.loupe-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.loupe-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.375rem 0.75rem;
  cursor: pointer;
}

.loupe-btn:hover,
.loupe-btn.active {
  border-color: var(--fg);
  color: var(--fg);
}

/* Loupe overlay */
.loupe {
  position: fixed;
  width: 8rem;
  height: 8rem;
  border: 2px solid var(--fg);
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
  background: var(--bg);
}

.loupe-inner {
  position: absolute;
  top: 0;
  left: 0;
}

.loupe-inner img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.loupe-crosshair {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(196, 30, 58, 0.5);
  pointer-events: none;
}

.loupe-crosshair::before,
.loupe-crosshair::after {
  content: '';
  position: absolute;
  background: var(--brand-red);
  opacity: 0.5;
}

.loupe-crosshair::before {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-50%);
}

.loupe-crosshair::after {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  transform: translateY(-50%);
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

/* Technical table */
.tech-section {
  margin-bottom: 2rem;
}

.tech-title {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.tech-table {
  border: 1px solid var(--border);
}

.tech-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 1px solid var(--border);
}

.tech-row:last-child {
  border-bottom: none;
}

.tech-header .tech-cell {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.tech-cell {
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  border-right: 1px solid var(--border);
}

.tech-cell:last-child {
  border-right: none;
}

.tech-cell-optimized {
  color: var(--brand-red);
  font-weight: 500;
}

.tech-status {
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.tech-pass {
  background: #22c55e;
}

.tech-fail {
  background: var(--brand-red);
}

.tech-warn {
  background: #eab308;
}

/* Printable sizes table – column widths match technical analysis table (1fr 1fr 1fr) */
.print-sizes-section {
  margin-top: 2rem;
}

.print-sizes-section .tech-subtitle {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: -0.5rem 0 1rem;
}

.print-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
}

.print-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.print-table thead th {
  width: 33.333%;
}

.print-table th,
.print-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  box-sizing: border-box;
}

.print-table th:last-child,
.print-table td:last-child {
  border-right: none;
}

.print-table th {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.print-table td.print-yes {
  color: #22c55e;
}

.print-table td.print-no {
  color: var(--muted);
}

.print-table td.print-after-only {
  color: var(--brand-red);
  font-weight: 500;
}

/* CTA section */
.cta-section {
  text-align: center;
  padding: 0 0 2rem;
}

.cta-mission {
  font-size: 0.75rem;
  font-style: italic;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 0.25rem;
}

.cta-tagline {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.8;
  margin: 0 0 2rem;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--fg);
  color: var(--bg);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-cta:hover {
  opacity: 0.9;
}

.btn-arrow {
  font-size: 1rem;
}

.link-secondary {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-secondary:hover {
  color: var(--fg);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 36rem;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2.5rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--fg);
}

.modal-box h3 {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

/* Legal modal (Terms / Privacy) */
.legal-modal-box {
  max-width: 42rem;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.legal-modal-box .modal-close {
  flex-shrink: 0;
}

.legal-modal-box h3 {
  flex-shrink: 0;
}

.legal-modal-body {
  overflow-y: auto;
  padding-right: 0.25rem;
  margin: 0 -0.25rem 0 0;
}

.legal-content {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--fg);
}

.legal-content h4 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.5rem 0 0.5rem;
}

.legal-content h4:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content ul {
  margin: 0 0 0.75rem;
}

.legal-content ul {
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.25rem;
}

.legal-content a {
  color: var(--brand-red);
  text-decoration: underline;
}

.legal-content a:hover {
  color: var(--brand-red-hover);
}

.legal-source {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Footer links */
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.footer-link {
  color: var(--muted);
  text-decoration: none;
}

.footer-link:hover {
  color: var(--brand-red);
}

.btn-reset {
  display: block;
  margin: 0 auto 1rem;
  padding: 0.5rem 1rem;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
}

.btn-reset:hover {
  border-color: var(--muted);
  color: var(--fg);
}

.form-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg);
}

.form-group input {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  background: var(--muted-bg);
  color: var(--fg);
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: var(--muted);
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary {
  background: var(--fg);
  color: var(--bg);
}

.btn-primary:hover {
  opacity: 0.9;
}

.submit-row {
  margin-top: 1.5rem;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  margin-top: auto;
}

footer .inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

footer span {
  font-size: 10px;
  color: var(--muted);
}
