/* ==========================================================================
   1996 catalog-era layout — black page frame, flat tint ribbon cards,
   Arial Black display, Helvetica UI, Times Roman body. No radius, no soft
   shadows, no webfonts. Shared with omertekin2002.github.io.
   ========================================================================== */

:root {
  --red: #e91d2a;
  --white: #ffffff;
  --ink: #000000;
  --yellow: #fcc20f;
  --purple: #6a26a4;
  --link: #0000ee;
  --visited: #551a8b;
  --rule-green: #2f8f2f;

  --tint-olive: #8e8a25;
  --tint-sage: #b3bd95;
  --tint-salmon: #d77a7a;
  --tint-peach: #e6915d;
  --tint-lime: #c0d4a7;
  --tint-sky: #9ab6c8;
  --tint-steel: #a5b8c0;
  --tint-periwinkle: #8c9ae0;

  --font-display: "Arial Black", "Arial Bold", Gadget, Helvetica, sans-serif;
  --font-ui: Helvetica, Arial, sans-serif;
  --font-body: "Times New Roman", Times, serif;

  --frame: 8px;
  --bevel: 2px 2px 0 var(--ink);
}

* {
  box-sizing: border-box;
  border-radius: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 16px;
  background: var(--white);
  color: var(--ink);
  font: 14px/1.4 var(--font-body);
}

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

a {
  color: var(--link);
  text-decoration: underline;
}

a:visited {
  color: var(--visited);
}

a:focus-visible,
button:focus-visible {
  outline: 2px dotted var(--ink);
  outline-offset: 2px;
}

p {
  margin: 0;
}

/* ---------- Page frame ---------- */

.page-frame {
  max-width: 760px;
  margin: 0 auto;
  border: var(--frame) solid var(--ink);
  background: var(--white);
}

/* ---------- Top banner ---------- */

.top-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--white);
}

.wordmark {
  font: 900 36px/1 var(--font-display);
  color: var(--white);
  text-decoration: none;
}

.wordmark:visited {
  color: var(--white);
}

.tagline {
  margin-top: 6px;
  font: 700 16px/1.2 var(--font-ui);
}

.banner-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.sticker-tab {
  display: inline-block;
  padding: 4px 8px;
  background: var(--yellow);
  color: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: inset 1px 1px 0 #fff3c4, inset -1px -1px 0 #9c7600, var(--bevel);
  font: 700 12px/1 var(--font-ui);
  text-decoration: none;
  transform: rotate(-2deg);
}

.sticker-tab:visited {
  color: var(--ink);
}

.sticker-tab:hover {
  transform: rotate(0);
}

.sticker-tab .stripe {
  display: inline-block;
  padding: 1px 4px;
  background: var(--purple);
  color: var(--white);
  font-style: italic;
  text-transform: lowercase;
}

.phone-callout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 4px 8px;
  color: var(--red);
  font: 700 16px/1.2 var(--font-ui);
}

#copyButton {
  padding: 3px 8px;
  background: var(--ink);
  color: var(--white);
  border: 1px solid var(--white);
  font: 700 12px/1 var(--font-ui);
  cursor: pointer;
}

#copyButton:hover {
  background: var(--white);
  color: var(--ink);
}

#copyButton.copied {
  background: var(--yellow);
  color: var(--ink);
  border-color: var(--yellow);
}

/* ---------- Two-column body ---------- */

.layout {
  display: grid;
  grid-template-columns: 28% 1fr;
  align-items: start;
}

/* ---------- Left rail ---------- */

.rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 12px;
  border-right: 1px solid var(--ink);
  position: sticky;
  top: 0;
}

.icon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--ink);
}

.icon-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font: 700 11px/1 var(--font-ui);
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.icon-grid a:nth-child(2n) {
  border-right: 0;
}

.icon-grid a:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.icon-grid a:hover {
  background: var(--yellow);
}

.icon-grid a:hover span {
  text-decoration: underline;
}

.icon-grid svg,
.icon-nav svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(var(--bevel));
}

