/* ── Variables ── */
:root {
  --bg: #faf8f5;
  --bg-warm: #f3efe8;
  --surface: #ffffff;
  --text: #1a1814;
  --text-muted: #6b6560;
  --accent: #c45c3e;
  --accent-soft: rgba(196, 92, 62, 0.12);
  --accent-hover: #a84d32;
  --border: rgba(26, 24, 20, 0.08);
  --shadow: 0 4px 24px rgba(26, 24, 20, 0.06);
  --shadow-lg: 0 24px 64px rgba(26, 24, 20, 0.1);
  --radius: 12px;
  --radius-lg: 20px;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Outfit', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.no-cursor-glow .cursor-glow {
  display: none;
}

/* ── Ambient effects ── */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 92, 62, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  opacity: 0;
}

body.cursor-ready .cursor-glow {
  opacity: 1;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #e8a598);
  z-index: 200;
  transition: width 0.1s linear;
}

.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orb-drift 20s ease-in-out infinite;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: rgba(196, 92, 62, 0.15);
  top: -10%;
  right: -5%;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: rgba(232, 160, 152, 0.12);
  bottom: 20%;
  left: -10%;
  animation-delay: -7s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: rgba(152, 200, 152, 0.08);
  top: 50%;
  left: 40%;
  animation-delay: -14s;
}

@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(250, 248, 245, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s var(--ease);
}

.nav.scrolled {
  box-shadow: var(--shadow);
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav .logo-text {
  font-weight: 600;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  letter-spacing: -0.03em;
  transition: opacity 0.2s;
}

.footer .logo-text {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  transition: opacity 0.2s;
}

.logo-text {
  font-weight: 600;
  letter-spacing: -0.03em;
}

.logo-dot {
  color: var(--accent);
  font-weight: 500;
}

.nav-logo:hover .logo-text {
  opacity: 0.75;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  position: relative;
  transition: color 0.2s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}

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

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav-toggle.open span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle.open span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* ── Buttons ── */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  border: none;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  padding: 0.625rem 1.25rem;
  position: relative;
  overflow: hidden;
}

.btn-shimmer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.18) 50%, transparent 60%);
  transform: translateX(-100%);
  animation: shimmer 3s ease-in-out infinite;
}

.btn-shimmer span {
  position: relative;
  z-index: 1;
}

@keyframes shimmer {
  0%, 70%, 100% { transform: translateX(-100%); }
  85% { transform: translateX(100%); }
}

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(196, 92, 62, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 0.625rem 1rem;
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 0.9375rem;
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 8rem 2.5rem 4rem;
  max-width: 1280px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 5vw, 4.25rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.title-line {
  display: block;
}

.hero-tag.visible {
  animation: tag-pulse 2s ease-in-out infinite;
}

@keyframes tag-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.hero-desc {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

/* ── Hero Prompt ── */
.hero-prompt {
  margin-bottom: 2.5rem;
  max-width: 520px;
}

.prompt-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1rem 0.75rem;
  box-shadow: var(--shadow);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.prompt-box:focus-within {
  border-color: rgba(196, 92, 62, 0.4);
  box-shadow: 0 8px 32px rgba(196, 92, 62, 0.12), 0 0 0 3px rgba(196, 92, 62, 0.08);
}

.prompt-inner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.prompt-inner textarea {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text);
  background: transparent;
  min-height: 72px;
  max-height: 160px;
}

.prompt-inner textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.prompt-submit {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--text);
  color: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.prompt-submit:hover {
  background: var(--accent);
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(196, 92, 62, 0.3);
}

.prompt-submit:active {
  transform: scale(0.97);
}

.prompt-box:focus-within .prompt-submit {
  background: var(--accent);
}

.prompt-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  margin-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.prompt-hint {
  font-size: 0.6875rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.prompt-count {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.prompt-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.875rem;
}

.suggestions-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.suggestion-chip {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.suggestion-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.stat-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* ── Preview Window ── */
.hero-visual {
  position: relative;
  perspective: 1200px;
}

.preview-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(ellipse at center, rgba(196, 92, 62, 0.12) 0%, transparent 60%);
  animation: glow-pulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.preview-window {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transform: rotateY(-4deg) rotateX(2deg);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
  position: relative;
  will-change: transform;
}

.preview-window:hover {
  transform: rotateY(0deg) rotateX(0deg);
  box-shadow: 0 32px 80px rgba(26, 24, 20, 0.15);
}

.preview-chrome {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-warm);
  border-bottom: 1px solid var(--border);
}

.chrome-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex: 1;
}

.chrome-status {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  color: var(--accent);
  font-weight: 500;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: status-blink 1.5s ease-in-out infinite;
}

@keyframes status-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(196, 92, 62, 0.4); }
  50% { opacity: 0.5; box-shadow: 0 0 0 4px rgba(196, 92, 62, 0); }
}

