:root {
  --bg: #f9f6f0;
  --bg-soft: #ffffff;
  --ink: #1a1814;
  --muted: #6b635a;
  --accent: #d95c2c;
  --accent-deep: #b84518;
  --accent-light: #fcece6;
  --card: #ffffff;
  --line: #e8dfd1;
  --shadow-sm: 0 4px 12px rgba(26, 24, 20, 0.05);
  --shadow-md: 0 12px 32px rgba(26, 24, 20, 0.08);
  --shadow-lg: 0 24px 64px rgba(26, 24, 20, 0.12);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --font-sans: "Space Grotesk", system-ui, sans-serif;
  --font-serif: "Fraunces", Georgia, serif;
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-sans);
  background: radial-gradient(circle at 15% 15%, #ffe4c8 0%, transparent 38%),
    radial-gradient(circle at 88% 12%, #ffd7c8 0%, transparent 33%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  line-height: 1.6;
}

.background-glow {
  position: fixed;
  inset: auto -10vw -22vh auto;
  width: 46vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(217, 92, 44, 0.15) 0%, rgba(217, 92, 44, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4 {
  margin-top: 0;
  font-family: var(--font-serif);
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin: 1.2rem 0;
  max-width: 14ch;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  margin-bottom: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 1rem;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1200px, 92vw);
  margin: 1rem auto;
  padding: 0.8rem 1.2rem;
  border: 1px solid rgba(232, 223, 209, 0.6);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
}

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
}

nav a:hover {
  color: var(--ink);
}

/* Hero Section */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin: 0;
  padding: 0.4rem 1rem;
  border: 1px solid var(--accent-light);
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent-deep);
  font-size: 0.9rem;
  font-weight: 600;
}

.lead {
  max-width: 64ch;
  margin: 0 auto 2.5rem;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

/* Buttons */
.btn {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(217, 92, 44, 0.25);
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  background: var(--accent-deep);
  box-shadow: 0 6px 20px rgba(217, 92, 44, 0.35);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn-small {
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg);
  border-color: var(--muted);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 4px 14px rgba(26, 24, 20, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background: #000;
  box-shadow: 0 6px 20px rgba(26, 24, 20, 0.3);
}

.btn-full {
  width: 100%;
}

.btn:disabled,
.btn-ghost:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
  transform: none;
}

/* Trust Badges */
.trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.trust li {
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

/* Sections & Grids */
section {
  padding: 4rem 0;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.cards,
.steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.step {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}

.card:hover,
.step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card p,
.step p {
  margin: 0;
  color: var(--muted);
}

.step span {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 4px 12px rgba(217, 92, 44, 0.3);
}

/* Tool Section */
.tool-section {
  padding-top: 2rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

.tool-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
}

.tool-header {
  margin-bottom: 2rem;
}

.tool-header h2 {
  margin-bottom: 0.5rem;
}

.tool-note {
  color: var(--muted);
  margin: 0;
  font-size: 1.05rem;
}

/* Form Elements */
.form-group {
  margin-bottom: 2rem;
}

.examples-wrap {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.examples-title {
  margin: 0 0 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.examples-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
  background: var(--accent-light);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--ink);
}

textarea,
select,
input[type="number"],
input[type="text"] {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  padding: 0.8rem 1rem;
  font: inherit;
  background: var(--bg-soft);
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}

textarea:focus,
select:focus,
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

textarea {
  resize: vertical;
  min-height: 200px;
  line-height: 1.6;
}

.input-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.setting-group {
  display: flex;
  flex-direction: column;
}

.dimension-hint {
  margin: -0.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

.demo-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.secondary-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.status-text {
  min-height: 1.5rem;
  color: var(--muted);
  margin: 1.5rem 0 0;
  font-size: 0.95rem;
  text-align: center;
  font-weight: 500;
}

.status-text.error {
  color: #d32f2f;
}

/* Preview Side */
.preview-side {
  position: relative;
  height: 100%;
}

.sticky-preview {
  position: sticky;
  top: 6rem;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.sticky-preview::-webkit-scrollbar {
  width: 6px;
}

.sticky-preview::-webkit-scrollbar-track {
  background: transparent;
}

.sticky-preview::-webkit-scrollbar-thumb {
  background-color: var(--line);
  border-radius: 10px;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.preview-header h3 {
  margin: 0;
}

.badge {
  background: var(--accent-light);
  color: var(--accent-deep);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.slide-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.slide-list li {
  padding: 1.2rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  transition: transform var(--transition);
}

.slide-list li:hover {
  transform: translateX(4px);
  border-color: var(--accent);
}

.slide-list strong {
  display: block;
  color: var(--ink);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-serif);
}

.slide-list p {
  margin: 0 0 0.8rem;
  color: var(--muted);
  line-height: 1.6;
}

.slide-list small {
  display: inline-block;
  color: var(--accent-deep);
  background: var(--accent-light);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Editor Section */
.editor-section {
  padding-top: 2rem;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.editor-header p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.export-name-box {
  width: min(400px, 100%);
}

.slide-editor-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.5rem;
}

.editor-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  transition: box-shadow var(--transition);
}

.editor-card:focus-within {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.editor-card h3 {
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.editor-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  border: 2px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--muted);
  font-size: 1.1rem;
}

/* Footer */
.site-footer {
  padding: 3rem 0;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .sticky-preview {
    position: static;
    max-height: none;
  }
  
  .hero {
    padding: 4rem 0 2rem;
  }
}

@media (max-width: 768px) {
  .cards,
  .steps {
    grid-template-columns: 1fr;
  }

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

  .secondary-actions {
    grid-template-columns: 1fr;
  }

  .slide-editor-list {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
  }

  nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .tool-card {
    padding: 1.5rem;
  }
  
  .editor-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2.2rem;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .btn {
    width: 100%;
  }
}