.icon-grid svg.gh {
  color: var(--ink);
  filter: none;
}

.cta-red {
  padding: 16px;
  background: var(--red);
  color: var(--white);
  border: 1px solid var(--ink);
}

.cta-red p + p {
  margin-top: 10px;
}

.cta-red a,
.cta-red a:visited {
  color: var(--yellow);
  font-weight: 700;
}

.seal-row {
  display: flex;
  margin-top: 16px;
  justify-content: center;
  gap: 12px;
}

.cert-seal {
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  background: var(--red);
  color: var(--white);
  border: 1px solid var(--ink);
  box-shadow: inset 0 0 0 4px var(--red), inset 0 0 0 5px var(--white), var(--bevel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font: 700 8px/1 var(--font-ui);
  text-align: center;
}

.cert-seal:nth-child(2) {
  transform: rotate(8deg);
}

.seal-mid {
  font: 900 18px/1.05 var(--font-display);
}

.seal-mid.word {
  font-size: 13px;
}

.rail-box {
  border: 1px solid var(--ink);
}

.rail-title {
  margin: 0;
  padding: 6px 12px;
  background: var(--ink);
  color: var(--white);
  font: 700 14px/1.2 var(--font-ui);
}

.spec-list {
  margin: 0;
  padding: 8px 12px 8px 28px;
  list-style: square;
}

/* ---------- Main stack ---------- */

.stack {
  padding: 16px;
  min-width: 0;
}

.stack section + section {
  margin-top: 40px;
}

.eyebrow {
  margin: 0 0 32px;
  padding: 24px 16px;
  border: 1px solid var(--ink);
  color: var(--ink);
  font: 900 36px/1 var(--font-display);
  overflow-wrap: anywhere;
}

/* Converts / not-yet boxes */

.rail-title[class*="tint-"] {
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}

/* Ribbon cards */

.ribbon {
  position: relative;
  border: 1px solid var(--ink);
}

.ribbon + .ribbon {
  margin-top: 12px;
}

.ribbon-title {
  margin: 0;
  padding: 6px 12px;
  background: var(--white);
  border-bottom: 1px solid var(--ink);
  font: 700 14px/1.2 var(--font-ui);
}

.ribbon-body {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 12px 16px;
}

.when {
  font: 700 12px/1.4 var(--font-ui);
  white-space: nowrap;
}

.tint-olive { background: var(--tint-olive); }
.tint-sage { background: var(--tint-sage); }
.tint-salmon { background: var(--tint-salmon); }
.tint-peach { background: var(--tint-peach); }
.tint-lime { background: var(--tint-lime); }
.tint-sky { background: var(--tint-sky); }
.tint-steel { background: var(--tint-steel); }
.tint-periwinkle { background: var(--tint-periwinkle); }

/* Shared buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 16px;
  border: 1px solid var(--ink);
  font: 700 12px/1 var(--font-ui);
  text-decoration: none;
  box-shadow: var(--bevel);
  cursor: pointer;
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--yellow);
  color: var(--ink);
}

.new-burst {
  position: absolute;
  right: 12px;
  top: -12px;
  padding: 4px 8px;
  background: var(--yellow);
  border: 1px solid var(--ink);
  box-shadow: var(--bevel);
  font: 700 12px/1 var(--font-ui);
  transform: rotate(15deg);
  z-index: 1;
}

/* ---------- Converter tool ---------- */

.tool-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.upload-zone {
  position: relative;
  min-height: 200px;
  padding: 24px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--white);
  border: 2px dashed var(--ink);
}

.upload-zone:hover,
.upload-zone:focus-within,
.upload-zone.drag-over {
  background: var(--yellow);
  border-style: solid;
}

.file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  filter: drop-shadow(var(--bevel));
}

.upload-text {
  font: 700 16px/1.2 var(--font-ui);
}

.upload-subtext {
  margin-top: 6px;
  color: var(--link);
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--ink);
}

.file-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  filter: drop-shadow(var(--bevel));
}

