/* ============================================================
   Pemy ICT Solution — Company Profile Document Styles
   doc.css
   ============================================================ */

/* ── Screen-reader only utility ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --amber:   #b45309;
  --amber-l: #d97706;
  --ink:     #111827;
  --ink-2:   #374151;
  --ink-3:   #6b7280;
  --rule:    #e5e7eb;
  --bg:      #ffffff;
  --bg-off:  #f9fafb;
  --bg-warm: #fef9f0;

  --font: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Document page width — A4-ish on screen */
  --max-w: 820px;
  --pad-x: 2.5rem;
  --pad-y: 3rem;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: #e8e9eb;
  line-height: 1.65;
}

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Screen toolbar ── */
.screen-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ink);
  border-bottom: 1px solid #2d3748;
  padding: 0.6rem 1.25rem;
}
.screen-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.back-link {
  font-size: 0.8125rem;
  color: #d1d5db;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.back-link:hover { color: #fff; text-decoration: none; }
.print-btn {
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--amber);
  border: none;
  border-radius: 4px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  letter-spacing: 0.01em;
}
.print-btn:hover { background: var(--amber-l); }

/* ── Document wrapper ── */
#doc {
  max-width: var(--max-w);
  margin: 2rem auto;
  background: var(--bg);
  box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 4px 16px rgba(0,0,0,.08);
  border-radius: 2px;
}

/* ── Sections ── */
.doc-section {
  padding: var(--pad-y) var(--pad-x);
  border-bottom: 1px solid var(--rule);
}
.doc-section:last-child { border-bottom: none; }
.doc-section:nth-child(even) { background: var(--bg-off); }

/* alternating warm for services, team, engagement */
#services,
#team,
#engagement { background: var(--bg-warm); }
#why { background: #f0f4ff; }

/* ── Cover ── */
.cover {
  padding: 3.5rem var(--pad-x) 3rem;
  background: var(--ink);
  color: #f9fafb;
  border-radius: 2px 2px 0 0;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}
.cover-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.brand-name {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.brand-dot { color: var(--amber); }
.brand-long {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #9ca3af;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0.2rem;
}
.doc-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid var(--amber);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
}
.cover-middle { }
.cover-tagline {
  font-size: 1.75rem;
  font-weight: 600;
  color: #f9fafb;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
}
.cover-sub {
  font-size: 0.875rem;
  color: #9ca3af;
  letter-spacing: 0.02em;
}
.cover-bottom { border-top: 1px solid #374151; padding-top: 1.25rem; }
.cover-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.8125rem;
  color: #9ca3af;
  margin-bottom: 0.35rem;
}
.cover-contact-row a { color: #d1d5db; }
.cover-contact-row a:hover { color: #fff; text-decoration: none; }
.sep { color: #4b5563; }

/* ── Section headings ── */
.section-heading {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--amber);
  margin-bottom: 1.5rem;
  display: inline-block;
}
.section-intro {
  font-size: 0.9375rem;
  color: var(--ink-3);
  margin-bottom: 1.75rem;
  max-width: 56ch;
}
.sub-heading {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

p { margin-bottom: 0.85rem; font-size: 0.9375rem; }
p:last-child { margin-bottom: 0; }

/* ── Stats row ── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1.75rem;
}
.stat-item {
  background: var(--bg-warm);
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
}
.stat-val {
  display: block;
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-desc {
  font-size: 0.75rem;
  color: var(--ink-3);
  line-height: 1.4;
}

/* ── Two column ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

/* ── Values ── */
.values-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.75rem;
}
.value-item {
  padding: 1rem 1.1rem;
  background: var(--bg);
  border-left: 3px solid var(--amber);
  border-radius: 0 4px 4px 0;
}
.value-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.value-text {
  font-size: 0.8125rem;
  color: var(--ink-3);
  line-height: 1.5;
}

/* ── Service blocks ── */
.service-block {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}
.service-block:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.service-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.service-number {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--amber);
  letter-spacing: 0.04em;
}
.service-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
}
.service-body > p { font-size: 0.9375rem; }

.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}
.service-deliverables h4,
.service-suited h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.5rem;
}
.service-deliverables ul,
.service-suited ul {
  padding-left: 1.1rem;
  list-style: disc;
}
.service-deliverables li,
.service-suited li {
  font-size: 0.875rem;
  color: var(--ink-2);
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

/* ── Why grid ── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.why-item {
  padding: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.why-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}
.why-item p { font-size: 0.8125rem; color: var(--ink-2); }

/* ── Engagements ── */
.engagement {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.engagement:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.eng-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 1rem;
}
.eng-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.15rem;
}
.eng-role {
  display: block;
  font-size: 0.8125rem;
  color: var(--ink-3);
}
.eng-sector {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding-top: 0.2rem;
}
.eng-body > p { font-size: 0.9rem; }

.outcomes-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}
.outcome {
  background: var(--bg-warm);
  border: 1px solid #fde68a;
  border-radius: 5px;
  padding: 0.5rem 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}
.outcome-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
}
.outcome-desc {
  font-size: 0.7rem;
  color: var(--ink-3);
  line-height: 1.3;
  text-align: center;
  margin-top: 0.25rem;
}

