/*
Theme Name: TMG System
Theme URI: https://metiseragroup.com/
Author: OpenAI
Description: Restrained, system-aligned WordPress theme for The Metisera Group.
Version: 1.0.1
Text Domain: tmg-system
*/

:root {
  --midnight: #00003C;
  --teal: #1F6F6B;
  --gold: #C6A75E;
  --cream: #F9F7F3;
  --charcoal: #333333;
  --text-soft: rgba(51, 51, 51, 0.78);
  --text-muted: rgba(0, 0, 60, 0.55);
  --line-soft: rgba(0, 0, 60, 0.10);

  --font-display: "Bembo Std", "Adobe Caslon Pro", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-ui: "Calibri Light", Calibri, "Aptos", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Times New Roman", Times, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

.site-shell {
  min-height: 100vh;
  padding-top: 56px;
  display: flex;
  flex-direction: column;
}

.admin-bar .site-shell { padding-top: 77px; }
@media (max-width: 782px) {
  .admin-bar .site-shell { padding-top: 91px; }
}

.frame {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.page-rail {
  width: 100%;
  max-width: 700px;
}

.page-rail-centered {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

.page-rail-narrow {
  width: 100%;
  max-width: 600px;
}

.page-stack > * + * { margin-top: 2.4rem; }
.page-stack-tight > * + * { margin-top: 1.15rem; }
.page-section {
  border-top: 1px solid var(--line-soft);
  padding-top: 0.65rem;
}

.anchor-target {
  display: block;
  position: relative;
  top: -92px;
  visibility: hidden;
  height: 0;
  pointer-events: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 200;
  background: rgba(249, 247, 243, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 60, 0.06);
}

.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

.header-inner {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--midnight);
  min-width: 0;
}

.custom-logo-link,
.custom-logo-link img {
  display: block;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-weight: 400;
}

.nav {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--text-soft);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  list-style: none;
  cursor: pointer;
  color: var(--text-soft);
  transition: color 160ms ease;
  font-family: var(--font-ui);
}

.nav-dropdown-toggle::-webkit-details-marker {
  display: none;
}

.nav-dropdown-toggle::after {
  content: " ▾";
  font-size: 0.75em;
  color: rgba(51, 51, 51, 0.55);
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle:focus-visible {
  color: var(--midnight);
  outline: none;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  min-width: 180px;
  padding: 0.55rem 0;
  background: rgba(249, 247, 243, 0.98);
  border: 1px solid rgba(0, 0, 60, 0.10);
  box-shadow: 0 14px 34px rgba(0, 0, 60, 0.08);
  display: none;
  z-index: 300;
}

.nav-dropdown[open] .nav-dropdown-panel {
  display: block;
}

.nav-dropdown-panel a {
  display: block;
  padding: 0.55rem 0.85rem;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.nav-dropdown-panel a:hover,
.nav-dropdown-panel a:focus-visible {
  color: var(--midnight);
  background: rgba(0, 0, 60, 0.035);
  outline: none;
}

main {
  padding-top: 1rem;
  padding-bottom: 3rem;
  flex: 1;
}

.meta-label,
.section-label {
  font-family: var(--font-ui);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(0, 0, 60, 0.55);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--midnight);
  font-weight: 500;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 6.4vw, 3.55rem);
  line-height: 1.03;
  letter-spacing: -0.025em;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 2.45rem);
  line-height: 1.08;
  margin-bottom: 0.35rem;
}

h3 {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

p, li {
  font-size: 1.02rem;
  line-height: 1.82;
  color: var(--text-soft);
}

p { margin: 0; }

.hero {
  min-height: calc(78vh - 90px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  padding-top: 6.5rem;
  padding-bottom: 8.5rem;
}

.hero-inner {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero h1 {
  font-size: clamp(3rem, 6.8vw, 4.35rem);
  letter-spacing: -0.02em;
}

.hero-subline {
  margin: 0 auto;
  max-width: 560px;
  font-family: var(--font-ui);
  font-size: 1.12rem;
  line-height: 1.65;
  color: rgba(51, 51, 51, 0.82);
}

.soft-motif {
  position: absolute;
  inset: 45% auto auto 50%;
  width: min(52vw, 540px);
  transform: translate(-50%, -50%);
  opacity: 0.04;
  pointer-events: none;
  filter: grayscale(100%);
}

.statement {
  text-align: center;
  margin: 0 auto;
}

.statement h2,
.contact h2,
.system-copy h2 {
  font-size: clamp(2rem, 5vw, 2.35rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
}

.statement p,
.contact p,
.system-copy p {
  font-size: 1.04rem;
  line-height: 1.9;
}

.linear-list {
  border-top: 1px solid rgba(0, 0, 60, 0.16);
  border-bottom: 1px solid rgba(0, 0, 60, 0.16);
}

.linear-row {
  padding: 0.9rem 0 0.95rem;
}

.linear-row + .linear-row {
  border-top: 1px solid rgba(0, 0, 60, 0.1);
}

.capability-copy {
  margin-top: 0.34rem;
  font-size: 1rem;
  line-height: 1.75;
}

.page-shell-block,
.page-shell-header {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 60, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.025);
}

.page-shell-block::before,
.page-shell-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--midnight);
}

.page-shell-block::after,
.page-shell-header::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 56px;
  height: 3px;
  background: var(--gold);
}

