/* ============================================================
   PuLin — Computer Systems Design and Related Services
   Homepage stylesheet
   Palette: Ivory / Ink / Crimson / Deep Navy / Bronze
   ============================================================ */

:root {
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --surface-2: #EFECE4;
  --ink: #16130F;
  --ink-soft: #5E584E;
  --line: #E5E1D6;
  --primary: #A82133;
  --primary-dark: #7E1625;
  --primary-soft: #FBEFF0;
  --navy: #1F3A5F;
  --navy-ink: #122033;
  --bronze: #B5852C;
  --on-dark: #FFFFFF;
  --on-dark-soft: #C9D4E2;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-size: 16px;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.15;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}

a {
  color: var(--primary);
  text-decoration: none;
}

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

/* =========================== Layout shell =========================== */

.app-shell {
  display: grid;
  grid-template-columns: 264px 1fr;
  min-height: 100vh;
}

.main-content {
  min-width: 0;
  grid-column: 2;
}

/* =========================== Sidebar navigation =========================== */

.sidebar-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 264px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--navy-ink);
  color: var(--on-dark);
  padding: 34px 26px 28px;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 46px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background-color: var(--primary);
  color: var(--on-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 20px;
  border-radius: 10px;
}

.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--on-dark);
}

.brand-tag {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--on-dark-soft);
  font-size: 15px;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
  background-color: #1C2C45;
  color: var(--on-dark);
}

.nav-link .nav-index {
  font-size: 12px;
  color: var(--bronze);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav-cta {
  display: block;
  text-align: center;
  background-color: var(--primary);
  color: var(--on-dark);
  padding: 13px 16px;
  border-radius: 10px;
  font-weight: 600;
  margin-top: 20px;
  transition: background-color 0.2s ease;
}

.nav-cta:hover {
  background-color: var(--primary-dark);
  color: var(--on-dark);
}

.sidebar-foot {
  margin-top: 24px;
  font-size: 12.5px;
  color: var(--on-dark-soft);
  line-height: 1.5;
}

.sidebar-foot a {
  color: var(--on-dark);
}

/* =========================== Mobile nav toggle =========================== */

.nav-toggle {
  display: none;
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 200;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 10px;
  background-color: var(--navy-ink);
  color: var(--on-dark);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--on-dark);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.sidebar-overlay {
  display: none;
}

/* =========================== Hero (full-bleed band) =========================== */

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  background-color: var(--navy-ink);
  background-image:
    radial-gradient(circle at 82% 18%, rgba(168, 33, 51, 0.55), transparent 42%),
    radial-gradient(circle at 20% 88%, rgba(31, 58, 95, 0.9), transparent 55%),
    linear-gradient(135deg, #0B1523 0%, #122033 55%, #1F3A5F 100%);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
}

.hero-inner {
  position: relative;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 96px 56px;
  z-index: 2;
}

.hero-kicker {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #F3B9C1;
  font-weight: 600;
  margin-bottom: 22px;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4.1rem);
  color: var(--on-dark);
  max-width: 16ch;
  margin-bottom: 26px;
}

.hero-title em {
  font-style: italic;
  color: #F3B9C1;
}

.hero-sub {
  font-size: 18px;
  color: var(--on-dark-soft);
  max-width: 56ch;
  margin-bottom: 38px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: 12px;
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--on-dark);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: var(--on-dark);
}

.btn-ghost {
  background-color: transparent;
  color: var(--on-dark);
  border-color: #3A4C66;
}

.btn-ghost:hover {
  background-color: #1C2C45;
  border-color: #4A5D78;
  color: var(--on-dark);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  background-color: #16263C;
  border: 1px solid #2A3D57;
  color: var(--on-dark-soft);
  font-size: 14px;
}

.hero-badge strong {
  color: var(--on-dark);
}

/* =========================== Stats band =========================== */

.stats-band {
  background-color: var(--surface);
  border-bottom: 1px solid var(--line);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 56px;
  gap: 32px;
}

.stat {
  text-align: left;
}

.stat-num {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--ink-soft);
  font-size: 15px;
}

/* =========================== Generic section =========================== */

.section {
  padding: 88px 56px;
  max-width: 1160px;
  margin: 0 auto;
}

.section-head {
  max-width: 680px;
  margin-bottom: 52px;
}

.section-kicker {
  display: inline-block;
  font-size: 12.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.9rem, 3.5vw, 2.7rem);
  margin-bottom: 18px;
}

.section-lead {
  font-size: 17px;
  color: var(--ink-soft);
}

/* =========================== Capabilities (numbered list) =========================== */

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

.cap-list {
  list-style: none;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.cap-item {
  display: grid;
  grid-template-columns: 96px 1fr 1.4fr;
  gap: 24px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.cap-num {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--bronze);
  line-height: 1;
}

.cap-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  color: var(--ink);
  font-weight: 600;
}

.cap-desc {
  color: var(--ink-soft);
  font-size: 15.5px;
}

