/* Cornerstone Desk Co. — small-business productivity aesthetic */
:root {
  --paper: #f7f5f0;
  --ink: #1a1f26;
  --muted: #5c6570;
  --ribbon-top: #4a5f73;
  --ribbon-mid: #3d5163;
  --ribbon-highlight: #5a7390;
  --accent: #c25621;
  --accent-soft: #e8d4c8;
  --grid-line: #d4d0c8;
  --cell-fill: #ffffff;
  --slide-shadow: 0 8px 32px rgba(26, 31, 38, 0.12);
  --font-ui: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-doc: "Georgia", "Times New Roman", serif;
  --font-mono: "Consolas", "Lucida Console", monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  min-height: 100vh;
}

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

/* ----- Ribbon bar (generic productivity toolbar — not a trademark) ----- */
.ribbon {
  background: linear-gradient(180deg, var(--ribbon-highlight) 0%, var(--ribbon-top) 45%, var(--ribbon-mid) 100%);
  color: #f0f4f8;
  padding: 0.35rem 1rem 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.ribbon-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-mark {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #fff 0%, #dde4ec 100%);
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  color: var(--ribbon-mid);
  font-weight: 800;
}

.ribbon-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  align-items: center;
}

.ribbon-nav a {
  color: #e8eef4;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.25rem 0.35rem;
  border-radius: 3px;
}
.ribbon-nav a:hover,
.ribbon-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.btn-contact {
  background: var(--accent);
  color: #fff !important;
  border: none;
  padding: 0.4rem 0.9rem !important;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
}
.btn-contact:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* ----- Modal ----- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 31, 38, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--cell-fill);
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  max-width: 420px;
  width: 100%;
  padding: 1.5rem;
  position: relative;
  border: 1px solid var(--grid-line);
}

.modal h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.modal p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.modal .btn-primary {
  background: var(--ribbon-mid);
  color: #fff;
  border: none;
  padding: 0.55rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.modal .btn-primary:hover {
  filter: brightness(1.1);
}

.modal .btn-ghost {
  background: transparent;
  border: 1px solid var(--grid-line);
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0.25rem;
}
.modal-close:hover {
  color: var(--ink);
}

.modal--wide {
  max-width: 560px;
}

/* ----- Outlook-inspired compose (generic mail window look) ----- */
.modal.modal--compose.modal--outlook {
  max-width: 720px;
  width: 100%;
  padding: 0;
  border-radius: 4px;
  border: 1px solid #8a8886;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.08),
    0 24px 64px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  background: #f3f2f1;
}

.outlook-compose {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 820px);
  font-family: var(--font-ui);
}

.outlook-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem 0.35rem 0.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #f3f2f1 100%);
  border-bottom: 1px solid #d2d0ce;
  flex-shrink: 0;
}

.outlook-titlebar-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #323130;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.outlook-titlebar-btns {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
}

.outlook-winctrl {
  width: 46px;
  border: none;
  background: transparent;
  color: #605e5c;
  font-size: 0.7rem;
  cursor: default;
  line-height: 1;
  padding: 0.25rem 0;
  font-family: inherit;
}

.outlook-winctrl:not(:disabled):hover {
  background: rgba(0, 0, 0, 0.04);
}

.outlook-winctrl:disabled {
  opacity: 0.35;
  cursor: default;
}

.outlook-winctrl-close {
  font-size: 1rem;
  cursor: pointer;
  color: #323130;
}

.outlook-winctrl-close:hover {
  background: #e81123;
  color: #fff;
}

.outlook-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  background: #faf9f8;
  border-bottom: 1px solid #edebe9;
}

.outlook-btn-send {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem 0.4rem 0.75rem;
  border: none;
  border-radius: 2px;
  background: #0f6cbd;
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.outlook-btn-send:hover {
  background: #0b5aa8;
}

.outlook-ribbon-spacer {
  flex: 1;
  min-width: 0.5rem;
}

.outlook-btn-ghost {
  padding: 0.35rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: #605e5c;
  font-size: 0.78rem;
  cursor: default;
  font-family: inherit;
}

.outlook-btn-ghost:disabled {
  opacity: 0.55;
}

.outlook-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: #fff;
}

.outlook-headers {
  flex-shrink: 0;
  border-bottom: 1px solid #edebe9;
}

.outlook-header-row {
  display: grid;
  grid-template-columns: 3.75rem 1fr;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.15rem 0.65rem;
  border-bottom: 1px solid #edebe9;
  min-height: 2.25rem;
}

.outlook-h-label {
  font-size: 0.8rem;
  color: #605e5c;
  text-align: right;
  padding-right: 0.25rem;
}

.outlook-h-field {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.outlook-input {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 0.35rem 0.25rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: #323130;
  background: transparent;
}

.outlook-input:focus {
  outline: none;
}

.outlook-input:focus-visible {
  outline: 2px solid #0f6cbd;
  outline-offset: 1px;
}

.outlook-input-full {
  grid-column: 2;
}

.outlook-header-row:focus-within {
  background: #fffefb;
}

.outlook-cclink {
  flex-shrink: 0;
  padding: 0.2rem 0.45rem;
  border: none;
  background: transparent;
  color: #0f6cbd;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.outlook-cclink:hover {
  text-decoration: underline;
}

.outlook-editor-wrap {
  flex: 1;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.outlook-editor {
  flex: 1;
  width: 100%;
  min-height: 200px;
  padding: 0.65rem 0.85rem;
  border: none;
  resize: vertical;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  line-height: 1.55;
  color: #323130;
  background: #fff;
}

.outlook-editor:focus {
  outline: none;
}

.outlook-editor:focus-visible {
  outline: 2px solid #0f6cbd;
  outline-offset: -2px;
}

.outlook-form-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.4rem 0.65rem;
  border-top: 1px solid #edebe9;
  background: #faf9f8;
  flex-shrink: 0;
}

.outlook-btn-discard {
  padding: 0.35rem 0.75rem;
  border: 1px solid #8a8886;
  border-radius: 2px;
  background: #fff;
  color: #323130;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
}

.outlook-btn-discard:hover {
  background: #f3f2f1;
}

/* Success panel */
.outlook-compose.outlook-success {
  max-height: none;
}

.outlook-success-body {
  padding: 1rem 1rem 1.25rem;
  background: #fff;
}

.outlook-success-body > p {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  color: #323130;
  line-height: 1.5;
}

.outlook-success-meta {
  font-size: 0.8rem !important;
  color: #605e5c !important;
}

.outlook-success-body .outlook-btn-send {
  margin-top: 0.5rem;
}

/* Legacy compose classes (if referenced elsewhere) */
.modal--compose h2 {
  margin-top: 0;
}

.modal-lead {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.compose-field {
  margin-bottom: 0.85rem;
}

.compose-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ribbon-mid);
  margin-bottom: 0.25rem;
}

.compose-field input,
.compose-field textarea {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--grid-line);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
}

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

.compose-success h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.compose-success p {
  margin: 0 0 0.75rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

footer.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--grid-line);
}