.chrome-dots {
  display: flex;
  gap: 6px;
}

.chrome-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.chrome-dots span:first-child { background: #e8a598; }
.chrome-dots span:nth-child(2) { background: #e8d098; }
.chrome-dots span:nth-child(3) { background: #98c898; }

.preview-body {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.slide-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  z-index: 2;
}

.slide-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}

.preview-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(30px) scale(0.97);
  filter: blur(4px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), filter 0.6s var(--ease);
  padding: 2rem;
}

.slide.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  filter: blur(0);
}

.slide.exit-left {
  opacity: 0;
  transform: translateX(-30px) scale(0.97);
  filter: blur(4px);
}

.slide-cover .slide-inner h3 {
  animation: slide-up 0.8s var(--ease) 0.2s both;
}

.slide-cover .slide-inner p {
  animation: slide-up 0.8s var(--ease) 0.35s both;
}

.slide.active .slide-tag {
  animation: slide-up 0.6s var(--ease) 0.1s both;
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-inner h3 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.slide-inner p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.slide-cover {
  background: linear-gradient(135deg, #1a1814 0%, #3d3530 100%);
  color: #faf8f5;
}

.slide-inner-cover-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 100%;
  text-align: center;
  padding: 1.5rem;
}

.slide-portfolio-word {
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 9vw, 4.75rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0;
  color: #faf8f5;
}

.slide-cover.active .slide-portfolio-word {
  animation: slide-up 0.9s var(--ease) 0.15s both;
}

.slide-cover .slide-tag { color: #e8a598; }
.slide-cover p { color: rgba(250, 248, 245, 0.6); }

.slide-about {
  background: var(--bg-warm);
}

.about-grid {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.about-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), var(--border));
  flex-shrink: 0;
}

.slide-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.about-lines div {
  height: 10px;
  background: var(--border);
  border-radius: 4px;
  margin-bottom: 0.5rem;
  animation: skeleton 1.5s ease-in-out infinite;
}

.about-lines div:nth-child(1) { animation-delay: 0s; }
.about-lines div:nth-child(2) { animation-delay: 0.2s; }
.about-lines div:nth-child(3) { animation-delay: 0.4s; }

@keyframes skeleton {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.about-lines div:first-child { width: 140px; }
.about-lines div:nth-child(2) { width: 100px; }
.about-lines div:nth-child(3) { width: 120px; }

.slide-process {
  background: var(--surface);
}

.process-steps {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.process-steps .step {
  flex: 1;
  aspect-ratio: 1;
  background: var(--bg-warm);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.3s, color 0.3s, transform 0.3s var(--ease);
  animation: step-pop 0.5s var(--ease) both;
}

.process-steps .step:nth-child(1) { animation-delay: 0.1s; }
.process-steps .step:nth-child(2) { animation-delay: 0.2s; }
.process-steps .step:nth-child(3) { animation-delay: 0.3s; }
.process-steps .step:nth-child(4) { animation-delay: 0.4s; }

@keyframes step-pop {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.slide.active .process-steps .step:nth-child(odd) {
  animation: step-bounce 2s ease-in-out infinite;
}

.slide.active .process-steps .step:nth-child(even) {
  animation: step-bounce 2s ease-in-out 0.5s infinite;
}

@keyframes step-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.process-steps .step:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.slide-ui {
  background: #eef0f4;
}

.ui-mock {
  margin-top: 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ui-bar {
  height: 28px;
  background: var(--bg-warm);
  border-bottom: 1px solid var(--border);
}

.ui-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 1rem;
}

.ui-card {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-warm));
  border-radius: 8px;
  animation: ui-float 3s ease-in-out infinite;
}

.ui-card:nth-child(2) {
  animation-delay: -1.5s;
}

@keyframes ui-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.preview-nav {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  padding: 0.375rem 0.625rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 100px;
  border: 1px solid var(--border);
}

.preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  padding: 0;
}