.page-shell-inner,
.page-shell-header-inner {
  padding: 1.2rem 1.3rem 1.15rem 1.45rem;
}

.page-shell-kicker {
  margin: 0 0 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(0, 0, 60, 0.5);
}

.page-shell-title {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.15;
  color: var(--midnight);
}

.system-band {
  background: var(--midnight);
  color: var(--cream);
  margin-top: 8rem;
  margin-bottom: 8rem;
}

.system-band .frame {
  padding-top: 5.5rem;
  padding-bottom: 5.5rem;
}

.system-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: 3rem;
  align-items: center;
}

.system-copy h2,
.system-copy p {
  color: var(--cream);
}

.system-copy p {
  color: rgba(249, 247, 243, 0.84);
}

.system-panel {
  position: relative;
  border: 1px solid rgba(249, 247, 243, 0.14);
  background: rgba(14, 16, 63, 0.96);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.24);
}

.system-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: rgba(249, 247, 243, 0.2);
}

.system-panel::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 56px;
  height: 3px;
  background: var(--gold);
}

.system-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(249, 247, 243, 0.08);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  color: rgba(249, 247, 243, 0.72);
}

.system-dots { display: flex; gap: 0.45rem; }
.system-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(249, 247, 243, 0.24);
}

.system-body { padding: 1rem 1rem 1.1rem; }
.system-stack > * + * { margin-top: 0.8rem; }

.query-row,
.response-row {
  border: 1px solid rgba(249, 247, 243, 0.09);
  background: rgba(249, 247, 243, 0.03);
  border-radius: 14px;
  padding: 0.95rem 1rem;
}

.query-label,
.response-label,
.bottomline-kicker,
.coming-soon,
.bottomline-meta {
  margin: 0 0 0.55rem;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.query-label,
.response-label,
.bottomline-kicker,
.bottomline-meta { color: rgba(249, 247, 243, 0.72); }
.coming-soon { color: rgba(198, 167, 94, 0.95); font-weight: 700; margin-bottom: 0.85rem; }
.query-text { font-size: 0.96rem; line-height: 1.65; color: rgba(249, 247, 243, 0.88); }

.response-line,
.bottomline-line {
  height: 9px;
  border-radius: 999px;
  background: rgba(249, 247, 243, 0.12);
}
.response-line + .response-line,
.bottomline-line + .bottomline-line { margin-top: 0.52rem; }
.response-line.med,
.bottomline-line.med { width: 76%; }
.response-line.short,
.bottomline-line.short { width: 54%; }

.bottom-line-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(249, 247, 243, 0.1);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 1.05rem 1rem 1rem 1.2rem;
}
.bottom-line-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: rgba(249, 247, 243, 0.16);
}
.bottom-line-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 56px;
  height: 2px;
  background: var(--gold);
}
.bottomline-title {
  margin: 0 0 0.28rem;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  color: rgba(249, 247, 243, 0.96);
}

.content-body > * + * { margin-top: 1.15rem; }
.content-body h2,
.content-body h3,
.content-body h4 { margin-top: 2rem; }
.content-body ul,
.content-body ol { margin: 0; padding-left: 1.2rem; }
.content-body li + li { margin-top: 0.55rem; }
.content-body a { color: var(--midnight); transition: color 160ms ease; }
.content-body a:hover { color: var(--teal); }
.content-body img {
  width: 100%;
  max-width: 560px;
  margin: 0;
  border: 1px solid rgba(0, 0, 60, 0.08);
}

.page-header-intro {
  max-width: 600px;
}

.contact {
  margin: 0 auto;
  text-align: center;
}

