/* One Orpington Place — static stylesheet (no build step) */

@font-face { font-family: "Zilla Slab"; src: url("../fonts/ZillaSlab-500.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Zilla Slab"; src: url("../fonts/ZillaSlab-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Zilla Slab"; src: url("../fonts/ZillaSlab-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-500.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --background: #fbfcfd;
  --foreground: #1e2733;
  --surface: #f1f4f6;
  --card: #ffffff;
  --border: #dde3e8;
  --muted: #6b7683;
  --primary: #1f6f9e;
  --brand: #4cb8e4;
  --ink: #131c2a;
  --ink-fg: #f2f5f8;
  --ink-muted: #a8b4c2;
  --radius: 4px;
}

* { box-sizing: border-box; border-color: var(--border); }
body { margin: 0; background: var(--background); color: var(--foreground); font-family: "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased; line-height: 1.6; }
h1, h2, h3, h4 { font-family: "Zilla Slab", Georgia, serif; letter-spacing: -0.01em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.eyebrow { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; margin: 0; }
.primary-text { color: var(--primary); }
.brand-text { color: var(--brand); }
.section { padding: 6rem 0; }
.section.bordered { border-bottom: 1px solid var(--border); }
.section.surface { background: var(--surface); }
.section-note { max-width: 24rem; font-size: 0.9rem; color: var(--muted); }
.prose { color: var(--muted); font-size: 1.06rem; display: grid; gap: 1.25rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(251,252,253,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 5rem; }
.brand img { height: 4.125rem; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav a { font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.site-nav a:hover { color: var(--foreground); }
.btn-outline { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.5rem 1rem; color: var(--foreground) !important; }
.btn-brand { display: inline-block; margin-top: 2.5rem; background: var(--brand); color: var(--ink); font-weight: 600; font-size: 0.9rem; padding: 0.85rem 1.5rem; border-radius: var(--radius); }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--ink); color: var(--ink-fg); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.25; }
.hero-inner { position: relative; padding-top: 7rem; padding-bottom: 7rem; }
.hero h1 { margin-top: 1.5rem; max-width: 46rem; }
.hero-lede { margin-top: 1.75rem; max-width: 34rem; font-size: 1.12rem; color: var(--ink-muted); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 2rem 1rem; max-width: 48rem; margin: 5rem 0 0; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.15); }
.stats dt { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted); }
.stats dd { margin: 0.5rem 0 0; font-family: "Zilla Slab", Georgia, serif; font-size: 1.9rem; }

/* Layout helpers */
.two-col { display: grid; gap: 3rem; }
.three-col { display: grid; gap: 2.5rem; margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--border); }
.three-col p { margin-top: 0.75rem; color: var(--muted); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem; }
.section-head h2 { margin-top: 1.25rem; }

/* Portfolio grid — 3 per row, incomplete last row centered */
.company-grid {
  margin-top: 3.5rem;
  padding-left: 1px;
  padding-top: 1px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}
.company-card {
  flex: 0 0 calc(33.3333% - 0.667px);
  max-width: calc(33.3333% - 0.667px);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2rem;
  margin: -1px 0 0 -1px;
  transition: background-color 0.2s;
  position: relative;
  z-index: 0;
}
.company-card:hover { background: #eef4f8; z-index: 1; }
.company-preview {
  position: fixed;
  left: 0;
  top: 0;
  width: 480px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
  z-index: 100;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.company-preview.is-visible { visibility: visible; opacity: 1; }
.company-preview .preview-frame {
  position: relative;
  width: 100%;
  height: 294px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface);
}
.company-preview .preview-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: var(--surface);
  border: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.company-preview .preview-frame img.is-loaded { opacity: 1; }
.preview-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-spinner::after {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  animation: preview-spin 0.8s linear infinite;
}
.preview-spinner.is-hidden { display: none; }
@keyframes preview-spin { to { transform: rotate(360deg); } }
.preview-fallback {

  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.125rem;
  padding: 1rem;
}
.accent { display: block; height: 4px; width: 3rem; border-radius: 999px; }
.accent.wide { width: 4rem; margin-top: 2.5rem; }
.card-sector { margin-top: 1.5rem; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); }
.company-card h3 { margin-top: 0.75rem; }
.card-tagline { margin-top: 0.75rem; flex: 1; font-size: 0.9rem; color: var(--muted); }
.card-link { margin-top: 2rem; font-size: 0.9rem; font-weight: 500; color: var(--primary); }

/* Company page */
.company-hero { background: var(--ink); color: var(--ink-fg); padding: 5rem 0; }
.back-link { font-size: 0.9rem; color: var(--ink-muted); }
.company-hero h1 { margin-top: 1rem; max-width: 46rem; }
.company-body { display: grid; gap: 3rem; }
.facts { display: grid; gap: 1.5rem; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0.25rem 0 0; font-size: 1rem; }
.facts a { color: var(--primary); }

/* Footer */
.site-footer { background: var(--ink); color: var(--ink-fg); }
.footer-grid { display: grid; gap: 3rem; padding-top: 4rem; padding-bottom: 4rem; }
.footer-logo { height: 4.5rem; width: auto; }
.muted-dark { color: var(--ink-muted); font-size: 0.9rem; margin-top: 1.25rem; max-width: 20rem; }
.link-list { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 0.75rem; font-size: 0.9rem; color: var(--ink-muted); }
.link-list a { color: var(--ink-muted); }
.link-list a:hover { color: var(--ink-fg); }
.footer-bar { border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.75rem; color: var(--ink-muted); }
.footer-bar .wrap { padding-top: 1.5rem; padding-bottom: 1.5rem; }

/* Admin */
.admin-body { background: var(--surface); }
.admin-wrap { max-width: 68rem; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; margin-top: 1.5rem; }
.field { display: grid; gap: 0.35rem; margin-bottom: 1rem; font-size: 0.85rem; }
.field input, .field textarea, .field select { font: inherit; font-size: 0.9rem; padding: 0.6rem 0.7rem; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.field textarea { min-height: 6rem; }
.grid-2 { display: grid; gap: 0 1rem; grid-template-columns: repeat(2, minmax(0,1fr)); }
.btn { font: inherit; font-size: 0.9rem; font-weight: 600; padding: 0.6rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--primary); background: var(--primary); color: #fff; cursor: pointer; }
.btn.secondary { background: #fff; color: var(--foreground); border-color: var(--border); }
.btn.danger { background: #b3261e; border-color: #b3261e; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.admin-table th, table.admin-table td { text-align: left; padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.notice { padding: 0.8rem 1rem; border-radius: var(--radius); background: #e6f2f9; border: 1px solid #bfdcec; font-size: 0.9rem; }
.notice.error { background: #fdeceb; border-color: #f2c2be; }
.notice.success { background: #e9f7ee; border-color: #bfe3cc; }
.contact-info { display: grid; gap: 0.9rem; align-content: start; }
.contact-info-card { display: flex; align-items: center; gap: 1rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.contact-info-card .icon { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--surface); color: var(--primary); }
.contact-info-card .icon svg { width: 1.2rem; height: 1.2rem; }
.contact-info-card .label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.contact-info-card .value { font-family: "Zilla Slab", Georgia, serif; font-size: 1.1rem; margin-top: 0.15rem; }
.contact-form-panel { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 2.25rem; }
.contact-form-panel h2 { font-size: 1.7rem; }
.contact-form-panel .form-note { color: var(--muted); font-size: 0.9rem; margin-top: 0.4rem; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.app-shell { background: var(--background); min-height: 100vh; }
.app-header { background: var(--ink); color: var(--ink-fg); }
.app-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 4.25rem; gap: 1.5rem; }
.app-header .app-brand { display: flex; align-items: center; gap: 0.6rem; font-family: "Zilla Slab", Georgia, serif; font-weight: 600; font-size: 1.05rem; }
.app-header .app-brand img { height: 2.1rem; width: auto; display: block; }
.app-nav { display: flex; align-items: center; gap: 1.4rem; font-size: 0.85rem; }
.app-nav a { color: var(--ink-muted); }
.app-nav a:hover { color: var(--ink-fg); }
.app-nav .app-user { color: rgba(242,245,248,0.85); }
.app-nav .divider { color: var(--ink-muted); }
.app-main { padding: 2.5rem 0 5rem; }
.alert { padding: 0.8rem 1rem; border-radius: var(--radius); background: #e6f2f9; border: 1px solid #bfdcec; font-size: 0.9rem; margin-bottom: 1.5rem; }
.alert-error { background: #fdeceb; border-color: #f2c2be; }
.alert-success { background: #e9f7ee; border-color: #bfe3cc; }

@media (min-width: 700px) {
  .stats { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .two-col { grid-template-columns: 1fr 1.2fr; }
  .three-col { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .company-body { grid-template-columns: 1.4fr 1fr; }
}

@media (max-width: 1023px) {
  .company-card { flex-basis: calc(50% - 0.5px); max-width: calc(50% - 0.5px); }
}
@media (max-width: 639px) {
  .company-card { flex-basis: 100%; max-width: 100%; margin-left: 0; }
  .site-nav { display: none; }
}
