@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --surface: #fffdf8;
  --surface-muted: #f7f4ec;
  --card: rgba(255, 255, 255, 0.94);
  --foreground: #1f2530;
  --foreground-muted: #4b5563;
  --primary: #ff8a65;
  --primary-foreground: #ffffff;
  --primary-soft: rgba(255, 138, 101, 0.15);
  --accent: #4fc3f7;
  --accent-soft: rgba(79, 195, 247, 0.16);
  --success: #81c784;
  --divider: rgba(31, 37, 48, 0.08);
  --shadow: 0 20px 60px rgba(31, 37, 48, 0.08);
}

.dark {
  color-scheme: dark;
  --surface: #0f111e;
  --surface-muted: #14172c;
  --card: rgba(26, 31, 55, 0.92);
  --foreground: #f5f6ff;
  --foreground-muted: rgba(245, 246, 255, 0.72);
  --primary: #ffb48d;
  --primary-foreground: #1f1f2c;
  --primary-soft: rgba(255, 180, 141, 0.2);
  --accent: #67d3ff;
  --accent-soft: rgba(103, 211, 255, 0.22);
  --success: #91d89a;
  --divider: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 60px rgba(10, 12, 22, 0.45);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--surface);
  color: var(--foreground);
  transition: background 0.3s ease, color 0.3s ease;
}

body.page {
  display: flex;
  flex-direction: column;
}

.page__main {
  flex: 1 0 auto;
}

.no-theme {
  visibility: hidden;
}

::selection {
  background: var(--primary);
  color: var(--primary-foreground);
}

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

a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--divider);
}

.site-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.site-header__actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--divider);
  background: var(--surface-muted);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

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

.theme-toggle__icon {
  display: none;
}

[data-theme="light"] .theme-toggle__icon--sun,
[data-theme="dark"] .theme-toggle__icon--moon {
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.72rem 1.6rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn.is-loading {
  opacity: 0.7;
  cursor: wait;
  pointer-events: none;
}

.btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 20px 40px rgba(255, 138, 101, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 52px rgba(255, 138, 101, 0.36);
}

.btn--secondary {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid transparent;
}

.btn--secondary:hover {
  border-color: var(--accent);
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--divider);
}

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  align-items: center;
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin-bottom: 1rem;
  line-height: 1.1;
}

/* Gallery */
.gallery-grid {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.gallery-item {
  border-radius: 1rem;
  overflow: hidden;
  background: var(--surface-muted);
  border: 1px solid var(--divider);
}

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

.gallery-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--divider);
  background: color-mix(in srgb, var(--surface-muted) 60%, transparent);
}

.hero__subtitle {
  color: var(--foreground-muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.hero__card {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--divider) 80%, transparent);
}

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section--muted {
  background: var(--surface-muted);
  border-radius: 2rem;
  margin-bottom: 2rem;
}

.section__header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 0.75rem;
}

.section__subtitle {
  color: var(--foreground-muted);
  font-size: 1rem;
}

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

.grid--three {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--card);
  border-radius: 1.5rem;
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--divider) 70%, transparent);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card__icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
}

.card__title {
  font-weight: 600;
  font-size: 1.1rem;
}

.card__text {
  color: var(--foreground-muted);
  line-height: 1.6;
}

.plan-card {
  position: relative;
  overflow: hidden;
}

.plan-card__price {
  font-size: 2.2rem;
  font-weight: 700;
}

.plan-card__price span {
  font-size: 0.9rem;
  color: var(--foreground-muted);
}

.plan-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  color: var(--foreground-muted);
}

.plan-card ul li::before {
  content: '✓';
  margin-right: 0.5rem;
  color: var(--success);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.library-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.library-card__image {
  height: 180px;
  border-radius: 1rem;
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  overflow: hidden;
  position: relative;
}

.library-card__meta {
  display: flex;
  justify-content: space-between;
  color: var(--foreground-muted);
  font-size: 0.85rem;
}

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

/* Do not stretch single button to full width inside cards on examples */
.library-card .btn {
  align-self: flex-start;
}

.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.testimonial {
  background: var(--card);
  border-radius: 1.5rem;
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--divider) 70%, transparent);
}

.testimonial__author {
  font-weight: 600;
  margin-top: 1rem;
}

.faq {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.faq-item {
  background: var(--card);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--divider) 70%, transparent);
}

.cta {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: linear-gradient(135deg, rgba(255, 138, 101, 0.12), rgba(103, 211, 255, 0.12));
  border-radius: 2rem;
}

