/* ==========================================================================
   Portal / auth theme bridge
   --------------------------------------------------------------------------
   The login, OTP and client-portal views are written against a small token
   set (--paper, --ink, --rule, --signal ...). The SmartNet frontend layout
   never defined those tokens, and switches theme with `body.light-mode`
   (dark is the default). This file defines the tokens from the SmartNet
   palette for BOTH themes, so those pages follow the same light/dark colours
   as the rest of the site.

   Tokens are defined on <body>. The layout rules below only apply to pages
   that opt in with <body class="theme-paper">.
   ========================================================================== */

/* ---- Tokens: dark (default) ------------------------------------------- */
body {
  --paper:       #080220;   /* = --theme-bg-color1 */
  --paper-2:     #120C2A;   /* = --theme-bg-color2 */
  --paper-3:     #1F1A36;   /* = --theme-color5 */
  --ink:         #FFFFFF;
  --ink-2:       #C4C0D6;
  --ink-3:       #9A95B4;
  --rule:        #2A2445;
  --rule-2:      #3A3360;
  --signal:      #1C8CFC;   /* = --theme-primary */
  --signal-2:    #4DA3FF;
  --signal-wash: #0F1B3D;
  --brand-1:     #2EE3FF;
  --brand-2:     #1C8CFC;
  --pos:         #4ADE9A;
  --warn:        #E2B15C;

  --font-display: "Rajdhani", "Nunito Sans", system-ui, sans-serif;
  --font-body:    "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --t-mono: 0.6875rem;
  --t-sm:   0.875rem;
  --t-base: 1rem;
  --t-lead: 1.125rem;
  --t-h4:   1.125rem;
  --t-h3:   1.5rem;
  --t-h2:   2.25rem;
  --t-h1:   3rem;

  --s1: 0.25rem; --s2: 0.5rem;  --s3: 0.75rem; --s4: 1rem;
  --s5: 1.5rem;  --s6: 2rem;    --s7: 3rem;    --s8: 4rem;
  --s9: 6rem;    --s10: 8rem;

  --shell:     80rem;
  --shell-pad: clamp(1.25rem, 4vw, 3rem);
  --band:      clamp(4rem, 9vw, 7.5rem);
  --focus:     2px solid var(--signal);
}

/* ---- Tokens: light ---------------------------------------------------- */
body.light-mode {
  --paper:       #FFFFFF;
  --paper-2:     #F1F5F9;
  --paper-3:     #E5E7EB;
  --ink:         #1F2937;
  --ink-2:       #4B5563;
  --ink-3:       #6B7280;
  --rule:        #E5E7EB;
  --rule-2:      #D1D5DB;
  --signal:      #1273DE;
  --signal-2:    #0B5CB8;
  --signal-wash: #E6F1FE;
  --brand-1:     #1C8CFC;
  --brand-2:     #1273DE;
  --pos:         #1D6B4A;
  --warn:        #8A5A12;
}

/* ---- Page ground ------------------------------------------------------ */
body.theme-paper,
body.theme-paper .page-wrapper {
  background-color: var(--paper) !important;
  color: var(--ink-2);
}
/* The layout's light-mode rule forces every <section> to #fff; keep the
   themed paper colour instead so cards and ground stay consistent. */
body.light-mode.theme-paper,
body.light-mode.theme-paper .page-wrapper,
body.light-mode.theme-paper main section {
  background-color: var(--paper) !important;
  background-image: none !important;
}
body.theme-paper main section { background-color: transparent; }

/* Headings: the base theme colours them dark-green, unreadable on dark. */
body.theme-paper:not(.light-mode) :is(h1, h2, h3, h4, h5, h6) {
  color: var(--ink);
}
body.theme-paper:not(.light-mode) :is(p, li, label, td, th, small) {
  color: var(--ink-2);
}

/* ---- Layout primitives ------------------------------------------------ */
body.theme-paper .shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}
body.theme-paper .band { padding-block: var(--band); }
body.theme-paper .band--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

/* ---- Typography components -------------------------------------------- */
body.theme-paper .eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: 0 0 var(--s5);
}
body.theme-paper .eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}
body.theme-paper .eyebrow--plain::after { display: none; }
body.theme-paper .muted { color: var(--ink-2) !important; }
body.theme-paper .dim { color: var(--ink-3) !important; }
body.theme-paper .mb-6 { margin-bottom: var(--s6); }
body.theme-paper .mt-6 { margin-top: var(--s6); }