.tmg-form-wrap { margin-top: 2rem; }
.tmg-form-wrap .gform_wrapper { margin: 0 !important; }
.tmg-form-wrap .gform_heading,
.tmg-form-wrap .gform_title,
.tmg-form-wrap .gform_description { display: none !important; }
.tmg-form-wrap .gform_fields { row-gap: 0.6rem !important; }
.tmg-form-wrap .gfield { margin-bottom: 0.35rem !important; }
.tmg-form-wrap .gfield_label {
  text-align: left !important;
  font-family: var(--font-body) !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
  color: var(--charcoal) !important;
  margin-bottom: 0.35rem !important;
}
.tmg-form-wrap .gfield_required,
.tmg-form-wrap .gfield_required_text {
  color: rgba(198, 167, 94, 0.95) !important;
  font-weight: 400 !important;
  font-size: 0.9em !important;
}
.tmg-form-wrap .gform_wrapper .gfield_description,
.tmg-form-wrap .gform_wrapper .ginput_counter {
  font-family: var(--font-ui) !important;
  font-size: 0.82rem !important;
  color: rgba(51, 51, 51, 0.58) !important;
  text-align: center !important;
  margin-top: 0.4rem !important;
}
.tmg-form-wrap .ginput_container_name {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.75rem !important;
  align-items: start !important;
}
.tmg-form-wrap .name_first,
.tmg-form-wrap .name_last { width: 100% !important; margin: 0 !important; padding: 0 !important; }
.tmg-form-wrap .name_first label,
.tmg-form-wrap .name_last label {
  display: block !important;
  margin: 0 0 0.2rem !important;
  padding-left: 1.05rem !important;
  font-family: var(--font-ui) !important;
  font-size: 0.78rem !important;
  color: rgba(51, 51, 51, 0.58) !important;
  text-align: left !important;
}
.tmg-form-wrap input[type="text"],
.tmg-form-wrap input[type="email"],
.tmg-form-wrap input[type="tel"],
.tmg-form-wrap input[type="url"],
.tmg-form-wrap textarea {
  width: 100% !important;
  border: 1px solid rgba(0, 0, 60, 0.14) !important;
  border-radius: 10px !important;
  padding: 0.95rem 1rem !important;
  background: rgba(255, 255, 255, 0.58) !important;
  color: var(--charcoal) !important;
  font-family: var(--font-body) !important;
  font-size: 1rem !important;
  box-shadow: none !important;
  text-align: left !important;
}
.tmg-form-wrap textarea { min-height: 150px !important; resize: vertical !important; }
.tmg-form-wrap input:focus,
.tmg-form-wrap textarea:focus {
  outline: none !important;
  border-color: rgba(0, 0, 60, 0.28) !important;
  background: rgba(255, 255, 255, 0.76) !important;
  box-shadow: none !important;
}
.tmg-form-wrap .gform_footer {
  margin-top: 1.1rem !important;
  padding: 0 !important;
  display: flex !important;
  justify-content: center !important;
}
.tmg-form-wrap .gform_button {
  min-width: 140px !important;
  border-radius: 10px !important;
  padding: 0.95rem 1.45rem !important;
  background: var(--teal) !important;
  color: var(--cream) !important;
  font-family: var(--font-ui) !important;
  font-size: 0.98rem !important;
  font-weight: 400 !important;
  border: none !important;
  box-shadow: none !important;
}
.tmg-form-wrap .gform_confirmation_message {
  font-family: var(--font-body) !important;
  font-size: 1.05rem !important;
  line-height: 1.75 !important;
  color: var(--charcoal) !important;
  text-align: center !important;
  padding: 1rem 0 0 !important;
  background: transparent !important;
  border: none !important;
}

.site-footer {
  border-top: 1px solid rgba(0, 0, 60, 0.08);
  padding: 0.5rem 0 0.7rem;
}
.footer-copy {
  font-size: 0.84rem;
  color: rgba(51, 51, 51, 0.7);
  text-align: center;
}
.footer-copy a:hover { color: var(--midnight); }

