/* ============================================================
   THE TREND TRADE — landing page
   Palette + type pulled from stock-tool/stock-tool.html :root
   so the site and the tool read as one brand.
   ============================================================ */

:root{
  /* --- exact tokens from the stock tool --- */
  --bg:#0a0b0d;
  --panel:#14161a;
  --panel-2:#1c1f24;
  --line:#2e3238;
  --bronze:#b08d57;
  --gold:#d4af37;
  --green:#4caf7d;
  --red:#d15b5b;
  --text:#ece9e2;
  --text-dim:#8f939a;

  /* --- page-only additions --- */
  --line-soft:rgba(176,141,87,0.22);
  --max:640px;
}

*{box-sizing:border-box;}

html{ -webkit-text-size-adjust:100%; }

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:'IBM Plex Sans',system-ui,sans-serif;
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  /* cinematic bronze wash, same treatment as the tool */
  background-image:
    radial-gradient(circle at 50% -10%, rgba(212,175,55,0.10), transparent 45%),
    radial-gradient(circle at 12% 8%, rgba(176,141,87,0.07), transparent 40%);
  background-attachment:fixed;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.wrap{
  width:100%;
  max-width:var(--max);
  margin:0 auto;
  padding:36px 20px 40px;
  flex:1 0 auto;
}

/* ------------------------------------------------------------
   State machine — body class decides which view is visible.
   No page reload; JS just swaps the class.
   ------------------------------------------------------------ */
.view{ display:none; }
body.state-capture #view-capture{ display:block; }
body.state-thanks  #view-thanks { display:block; }

/* fade the incoming view in */
.view{ animation:fadeUp .45s ease both; }
@keyframes fadeUp{
  from{ opacity:0; transform:translateY(10px); }
  to  { opacity:1; transform:none; }
}
@media (prefers-reduced-motion:reduce){
  .view{ animation:none; }
  *{ transition:none !important; }
}

/* ------------------------------------------------------------
   Brand header
   ------------------------------------------------------------ */
.brand{
  text-align:center;
  margin-bottom:34px;
}
.brand-logo{
  height:74px;
  width:auto;
  max-width:180px;
  object-fit:contain;
  filter:drop-shadow(0 4px 14px rgba(212,175,55,0.28));
}
.brand-name{
  font-family:'Oswald',sans-serif;
  font-weight:500;
  font-size:15px;
  letter-spacing:0.26em;
  text-transform:uppercase;
  color:var(--bronze);
  margin-top:10px;
}

/* ------------------------------------------------------------
   Headline block
   ------------------------------------------------------------ */
.eyebrow{
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  letter-spacing:0.22em;
  text-transform:uppercase;
  color:var(--bronze);
  text-align:center;
  margin:0 0 12px;
}

.headline{
  font-family:'Oswald',sans-serif;
  font-weight:600;
  font-size:clamp(34px,9vw,54px);
  line-height:1.05;
  letter-spacing:0.005em;
  text-transform:uppercase;
  color:var(--gold);
  text-align:center;
  margin:0 0 18px;
  text-shadow:0 2px 20px rgba(212,175,55,0.18);
}
.headline-thanks{
  font-size:clamp(26px,6.4vw,38px);
  color:var(--text);
  text-transform:none;
  letter-spacing:0;
}
/* JS focuses this heading so screen readers announce the view change.
   That focus is programmatic, never from the keyboard, so the ring is noise. */
.headline-thanks:focus{ outline:none; }

.subhead{
  font-size:16px;
  line-height:1.65;
  color:var(--text-dim);
  text-align:center;
  margin:0 auto 30px;
  max-width:520px;
}
.subhead strong{ color:var(--text); font-weight:600; }

/* ------------------------------------------------------------
   Value bullets
   ------------------------------------------------------------ */
