/* Siegel Software — baseline site styles
   Inspired by the live Weebly "Birdseye" theme at siegelsoftware.com */

:root {
  --color-text: #2a2a2a;
  --color-text-muted: #555;
  --color-bg: #ffffff;
  --color-bg-soft: #f5f5f5;
  --color-bg-dark: #0d0d0d;
  --color-hero-text: #d5d5d5;
  --color-border: #e5e5e5;
  --color-accent: #1a1a1a;
  --color-accent-hover: #333;
  --font-sans: "Roboto", system-ui, -apple-system, sans-serif;
  --font-serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-display: "Montserrat", var(--font-sans);
  --max-width: 1100px;
  --header-height: 80px;
  --radius: 2px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  --transition: 200ms ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0 0 1.1em;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0 0 1.1em;
  padding-left: 1.35em;
}

li {
  margin-bottom: 0.4em;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0 0 0.75em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
}

h3 {
  font-size: 1.25rem;
}

.container {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}

/* —— Header —— */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 1.1rem 0;
  color: #fff;
  transition: background var(--transition), box-shadow var(--transition), color var(--transition);
}

.site-header.is-scrolled,
.site-header.solid {
  background: rgba(12, 12, 12, 0.95);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(100% - 2.5rem, 1200px);
  margin-inline: auto;
}

.logo {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.logo:hover {
  opacity: 0.7;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: block;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity var(--transition), border-color var(--transition);
}

.nav-list a:hover {
  opacity: 0.65;
}

.nav-list a.active {
  border-color: currentColor;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  color: inherit;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
  transition: transform var(--transition), opacity var(--transition);
}

/* —— Buttons —— */
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn:hover {
  background: var(--color-accent-hover);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header-height) + 2rem) 0 5rem;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.35) 40%, rgba(0, 0, 0, 0.55) 100%),
    url("../assets/images/hero-graph.jpg") center / cover no-repeat;
  color: var(--color-hero-text);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-hero-text);
  max-width: 14ch;
  margin: 0;
}

.hero-title strong {
  font-weight: 700;
}

.hero-content {
  max-width: 40rem;
}

.hero-title.hero-title-wide {
  max-width: 18ch;
}

.hero-lead {
  margin: 1.25rem 0 0;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  max-width: 38rem;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 1.75rem;
}

.page-hero {
  min-height: 42vh;
  padding-bottom: 3rem;
  align-items: flex-end;
}

.page-hero .hero-title {
  max-width: none;
  font-size: clamp(2rem, 5vw, 3.25rem);
}

.page-hero .hero-lead {
  max-width: 40rem;
}

/* —— Sections —— */
.section {
  padding: 5rem 0;
}

.section-soft {
  background: var(--color-bg-soft);
}

.section-dark {
  background: var(--color-bg-dark);
  color: #e8e8e8;
}

.section-dark h2,
.section-dark h3 {
  color: #fff;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 0.75rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.split-reverse .split-media {
  order: 2;
}

.split-media img {
  width: 100%;
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.prose {
  max-width: 70ch;
}

.prose.narrow {
  max-width: 60ch;
  margin-inline: auto;
}

.prose h2 {
  margin-top: 2rem;
}

.prose h3 {
  margin-top: 1.75rem;
}

.prose pre,
.prose code {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.85em;
}

.prose pre {
  background: #1e1e1e;
  color: #e8e8e8;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  border-radius: 4px;
  margin: 1.25rem 0;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.center {
  text-align: center;
}

.stack > * + * {
  margin-top: 1.25rem;
}

.section-intro {
  max-width: 42rem;
  margin: 0 auto 2.5rem;
  color: var(--color-text-muted);
}

.section-intro.left {
  margin-left: 0;
  margin-right: 0;
}

/* —— Service cards —— */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 1.75rem 1.5rem;
  height: 100%;
  transition: box-shadow var(--transition), transform var(--transition);
}

.service-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.service-card.featured {
  border-color: #222;
  box-shadow: 0 0 0 1px #222;
}

.service-card .eyebrow {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.55;
  margin: 0 0 0.65rem;
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.service-card ul {
  margin: 0;
  padding-left: 1.15em;
  font-size: 0.92rem;
  color: var(--color-text);
}

.service-card li {
  margin-bottom: 0.35em;
}

/* —— Insights / video placeholder —— */
.insights-panel {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  border: 1px dashed #bbb;
  border-radius: 4px;
  background: #fafafa;
}

.insights-panel .video-slot {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.insights-panel .video-slot span {
  display: block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
}

.pill {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  background: #fff;
}

/* —— Cards / grids —— */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-image {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  background: #eee;
}

.card-body {
  padding: 1.25rem;
}

.card-body h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.card-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.work-tile {
  display: block;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow var(--transition), transform var(--transition);
}

.work-tile:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.work-tile img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: #fafafa;
  padding: 1.5rem;
}

.work-tile span {
  display: block;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-top: 1px solid var(--color-border);
}

/* —— Case study list —— */
.study-list {
  display: grid;
  gap: 2rem;
}

.study-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.75rem;
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  transition: box-shadow var(--transition);
}

.study-card:hover {
  box-shadow: var(--shadow);
}

.study-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 3px;
  background: #f0f0f0;
}

.study-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.study-card h2 a:hover {
  text-decoration: underline;
}

.study-excerpt {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* —— Contact form —— */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.contact-details {
  font-size: 1.05rem;
}

.contact-details a {
  text-decoration: underline;
  font-weight: 600;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.required {
  color: #b00;
}

input,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
  transition: border-color var(--transition);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #222;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
}

.form-note-success {
  color: #0d5c2e;
  font-weight: 600;
}

.form-note-error {
  color: #9b1c1c;
  font-weight: 600;
}

/* Honeypot — hidden from people, visible to simple bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* —— Education block —— */
.edu-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.edu-list li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--color-border);
}

.edu-list li:last-child {
  border-bottom: 1px solid var(--color-border);
}

.edu-list strong {
  display: block;
}

/* —— Article —— */
.article {
  padding: 6.5rem 0 4rem;
}

.article-header {
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.article-header .meta {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
}

.article-body img.lead {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 4px;
  margin: 0 0 2rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.65;
}

.back-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* —— Footer —— */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 3rem 0 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
}

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

.footer-nav a {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-copy {
  font-size: 0.85rem;
  width: 100%;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* —— Responsive —— */
@media (max-width: 900px) {
  .split,
  .split-reverse .split-media,
  .contact-grid,
  .study-card,
  .insights-panel {
    grid-template-columns: 1fr;
  }

  .split-reverse .split-media {
    order: 0;
  }

  .study-card img {
    height: 160px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(280px, 85vw);
    background: #111;
    padding: 5rem 1.5rem 2rem;
    transform: translateX(100%);
    transition: transform 250ms ease;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.3);
  }

  .nav.is-open {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-list a {
    padding: 1rem 0.5rem;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 70vh;
  }
}
