/*
Theme Name: SciAI Labs
Theme URI: https://sciailabs.ai
Author: SciAI Labs India Private Limited
Description: Company site and blog for sciailabs.ai. Classic theme - templates are plain PHP, so the markup here is the markup that ships.
Version: 1.0.0
License: Proprietary
Text Domain: sciailabs
*/

/*
 * Palette taken from the logo: deep #112D4E, mid #27548A, steel #3F72AF,
 * pale #DBE2EF. The gradient is the logo's own, so the header hairline and
 * buttons carry the same sweep as the mark.
 *
 * Contrast, measured against white:
 *   --ink    #112D4E  14.0:1
 *   --muted  #4C6484   5.9:1
 *   --accent #27548A   7.7:1  (links, headings)
 *   steel    #3F72AF   4.9:1  (passes for text, used on the gradient)
 *   --accent-bright #7FA6D9  2.4:1 - decoration only, never text
 */

:root {
  --bg: #ffffff;
  --surface: #f2f6fb;
  --ink: #112d4e;
  --muted: #4c6484;
  --line: #d9e2ee;

  --accent: #27548a;        /* links and headings, 7.7:1 on white */
  --accent-hover: #1b3d68;
  --accent-blue: #3f72af;   /* steel, 4.9:1 on white */
  --accent-bright: #7fa6d9; /* decorative only - fails text contrast */

  --gradient: linear-gradient(135deg, #27548a, #3f72af);

  /* Two widths, used deliberately. --shell is the page container: header,
     footer and main all share it so the logo, content and copyright line up on
     the same left edge. --measure caps running prose inside that shell, since
     a 62rem line length is unreadable. */
  --shell: 62rem;
  --measure: 68ch;
}

/*
 * Dark scheme: the same family inverted. Backgrounds descend from #112D4E,
 * text rises to the logo's pale #DBE2EF.
 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1a2b;
    --surface: #12283f;
    --ink: #dbe2ef;
    --muted: #9db3cc;
    --line: #24405c;

    --accent: #8ab0dd;
    --accent-hover: #dbe2ef;
    --accent-blue: #7fa6d9;
    --accent-bright: #5b8ec4;
  }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

.wrap {
  max-width: var(--shell);
  margin: 0 auto;
  /* padding-inline, not the padding shorthand. <main> carries .wrap too, and a
     shorthand here beats "main { padding-block }" on specificity, silently
     flattening the page's vertical rhythm. */
  padding-inline: 1.25rem;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
  /* Hairline pulled from the logo gradient, tying the chrome to the mark. */
  box-shadow: inset 0 -3px 0 -2px transparent;
  background-image: var(--gradient);
  background-size: 100% 2px;
  background-position: bottom;
  background-repeat: no-repeat;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--ink);
}

.site-logo-lockup {
  display: block;
  /* The lockup is 590x190, so this renders about 48px tall. */
  width: 150px;
  flex: none;
}

.site-logo-lockup svg {
  display: block;
  width: 100%;
  height: auto;
}

/* The wordmark's "SCI" and the tagline ship as #112D4E. Against the dark
   scheme's #07161f that is roughly 1.3:1 - they simply disappear. Lift only
   those two, using #DBE2EF from the logo's own palette.
   Scoped to text so the mark's centre disc keeps its dark fill; lifting that
   too would merge it with the light dot sitting inside it. */
@media (prefers-color-scheme: dark) {
  .site-logo-lockup text[fill="#112D4E"],
  .site-logo-lockup tspan[fill="#112D4E"] {
    fill: #dbe2ef;
  }

  .site-logo-lockup tspan[fill="#27548A"] {
    fill: #7fa6d9;
  }
}

.site-title {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
}

.site-nav a:hover { color: var(--ink); }

main { padding-block: 3rem; }

/* Homepage sections. Markup lives in template-parts/home/. */

.hero { padding: 1rem 0 3rem; }

.hero-eyebrow {
  margin: 0 0 .75rem;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-title {
  margin: 0 0 .9rem;
  max-width: 22ch;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero-lede {
  margin: 0 0 1.75rem;
  max-width: 58ch;
  font-size: 1.125rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 0;
}

.button {
  display: inline-block;
  padding: .65rem 1.2rem;
  border-radius: 7px;
  background: var(--gradient);
  color: #fff;
  text-decoration: none;
  font-weight: 550;
  border: 1px solid transparent;
}

.button:hover {
  color: #fff;
  filter: brightness(1.1);
}

.button-secondary {
  background: none;
  color: var(--accent);
  border-color: var(--line);
}

.button-secondary:hover {
  color: var(--accent-hover);
  border-color: var(--accent);
  filter: none;
}

.services,
.research,
.approach {
  padding: 3rem 0;
  border-top: 1px solid var(--line);
}

.section-title {
  margin: 0 0 .5rem;
  font-size: 1.375rem;
  letter-spacing: -0.015em;
}

.section-lede {
  margin: 0 0 2rem;
  max-width: 58ch;
  color: var(--muted);
}

/* Services: four practice areas, each with its own offerings. Cards carry a
   heading, a sentence and a list, so they need width - 20rem settles to two
   across on desktop rather than four cramped columns. */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1.25rem;
}

.service {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.service-title {
  margin: 0 0 .5rem;
  font-size: 1.0625rem;
  color: var(--accent);
}

.service-body {
  margin: 0 0 1rem;
  color: var(--muted);
}

.service-items {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .9375rem;
}

.service-items li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: .4rem;
}

.service-items li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-bright);
}

