/* Homepage design system — tokens + section styles for architecture_designer#step1.
   Linked only on the homepage via stylesheet_link_tag 'homepage'. */

:root {
  --ah-blue: #0056b3;
  --ah-blue-dark: #004080;
  --ah-ink: #1a1a2e;
  --ah-text: #374151;
  --ah-muted: #6b7280;
  --ah-faint: #9ca3af;
  --ah-bg: #f3f4f6;
  --ah-card-bg: #ffffff;
  --ah-radius: 16px;
  --ah-radius-sm: 10px;
  --ah-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --ah-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.1);
  --ah-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

body {
  background-color: var(--ah-bg);
  font-family: var(--ah-font);
  color: var(--ah-text);
}

/* ---------- Buttons ---------- */
.hp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--ah-radius-sm);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.hp-btn:hover { text-decoration: none; transform: translateY(-1px); }
.hp-btn-primary {
  background-color: var(--ah-blue);
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.hp-btn-primary:hover { background-color: var(--ah-blue-dark); color: #fff; }
.hp-btn-outline {
  background-color: #fff;
  color: var(--ah-blue);
  border-color: var(--ah-blue);
}
.hp-btn-outline:hover { background-color: var(--ah-blue); color: #fff; }

/* ---------- Sections & headers ---------- */
.hp-section {
  max-width: 1200px;
  margin: 56px auto 0;
}
.hp-section:first-child { margin-top: 8px; }

.hp-section-header {
  text-align: center;
  margin-bottom: 24px;
}
.hp-section-header h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--ah-ink);
  margin: 0 0 8px;
}
.hp-section-subtitle {
  font-size: 15.5px;
  color: var(--ah-muted);
  max-width: 640px;
  margin: 0 auto;
}

.hp-page-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--ah-ink);
  text-align: center;
  margin: 24px 0 8px;
}

.hp-card {
  background: var(--ah-card-bg);
  border-radius: var(--ah-radius);
  box-shadow: var(--ah-shadow);
  padding: 32px;
}

/* ---------- Hero ---------- */
.hp-hero {
  display: flex;
  align-items: center;
  gap: 40px;
  background: var(--ah-card-bg);
  border-radius: var(--ah-radius);
  box-shadow: var(--ah-shadow);
  padding: 48px 40px;
  max-width: 1200px;
  margin: 8px auto 0;
}
.hp-hero-content { flex: 1 1 50%; }
.hp-hero-content h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--ah-ink);
  margin: 0 0 16px;
}
.hp-highlight { color: var(--ah-blue); }
.hp-hero-lead {
  font-size: 17px;
  font-weight: 600;
  color: var(--ah-text);
  margin: 0 0 10px;
}
.hp-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.hp-checklist li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 8px;
  font-size: 15.5px;
  color: var(--ah-muted);
}
.hp-checklist li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: #28a745;
  font-weight: 700;
}
.hp-hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hp-hero-note {
  color: var(--ah-muted);
  font-size: 13px;
  margin: 10px 0 0;
}
.hp-hero-collage {
  flex: 1 1 50%;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 62px;
  gap: 14px;
}
.hp-hero-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--ah-radius-sm);
}
.hp-collage-large { grid-column: span 6; grid-row: span 4; }
.hp-collage-medium { grid-column: span 3; grid-row: span 4; }
.hp-collage-small { grid-column: span 3; grid-row: span 2; }

/* ---------- Restyle showcase ---------- */
.hp-restyle-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}
.hp-restyle-panel { position: relative; }
.hp-restyle-panel img {
  width: 100%;
  border-radius: var(--ah-radius-sm);
  display: block;
}
.hp-restyle-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(26, 26, 46, 0.75);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}
.hp-restyle-arrow {
  color: var(--ah-blue);
  font-size: 26px;
  font-weight: 700;
}
.hp-restyle-cta { text-align: center; margin-top: 24px; }
.hp-restyle-note {
  color: var(--ah-muted);
  font-size: 13px;
  margin: 8px 0 0;
}

