/* heic-to.app — static styles, no framework */

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/instrument-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

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

[hidden] { display: none !important; }

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

body {
  background: #FFFFFF;
  color: #18181B;
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
}

a { color: #2563EB; text-decoration: none; }
a:hover { text-decoration: underline; }

.page {
  max-width: 1080px;
  margin: 0 auto;
}

.hl { color: #2563EB; }

/* Header */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 56px;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: #18181B;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #2563EB;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.header-links { display: flex; gap: 8px; font-size: 13px; font-weight: 600; }
.header-links a {
  color: #2563EB;
  background: #EFF6FF;
  border-radius: 999px;
  padding: 7px 16px;
  transition: background .15s;
}
.header-links a:hover { background: #DBEAFE; text-decoration: none; }

/* Hero + widget */

.hero {
  padding: 72px 56px 56px;
  max-width: 860px;
  margin: 0 auto;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: 44px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.hero-sub {
  margin: 0 0 40px;
  font-size: 18px;
  line-height: 1.6;
  color: #52525B;
  max-width: 640px;
}

.widget {
  background: #fff;
  border: 1px solid #E4E4E7;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -12px rgba(0,0,0,.08);
}

.widget-label {
  font-size: 13px;
  font-weight: 600;
  color: #71717A;
  letter-spacing: .02em;
}

.format-switcher {
  display: flex;
  gap: 0;
  background: #F4F4F5;
  border-radius: 10px;
  padding: 3px;
}

.format-pill {
  cursor: pointer;
  padding: 8px 20px;
  font: 600 14px 'Instrument Sans', sans-serif;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #71717A;
  transition: all .15s;
}

.format-pill.active {
  background: #fff;
  color: #18181B;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

.dropzone {
  cursor: pointer;
  border: 1.5px dashed #93C5FD;
  border-radius: 24px;
  padding: 56px 32px;
  text-align: center;
  background: linear-gradient(180deg, #EFF6FF, #E0EAFF);
  transition: all .2s;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.dragover {
  border-color: #2563EB;
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
  outline: none;
}

.dropzone-title { font-size: 17px; font-weight: 600; color: #1E3A8A; }

.dropzone-or {
  margin: 12px 0;
  font-size: 13px;
  color: #7E9BD1;
}

.dropzone-caption {
  margin-top: 16px;
  font-size: 14px;
  color: #5A74A8;
}

/* Buttons */

.btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 600 14px 'Instrument Sans', -apple-system, sans-serif;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  transition: background .15s, color .15s, border-color .15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }

.btn-primary {
  background: #2563EB;
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(37,99,235,.55);
}
.btn-primary:hover { background: #1D4ED8; }

.btn-ghost {
  background: transparent;
  color: #52525B;
  border: 1px solid #E4E4E7;
}
.btn-ghost:hover { border-color: #A1A1AA; color: #18181B; }

.btn-convert {
  margin-top: 18px;
  padding: 12px 32px;
  background: #2563EB;
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(37,99,235,.55);
}
.btn-convert:hover:not(:disabled) { background: #1D4ED8; }

/* Selected-file stage */

.stage { text-align: center; }

.preview-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: #FAFAFA;
  border: 1px solid #F0F0EF;
  border-radius: 12px;
}

.preview-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: #EFF6FF;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid #BFDBFE;
  border-top-color: #2563EB;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

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

.preview-meta { flex: 1; min-width: 0; }

.file-name {
  font-size: 14.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-info {
  margin-top: 2px;
  font-size: 13px;
  color: #71717A;
}

.btn-remove {
  cursor: pointer;
  border: none;
  background: #F4F4F5;
  color: #71717A;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 13px;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.btn-remove:hover { background: #FEE2E2; color: #B91C1C; }

.stage-format {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.file-progress {
  height: 4px;
  background: #E4E4E7;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 18px;
}

.file-progress-bar {
  height: 100%;
  background: #2563EB;
  width: 0%;
  transition: width .3s;
}

.file-progress-bar.indeterminate {
  width: 40% !important;
  animation: indeterminate 1.1s ease-in-out infinite;
}

@keyframes indeterminate {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

.result-row {
  margin-top: 18px;
  padding: 14px;
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.result-status {
  font-size: 14px;
  font-weight: 600;
  color: #2563EB;
  overflow-wrap: anywhere;
  min-width: 0;
}

.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.file-error {
  margin-top: 18px;
  padding: 12px 14px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #B91C1C;
  border-radius: 10px;
  font-size: 14px;
}

.widget-footer {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  justify-content: center;
  font-size: 12px;
  color: #A1A1AA;
}

/* SEO content */

.content {
  padding: 24px 56px 64px;
  max-width: 760px;
  margin: 0 auto;
}

.content h2 {
  margin: 40px 0 14px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.content > *:first-child,
.content section:first-child h2 { margin-top: 0; }

.content p {
  margin: 0 0 12px;
  font-size: 15.5px;
  line-height: 1.7;
  color: #3F3F46;
}
.content p:last-child { margin-bottom: 0; }

.steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.steps-list li {
  counter-increment: steps;
  display: flex;
  gap: 14px;
  font-size: 15.5px;
  line-height: 1.6;
  color: #3F3F46;
}

.steps-list li::before {
  content: counter(steps);
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #EFF6FF;
  color: #2563EB;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.format-card {
  background: #fff;
  border: 1px solid #E4E4E7;
  border-radius: 12px;
  padding: 20px;
}

.format-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.format-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #52525B;
}

.faq-list { display: flex; flex-direction: column; gap: 0; }

.faq-item {
  padding: 18px 0;
  border-top: 1px solid #EDEDEB;
}
.faq-item:last-child { border-bottom: 1px solid #EDEDEB; }

.faq-item h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
}

.faq-item p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: #52525B;
}

/* Footer */

.site-footer {
  padding: 22px 56px;
  border-top: 1px solid #EDEDEB;
  font-size: 13px;
  color: #A1A1AA;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a { color: #71717A; }
.footer-links a:hover { color: #2563EB; }

/* 404 page */

.not-found {
  padding: 72px 56px;
  text-align: center;
}
.not-found h1 { font-size: 32px; margin-bottom: 12px; }
.not-found p { color: #52525B; margin-bottom: 24px; }
.not-found .footer-links { justify-content: center; display: flex; }

/* Responsive */

@media (max-width: 720px) {
  .site-header { padding: 16px 20px; }

  .hero { padding: 40px 20px 32px; }
  .hero h1 { font-size: 30px; }
  .hero-sub { font-size: 16px; margin-bottom: 28px; }

  .widget { padding: 18px; }
  .dropzone { padding: 36px 16px; border-radius: 20px; }

  .result-row {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .result-actions { flex-direction: column; }

  .content { padding: 8px 20px 40px; }
  .content h2 { font-size: 22px; margin-top: 32px; }

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

  .site-footer { padding: 18px 20px; flex-direction: column; gap: 8px; }
}
