:root {
  --paper: #F5EFE2;
  --paper-deep: #EDE4D0;
  --ink: #14120F;
  --ink-soft: #4A453B;
  --yellow: #FFC933;
  --red: #E5484D;
  --blue: #2F6BFF;
  --green: #1F9D55;
  --white: #FFFDF8;
  --ease: cubic-bezier(0.34, 0.7, 0.13, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--yellow);
  color: var(--ink);
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .wrap {
    padding: 0 44px;
  }
}

.anton {
  font-family: 'Anton', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.mono {
  font-family: 'IBM Plex Mono', 'SF Mono', monospace;
}

/* Halftone dot field */
.dots {
  background-image: radial-gradient(rgba(20, 18, 15, 0.16) 1.3px, transparent 1.3px);
  background-size: 9px 9px;
}

.dots-red {
  background-image: radial-gradient(rgba(229, 72, 77, 0.35) 1.4px, transparent 1.4px);
  background-size: 8px 8px;
}

/* The panel */
.panel {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 10px;
  box-shadow: 7px 7px 0 var(--ink);
}

.panel-flat {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 10px;
}

.lift {
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

@media (hover: hover) {
  .lift:hover {
    transform: translate(-3px, -3px);
    box-shadow: 11px 11px 0 var(--ink);
  }
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
}

.nav .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  max-width: 1180px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .nav .row {
    padding: 14px 44px;
  }
}

.logo {
  font-family: 'Anton', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 24px;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.logo span {
  background: var(--yellow);
  padding: 1px 7px;
  border: 2.5px solid var(--ink);
  border-radius: 6px;
  box-shadow: 3px 3px 0 var(--ink);
  display: inline-block;
}

.nav nav {
  display: none;
  gap: 22px;
}

@media (min-width: 900px) {
  .nav nav {
    display: flex;
  }
}

.nav nav a {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav nav a:hover {
  background: var(--yellow);
  box-shadow: 0 0 0 4px var(--yellow);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--yellow);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 11px 20px;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  cursor: pointer;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--ink);
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn.red {
  background: var(--red);
  color: var(--white);
}

.btn.ghost {
  background: var(--white);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(20, 18, 15, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 15px 15px 0 rgba(20, 18, 15, 0.2);
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.3s var(--ease);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-header {
  background: var(--ink);
  color: var(--paper);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--ink);
}

.modal-header h2 {
  font-family: 'Anton', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.close-btn {
  background: none;
  border: none;
  color: var(--white);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
}

.close-btn:hover {
  color: var(--yellow);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  background: var(--white);
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--yellow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group input::placeholder {
  color: var(--ink-soft);
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 20px;
  border-top: 2.5px dashed rgba(20, 18, 15, 0.25);
}

/* Sections */
section {
  padding: 84px 0;
}

@media (min-width: 768px) {
  section {
    padding: 120px 0;
  }
}

.kick {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--yellow);
  padding: 7px 14px;
  border-radius: 6px;
}

h2.head {
  font-family: 'Anton', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
  letter-spacing: 0.005em;
  margin-top: 20px;
}

h2.head .y {
  background: var(--yellow);
  padding: 0 10px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.lead {
  max-width: 600px;
  color: var(--ink-soft);
  font-size: 19px;
  margin-top: 20px;
}

.lead b {
  color: var(--ink);
}

/* Hero */
.hero {
  padding: 60px 0 90px;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero {
    padding: 80px 0 130px;
  }
}

.hero .grid {
  display: grid;
  gap: 44px;
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 980px) {
  .hero .grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
  }
}

/* Comic cover mock */
.comic-cover {
  width: min(400px, 88vw);
  aspect-ratio: 5/7;
  background: var(--white);
  border: 4px solid var(--ink);
  border-radius: 8px;
  box-shadow: 12px 12px 0 var(--ink);
  position: relative;
  overflow: hidden;
  transform: rotate(1.6deg);
}

.comic-cover .cc-top {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  border-bottom: 4px solid var(--ink);
}

/* Grid layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Buttons */
.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* Loading indicator */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 40px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--ink);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-family: 'Anton', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 28px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Error messages */
.error {
  background: rgba(229, 72, 77, 0.1);
  border: 2px solid var(--red);
  color: var(--red);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.error b {
  font-weight: 700;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--ink);
  color: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
  animation: slideIn 0.3s var(--ease);
  box-shadow: 5px 5px 0 var(--ink);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Mobile nav */
@media (max-width: 900px) {
  .nav .logo {
    font-size: 20px;
  }

  .nav .btn {
    padding: 8px 16px;
    font-size: 14px;
  }
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
select:focus {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
/* Main App Content */
#app {
  min-height: calc(100vh - 200px);
  padding: 40px 0;
}
