/* Terix Studio - terixstudio.com
   Palette and backdrop mirror TerixStudioTheme.swift in the iOS app. */

@font-face {
  font-family: "Clash Display";
  src: url("/assets/fonts/clash-display-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Clash Display";
  src: url("/assets/fonts/clash-display-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Clash Display";
  src: url("/assets/fonts/clash-display-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #040608;
  --carbon: #0e1013;
  --steel: #bdc4d1;
  --steel-bright: #ebeef4;
  --deep-blue: #163063;
  --lens-blue: #2e6eb3;
  --teal: #086b4d;
  --amber: #faba54;
  --crimson: #f05c66;
  --aqua: #4dd9d9;
  --mint: #8ff2bd;
  --text: #ffffff;
  --text-2: #d4deeb;
  --text-3: #9eabbd;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --edge: rgba(255, 255, 255, 0.12);
  --edge-soft: rgba(255, 255, 255, 0.07);
  --display: "Clash Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Aurora backdrop (matches TerixStudioBackdrop) ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 60vmax 52vmax at 10% 2%, rgba(13, 92, 84, 0.44), transparent 70%),
    radial-gradient(ellipse 55vmax 48vmax at 98% 36%, rgba(24, 54, 128, 0.38), transparent 70%),
    radial-gradient(ellipse 48vmax 40vmax at 30% 104%, rgba(133, 64, 38, 0.16), transparent 70%),
    var(--ink);
}

.backdrop::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  width: 26vw;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  transform: rotate(8deg);
  animation: sheen 18s linear infinite;
}

@keyframes sheen {
  from { left: -40vw; }
  to   { left: 140vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .backdrop::after { animation: none; display: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Layout ---------- */

.wrap {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

@media (max-width: 600px) {
  .wrap { width: calc(100% - 40px); }
}

main { display: block; }

/* ---------- Nav ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  background: rgba(4, 6, 8, 0.55);
  border-bottom: 1px solid var(--edge-soft);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 0;
}

.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 11px;
  white-space: nowrap;
}

.wordmark img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
}

.nav-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

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

.pill {
  border: 1px solid var(--edge);
  background: var(--glass);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav .pill { margin-left: auto; }
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding: 88px 0 96px;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 56px 0 72px;
  }
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--aqua);
  margin-bottom: 20px;
}

h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.5rem, 5.6vw, 4.1rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin-bottom: 22px;
}

h1 .grad {
  background: linear-gradient(92deg, var(--aqua), var(--mint));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: 19px;
  color: var(--text-2);
  max-width: 34em;
  margin-bottom: 32px;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 999px;
  padding: 14px 30px;
  color: var(--ink);
  background: linear-gradient(92deg, var(--aqua), var(--mint));
  box-shadow: 0 6px 32px rgba(77, 217, 217, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 40px rgba(77, 217, 217, 0.38);
}

.btn.ghost {
  background: var(--glass);
  color: var(--text);
  border: 1px solid var(--edge);
  box-shadow: none;
}

.btn.ghost:hover { background: var(--glass-strong); }

.cta-note {
  font-size: 14px;
  color: var(--text-3);
}

/* ---------- Composer (signature element) ---------- */

.composer {
  border: 1px solid var(--edge);
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 28px;
  padding: 26px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.composer-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.composer-label .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  display: inline-block;
  box-shadow: 0 0 12px var(--mint);
}

.prompt-box {
  border: 1px solid var(--edge-soft);
  background: rgba(4, 6, 8, 0.5);
  border-radius: 18px;
  padding: 18px 20px;
  min-height: 128px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--steel-bright);
}

.prompt-box .caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  background: var(--aqua);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 20px;
}

.chip {
  border: 1px solid var(--edge-soft);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
}

.chip.credits {
  font-family: var(--mono);
  color: var(--mint);
  border-color: rgba(143, 242, 189, 0.35);
  margin-left: auto;
}

.composer-generate {
  width: 100%;
  text-align: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  border: 0;
  border-radius: 16px;
  padding: 15px;
  color: var(--ink);
  background: linear-gradient(92deg, var(--aqua), var(--mint));
  display: block;
  text-decoration: none;
}

.composer-note {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--text-3);
  text-align: center;
}

/* ---------- Sections ---------- */

section { padding: 44px 0; }

.section-head {
  max-width: 40em;
  margin-bottom: 44px;
}

h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.15;
  margin-bottom: 14px;
}

.section-head p {
  color: var(--text-2);
  font-size: 17.5px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; }
}

.step {
  border: 1px solid var(--edge-soft);
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 24px;
  padding: 28px;
}

.step .num {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--aqua);
  display: block;
  margin-bottom: 16px;
}