.bullets{
  list-style:none;
  margin:0 0 34px;
  padding:0;
  display:grid;
  gap:2px;
  background:var(--line);
  border:1px solid var(--line);
  border-radius:6px;
  overflow:hidden;
}
.bullets li{
  display:flex;
  align-items:flex-start;
  gap:14px;
  background:var(--panel);
  padding:16px 18px;
  font-size:15px;
  line-height:1.55;
  color:var(--text-dim);
}
.bullets strong{ color:var(--text); font-weight:600; }
.bullet-num{
  flex:0 0 auto;
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  font-weight:500;
  letter-spacing:0.08em;
  color:var(--bronze);
  padding-top:3px;
}

/* ------------------------------------------------------------
   Form
   ------------------------------------------------------------ */
.form{
  background:var(--panel);
  border:1px solid var(--line);
  border-top:2px solid var(--bronze);
  border-radius:6px;
  padding:22px 20px 18px;
  margin-bottom:24px;
}

.field{ margin-bottom:14px; }

.field label{
  display:block;
  font-family:'IBM Plex Mono',monospace;
  font-size:10.5px;
  letter-spacing:0.09em;
  text-transform:uppercase;
  color:var(--text-dim);
  margin-bottom:7px;
}

.field input{
  width:100%;
  background:var(--panel-2);
  border:1px solid var(--line);
  border-radius:4px;
  padding:13px 12px;
  color:var(--text);
  font-family:'IBM Plex Sans',sans-serif;
  /* 16px minimum stops iOS Safari from zooming on focus */
  font-size:16px;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder{ color:#565a61; }
.field input:focus{
  outline:none;
  border-color:var(--bronze);
  box-shadow:0 0 0 3px rgba(176,141,87,0.16);
}
.field input.invalid{
  border-color:var(--red);
  box-shadow:0 0 0 3px rgba(209,91,91,0.14);
}

/* Privacy-policy consent checkbox */
.field-checkbox{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-bottom:16px;
}
.field-checkbox input[type="checkbox"]{
  flex:0 0 auto;
  width:19px;
  height:19px;
  margin:1px 0 0;
  accent-color:var(--gold);
  cursor:pointer;
}
.field-checkbox label{
  display:inline;
  font-family:'IBM Plex Sans',sans-serif;
  font-size:13.5px;
  line-height:1.5;
  letter-spacing:normal;
  text-transform:none;
  color:var(--text-dim);
  margin-bottom:0;
  cursor:pointer;
}
.field-checkbox label a{
  color:var(--bronze);
  text-decoration:underline;
}
.field-checkbox label a:hover{ color:var(--gold); }

/* CTA */
.cta{
  position:relative;
  width:100%;
  margin-top:6px;
  padding:16px 18px;
  border:none;
  border-radius:5px;
  background:linear-gradient(180deg,var(--gold),#b8952c);
  color:#14110a;
  font-family:'Oswald',sans-serif;
  font-weight:600;
  font-size:17px;
  letter-spacing:0.07em;
  text-transform:uppercase;
  cursor:pointer;
  box-shadow:0 6px 20px rgba(212,175,55,0.22);
  transition:transform .12s ease, box-shadow .15s ease, filter .15s ease;
}
.cta:hover{ filter:brightness(1.06); box-shadow:0 8px 26px rgba(212,175,55,0.32); }
.cta:active{ transform:translateY(1px); }
.cta:focus-visible{ outline:2px solid var(--text); outline-offset:3px; }

.cta:disabled{
  cursor:not-allowed;
  filter:saturate(.4) brightness(.7);
  box-shadow:none;
}
.cta:disabled:hover{ filter:saturate(.4) brightness(.7); }

.cta.is-loading{ pointer-events:none; filter:saturate(.6) brightness(.85); }
.cta.is-loading .cta-label{ visibility:hidden; }
.cta.is-loading .cta-spinner{
  display:block;
  position:absolute;
  top:50%; left:50%;
  width:19px; height:19px;
  margin:-9.5px 0 0 -9.5px;
  border:2px solid rgba(20,17,10,0.3);
  border-top-color:#14110a;
  border-radius:50%;
  animation:spin .65s linear infinite;
}
.cta-spinner{ display:none; }
@keyframes spin{ to{ transform:rotate(360deg); } }

.form-error{
  margin:12px 0 0;
  padding:10px 12px;
  background:rgba(209,91,91,0.10);
  border:1px solid rgba(209,91,91,0.42);
  border-radius:4px;
  color:#e58b8b;
  font-size:13.5px;
  line-height:1.5;
}

.trust{
  margin:14px 0 0;
  text-align:center;
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  letter-spacing:0.05em;
  color:var(--text-dim);
}

.yt-note{
  text-align:center;
  font-size:14px;
  line-height:1.6;
  color:var(--text-dim);
  margin:0 auto 26px;
  max-width:460px;
}
.yt-note strong{ color:var(--bronze); font-weight:600; }

/* ------------------------------------------------------------
   Secondary CTA — mobile only, sits under the subheadline so
   there's a conversion path above the fold before the fields.
   ------------------------------------------------------------ */
.mobile-cta-wrap{ display:none; }
@media (max-width:640px){
  .mobile-cta-wrap{ display:block; margin:0 auto 30px; }
}
.cta-secondary{
  display:block;
  width:100%;
  text-align:center;
  padding:14px 18px;
  border:1.5px solid var(--bronze);
  border-radius:5px;
  background:transparent;
  color:var(--gold);
  font-family:'Oswald',sans-serif;
  font-weight:600;
  font-size:15px;
  letter-spacing:0.06em;
  text-transform:uppercase;
  text-decoration:none;
  transition:border-color .15s ease, background .15s ease, color .15s ease;
}
.cta-secondary:hover{ border-color:var(--gold); background:rgba(212,175,55,0.08); }
.cta-secondary:focus-visible{ outline:2px solid var(--text); outline-offset:3px; }

/* ------------------------------------------------------------
   Scorecard preview placeholder — swap the frame's contents
   for a real screenshot of the finished scorecard.
   ------------------------------------------------------------ */
.scorecard-preview{
  margin:0 0 24px;
  text-align:center;
}
.scorecard-preview-frame{
  aspect-ratio:4/3;
  max-width:320px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--panel-2);
  border:1.5px dashed var(--line-soft);
  border-radius:6px;
  color:var(--bronze);
  font-size:36px;
}
.scorecard-preview figcaption{
  margin-top:10px;
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  letter-spacing:0.05em;
  text-transform:uppercase;
  color:var(--text-dim);
}

/* ------------------------------------------------------------
   Thank-you state
   ------------------------------------------------------------ */
.check-mark{
  width:62px; height:62px;
  margin:0 auto 22px;
  border:1.5px solid var(--gold);
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  color:var(--gold);
  background:rgba(212,175,55,0.07);
  box-shadow:0 0 30px rgba(212,175,55,0.16);
}

.divider{
  display:flex;
  align-items:center;
  gap:14px;
  margin:36px 0 26px;
  color:var(--bronze);
  font-family:'IBM Plex Mono',monospace;
  font-size:10.5px;
  letter-spacing:0.2em;
  text-transform:uppercase;
  white-space:nowrap;
}
.divider::before,
.divider::after{
  content:"";
  flex:1;
  height:1px;
  background:linear-gradient(90deg,transparent,var(--line-soft),transparent);
}

.block-label{
  font-family:'IBM Plex Mono',monospace;
  font-size:10.5px;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--text-dim);
  margin:0 0 12px;
}

/* Socials */
.social-block{ margin-bottom:32px; }
.social-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
}
.social-btn{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:16px 8px;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:6px;
  color:var(--text);
  text-decoration:none;
  font-size:13px;
  font-weight:600;
  letter-spacing:0.02em;
  transition:border-color .15s ease, background .15s ease, transform .12s ease;
}
.social-btn:hover{
  border-color:var(--bronze);
  background:var(--panel-2);
  transform:translateY(-2px);
}
.social-icon{ display:block; width:23px; height:23px; color:var(--bronze); }
.social-icon svg{ width:100%; height:100%; display:block; }
.social-btn:hover .social-icon{ color:var(--gold); }

