/* /tools and /templates — dark, quiet, the work does the talking */
.gx-body { margin: 0; background: #0b0816; color: #ece9f6; font-family: var(--font-body, 'Figtree', system-ui, sans-serif); }
.gx { width: min(1240px, 100%); margin: 0 auto; padding: 72px 24px 96px; box-sizing: border-box; }
.gx * { box-sizing: border-box; }

.gx-hero { max-width: 760px; margin-bottom: 64px; }
.gx-hero h1 { margin: 0 0 16px; font: 800 clamp(34px, 5vw, 58px)/1.04 var(--font-display, 'Sora', sans-serif); letter-spacing: -0.035em; color: #fff; }
.gx-hero p { margin: 0; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; color: #a7a1bd; }
.gx-jump { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.gx-jump a { padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.16); color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; transition: background 0.2s, border-color 0.2s; }
.gx-jump a:hover { background: #fff; color: #0b0816; border-color: #fff; }

.gx-section { margin-top: 72px; }
.gx-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 18px; margin-bottom: 28px; border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
.gx-section-head h2 { margin: 0; font: 800 clamp(24px, 2.6vw, 32px) var(--font-display, 'Sora', sans-serif); letter-spacing: -0.02em; color: #fff; }
.gx-section-head p { margin: 0; max-width: 520px; color: #8f89a8; line-height: 1.55; }

/* tools */
.gx-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.gx-tool { display: flex; align-items: center; gap: 18px; padding: 20px; border-radius: 18px; background: #131022; border: 1px solid rgba(255, 255, 255, 0.07); color: inherit; text-decoration: none; transition: border-color 0.2s, transform 0.2s, background 0.2s; }
.gx-tool:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.2); background: #17132a; }
.gx-tool .service-icon { flex: none; width: 56px; height: 56px; margin: 0; }
.gx-tool-text { flex: 1; min-width: 0; display: grid; gap: 4px; }
.gx-tool-text strong { font: 700 17px var(--font-display, 'Sora', sans-serif); color: #fff; }
.gx-tool-text span { font-size: 14px; line-height: 1.5; color: #a7a1bd; }
.gx-tool-go { flex: none; font-size: 20px; color: #6f6889; transition: transform 0.2s, color 0.2s; }
.gx-tool:hover .gx-tool-go { transform: translateX(4px); color: #fff; }
[dir="rtl"] .gx-tool-go { transform: scaleX(-1); }

/* template cards */
.gx-grid { display: grid; gap: 18px; }
.gx-grid-sq { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gx-grid-wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.gx-card { display: grid; gap: 10px; color: inherit; text-decoration: none; }
.gx-preview { position: relative; display: block; overflow: hidden; border-radius: 16px; background: #1a1530; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07); transition: transform 0.25s, box-shadow 0.25s; }
.gx-preview canvas { display: block; width: 100%; height: auto; }
.gx-grid-sq .gx-preview canvas { aspect-ratio: 1; }
.gx-grid-wide .gx-preview canvas { aspect-ratio: 16 / 10; }
.gx-open { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(11, 8, 22, 0.78); backdrop-filter: blur(8px); color: #fff; font-weight: 700; font-size: 13px; text-align: center; opacity: 0; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s; }
.gx-card:hover .gx-preview, .gx-card:focus-visible .gx-preview { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 24px 50px -24px #000; }
.gx-card:hover .gx-open, .gx-card:focus-visible .gx-open { opacity: 1; transform: none; }
.gx-name { font-weight: 600; font-size: 14px; color: #c9c3df; }
.gx-card:focus-visible { outline: none; }
.gx-card:focus-visible .gx-preview { outline: 2px solid #ff5fa2; outline-offset: 3px; }

@media (max-width: 640px) {
  .gx { padding: 44px 16px 72px; }
  .gx-hero { margin-bottom: 40px; }
  .gx-section { margin-top: 52px; }
  .gx-tools { grid-template-columns: 1fr; }
  .gx-grid-sq { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .gx-grid-wide { grid-template-columns: 1fr; }
  .gx-open { opacity: 1; transform: none; font-size: 12px; padding: 8px; }
}
@media (hover: none) { .gx-open { opacity: 1; transform: none; } }
.gx-tool .service-icon {
  display: grid; place-items: center; border-radius: 16px;
  background: linear-gradient(135deg, var(--from), var(--to));
  box-shadow: 0 10px 22px -12px var(--tint), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.25s;
}
.gx-tool:hover .service-icon { transform: rotate(-6deg) scale(1.06); }

/* /word-art: templates first, then the editor */
.gx-section-first { margin-top: 0; }
.gx-grid-wa { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.gx-grid-wa .gx-preview canvas { aspect-ratio: 16 / 10; }
.gx-blank { aspect-ratio: 16 / 10; display: grid; place-items: center; background: transparent; box-shadow: none; border: 1.5px dashed rgba(255, 255, 255, 0.22); color: #c9c3df; transition: transform 0.25s, border-color 0.2s, color 0.2s, background 0.2s; }
.gx-blank-inner { display: grid; justify-items: center; gap: 12px; padding: 16px; text-align: center; }
.gx-blank-inner strong { font: 700 15px var(--font-display, 'Sora', sans-serif); }
.gx-card:hover .gx-blank, .gx-card:focus-visible .gx-blank { border-color: #fff; color: #fff; background: rgba(255, 255, 255, 0.04); box-shadow: none; }
/* saved designs may be transparent: show it like the editor does */
.gx-saved { background: repeating-conic-gradient(#221c38 0% 25%, #19142b 0% 50%) 0 0 / 20px 20px; }
.gx-open-on { opacity: 1; transform: none; }
@media (max-width: 640px) { .gx-grid-wa { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.gx-card[hidden] { display: none; }