/* ── Products grid ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.product-card {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.25rem;
  background: var(--bg);
}
.product-featured {
  grid-column: 1 / -1;
  background: var(--bg-warm);
  border-color: #fde68a;
}
.product-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.badge-live {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #065f46;
  background: #d1fae5;
  border-radius: 3px;
  padding: 0.15rem 0.45rem;
}
.product-sector {
  font-size: 0.75rem;
  color: var(--ink-3);
  font-weight: 500;
}
.product-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.product-desc { font-size: 0.8125rem; color: var(--ink-2); line-height: 1.55; }
.product-outcome {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--amber);
  margin: 0.5rem 0;
  font-family: var(--mono);
}
.product-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}
.product-stack span {
  font-size: 0.7rem;
  font-family: var(--mono);
  background: #f3f4f6;
  color: var(--ink-2);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  border: 1px solid var(--rule);
}
.product-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--amber);
}

/* ── Team ── */
.team-block { }
.team-intro { margin-bottom: 1rem; }
.team-name { font-size: 1rem; font-weight: 700; color: var(--ink); }
.team-role {
  font-size: 0.8125rem;
  color: var(--ink-3);
  display: block;
  margin-top: 0.1rem;
}
.team-body > p { font-size: 0.9375rem; }

.credentials-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.credentials-block h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.5rem;
}
.credentials-block ul { padding-left: 1.1rem; list-style: disc; }
.credentials-block li {
  font-size: 0.875rem;
  color: var(--ink-2);
  margin-bottom: 0.3rem;
  line-height: 1.45;
}

.tech-block { margin-top: 1.5rem; }
.tech-block h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.75rem;
}
.tech-areas { display: flex; flex-direction: column; gap: 0.5rem; }
.tech-area {
  display: flex;
  gap: 1rem;
  align-items: baseline;
}
.tech-area-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
  width: 110px;
  flex-shrink: 0;
}
.tech-area-list {
  font-size: 0.8125rem;
  color: var(--ink-2);
  font-family: var(--mono);
}

/* ── Engagement table ── */
.eng-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}
.eng-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0.6rem 0.85rem;
  border-bottom: 2px solid var(--rule);
  background: var(--bg);
}
.eng-table td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  line-height: 1.5;
  vertical-align: top;
}
.eng-table tr:last-child td { border-bottom: none; }
.eng-table tr:nth-child(even) td { background: var(--bg-off); }
.eng-type {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.eng-note {
  background: var(--bg);
  border-left: 3px solid var(--amber);
  padding: 1rem 1.25rem;
  border-radius: 0 4px 4px 0;
}
.eng-note p { font-size: 0.875rem; color: var(--ink-2); }

/* ── Contact section ── */
.contact-section { background: var(--ink) !important; color: #f9fafb; }
.contact-section .section-heading { color: #f9fafb; border-bottom-color: var(--amber); }
.contact-section .section-intro { color: #9ca3af; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
.contact-line {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px solid #374151;
  font-size: 0.875rem;
}
.contact-label {
  width: 140px;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}
.contact-value { color: #e5e7eb; }
a.contact-value { color: #fbbf24; }
a.contact-value:hover { color: #fde68a; text-decoration: none; }

.contact-cta-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
}
.contact-cta-block p {
  font-size: 0.9375rem;
  color: #d1d5db;
  line-height: 1.7;
}
.cta-btn {
  display: inline-block;
  background: var(--amber);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.6rem 1.4rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
  align-self: flex-start;
}
.cta-btn:hover { background: var(--amber-l); text-decoration: none !important; }

.doc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid #374151;
  font-size: 0.75rem;
  color: #6b7280;
}

/* ── Print styles ── */
@media print {
  @page {
    size: A4;
    margin: 20mm 18mm 18mm 18mm;
  }

  body { background: #fff; font-size: 10pt; }

  .screen-bar,
  .screen-only { display: none !important; }

  #doc {
    max-width: none;
    margin: 0;
    box-shadow: none;
    border-radius: 0;
  }

  :root {
    --pad-x: 0;
    --pad-y: 1.5rem;
  }

  .doc-section { break-inside: avoid; }
  .service-block { break-inside: avoid; }
  .engagement { break-inside: avoid; }
  .product-card { break-inside: avoid; }

  .cover { background: var(--ink) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* Keep colored backgrounds in print */
  .stat-item, .value-item, .outcome, .why-item,
  .product-card, .product-featured,
  .eng-note, .contact-section {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  a { color: var(--amber); }
  .contact-section a.contact-value { color: #fbbf24; }
}

/* ── Responsive ── */
@media (max-width: 680px) {
  :root { --pad-x: 1.25rem; --pad-y: 2rem; }

  .cover-tagline { font-size: 1.25rem; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .two-col, .values-row, .why-grid, .credentials-row, .products-grid, .contact-grid,
  .service-detail { grid-template-columns: 1fr; }
  .product-featured { grid-column: auto; }
  .eng-header { flex-direction: column; gap: 0.25rem; }
  .tech-area { flex-direction: column; gap: 0.15rem; }
  .tech-area-label { width: auto; }
  .cover-top { flex-direction: column; gap: 0.75rem; }
}