/* Tools / affiliate */
.tools-block{ margin-bottom:8px; }
.tool-card{
  display:flex;
  align-items:center;
  gap:14px;
  padding:16px 18px;
  background:var(--panel);
  border:1px solid var(--line);
  border-left:2px solid var(--bronze);
  border-radius:6px;
  text-decoration:none;
  color:var(--text);
  transition:border-color .15s ease, background .15s ease;
}
.tool-card:hover{ background:var(--panel-2); border-color:var(--bronze); border-left-color:var(--gold); }
.tool-info{ flex:1; min-width:0; }
.tool-name{
  font-family:'Oswald',sans-serif;
  font-weight:500;
  font-size:17px;
  letter-spacing:0.03em;
  color:var(--gold);
  margin-bottom:3px;
}
.tool-desc{ font-size:13.5px; line-height:1.5; color:var(--text-dim); }
.tool-arrow{ flex:0 0 auto; color:var(--bronze); font-size:19px; }
.tool-card:hover .tool-arrow{ color:var(--gold); }

.ftc{
  margin:14px 0 0;
  font-size:12px;
  line-height:1.55;
  color:var(--text-dim);
  opacity:.85;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.footer{
  flex:0 0 auto;
  border-top:1px solid var(--line);
  padding:18px 20px 26px;
  text-align:center;
}
.footer p{
  margin:0;
  font-size:11.5px;
  letter-spacing:0.03em;
  color:var(--text-dim);
  opacity:.75;
}
.footer a{
  color:var(--text-dim);
  text-decoration:underline;
}
.footer a:hover{ color:var(--bronze); }

/* ------------------------------------------------------------
   Legal pages (privacy policy) — reuses brand header/footer,
   adds plain prose styling for the policy text itself.
   ------------------------------------------------------------ */
.brand-link{
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  text-decoration:none;
}
.legal-title{
  font-family:'Oswald',sans-serif;
  font-weight:600;
  font-size:clamp(28px,7vw,38px);
  color:var(--gold);
  text-align:center;
  text-transform:uppercase;
  margin:0 0 8px;
}
.legal-updated{
  text-align:center;
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  letter-spacing:0.05em;
  color:var(--text-dim);
  margin:0 0 30px;
}
.legal h2{
  font-family:'Oswald',sans-serif;
  font-weight:500;
  font-size:19px;
  color:var(--bronze);
  margin:28px 0 10px;
}
.legal p,
.legal li{
  font-size:14.5px;
  line-height:1.65;
  color:var(--text-dim);
}
.legal ul{ padding-left:20px; margin:10px 0; }
.legal a{ color:var(--gold); text-decoration:underline; }
.legal a:hover{ color:var(--bronze); }
.legal .back-link{
  display:inline-block;
  margin-top:20px;
  font-family:'IBM Plex Mono',monospace;
  font-size:12px;
}

/* ------------------------------------------------------------
   Mobile — most traffic arrives here from YouTube
   ------------------------------------------------------------ */
@media (max-width:420px){
  .wrap{ padding:26px 16px 32px; }
  .brand-logo{ height:60px; }
  .brand{ margin-bottom:26px; }
  .bullets li{ padding:14px 15px; font-size:14.5px; gap:11px; }
  .form{ padding:18px 15px 15px; }
  .social-grid{ gap:8px; }
  .social-btn{ padding:14px 4px; font-size:12px; }
  .tool-card{ padding:14px 15px; gap:11px; }
  .subhead{ font-size:15px; }
}

/* Very narrow viewports (folded phones, in-app webviews with side chrome).
   The 34px clamp floor is wide enough to overflow "SCORE ANY STOCK" below
   ~300px, so drop the floor rather than let the headline clip. */
@media (max-width:340px){
  .headline{ font-size:30px; }
  .wrap{ padding:22px 12px 28px; }
  .social-btn{ font-size:11.5px; letter-spacing:0; }
}

/* Short landscape phones — keep the fold usable */
@media (max-height:520px) and (orientation:landscape){
  .brand-logo{ height:52px; }
}