.preview-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

.floating-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  box-shadow: var(--shadow);
  animation: float 4s ease-in-out infinite;
  will-change: transform;
  transition: box-shadow 0.3s;
}

.floating-card:hover {
  box-shadow: var(--shadow-lg);
}

.card-1 {
  top: -1rem;
  right: -1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-weight: 500;
}

.typing-dots span {
  animation: dot-blink 1.4s infinite;
  opacity: 0;
}

.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-blink {
  0%, 20% { opacity: 0; }
  40%, 100% { opacity: 1; }
}

.card-2 {
  bottom: 2rem;
  left: -2rem;
  animation-delay: -2s;
}

.card-3 {
  top: 50%;
  right: -2.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  animation-delay: -1s;
}

.fc-icon-sm {
  color: var(--accent);
}

.fc-icon {
  animation: spin 3s linear infinite;
}

.fc-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

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

/* ── Marquee ── */
.marquee-wrap {
  overflow: hidden;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.marquee {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee span {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-muted);
  opacity: 0.35;
  white-space: nowrap;
  transition: opacity 0.3s, color 0.3s;
}

.marquee span:hover {
  opacity: 1;
  color: var(--accent);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── Sections ── */
section {
  padding: 6rem 2.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
}

/* ── Features ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  transform-style: preserve-3d;
}

.tilt-card {
  transition: transform 0.15s var(--ease), box-shadow 0.3s var(--ease);
}

.tilt-card:hover {
  box-shadow: var(--shadow-lg);
}

.tilt-card:hover .feature-icon {
  transform: scale(1.1) rotate(-5deg);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: 10px;
  margin-bottom: 1.25rem;
  color: var(--accent);
  transition: transform 0.4s var(--ease);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── How it works ── */
.how {
  max-width: none;
  background: var(--bg-warm);
  padding: 6rem 2.5rem;
}

.how-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.how .section-header {
  text-align: left;
  margin-bottom: 0;
}

.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step-item {
  display: flex;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.3s var(--ease), opacity 0.3s;
  opacity: 0.5;
}

.step-item.in-view {
  opacity: 1;
}

.step-item.in-view .step-num {
  animation: num-glow 2s ease-in-out infinite;
}

@keyframes num-glow {
  0%, 100% { text-shadow: none; }
  50% { text-shadow: 0 0 20px rgba(196, 92, 62, 0.3); }
}

.step-item:first-child {
  border-top: 1px solid var(--border);
}

.step-item:hover {
  padding-left: 0.5rem;
}

.step-num {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
  width: 3rem;
}

.step-content h3 {
  font-size: 1.0625rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
}

.step-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Page Types ── */
.types-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.type-chip {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 400;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.type-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.type-chip.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  transform: scale(1.05);
}

.type-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}

.type-preview-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, var(--accent-soft) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

.type-preview:hover .type-preview-bg {
  opacity: 1;
}

.type-preview-inner {
  position: relative;
  z-index: 1;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.type-preview-inner.fade {
  opacity: 0;
  transform: translateY(8px);
}

.type-preview-label {
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.type-preview-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto;
}

/* ── CTA ── */
.cta {
  max-width: none;
  padding: 0 2.5rem 6rem;
}

.cta-inner {
  max-width: 1280px;
  margin: 0 auto;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-lg);
  padding: 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 160, 152, 0.25) 0%, transparent 70%);
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  animation: cta-glow-move 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes cta-glow-move {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-30%) translateY(20px); }
}