.service-items li:last-child { margin-bottom: 0; }

/* Research: shorter entries than services, so they tolerate narrower columns. */

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 1.5rem;
}

.research-title {
  margin: 0 0 .35rem;
  padding-top: .75rem;
  border-top: 2px solid var(--accent-bright);
  font-size: 1rem;
}

.research-item p {
  margin: 0;
  color: var(--muted);
  font-size: .9375rem;
}

/* Approach: an ordered list, numbered explicitly so the sequence survives the
   list markers being removed. */

.approach-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.approach-number {
  display: block;
  margin-bottom: .5rem;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .06em;
  /* --accent, not --accent-bright: these numerals are text, and the bright
     tone sits around 2.4:1. It is reserved for rules and bullets. */
  color: var(--accent);
}

.approach-title {
  margin: 0 0 .35rem;
  font-size: 1rem;
}

.approach-step p {
  margin: 0;
  color: var(--muted);
  font-size: .9375rem;
}

/* Blog.
   Posts sit in the same shell as everything else so the header, article and
   footer share a left edge, but the text itself is capped at the reading
   measure rather than running the full width. */

.entry,
.page-intro { max-width: var(--measure); }

.entry + .entry {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.entry-title {
  margin: 0 0 .35rem;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.entry-title a { text-decoration: none; color: inherit; }
.entry-title a:hover { color: var(--accent); }

.entry-meta {
  margin: 0 0 1rem;
  font-size: .875rem;
  color: var(--muted);
}

.entry-content img,
.entry-content iframe { max-width: 100%; height: auto; }

.entry-content pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.entry-content blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent-bright);
  color: var(--muted);
}

/* Contact page */

.contact { padding-bottom: 2rem; }

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 3rem;
  margin-top: 2rem;
}

@media (max-width: 48rem) {
  .contact-layout { grid-template-columns: 1fr; gap: 2.5rem; }
}

.field { margin: 0 0 1.25rem; }

.field label {
  display: block;
  margin-bottom: .35rem;
  font-size: .9375rem;
  font-weight: 550;
}

.field .req { color: var(--accent); }

.field input,
.field textarea {
  width: 100%;
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.field textarea { resize: vertical; }

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.field button { cursor: pointer; }

/* Honeypot. Positioned off-screen rather than display:none, which some bots
   detect and skip. Real submissions leave it empty. */
.contact-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.notice {
  margin: 0 0 1.5rem;
  padding: .8rem 1rem;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: .9375rem;
}

.notice-success { border-color: var(--accent); }
.notice-error { border-color: #c2410c; }

.contact-aside-title {
  margin: 0 0 .5rem;
  font-size: 1rem;
}

.contact-aside-title + p { margin-top: 0; }

.contact-aside p,
.contact-steps { color: var(--muted); font-size: .9375rem; }

.contact-aside > * + .contact-aside-title { margin-top: 2rem; }

.contact-steps {
  margin: 0;
  padding-left: 1.1rem;
}

.contact-steps li { margin-bottom: .5rem; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  color: var(--muted);
  font-size: .875rem;
}

/* Address block, then the copyright centred on its own row beneath it. The
   earlier side-by-side flex row cannot centre the copyright against the page,
   only against whatever space the address leaves. */

/* Wide enough for the longest address line (44 characters) so the block breaks
   only at its own <br>s rather than wrapping mid-line. */
.footer-block { max-width: 46ch; }

.footer-heading {
  margin: 0 0 .4rem;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}

.footer-address {
  /* <address> is italic by default in every browser, which reads as emphasis
     rather than as a postal address. */
  font-style: normal;
  margin: 0;
  line-height: 1.6;
}

.footer-entity {
  color: var(--ink);
  font-weight: 600;
}

.footer-copy {
  margin: 2rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.pagination {
  margin-top: 3rem;
  display: flex;
  gap: 1rem;
}

.field-hint {
  display: block;
  margin-top: .35rem;
  font-size: .8125rem;
  color: var(--muted);
}
