/* Tradecraft ATS brand styles, shared by every layout. From the "Texture
   Tradecraft" design system (the waitlist design handoff): dark only, with
   Texture yellow #FFEB44 as the only accent.
   Font: New Science, from Texture's Adobe Fonts web project (loaded in
   shared/_brand_head). Each domain serving the site must be listed in that
   web project, or pages fall back to Inter / the system font. */

:root {
  --tc-bg: #192430; /* Texture Midnight */
  --tc-bg-footer: #141d27;
  --tc-surface: #212e3c;
  --tc-surface-raised: #283647;
  --tc-border: #344354;
  --tc-border-strong: #46566a;
  --tc-text: #fcfafa;
  --tc-text-soft: #dddddd;
  --tc-text-muted: #a9a9a9;
  --tc-text-faint: #9ea6b0;
  --tc-accent: #ffeb44;
  --tc-accent-hover: #fff6a8;
  --tc-on-accent: #192430;
  --tc-accent-tint: rgba(255, 235, 68, 0.08);
  --tc-accent-line: rgba(255, 235, 68, 0.28);
  --tc-success: #3ecf8e;
  --tc-success-tint: rgba(62, 207, 142, 0.12);
  --tc-font: "new-science", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --tc-font-display: "new-science", Inter, system-ui, sans-serif;
  --tc-gutter: 24px;
  --tc-radius: 12px;
  color-scheme: dark;
}
@media (max-width: 640px) {
  :root { --tc-gutter: 16px; }
}

/* Dark public page chrome (layouts/public) */
.tc-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--tc-bg);
  color: var(--tc-text);
  font-family: var(--tc-font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.tc-page > main { flex: 1 0 auto; }
/* keep the hidden attribute working on elements that set their own display */
.tc-page [hidden] { display: none !important; }
.tc-page *,
.tc-page *::before,
.tc-page *::after { box-sizing: border-box; }

/* :where keeps these at element specificity so component colors (.tc-btn) win */
:where(.tc-page) a { color: var(--tc-accent); }
:where(.tc-page) a:hover { color: var(--tc-accent-hover); }
.tc-page :focus-visible { outline: 2px solid var(--tc-accent); outline-offset: 3px; border-radius: 4px; }

.tc-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: var(--tc-gutter);
  padding-right: var(--tc-gutter);
}

.tc-card { background: var(--tc-surface); border: 1px solid var(--tc-border); border-radius: var(--tc-radius); padding: 22px; }

/* Small uppercase label in yellow */
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tc-accent);
  margin: 0;
}

/* Hidden on screen, still read by screen readers */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Long-form content pages (static_pages) */
.tc-prose { max-width: 760px; padding-top: 56px; padding-bottom: 24px; }
.tc-prose h1 {
  font-family: var(--tc-font-display);
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  text-wrap: balance;
}
.tc-prose__meta { color: var(--tc-text-muted); font-size: 14px; margin: -12px 0 32px; }
.tc-prose h2 { font-family: var(--tc-font-display); font-size: 24px; line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; margin: 40px 0 12px; }
.tc-prose h3 { font-size: 17px; font-weight: 700; margin: 28px 0 8px; }
.tc-prose p,
.tc-prose li { color: var(--tc-text-soft); font-size: 15.5px; }
.tc-prose p { margin: 0 0 16px; }
.tc-prose ul { margin: 0 0 16px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.tc-prose strong { color: var(--tc-text); font-weight: 500; }
.tc-prose a { overflow-wrap: anywhere; }
.tc-prose__label { color: var(--tc-accent) !important; font-weight: 600; margin-bottom: 8px !important; }

/* Sign in / sign up */
.tc-auth { display: flex; justify-content: center; padding-top: 64px; padding-bottom: 24px; }
.tc-auth .tc-card { width: 100%; max-width: 440px; padding: 32px; }
.tc-auth .tc-card--wide { max-width: 560px; }
.tc-auth h1 { font-family: var(--tc-font-display); font-size: 28px; font-weight: 500; margin: 0 0 6px; }
.tc-auth__intro { color: var(--tc-text-muted); font-size: 15px; margin: 0 0 24px; }
.tc-auth__links {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--tc-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.tc-auth__links p { margin: 0; color: var(--tc-text-muted); }

/* Account deletion block (devise/registrations/edit) */
.tc-danger-zone { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--tc-border); }
.tc-danger-zone h2 { font-family: var(--tc-font-display); font-size: 18px; font-weight: 500; margin: 0 0 4px; }
.tc-danger-zone p { color: var(--tc-text-muted); font-size: 14px; margin: 0 0 14px; }
.tc-danger-zone form { margin: 0; }

/* Forms */
.tc-field { margin-bottom: 18px; }
.tc-field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }
.tc-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--tc-text); }
.tc-input {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  background: var(--tc-surface);
  border: 1px solid var(--tc-border-strong);
  border-radius: 8px;
  color: var(--tc-text);
  font: inherit;
  font-size: 15px;
}
.tc-input::placeholder { color: var(--tc-text-faint); }
.tc-input:focus { outline: none; border-color: var(--tc-accent); box-shadow: 0 0 0 3px var(--tc-accent-line); }
select.tc-input {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a7a9b7' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.tc-hint { display: block; color: var(--tc-text-faint); font-size: 13px; margin-top: 6px; }
.tc-check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--tc-text-soft); }
.tc-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--tc-accent); }
.tc-btn--block { width: 100%; justify-content: center; }