.file-details {
  flex: 1;
  min-width: 0;
}

.file-name {
  font: 700 14px/1.2 var(--font-ui);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  font-size: 12px;
}

.remove-file {
  padding: 6px 10px;
  background: var(--white);
  border: 1px solid var(--ink);
  box-shadow: var(--bevel);
  font: 700 11px/1 var(--font-ui);
  cursor: pointer;
}

.remove-file:hover {
  background: var(--yellow);
}

.convert-btn {
  align-self: flex-start;
  padding: 10px 20px;
  font-size: 14px;
}

.convert-btn:disabled {
  background: var(--white);
  color: #808080;
  border-color: #808080;
  box-shadow: none;
  cursor: not-allowed;
}

/* 1996-style segmented progress bar */
.progress-bar {
  height: 22px;
  padding: 2px;
  background: var(--white);
  border: 1px solid var(--ink);
  box-shadow: inset 1px 1px 0 #808080;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(90deg, #0a2a6a 0 10px, transparent 10px 12px);
  transition: width 0.3s steps(6);
}

.progress-text {
  margin-top: 6px;
  font: 700 12px/1.2 var(--font-ui);
}

.download-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px 16px;
  background: var(--white);
  border: 1px solid var(--ink);
  text-align: center;
}

.success-icon {
  width: 56px;
  height: 56px;
  filter: drop-shadow(var(--bevel));
}

.success-text {
  font: 900 24px/1.05 var(--font-display);
}

.download-btn {
  padding: 10px 20px;
  font-size: 14px;
}

.convert-another {
  padding: 4px;
  background: none;
  border: 0;
  color: var(--link);
  font: 14px/1.4 var(--font-body);
  text-decoration: underline;
  cursor: pointer;
}

.error-message {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 12px;
  background: var(--yellow);
  border: 1px solid var(--ink);
  box-shadow: var(--bevel);
}

.error-icon {
  padding: 2px 6px;
  background: var(--ink);
  color: var(--yellow);
  font: 700 11px/1.2 var(--font-ui);
}

.hidden {
  display: none !important;
}

/* ---------- Footer ---------- */

.footer-band {
  padding: 16px;
  border-top: 1px solid var(--ink);
  font-size: 12px;
  text-align: center;
}

.icon-nav {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  max-width: 240px;
  margin: 0 auto 16px;
}

.icon-nav::before {
  content: "";
  position: absolute;
  left: 25%;
  right: 25%;
  top: 22px;
  height: 2px;
  background: var(--rule-green);
}

.icon-nav a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font: 700 12px/1 var(--font-ui);
}

.icon-nav svg {
  background: var(--white);
}

.icon-nav a:hover span {
  text-decoration: underline;
}

.legal {
  margin-bottom: 4px;
}

.small-print {
  font-size: 11px;
  line-height: 1.35;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
  body {
    padding: 8px;
  }

  .page-frame {
    border-width: 4px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  /* The tool comes first on small screens; the info rail follows it */
  .rail {
    order: 1;
    position: static;
    border-right: 0;
    border-top: 1px solid var(--ink);
  }

  .icon-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .icon-grid a,
  .icon-grid a:nth-child(2n) {
    border-right: 1px solid var(--ink);
    border-bottom: 0;
  }

  .icon-grid a:last-child {
    border-right: 0;
  }

  .wordmark {
    font-size: 28px;
  }

  .tagline {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0;
  }

  .page-frame {
    border-width: 2px;
  }

  .top-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .banner-right {
    align-items: flex-start;
  }

  .phone-callout {
    padding-left: 0;
  }

  .icon-grid {
    grid-template-columns: 1fr 1fr;
  }

  .icon-grid a,
  .icon-grid a:nth-child(2n) {
    border-right: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
  }

  .icon-grid a:nth-child(2n) {
    border-right: 0;
  }

  .icon-grid a:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .eyebrow {
    font-size: 26px;
    padding: 16px 12px;
    margin-bottom: 16px;
  }

  .stack {
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