.cta-inner h2,
.cta-inner p,
.cta-btn {
  position: relative;
  z-index: 1;
}

.cta-inner h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.cta-inner em {
  color: #e8a598;
}

.cta-inner p {
  color: rgba(250, 248, 245, 0.6);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.cta-inner .btn-primary {
  background: var(--bg);
  color: var(--text);
}

.cta-inner .btn-primary:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ── Footer ── */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 2.5rem;
  border-top: 1px solid var(--border);
  max-width: 1280px;
  margin: 0 auto;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
}

/* ── Reveal animations ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }

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

  .reveal {
    opacity: 1;
    transform: none;
  }

  .marquee {
    animation: none;
  }
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 6rem;
    gap: 3rem;
  }

  .hero-visual {
    order: 1;
    max-width: 520px;
    margin: 0 auto;
  }

  .preview-window {
    transform: none;
  }

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

  .how-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .how .section-header {
    text-align: center;
  }
}

@media (max-width: 640px) {
  .nav {
    padding: 1rem 1.25rem;
  }

  .nav-links,
  .nav-actions {
    display: none;
  }

  .nav-links.open,
  .nav-actions.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .nav.open {
    flex-wrap: wrap;
  }

  .nav.open .nav-links {
    order: 3;
    width: 100%;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
  }

  .nav.open .nav-actions {
    order: 4;
    width: 100%;
    justify-content: flex-start;
    padding-bottom: 0.5rem;
  }

  section,
  .how,
  .cta {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .hero {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .hero-prompt {
    max-width: 100%;
  }

  .prompt-suggestions {
    gap: 0.375rem;
  }

  .suggestion-chip {
    font-size: 0.6875rem;
    padding: 0.3rem 0.625rem;
  }

  .prompt-hint {
    display: none;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .stat-divider {
    display: none;
  }

  .footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 2rem 1.25rem;
  }

  .floating-card {
    display: none;
  }

  .card-3 {
    display: none;
  }

  .cursor-glow {
    display: none;
  }

  .cta-inner {
    padding: 2.5rem 1.5rem;
  }
}

/* ── Landing form extras (refs, options, flash) ── */
body.page-home-landing {
  --home-max-brief: 8000;
}

body.page-home-landing a:hover {
  text-decoration: none;
}

.home-flash-err {
  max-width: 520px;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(196, 92, 62, 0.35);
  background: rgba(196, 92, 62, 0.08);
  color: #8a3b28;
  font-size: 0.875rem;
}

.home-advanced {
  margin-top: 0.875rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.home-advanced-field label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

.home-advanced-field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.45rem 0.875rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text);
  background: var(--surface);
  outline: none;
  cursor: pointer;
}

.home-advanced-field select:focus {
  border-color: rgba(196, 92, 62, 0.45);
  box-shadow: 0 0 0 3px rgba(196, 92, 62, 0.08);
}

.home-ref-block {
  margin-top: 0.875rem;
}

.home-ref-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.home-ref-strip.ref-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.home-ref-strip .ref-slot {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
  background: var(--bg-warm);
}

.home-ref-strip .ref-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-ref-strip .ref-slot .x {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.home-ref-strip .ref-slot.loading .spin {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.65);
}

.home-ref-strip .ref-slot.loading .spin::after {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: home-spin 0.7s linear infinite;
}

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

.home-ref-strip button.ref-add {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.home-ref-strip button.ref-add:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.home-form-hint {
  margin-top: 0.625rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
  opacity: 0.85;
  line-height: 1.5;
}

.nav-lang-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: color 0.2s, border-color 0.2s;
}

.nav-lang-link:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

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