.step h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  margin-bottom: 10px;
}

.step p { color: var(--text-2); font-size: 15.5px; }

/* Credits panel */

.credits-panel {
  border: 1px solid rgba(143, 242, 189, 0.22);
  background: linear-gradient(140deg, rgba(77, 217, 217, 0.07), rgba(143, 242, 189, 0.04) 55%, rgba(4, 6, 8, 0));
  border-radius: 28px;
  padding: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

@media (max-width: 820px) {
  .credits-panel { grid-template-columns: 1fr; padding: 30px; }
}

.credit-fact h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  margin-bottom: 8px;
}

.credit-fact p { color: var(--text-2); font-size: 15.5px; }

/* Templates */

.cat-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cat {
  border: 1px solid var(--edge);
  background: var(--glass);
  border-radius: 999px;
  padding: 11px 22px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 15.5px;
  color: var(--steel-bright);
}

.cat:nth-child(3n+1) { border-color: rgba(77, 217, 217, 0.3); }
.cat:nth-child(3n+2) { border-color: rgba(46, 110, 179, 0.45); }

.templates-note {
  margin-top: 24px;
  color: var(--text-3);
  font-size: 15px;
}

/* Privacy strip */

.privacy-strip {
  border: 1px solid var(--edge-soft);
  background: var(--glass);
  border-radius: 28px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.privacy-strip p {
  color: var(--text-2);
  max-width: 36em;
  font-size: 16px;
}

.privacy-strip h2 { margin-bottom: 8px; }

/* ---------- Footer ---------- */

footer.site {
  margin-top: 64px;
  border-top: 1px solid var(--edge-soft);
  padding: 44px 0 56px;
  font-size: 14.5px;
  color: var(--text-3);
}

.foot-grid {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.foot-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

footer.site a { color: var(--text-2); text-decoration: none; }
footer.site a:hover { color: var(--text); }

.foot-legal { max-width: 52em; }

/* ---------- Subpages (support / privacy / terms) ---------- */

.doc {
  max-width: 760px;
  margin-inline: auto;
  padding: 64px 0 40px;
}

.doc h1 {
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  margin-bottom: 10px;
}

.doc .updated {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 40px;
}

.doc h2 {
  font-size: 22px;
  margin: 42px 0 12px;
}

.doc h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17.5px;
  margin: 26px 0 8px;
}

.doc p, .doc li {
  color: var(--text-2);
  font-size: 16.5px;
}

.doc ul { padding-left: 22px; margin: 10px 0 18px; }
.doc li { margin-bottom: 8px; }
.doc p { margin-bottom: 16px; }

.doc a { color: var(--aqua); text-decoration: none; }
.doc a:hover { text-decoration: underline; }

.doc .card {
  border: 1px solid var(--edge);
  background: var(--glass);
  border-radius: 20px;
  padding: 24px 28px;
  margin: 24px 0;
}

.doc .card p:last-child { margin-bottom: 0; }

.mail-btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none !important;
  border-radius: 999px;
  padding: 13px 28px;
  color: var(--ink) !important;
  background: linear-gradient(92deg, var(--aqua), var(--mint));
  margin: 6px 0 10px;
}

/* Focus visibility */

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 3px;
  border-radius: 6px;
}