/* ---------- City guides ---------- */
.cg-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
.cg-featured {
  grid-row: span 2;
  border-radius: var(--ah-radius);
  overflow: hidden;
  position: relative;
  text-decoration: none;
  color: #fff;
  display: block;
  min-height: 420px;
  box-shadow: var(--ah-shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}
.cg-featured:hover {
  transform: translateY(-3px);
  box-shadow: var(--ah-shadow-hover);
  text-decoration: none;
  color: #fff;
}
.cg-featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.5s;
}
.cg-featured:hover img { transform: scale(1.03); }
.cg-featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0.1) 100%);
}
.cg-featured-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px;
}
.cg-featured-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.cg-featured-content h3 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px;
  color: #fff;
}
.cg-featured-meta {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 12px;
}
.cg-featured-styles { display: flex; gap: 6px; flex-wrap: wrap; }
.cg-style-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
}
.cg-stacked-card {
  display: flex;
  border-radius: var(--ah-radius);
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--ah-shadow);
  border: 1px solid #f0f0f0;
  transition: transform 0.25s, box-shadow 0.25s;
}
.cg-stacked-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ah-shadow-hover);
  text-decoration: none;
  color: inherit;
}
.cg-stacked-img {
  width: 180px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.cg-stacked-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.cg-stacked-card:hover .cg-stacked-img img { transform: scale(1.05); }
.cg-stacked-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}
.cg-stacked-body h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ah-ink);
  margin: 0 0 6px;
}
.cg-card-meta { font-size: 13px; color: var(--ah-muted); margin-bottom: 10px; }
.cg-card-styles { display: flex; gap: 4px; flex-wrap: wrap; }
.cg-card-pill {
  font-size: 11px;
  font-weight: 600;
  color: #4b5563;
  background: var(--ah-bg);
  padding: 3px 8px;
  border-radius: 5px;
}
.cg-scroll-wrapper { position: relative; margin-bottom: 28px; }
.cg-scroll-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.cg-scroll-row::-webkit-scrollbar { display: none; }
.cg-scroll-card {
  flex: 0 0 200px;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: #fff;
  box-shadow: var(--ah-shadow);
  border: 1px solid #f0f0f0;
  transition: transform 0.25s, box-shadow 0.25s;
}
.cg-scroll-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ah-shadow-hover);
  text-decoration: none;
  color: inherit;
}
.cg-scroll-card-img { height: 130px; position: relative; overflow: hidden; }
.cg-scroll-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.cg-scroll-card:hover .cg-scroll-card-img img { transform: scale(1.05); }
.cg-count-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}
.cg-scroll-card-body { padding: 12px 14px; }
.cg-scroll-card-body h5 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ah-ink);
  margin: 0 0 4px;
}
.cg-scroll-meta { font-size: 12px; color: var(--ah-faint); }
.cg-scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  font-size: 18px;
  color: var(--ah-text);
  transition: all 0.2s;
  padding: 0;
}
.cg-scroll-arrow:hover { background: var(--ah-blue); color: #fff; border-color: var(--ah-blue); }
.cg-scroll-arrow.left { left: -18px; }
.cg-scroll-arrow.right { right: -18px; }
.cg-view-all { text-align: center; }

/* ---------- Analyze ---------- */
.hp-analyze-card { text-align: center; }
.hp-analyze-card img {
  max-width: 100%;
  height: auto;
  border-radius: var(--ah-radius-sm);
  margin-bottom: 24px;
}

/* ---------- Generate (option tiles) ---------- */
.hp-options-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}
.hp-option {
  position: relative;
  flex: 0 0 auto;
  width: calc(33.33% - 14px);
  max-width: 300px;
  border-radius: var(--ah-radius-sm);
  overflow: hidden;
  cursor: pointer;
}
.hp-option:hover .hp-option-btn {
  background: var(--ah-blue);
  color: #fff;
}
.hp-option img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: var(--ah-radius-sm);
  display: block;
}
.hp-option-btn {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  height: 45px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ah-ink);
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--ah-radius-sm);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.hp-option-btn:hover,
.hp-option-btn:focus-visible {
  background: var(--ah-blue);
  color: #fff;
}

/* ---------- Community & Library gallery ---------- */
.hp-thumb-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.hp-thumb {
  position: relative;
  width: 150px;
  height: 150px;
  display: block;
  border-radius: var(--ah-radius-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
a.hp-thumb:hover {
  transform: translateY(-2px);
  box-shadow: var(--ah-shadow-hover);
}
.hp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--ah-radius-sm);
}
.hp-thumb-chip {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(26, 26, 46, 0.65);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
  white-space: nowrap;
}
.hp-gallery-ctas {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .hp-hero {
    flex-direction: column;
    padding: 32px 24px;
  }
  .hp-hero-content h1 { font-size: 32px; }
  .hp-hero-collage { width: 100%; }
  .cg-layout { grid-template-columns: 1fr; }
  .cg-featured { min-height: 280px; grid-row: span 1; }
  .cg-stacked-img { width: 140px; }
  .cg-featured-content h3 { font-size: 22px; }
}

@media (max-width: 768px) {
  .hp-section { margin-top: 40px; }
  .hp-section-header h2 { font-size: 24px; }
  .hp-hero-content h1 { font-size: 28px; }
  .hp-card { padding: 24px 16px; }
  .hp-option { width: calc(50% - 10px); }
  .hp-option img { height: 280px; }
  .hp-restyle-grid { grid-template-columns: 1fr; }
  .hp-restyle-arrow { transform: rotate(90deg); text-align: center; }
  .hp-hero-ctas .hp-btn { width: 100%; }
}

@media (max-width: 600px) {
  .cg-stacked-card { flex-direction: column; }
  .cg-stacked-img { width: 100%; height: 160px; }
  .cg-scroll-card { flex: 0 0 170px; }
  .hp-option { width: 100%; max-width: 340px; }
}