.cta__title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: 1rem;
}

.cta__text {
  color: var(--foreground-muted);
  margin-bottom: 2rem;
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--divider);
  background: var(--surface-muted);
}

.site-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: grid;
  gap: 1rem;
  color: var(--foreground-muted);
}

.site-footer__title {
  font-weight: 600;
  color: var(--foreground);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer__copy {
  font-size: 0.85rem;
}

.form-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--divider) 70%, transparent);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-card__header {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.form-card__title {
  font-size: 1.6rem;
  font-weight: 700;
}

.form-card__text {
  color: var(--foreground-muted);
  line-height: 1.6;
}

.plan-selector {
  display: grid;
  gap: 0.75rem;
}

.plan-selector__option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid color-mix(in srgb, var(--divider) 80%, transparent);
  background: color-mix(in srgb, var(--surface-muted) 70%, transparent);
  cursor: pointer;
  transition: border 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.plan-selector__option:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(79, 195, 247, 0.18);
}

.plan-selector__option input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.plan-selector__content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
}

.plan-selector__content strong {
  font-size: 1.05rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.generation-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.generation-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.75rem;
}

.form-field--spaced {
  margin-bottom: 1.75rem;
  padding-bottom: 0.15rem;
}

.form-field--honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-field label {
  font-weight: 600;
  font-size: 0.95rem;
}

.form-input {
  border-radius: 0.95rem;
  border: 1px solid color-mix(in srgb, var(--divider) 60%, transparent);
  background: color-mix(in srgb, var(--surface) 70%, var(--surface-muted) 30%);
  color: var(--foreground);
  padding: 1rem 1.1rem;
  font-size: 1rem;
  width: 100%;
  transition: border 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.textarea-input {
  border-radius: 1.05rem;
  border: 1px solid color-mix(in srgb, var(--divider) 60%, transparent);
  background: color-mix(in srgb, var(--surface) 70%, var(--surface-muted) 30%);
  color: var(--foreground);
  padding: 1rem 1.1rem;
  font-size: 1rem;
  min-height: 160px;
  resize: vertical;
  font-family: inherit;
  width: 100%;
  transition: border 0.15s ease, box-shadow 0.15s ease;
}

.textarea-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.form-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-actions--stacked {
  margin-top: 1.75rem;
  padding-top: 0.25rem;
}

.consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--foreground-muted);
}

.consent input[type="checkbox"] {
  margin-top: 0.25rem;
}

.consent a { text-decoration: underline; }

.captcha-field__content {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.captcha-field__question {
  font-weight: 600;
  font-size: 1rem;
}

.status-toast {
  border-radius: 1rem;
  padding: 0.85rem 1.1rem;
  background: color-mix(in srgb, var(--accent-soft) 60%, transparent);
  color: var(--accent);
  font-size: 0.95rem;
}

.status-toast--error {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.dashboard {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dashboard__welcome {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dashboard__title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
}

.dashboard__subtitle {
  color: var(--foreground-muted);
}

.dashboard-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.dashboard-card {
  background: var(--card);
  border-radius: 1.5rem;
  padding: 1.6rem;
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--divider) 70%, transparent);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.dashboard-card__label {
  font-weight: 600;
  color: var(--foreground-muted);
}

.dashboard-card__value {
  font-size: 1.4rem;
  font-weight: 700;
}

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

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: color-mix(in srgb, var(--card) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--divider) 70%, transparent);
  border-radius: 1rem;
  padding: 1rem;
}

.list-item__info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.list-item__title {
  font-weight: 600;
}

.list-item__meta {
  color: var(--foreground-muted);
  font-size: 0.9rem;
}

.badge-pill {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}

.actions-row {
  display: flex;
  gap: 0.75rem;
}

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

.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: 1.5rem;
  border: 1px dashed color-mix(in srgb, var(--divider) 70%, transparent);
  color: var(--foreground-muted);
}

.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .form-actions {
    flex-direction: column;
  }

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

@media (max-width: 768px) {
  .site-header__inner {
    padding: 0.85rem 1rem;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
  }

  .site-header__actions {
    margin-left: auto;
    flex: 1 1 auto;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .site-header__actions .btn {
    padding: 0.6rem 1.2rem;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
  }

  .site-nav {
    display: none;
  }

  .hero {
    padding-top: 3rem;
  }

  .section {
    padding: 3rem 1.25rem;
  }
}