.nav-desktop {
  display: inline-flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-desktop a {
  transition: color 160ms ease;
}

.nav-desktop a:hover,
.nav-desktop a:focus-visible {
  color: var(--midnight);
  outline: none;
}

.mobile-nav {
  display: none;
}

.mobile-menu {
  position: relative;
}

.mobile-menu-toggle {
  width: 24px;
  height: 16px;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: center;
  margin-top: 1px;
  cursor: pointer;
  list-style: none;
}

.mobile-menu-toggle::-webkit-details-marker {
  display: none;
}

.mobile-menu-toggle::marker {
  content: "";
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: rgba(0, 0, 60, 0.55);
  transition: background 160ms ease;
}

.mobile-menu-toggle:hover span,
.mobile-menu-toggle:focus-visible span {
  background: rgba(0, 0, 60, 0.85);
}

.mobile-menu-panel {
  position: absolute;
  top: calc(100% + 0.9rem);
  right: 0;
  min-width: 180px;
  padding: 0.65rem 0;
  background: rgba(249, 247, 243, 0.98);
  border: 1px solid rgba(0, 0, 60, 0.10);
  box-shadow: 0 14px 34px rgba(0, 0, 60, 0.08);
  display: none;
  z-index: 300;
}

.mobile-menu[open] .mobile-menu-panel {
  display: block;
}

.mobile-menu-panel a {
  display: block;
  padding: 0.65rem 0.9rem;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  color: var(--text-soft);
  transition: color 160ms ease, background 160ms ease;
}

.mobile-menu-panel a:hover,
.mobile-menu-panel a:focus-visible {
  color: var(--midnight);
  background: rgba(0, 0, 60, 0.035);
  outline: none;
}

@media (max-width: 900px) {
  .frame { padding-left: 1.25rem; padding-right: 1.25rem; }
  .header-inner { min-height: 52px; }
  .brand-name { font-size: 1rem; white-space: normal; }

  .nav-desktop {
    display: none;
  }

  .mobile-nav {
    display: inline-flex;
    align-items: center;
  }

  .system-grid { grid-template-columns: 1fr; }
  .system-band { margin-top: 5rem; margin-bottom: 5rem; }
  .system-band .frame { padding-top: 4rem; padding-bottom: 4rem; }
  .hero { min-height: auto; padding-top: 4.25rem; padding-bottom: 5.25rem; }
.hero h1 { font-size: clamp(2.85rem, 7.2vw, 4rem); }
.soft-motif { width: min(58vw, 500px); }
}

@media (max-width: 640px) {
  .header-inner {
    min-height: 52px;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0;
    padding-bottom: 0;
  }

  .brand { gap: 0.7rem; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-name { font-size: 1rem; white-space: normal; }

  .hero { min-height: auto; padding-top: 3.25rem; padding-bottom: 4rem; }
  .hero h1 { font-size: clamp(2.2rem, 9vw, 3rem); }
  .hero-subline { font-size: 0.98rem; }
  .soft-motif { width: min(74vw, 360px); }
}

@media (max-width: 768px) {
  .tmg-form-wrap .ginput_container_name { grid-template-columns: 1fr !important; gap: 0.6rem !important; }
  .tmg-form-wrap .gform_button { width: 100% !important; }
  .tmg-form-wrap input[type="text"],
  .tmg-form-wrap input[type="email"],
  .tmg-form-wrap input[type="tel"],
  .tmg-form-wrap input[type="url"],
  .tmg-form-wrap textarea { font-size: 16px !important; }
}

.grecaptcha-badge {
  transform: scale(0.78);
  transform-origin: bottom right;
  opacity: 0.6;
}


/* Works page layer — uses the existing linear-list system. */
.work-row .work-title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 1.9rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.work-status {
  margin-top: 0.8rem;
}

.work-link {
  display: inline-block;
  margin-top: 0.85rem;
  font-family: var(--font-ui);
  font-size: 0.94rem;
  color: var(--midnight);
  border-bottom: 1px solid rgba(0, 0, 60, 0.18);
  padding-bottom: 0.08rem;
  transition: border-color 160ms ease, color 160ms ease;
}

.work-link:hover,
.work-link:focus-visible {
  color: var(--teal);
  border-color: var(--teal);
  outline: none;
}

.work-link-disabled {
  color: rgba(51, 51, 51, 0.5);
  border-bottom-color: rgba(51, 51, 51, 0.18);
  cursor: default;
  pointer-events: none;
}

.works-main {
  padding-top: 3.25rem;
}

.works-page {
  max-width: 700px;
}

.works-header {
  margin-bottom: 3.25rem;
}

.works-header h1 {
  font-size: clamp(2.45rem, 5vw, 3.15rem);
}

.works-header p {
  max-width: 620px;
  margin-top: 1.15rem;
  font-size: 1.02rem;
  line-height: 1.82;
}

.works-index {
  border-top: 1px solid rgba(0, 0, 60, 0.08);
}

.works-row {
  padding: 1.15rem 0 1.35rem;
  border-bottom: 1px solid rgba(0, 0, 60, 0.08);
}

.works-row h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.05rem);
}

.works-row p {
  max-width: 640px;
  margin-top: 0.65rem;
}

.works-meta {
  margin-top: 1rem !important;
  font-family: var(--font-ui);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(0, 0, 60, 0.42);
}

.works-link {
  display: inline-block;
  margin-top: 0.95rem;
  font-family: var(--font-ui);
  font-size: 0.94rem;
  color: var(--midnight);
  border-bottom: 1px solid rgba(0, 0, 60, 0.16);
  padding-bottom: 0.08rem;
  transition: color 160ms ease, border-color 160ms ease;
}

.works-link:hover,
.works-link:focus-visible {
  color: var(--teal);
  border-color: var(--teal);
  outline: none;
}

.works-link-disabled {
  color: rgba(51, 51, 51, 0.5);
  border-bottom-color: rgba(51, 51, 51, 0.16);
  pointer-events: none;
  cursor: default;
}