/* ---- Buttons used by the auth pages ----------------------------------- */
body.theme-paper .btn.btn--signal,
body.theme-paper .btn.btn--ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 0.72rem 1.25rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: var(--t-sm);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
body.theme-paper .btn.btn--signal {
  background: var(--signal);
  color: #fff;
  border: 1px solid var(--signal);
}
body.theme-paper .btn.btn--signal:hover {
  background: var(--signal-2);
  border-color: var(--signal-2);
  color: #fff;
}
body.theme-paper .btn.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule-2);
}
body.theme-paper .btn.btn--ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ---- Forms ------------------------------------------------------------ */
body.theme-paper .field { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
body.theme-paper .field label {
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}
body.theme-paper .field label .req { color: var(--signal); }
body.theme-paper .field input,
body.theme-paper .field textarea,
body.theme-paper .field select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: var(--paper-2);
  border: 1px solid var(--rule-2);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: var(--t-base);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
body.theme-paper .field input::placeholder,
body.theme-paper .field textarea::placeholder { color: var(--ink-3); }
body.theme-paper .field input:focus,
body.theme-paper .field textarea:focus,
body.theme-paper .field select:focus {
  outline: none;
  border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-wash);
}
body.theme-paper .field__error { font-size: 0.75rem; color: #F2837B; display: none; }
body.light-mode.theme-paper .field__error { color: #B3261E; }
body.theme-paper .field[data-invalid="true"] input,
body.theme-paper .field[data-invalid="true"] textarea { border-color: #F2837B; }
body.light-mode.theme-paper .field[data-invalid="true"] input,
body.light-mode.theme-paper .field[data-invalid="true"] textarea { border-color: #B3261E; }
body.theme-paper .field[data-invalid="true"] .field__error { display: block; }

body.theme-paper .form-note { font-size: 0.8125rem; color: var(--ink-3); line-height: 1.5; }
body.theme-paper .form-status {
  display: none;
  padding: var(--s4);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--signal);
  background: var(--paper-2);
  font-size: var(--t-sm);
  color: var(--ink-2);
  margin-bottom: var(--s5);
}
body.theme-paper .form-status[data-show="true"] { display: block; }

/* h1 variants of banner headings (one H1 per page). Sized for longer, keyword-led titles. */
@media (min-width: 992px) {
  .banner-section-one .banner-content-wrap .banner-content h1 { font-size: 72px; line-height: 78px; }
  .banner-section-three .banner-content-wrap .banner-content h1 { font-size: 48px; line-height: 56px; }
}
/* ── "How a first project works" (home + services), dark and light themes ── */
section.first-project { padding: 70px 0; }
.first-project .sec-title { margin-bottom: 0; }
.first-project-steps { list-style: none; margin: 30px 0 0; padding: 0; }
.first-project-steps > li { display: flex; }
.first-project-card {
    width: 100%; padding: 28px 26px; border-radius: 16px;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .18);
}
.first-project-label {
    display: inline-block; margin-bottom: 14px; padding: 6px 16px; border-radius: 30px;
    background: var(--theme-primary, #1d3fd6); color: #fff; font-weight: 700; font-size: 15px; line-height: 1.3;
}
.first-project-card p { margin: 0; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, .88); }
.first-project-cta { margin-top: 36px; text-align: center; }
.first-project-btn {
    display: inline-flex; align-items: center; gap: 10px; padding: 14px 30px; border-radius: 40px;
    background: var(--theme-primary, #1d3fd6); color: #fff; font-weight: 700; font-size: 17px;
    text-decoration: none; transition: opacity .25s, transform .25s;
}
.first-project-btn:hover { opacity: .88; transform: translateY(-2px); color: #fff; }

body.light-mode section.first-project { background: #ffffff !important; }
body.light-mode .first-project-card {
    background: #f4f6ff; border-color: #d5dcff; box-shadow: 0 6px 20px rgba(31, 41, 55, .08);
}
body.light-mode .first-project-card p { color: #374151 !important; }
body.light-mode .first-project-btn,
body.light-mode .first-project-btn:hover { color: #fff !important; }