/* ═══════════════════════════════════════════
   Goldfish Agent
   ═══════════════════════════════════════════ */

:root {
  --bg: #1e2940;
  --bg-deep: #182236;
  --bg-card: #263350;
  --bg-card-hover: #2d3c5c;
  --accent: #d14424;
  --accent-hover: #e04e2e;
  --accent-subtle: rgba(209, 68, 36, 0.12);
  --gold: #e9a830;
  --gold-light: #f4c860;
  --gold-subtle: rgba(233, 168, 48, 0.10);
  --text: #f4f6fc;
  --text-2: #cdd4e6;
  --text-3: #9aa4be;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.2);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
  --radius: 20px;
  --radius-sm: 12px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI',
               Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(ellipse 1200px 700px at 12% -6%, rgba(233, 168, 48, 0.10), transparent 60%),
              radial-gradient(ellipse 1000px 600px at 88% 8%, rgba(209, 68, 36, 0.07), transparent 55%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--gold);
}

a { color: var(--gold); transition: color 0.2s; }
a:hover { color: var(--gold-light); }
img { max-width: 100%; display: block; }

/* ─── Layout ─── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 28px; }

/* ─── Header ─── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(30, 41, 64, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header .container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  gap: 16px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}

.brand__logo {
  height: 48px;
  width: auto;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand:hover .brand__logo { transform: scale(1.04); }

.brand__tag {
  font-size: 0.92rem;
  color: var(--text-3);
  font-weight: 500;
  border-left: 1px solid var(--border);
  padding-left: 16px;
}

/* ─── Hero ─── */
.hero { padding: 72px 0 48px; }

.hero--landing > .container {
  text-align: center;
  max-width: 820px;
}

.hero__logo {
  display: block;
  height: clamp(80px, 12vw, 130px);
  width: auto;
  margin: 0 auto 32px;
  filter: drop-shadow(0 8px 24px rgba(233, 168, 48, 0.2));
  animation: heroLogo 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.eyebrow {
  display: inline-block;
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-subtle);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid rgba(209, 68, 36, 0.2);
}

.hero h1 {
  margin: 20px auto 18px;
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 800;
  max-width: 16ch;
}

.hero__lead {
  margin: 0 auto;
  font-size: clamp(1.08rem, 1.8vw, 1.28rem);
  color: var(--text-2);
  max-width: 48ch;
  line-height: 1.6;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  justify-content: center;
}

.hero__chips span {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-2);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero__chips span:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-subtle);
  transform: translateY(-1px);
}

/* ─── CTA ─── */
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  padding: 15px 30px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 4px 20px rgba(209, 68, 36, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-link:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(209, 68, 36, 0.4);
  background: var(--accent-hover);
}

.cta-link span {
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-link:hover span { transform: translateX(3px); }

/* ─── Steps section ─── */
.steps-section {
  padding: 72px 0 80px;
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 44px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0;
}

.section-header p {
  color: var(--text-2);
  font-size: 1.1rem;
  margin: 12px 0 0;
}

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

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: visible;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(233, 168, 48, 0.2);
  background: var(--bg-card-hover);
}

.step-card__img-wrap {
  height: 170px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-top: -28px;
  padding: 0 16px;
}

.step-card__img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-card:hover .step-card__img {
  transform: scale(1.06) translateY(-2px);
}

.step-card__body {
  padding: 20px 24px 28px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--gold-subtle);
  color: var(--gold);
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 14px;
  border: 1px solid rgba(233, 168, 48, 0.15);
}

.step-card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.step-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.97rem;
  line-height: 1.55;
}

/* ─── Signup section ─── */
.signup-section { padding: 72px 0 80px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
}

.card--signup { max-width: 720px; margin: 0 auto; }

.card h2 {
  margin: 0 0 6px;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
}

.signup-intro {
  margin: 0 0 20px;
  color: var(--text-2);
  font-size: 1.08rem;
}

.muted {
  color: var(--text-3);
  margin: 10px 0 0;
  font-size: 0.93rem;
}

/* ─── Forms ─── */
.form label {
  display: block;
  margin-top: 16px;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text);
}

.form input,
.form textarea,
.form select {
  width: 100%;
  margin-top: 6px;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(233, 168, 48, 0.12);
}

.form input::placeholder,
.form textarea::placeholder {
  color: var(--text-3);
}

.form select option {
  background: var(--bg-card);
  color: var(--text);
}

.form textarea { resize: vertical; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

/* ─── Buttons ─── */
button {
  min-height: 50px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-subtle);
}

button.primary {
  color: #ffffff;
  background: var(--accent);
  border-color: rgba(209, 68, 36, 0.6);
  box-shadow: 0 4px 16px rgba(209, 68, 36, 0.25);
}

button.primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(209, 68, 36, 0.35);
}

/* ─── Preview ─── */
.preview {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
  font-size: 0.95rem;
}

.preview code {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--gold-subtle);
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
}

.preview ul { margin: 10px 0 0; padding-left: 18px; }

.warn {
  margin-top: 8px;
  color: #f0a040;
  font-weight: 600;
}

/* ─── Sub-pages (confirmed, unsubscribed, etc.) ─── */
.page-center {
  max-width: 520px;
  margin: 80px auto 60px;
  text-align: center;
  padding: 0 20px;
}

.page-center__fish {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 28px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: float 5s ease-in-out infinite;
}

.page-center h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 12px;
}

.page-center p {
  color: var(--text-2);
  font-size: 1.08rem;
  line-height: 1.6;
  margin: 8px 0 0;
}

.page-center strong { color: var(--text); }

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 0.88rem;
}

.footer .container {
  padding-top: 18px;
  padding-bottom: 22px;
}

/* ═══════════════════════════════════════════
   Animations
   ═══════════════════════════════════════════ */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes heroLogo {
  from { opacity: 0; transform: translateY(-16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes heroEnter {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__copy {
  animation: heroEnter 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both;
}

/* Scroll-triggered fade-up */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up.d1 { transition-delay: 0.08s; }
.fade-up.d2 { transition-delay: 0.16s; }
.fade-up.d3 { transition-delay: 0.24s; }

/* ═══════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════ */

@media (max-width: 980px) {
  .steps-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
}

@media (max-width: 760px) {
  .container { padding: 0 16px; }
  .hero { padding: 40px 0 28px; }
  .hero__logo { margin-bottom: 20px; }
  .grid { grid-template-columns: 1fr; }
  .row { flex-direction: column; }
  .brand__logo { height: 36px; }
  .brand__tag { display: none; }
  .card { padding: 24px 18px; }
  .step-card__img-wrap { height: 140px; margin-top: -20px; }
  .steps-section { padding: 48px 0 56px; }
  .signup-section { padding: 48px 0 56px; }
  .page-center { margin: 48px auto 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
