@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Source+Serif+4:wght@600;700&display=swap');

:root {
  --bg: #f7f4ee;
  --surface: #fffdf9;
  --text: #1f2328;
  --muted: #6b7280;
  --primary: #0f4c5c;
  --primary-strong: #0a3a46;
  --accent: #b07a3f;
  --line: #e8dfd2;
  --radius: 12px;
  --shadow: 0 8px 30px rgba(31, 35, 40, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans SC', sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(176, 122, 63, 0.12), transparent 55%),
    radial-gradient(900px 400px at 0% 5%, rgba(15, 76, 92, 0.1), transparent 60%),
    var(--bg);
  line-height: 1.55;
}

a {
  color: inherit;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background: rgba(247, 244, 238, 0.9);
  border-bottom: 1px solid rgba(232, 223, 210, 0.7);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 12px;
}

.brand {
  text-decoration: none;
  display: grid;
  gap: 2px;
}

.brand-mark {
  font: 700 1.2rem 'Source Serif 4', serif;
  letter-spacing: 0.4px;
}

.brand-sub {
  font-size: 0.76rem;
  color: var(--muted);
}

.main-nav {
  display: flex;
  gap: 18px;
  font-size: 0.95rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--muted);
}

.main-nav a:hover {
  color: var(--text);
}

.hero {
  padding: 68px 0 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font: 700 clamp(1.9rem, 4vw, 3rem) 'Source Serif 4', serif;
  line-height: 1.15;
}

h2 {
  font: 700 clamp(1.5rem, 2.6vw, 2rem) 'Source Serif 4', serif;
}

.hero-copy {
  margin: 14px 0 18px;
  color: var(--muted);
  max-width: 58ch;
}

.hero-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #fffefb, #faf4ea);
  box-shadow: var(--shadow);
  padding: 24px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.hero-card-title {
  margin: 0;
  font: 700 1.24rem 'Source Serif 4', serif;
}

.section {
  padding: 42px 0;
}

.section-head {
  margin-bottom: 20px;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.upload-card,
.result-card,
.compare-card,
.faq-item {
  padding: 18px;
}

.upload-zone {
  display: grid;
  border: 1px dashed #c8b7a0;
  border-radius: 12px;
  min-height: 150px;
  cursor: pointer;
  place-items: center;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.8), rgba(248, 244, 236, 0.8));
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.upload-zone input {
  display: none;
}

.upload-title {
  margin: 0;
  font-weight: 600;
}

.upload-tip {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.file-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.preview,
.result-preview {
  width: 100%;
  border-radius: 10px;
  margin-top: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.controls {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

label > span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.92rem;
}

select,
input[type='range'] {
  width: 100%;
}

select {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  min-height: 40px;
  padding: 0 10px;
  font: inherit;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 42px;
  padding: 8px 10px;
  background: #fff;
}

.switch-row span {
  margin: 0;
}

.advanced {
  margin-top: 12px;
}

.advanced summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 600;
}

.advanced-grid {
  margin-top: 10px;
  display: grid;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  border: 1px solid transparent;
  min-height: 42px;
  padding: 0 14px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-strong);
}

.btn-secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
}

.btn.full {
  width: 100%;
  margin-top: 14px;
}

.btn.disabled {
  pointer-events: none;
  opacity: 0.45;
}

.status {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.progress {
  margin-top: 10px;
  width: 100%;
  height: 8px;
  background: #ebe4d8;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.2s linear;
}

.skeleton {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  background: linear-gradient(120deg, #f2ece2 25%, #f9f5ee 40%, #f2ece2 55%);
  background-size: 220% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  to {
    background-position: -120% 0;
  }
}

.download-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

.result-meta {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.compare {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.compare-before,
.compare-after {
  display: block;
  width: 100%;
}

.compare-after-wrap {
  position: absolute;
  inset: 0 auto 0 0;
  overflow: hidden;
  border-right: 2px solid var(--accent);
}

.compare-after {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-range {
  width: 100%;
  margin-top: 8px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
}

.faq-item p {
  margin: 8px 0 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 18px 0 28px;
  margin-top: 30px;
}

.footer-wrap {
  color: var(--muted);
  font-size: 0.88rem;
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  .main-nav {
    display: none;
  }

  .hero {
    padding-top: 38px;
  }

  .hero-grid,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .download-actions {
    flex-direction: column;
  }
}