/* Devise error summary (devise/shared/_error_messages); also used on light Bootstrap pages */
.tc-errors {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.4);
  border-radius: 8px;
  color: #a12b2b;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 14px;
}
.tc-page .tc-errors { color: #ffc9c9; }
.tc-errors h2 { font-family: inherit; font-size: 15px; font-weight: 600; margin: 0 0 6px; color: inherit; }
.tc-errors ul { margin: 0; padding-left: 18px; }

/* Buttons: work on <a> and <button> */
.tc-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.tc-btn:hover { text-decoration: none; }
.tc-btn--primary,
.tc-btn--primary:hover { background: var(--tc-accent); color: var(--tc-on-accent); }
.tc-btn--primary:hover { background: #fff27a; }
.tc-btn--secondary,
.tc-btn--secondary:hover { border-color: var(--tc-border-strong); color: var(--tc-text); font-weight: 600; }
.tc-btn--secondary:hover { border-color: var(--tc-text-faint); }
.tc-btn--danger,
.tc-btn--danger:hover { border-color: rgba(255, 107, 107, 0.5); color: #ff8a8a; font-weight: 600; }
.tc-btn--danger:hover { background: rgba(255, 107, 107, 0.1); }
.tc-btn--sm { min-height: 44px; padding: 0 18px; font-size: 14px; }

/* Header (shared/_header) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1020; /* above Bootstrap content, below its modals */
  background: rgba(25, 36, 48, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--tc-border);
  color: var(--tc-text);
  font-family: var(--tc-font);
  line-height: 1.55;
}
.site-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px var(--tc-gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.site-header__logo { display: flex; align-items: center; }
.site-header__logo img { height: 34px; width: auto; display: block; }
.site-header__nav { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.site-header__nav form { margin: 0; }
.site-header__link { color: var(--tc-text-soft); font-size: 14px; font-weight: 600; text-decoration: none; padding: 0 8px; }
.site-header__link:hover { color: var(--tc-accent); }
.site-header__badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tc-accent);
  border: 1px solid rgba(255, 235, 68, 0.35);
  border-radius: 999px;
  padding: 2px 10px;
}

/* Flash messages (shared/_flash) */
.site-flash {
  /* explicit width: the app layout's body is a flex column, where auto margins would shrink-wrap */
  width: min(1072px, calc(100% - 2 * var(--tc-gutter)));
  margin: 16px auto 0;
  padding: 12px 18px;
  border-radius: 8px;
  font-family: var(--tc-font);
  font-size: 14.5px;
}
.site-flash--notice { background: rgba(62, 207, 142, 0.12); border: 1px solid rgba(62, 207, 142, 0.4); color: #1d7a52; }
.site-flash--alert { background: rgba(255, 107, 107, 0.12); border: 1px solid rgba(255, 107, 107, 0.4); color: #a12b2b; }
.tc-page .site-flash--notice { color: #bff0d8; }
.tc-page .site-flash--alert { color: #ffc9c9; }

/* Footer (shared/_footer) */
.site-footer {
  margin-top: 48px; /* same gap Bootstrap's mt-5 gave the old footer */
  border-top: 1px solid var(--tc-border);
  background: var(--tc-bg-footer);
  color: var(--tc-text-muted);
  font-family: var(--tc-font);
  line-height: 1.55;
}
.site-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px var(--tc-gutter) 40px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; }
.site-footer nav a { color: var(--tc-text-soft); text-decoration: none; }
.site-footer nav a:hover { color: var(--tc-accent); }
.site-footer__copyright { font-size: 13px; margin: 22px 0 0; }
.site-footer__disclosures {
  font-size: 12.5px;
  line-height: 1.6;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 920px;
}
.site-footer__disclosures p { margin: 0; }
.site-footer__disclosures a { color: var(--tc-text-soft); }
.site-footer__disclosures a:hover { color: var(--tc-accent); }
.site-footer sup { font-size: 0.6em; color: var(--tc-accent); }
/* application.css sets a bold display font on every <p>; keep footer copy plain */
.site-footer p { font-family: var(--tc-font); font-weight: 400; }

.tc-btn:disabled,
.tc-btn:disabled:hover { opacity: 0.5; cursor: not-allowed; }
.tc-btn--primary:disabled:hover { background: var(--tc-accent); }
