/* Homepage hero v2 (Codex layout and artwork). Load after home-action.css.
   The form uses the tool pages' look (image-generator.css: .generator-panel, .mode-tab, .form-label,
   #textPromptTextarea, .tool-submit-btn) so the homepage feels like the tool pages and the Studio. */
.home-hero-v2 {
  --hero-yellow: #effb53;
  padding: 40px 0 56px;
  overflow: clip;
  background: radial-gradient(ellipse at 77% 42%, #29243155, transparent 49%), #151518;
}
.home-hero-v2 .home-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 145fr) minmax(0, 159fr);
  gap: 64px;
  align-items: center;
  width: min(100% - 96px, 1280px);
  text-align: left;
}
.home-hero-copy { min-width: 0; position: relative; z-index: 2; }
.home-hero-v2 .home-hero-title { font-size: 60px; line-height: 64px; font-weight: 900; letter-spacing: normal; }
.home-hero-v2 .home-hero-title-line { display: block; }
.home-hero-v2 .home-hero-title-line:last-child { color: var(--hero-yellow); }
.home-hero-v2 .home-hero-subtitle { max-width: 490px; margin: 14px 0 0; color: #cdcdcd; font-size: 17px; line-height: 25px; }

/* Card = .generator-panel */
.home-hero-v2 .home-action {
  max-width: none; margin: 22px 0 0; padding: 24px;
  border: 1px solid rgba(239, 251, 83, .16); border-radius: 20px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(239, 251, 83, .09) 0%, rgba(239, 251, 83, 0) 45%), linear-gradient(rgba(11, 14, 20, .95), rgba(8, 10, 15, .95));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
.home-hero-v2 .home-action-prompt { margin-top: 0; }
/* Label = .form-label */
.home-hero-v2 .home-action-label {
  color: rgba(205, 205, 205, .82); font-size: 13.76px; line-height: 20px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase;
}
/* Prompt = #textPromptTextarea */
.home-hero-v2 .home-action-textarea {
  height: 120px; margin-top: 10px; padding: 14px 18px 16px;
  border: 1px solid rgba(207, 208, 212, .2); border-radius: 12px; background: #222226; box-shadow: none;
  color: #cdcdcd; font-size: 15.2px; line-height: 1.5; font-weight: 500;
}
.home-hero-v2 .home-action-textarea:hover { border-color: rgba(207, 208, 212, .35); }
.home-hero-v2 .home-action-textarea[aria-invalid="true"] { border-color: #e47f7f; }

.home-action-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.home-action-examples > span { color: #a5a5b3; font-size: 11px; margin-right: 2px; }
.home-action-examples button {
  min-height: 28px; padding: 3px 10px; border: 1px solid rgba(207, 208, 212, .2);
  border-radius: 8px; background: #222226; color: #cdcdcd;
  font-size: 12px; line-height: 18px; font-weight: 500; cursor: pointer;
  transition: background .25s ease, border-color .25s ease, color .25s ease;
}
.home-action-examples button:hover { background: rgba(239, 251, 83, .1); border-color: rgba(239, 251, 83, .3); color: #effb53; }
.home-action-examples button:focus-visible { outline: 2px solid #effb53; outline-offset: 3px; }

/* Generate = .tool-submit-btn: full width, label left, cost and arrow right, dark fill on hover. */
.home-hero-v2 .home-action-actions { display: block; margin-top: 16px; }
.home-hero-v2 .home-action-primary {
  position: relative; z-index: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: flex-start; gap: 10px;
  width: 100%; min-width: 0; height: 56px; margin: 0; padding: 0 14px 0 22px;
  border: 1px solid rgba(207, 208, 212, .2); border-radius: 10px; background: #effb53; color: #151518;
  font-size: 14px; font-weight: 800; letter-spacing: .01em; white-space: nowrap;
  transition: color .5s ease-in-out;
}
.home-hero-v2 .home-action-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1; background: #1d1d21;
  clip-path: circle(0% at 50% 50%); transition: clip-path .8s cubic-bezier(0, .96, .58, 1.1);
}
.home-hero-v2 .home-action-primary:hover:not(.is-busy) { background: #effb53; color: #fff; }
.home-hero-v2 .home-action-primary:hover:not(.is-busy)::after { clip-path: circle(100% at 50% 50%); transition-duration: 4s; }
.home-hero-v2 .home-action-primary.is-busy { background: #34343e; color: #b6b6c2; border-color: transparent; }
.home-hero-v2 .home-action-primary.is-busy::after { display: none; }
.home-hero-v2 .home-action-primary-label { margin-right: auto; text-align: left; }
.home-action-primary-cost {
  display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 11px;
  border-radius: 999px; background: rgba(17, 21, 15, .12); color: inherit;
  font-size: 12px; line-height: 18px; font-weight: 700;
}
.home-action-primary-cost .home-credit-value { color: inherit; }
.home-hero-v2 .home-action-primary-cost .fa-coins { color: inherit; }
.home-hero-v2 .home-action-primary.is-busy .home-action-primary-cost { visibility: hidden; }

.home-hero-v2 .home-action-info { margin-top: 12px; min-height: 20px; color: #b8b8c3; font-size: 13px; line-height: 20px; }
.home-credit-value { display: inline-flex; align-items: baseline; gap: 5px; color: #e3e3ea; white-space: nowrap; }
.home-hero-v2 .home-credit-value .fa-coins { color: #effb53; font-size: 12px; }

/* Photo tools: links to their own pages, styled as the tool pages' .mode-tab. */
.home-photo-tools { margin-top: 20px; }
.home-photo-tools-title {
  margin: 0 0 10px; color: rgba(205, 205, 205, .82); font-size: 13.76px; line-height: 20px;
  font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
}
.home-photo-tools-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.home-photo-tool {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 16px;
  border: 1px solid rgba(207, 208, 212, .2); border-radius: 12px; background: #222226;
  color: #cdcdcd; font-size: 14.88px; line-height: 1.2; font-weight: 600; text-decoration: none;
  transition: background .25s ease, border-color .25s ease, color .25s ease;
}
.home-photo-tool i { font-size: 1.2rem; transition: color .25s ease; }
.home-photo-tool:hover { background: rgba(239, 251, 83, .1); border-color: rgba(239, 251, 83, .3); color: #effb53; }
.home-photo-tool:focus-visible { outline: 2px solid #effb53; outline-offset: 3px; }

.home-hero-benefits {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px 20px;
  margin: 16px 0 0; padding: 0; list-style: none;
  color: #babac4; font-size: 12px; line-height: 20px;
}
.home-hero-benefits li { display: inline-flex; align-items: center; gap: 7px; }
.home-hero-benefits i { color: #effb53; font-size: 12px; }

/* One generated artwork, with the CREATE label, the idea note and the edit card. */
.home-hero-visual {
  position: relative; isolation: isolate; min-width: 0; width: 100%;
  aspect-ratio: 636 / 644; margin: 0;
}
.home-hero-visual::before {
  position: absolute; z-index: -1; content: ""; inset: 8% -8% -4% -8%;
  background: radial-gradient(ellipse at 60% 35%, #ab8be326, transparent 60%), radial-gradient(ellipse at 40% 70%, #effb5309, transparent 63%);
  filter: blur(24px);
}
.hero-art-card {
  position: absolute; top: 3%; right: 2%; width: 79%; height: 92%; overflow: hidden;
  border: 1px solid #e0cfff3d; border-radius: 22px;
  background: #a89ac1; box-shadow: 0 24px 70px #00000045;
  transform: rotate(3deg);
}
.hero-art-card picture { display: block; width: 100%; height: 100%; }
.hero-art-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-art-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, #00000022, transparent 19%, transparent 65%, #100a2066);
}
.hero-art-label, .hero-edit-label {
  display: inline-flex; align-items: center; gap: 6px;
  position: absolute; z-index: 1; left: 16px; top: 16px;
  padding: 7px 10px; border: 1px solid #ffffff33; border-radius: 7px;
  background: #18181de8; color: #f8f8fa;
  font-size: 10px; line-height: 14px; font-weight: 600; letter-spacing: 1.1px;
}
.hero-art-label i { color: #effb53; }
.hero-edit-card {
  position: absolute; z-index: 2; left: 0; top: 42%; width: 36%; height: 34%;
  padding: 6px; border: 1px solid #66636d; border-radius: 14px;
  background: #232329; box-shadow: 0 16px 45px #00000055;
  transform: rotate(-6deg);
}
.hero-edit-image { position: relative; height: calc(100% - 28px); overflow: hidden; border-radius: 9px; background: #9989b5; }
.hero-edit-image picture { display: block; width: 100%; height: 100%; }
.hero-edit-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 31%; display: block; }
.hero-edit-muted { position: absolute; inset: 0; clip-path: inset(0 49% 0 0); filter: grayscale(1) brightness(.88); }
.hero-edit-divider { position: absolute; top: 0; bottom: 0; left: 51%; width: 2px; margin-left: -1px; background: #effb53; }
.hero-edit-handle {
  position: absolute; left: 51%; top: 54%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 50%; background: #effb53; color: #151518; font-size: 13px;
  box-shadow: 0 0 0 3px rgba(21, 21, 24, .35), 0 4px 12px rgba(0, 0, 0, .4);
}
.hero-edit-label { top: 9px; left: 9px; padding: 4px 6px; font-size: 9px; line-height: 12px; }
.hero-edit-footer { display: flex; align-items: center; justify-content: space-between; height: 28px; padding: 4px 4px 0; font-size: 9px; line-height: 12px; color: #babac5; }
.hero-edit-footer strong { color: #f1f1f6; font-weight: 500; }
.hero-prompt-note {
  position: absolute; z-index: 3; top: 15%; left: 0;
  display: flex; align-items: center; gap: 10px; max-width: 290px;
  padding: 13px 15px; border: 1px solid #64606b; border-radius: 12px;
  background: #25252beb; box-shadow: 0 10px 30px #00000035;
  transform: rotate(-3deg); animation: hero-note-float 9s ease-in-out infinite;
}
.hero-prompt-note > i { color: #effb53; font-size: 18px; }
.hero-prompt-note span { display: block; }
.hero-prompt-note small { display: block; margin-bottom: 4px; font-size: 9px; line-height: 12px; letter-spacing: 1px; color: #bdbbc8; }
.hero-prompt-note strong { display: block; font-size: 12px; line-height: 18px; font-weight: 500; color: #f8f8fa; }
@keyframes hero-note-float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-5px) rotate(-3deg); } }
@media (prefers-reduced-motion: reduce) {
  .hero-prompt-note { animation: none; }
  .home-hero-v2 *, .home-hero-v2 *::before, .home-hero-v2 *::after { transition: none; }
}

@media (min-width: 1024px) and (max-width: 1199.98px) {
  .home-hero-v2 { padding-top: 32px; }
  .home-hero-v2 .home-hero-inner { width: calc(100% - 80px); grid-template-columns: minmax(0, 28fr) minmax(0, 29fr); gap: 32px; }
  .home-hero-v2 .home-hero-title { font-size: 48px; line-height: 52px; }
  .home-hero-v2 .home-hero-subtitle { font-size: 16px; line-height: 24px; }
  .home-hero-v2 .home-action { padding: 20px; }
  .home-hero-visual { aspect-ratio: 464 / 600; max-height: 600px; }
  .hero-art-card { top: 5%; right: 0; width: 87%; height: 88%; }
  .hero-prompt-note { top: 12%; padding: 11px; }
  .hero-edit-card { width: 40%; height: 29%; left: -3%; top: 46%; }
  .home-hero-benefits { column-gap: 16px; font-size: 11px; }
}
@media (min-width: 768px) and (max-width: 1023.98px) {
  .home-hero-v2 { padding: 32px 0 48px; }
  .home-hero-v2 .home-hero-inner { width: min(100% - 48px, 640px); grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .home-hero-v2 .home-hero-title { font-size: 48px; line-height: 52px; }
  .home-hero-v2 .home-hero-subtitle { max-width: 520px; font-size: 16px; line-height: 24px; }
  .home-hero-v2 .home-action { margin-top: 20px; }
  .home-hero-visual { width: 560px; max-width: 100%; justify-self: center; }
}
@media (max-width: 767.98px) {
  .home-hero-v2 { padding: 18px 0 32px; }
  .home-hero-v2 .home-hero-inner { width: min(100% - 32px, 520px); grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .home-hero-v2 .home-hero-title { font-size: 36px; line-height: 40px; }
  .home-hero-v2 .home-hero-subtitle { max-width: 355px; margin: 10px 0 0; font-size: 14px; line-height: 20px; }
  .home-hero-v2 .home-action { margin-top: 16px; padding: 16px; border-radius: 16px; }
  .home-hero-v2 .home-action-textarea { height: 96px; padding: 10px 12px; font-size: 16px; line-height: 22px; }
  .home-action-examples { display: none; }
  .home-hero-v2 .home-action-actions { margin-top: 12px; }
  .home-hero-v2 .home-action-primary { height: 52px; padding: 0 12px 0 16px; font-size: 14px; gap: 8px; }
  .home-hero-v2 .home-action-primary-cost { min-height: 28px; padding: 0 9px; font-size: 11px; gap: 4px; }
  .home-hero-v2 .home-action-info { margin-top: 10px; font-size: 12px; line-height: 18px; }
  .home-photo-tools { margin-top: 16px; }
  .home-photo-tools-title { font-size: 12px; margin-bottom: 8px; }
  .home-photo-tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-photo-tool { justify-content: center; min-height: 44px; padding: 8px 12px; gap: 8px; font-size: 13.5px; }
  .home-photo-tool:last-child { grid-column: 1 / -1; }
  .home-photo-tool i { font-size: 1.05rem; }
  .home-hero-benefits { display: none; }
  .home-hero-visual { height: 250px; aspect-ratio: auto; }
  .hero-art-card { width: 76%; height: 222px; right: 0; top: 2px; border-radius: 15px; }
  .hero-art-card img { object-position: center 24%; }
  .hero-art-label { padding: 5px 7px; top: 10px; left: 10px; font-size: 9px; }
  .hero-prompt-note { top: 8%; left: 0; max-width: 185px; padding: 10px; border-radius: 10px; }
  .hero-prompt-note > i { font-size: 14px; }
  .hero-prompt-note small { font-size: 8px; margin-bottom: 2px; }
  .hero-prompt-note strong { font-size: 10px; line-height: 15px; }
  .hero-edit-card { left: 0; top: 37%; width: 42%; height: 119px; border-radius: 10px; padding: 4px; }
  .hero-edit-footer { font-size: 8px; }
  .hero-edit-label { font-size: 8px; padding: 3px 5px; }
  .hero-edit-handle { width: 22px; height: 22px; font-size: 10px; }
}
@media (max-width: 359.98px) {
  .home-hero-v2 .home-hero-title { font-size: 32px; line-height: 36px; }
  .home-photo-tool { font-size: 12.5px; padding: 8px 10px; }
}
/* Keep the runtime's hidden attribute authoritative over every flex/grid rule here. */
.home-hero-v2 [hidden] { display: none !important; }