.cap-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.cap-tag {
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: 999px;
  background-color: var(--surface-2);
  color: var(--ink-soft);
}

/* =========================== Process timeline =========================== */

.process-section {
  background-color: var(--surface);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  counter-reset: step;
}

.process-step {
  position: relative;
  padding-top: 26px;
}

.process-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 2px;
  background-color: var(--surface-2);
}

.process-step::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 34%;
  height: 4px;
  border-radius: 2px;
  background-color: var(--primary);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--navy);
  color: var(--on-dark);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.step-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.step-desc {
  color: var(--ink-soft);
  font-size: 15px;
}

/* =========================== Statement row =========================== */

.statement-section {
  background-color: var(--navy-ink);
  padding: 96px 56px;
}

.statement-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.statement-mark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3rem;
  color: var(--primary);
  line-height: 0.4;
  display: block;
  margin-bottom: 10px;
}

.statement-text {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.4;
  color: var(--on-dark);
  margin-bottom: 26px;
}

.statement-byline {
  color: var(--on-dark-soft);
  font-size: 15px;
}

/* =========================== About (two column) =========================== */

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

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}

.about-visual {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background-color: var(--navy);
  min-height: 360px;
  background-image:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.12), transparent 40%),
    linear-gradient(150deg, #1F3A5F 0%, #122033 70%);
  display: flex;
  align-items: flex-end;
  padding: 30px;
}

.about-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 34px 34px;
}

.about-visual-badge {
  position: relative;
  z-index: 2;
  background-color: var(--surface);
  color: var(--ink);
  padding: 18px 22px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 320px;
}

.about-visual-badge strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.about-copy h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  margin-bottom: 20px;
}

.about-copy p {
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.check-list {
  list-style: none;
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink);
  font-size: 15.5px;
}

.check-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  border-radius: 6px;
  background-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}

/* =========================== Industries =========================== */

.industries-section {
  background-color: var(--surface);
}

.industry-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.industry-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background-color: var(--surface);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.industry-tag:hover {
  border-color: var(--primary);
  background-color: var(--primary-soft);
  color: var(--primary);
}

/* =========================== Contact =========================== */

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

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.contact-info h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  margin-bottom: 18px;
}

.contact-info p {
  color: var(--ink-soft);
  margin-bottom: 30px;
}

.contact-details {
  list-style: none;
  display: grid;
  gap: 18px;
}

.contact-details li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.contact-detail-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background-color: var(--navy);
  color: var(--on-dark);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
}

.contact-details strong {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 2px;
}

.contact-details span {
  font-size: 15.5px;
  color: var(--ink);
}

.contact-form {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px;
}

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

.form-field {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--ink);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background-color: var(--bg);
  transition: border-color 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-field textarea {
  resize: vertical;
  min-height: 130px;
}

.form-note {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 6px;
}

.form-success {
  display: none;
  background-color: var(--primary-soft);
  border: 1px solid #E7C2C7;
  color: var(--primary-dark);
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14.5px;
  margin-bottom: 16px;
}

.form-success.show {
  display: block;
}

/* =========================== CTA band =========================== */

.cta-band {
  background-color: var(--primary);
  padding: 88px 56px;
}

.cta-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.cta-band h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: var(--on-dark);
  margin-bottom: 12px;
}

.cta-band p {
  color: #F3D6DA;
  max-width: 60ch;
}

.btn-light {
  background-color: var(--on-dark);
  color: var(--primary);
}

.btn-light:hover {
  background-color: #F3D6DA;
  color: var(--primary-dark);
}

/* =========================== Footer (compact single row) =========================== */

.site-footer {
  background-color: var(--navy-ink);
  color: var(--on-dark-soft);
}

.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 30px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 14px;
}

.footer-copy strong {
  color: var(--on-dark);
}

.footer-links {
  display: flex;
  gap: 26px;
  align-items: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--on-dark-soft);
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--on-dark);
}

/* =========================== Reveal animation =========================== */

.fade-up {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================== Responsive =========================== */

@media (max-width: 1020px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .main-content {
    grid-column: 1;
  }

  .sidebar-nav {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
  }

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

  .nav-toggle {
    display: flex;
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(11, 21, 35, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 90;
  }

  .sidebar-overlay.show {
    visibility: visible;
  }

  .hero-inner,
  .stats-grid,
  .section,
  .statement-section,
  .cta-band,
  .footer-inner {
    padding-left: 32px;
    padding-right: 32px;
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cap-item {
    grid-template-columns: 64px 1fr;
  }

  .cap-desc {
    grid-column: 2;
  }
}

@media (max-width: 720px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

  .cap-item {
    grid-template-columns: 1fr;
  }

  .cap-desc {
    grid-column: 1;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-inner,
  .stats-grid,
  .section,
  .statement-section,
  .cta-band,
  .footer-inner {
    padding-left: 22px;
    padding-right: 22px;
  }
}
