/* =====================================================================
   TITEY UP SERVICES — stylesheet
   Brand: orange (#F5821F), navy blue (#12356B), sunshine yellow (#FFC220)
   ===================================================================== */

:root {
  /* UI orange deepened to #B0540A so white/navy text on it meets WCAG AA
     contrast (4.5:1). The bright brand orange still lives in the mascot &
     photos; --orange-bright is available for large decorative use only. */
  --orange: #B0540A;
  --orange-bright: #F5821F;
  --orange-dark: #8f4408;
  --navy: #12356B;
  --navy-dark: #0d264d;
  --yellow: #FFC220;
  --ink: #1d2433;
  --muted: #5b6577;
  --line: #e5e8ef;
  --bg: #f5f7fb;
  --card: #ffffff;
  --good: #1f9d55;
  --good-bg: #e7f6ee;
  --warn: #b7791f;
  --warn-bg: #fdf3e0;
  --bad: #d13438;
  --bad-bg: #fbe9ea;
  --info: #2b6cb0;
  --info-bg: #e8f1fb;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 2px 10px rgba(18, 53, 107, .07);
  --shadow-lg: 0 12px 34px rgba(18, 53, 107, .16);
  --wrap: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt0{margin-top:0}.mb0{margin-bottom:0}.mt1{margin-top:.5rem}.mt2{margin-top:1rem}.mt3{margin-top:1.5rem}

/* ---- Buttons ------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font: inherit; font-weight: 700; cursor: pointer;
  padding: .7em 1.3em; border-radius: 999px; border: 2px solid transparent;
  background: var(--navy); color: #fff; text-decoration: none;
  transition: transform .05s ease, background .15s ease, box-shadow .15s ease;
  line-height: 1;
}
.btn:hover { text-decoration: none; background: var(--navy-dark); }
.btn:active { transform: translateY(1px); }
.btn--orange { background: var(--orange); }
.btn--orange:hover { background: var(--orange-dark); }
/* Repurposed from yellow to an accessible deep gold so button text can be
   white and still meet WCAG AA (white on #8f640f ≈ 5:1). */
.btn--yellow { background: #8f640f; color: #fff; }
.btn--yellow:hover { background: #77530c; color: #fff; }
/* White button for use ON dark/orange backgrounds (navy text on white). */
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: #eef2f9; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { background: #eef2f9; }
.btn--danger { background: var(--bad); }
.btn--danger:hover { background: #b32b2e; }
.btn--sm { padding: .45em .9em; font-size: .85rem; }
.btn--block { display: flex; width: 100%; justify-content: center; }
.btn--lg { padding: .95em 1.8em; font-size: 1.05rem; }

/* ---- Header / nav -------------------------------------------------- */
.site-header {
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--navy); font-size: 1.35rem; letter-spacing: .5px; }
.brand:hover { text-decoration: none; }
.brand .logo-badge {
  background: var(--yellow); color: var(--navy); width: 40px; height: 40px;
  border-radius: 10px; display: grid; place-items: center; font-size: 1.2rem;
  box-shadow: inset 0 0 0 3px rgba(18,53,107,.15);
}
.brand small { display:block; font-size:.6rem; color:var(--orange); font-weight:700; letter-spacing:1px; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav a { padding: .55em .85em; border-radius: 8px; color: var(--ink); font-weight: 600; font-size: .95rem; }
.main-nav a:hover { background: #eef2f9; text-decoration: none; }
.main-nav a.active { color: var(--orange); }
/* The header menu's link color/hover rules would otherwise override a filled
   button's white text and hover color — keep the orange nav button correct. */
.main-nav a.btn--orange { color: #fff; }
.main-nav a.btn--orange:hover { background: var(--orange-dark); color: #fff; }
.main-nav a.btn--ghost:hover { background: #eef2f9; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--navy); }

/* ---- Hero ---------------------------------------------------------- */
.hero { background: linear-gradient(135deg, var(--navy) 0%, #1c4a8a 100%); color: #fff; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: center; padding: 48px 20px; }
.hero h1 { color: #fff; font-size: 2.7rem; }
.hero p { color: #dbe6f6; font-size: 1.15rem; max-width: 34ch; }
.hero .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero-badge { display:inline-block; background: rgba(255,194,32,.18); color: var(--yellow); font-weight: 700; padding: .35em .9em; border-radius: 999px; font-size: .8rem; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 14px; }
.hero-art { position: relative; text-align: center; }
.hero-art img { border-radius: 18px; box-shadow: var(--shadow-lg); background: #fff; }

/* ---- Sections ------------------------------------------------------ */
.section { padding: 56px 0; }
.section--alt { background: #fff; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 34px; }
.section-head .eyebrow { color: var(--orange); font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; font-size: .8rem; }
.section-head h2 { font-size: 2rem; }

/* ---- Cards / grids ------------------------------------------------- */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card--pad { padding: 22px; }
.service-card { display: flex; flex-direction: column; }
.service-card .card-img { aspect-ratio: 4 / 3; overflow: hidden; background: #eef2f9; }
.service-card .card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.service-card:hover .card-img img { transform: scale(1.05); }
.service-card .card-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.service-card h3 { font-size: 1.15rem; margin-bottom: .3em; }
.service-card .cat { font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--orange); font-weight: 800; margin-bottom: 6px; }
.service-card .btn { margin-top: auto; align-self: flex-start; }

.icon-tile { text-align:center; padding: 24px 16px; }
.icon-tile .emoji { font-size: 2.2rem; }

/* ---- Category list ------------------------------------------------- */
.cat-block { margin-bottom: 34px; }
.cat-block h3 { display:flex; align-items:center; gap:10px; font-size:1.3rem; border-bottom: 2px solid var(--line); padding-bottom: 10px; margin-bottom: 18px; }
.cat-block h3 .pill { background: var(--yellow); color: var(--navy); font-size:.7rem; padding:.2em .7em; border-radius:999px; font-weight:800; }

/* ---- Package / deal ------------------------------------------------ */
.deal { background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%); color: #fff; border-radius: 20px; padding: 34px; box-shadow: var(--shadow-lg); }
.deal .price { font-size: 3rem; font-weight: 800; line-height: 1; }
.deal .price small { font-size: 1rem; font-weight: 600; opacity: .9; }
.deal ul { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.deal li::before { content: "✓ "; font-weight: 800; color: var(--navy); }
.deal-card { background: #fff; color: var(--ink); border-radius: 16px; padding: 26px; }

/* ---- Tagline banner ------------------------------------------------ */
.tagline-banner { background: var(--yellow); color: var(--navy); text-align: center; padding: 20px; font-weight: 800; font-size: 1.2rem; }

/* ---- Forms --------------------------------------------------------- */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
label .req { color: var(--bad); }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=date], input[type=datetime-local], input[type=search],
select, textarea {
  width: 100%; padding: .65em .8em; border: 1px solid #cfd6e4; border-radius: var(--radius-sm);
  font: inherit; color: var(--ink); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: var(--orange); }
textarea { min-height: 110px; resize: vertical; }
.field-error { color: var(--bad); font-size: .82rem; display: block; margin-top: 4px; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; }
.checkbox input { width: auto; margin-top: 3px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 8px; }
.help { font-size: .82rem; color: var(--muted); margin-top: 4px; }

/* Service chooser checkboxes */
.choose-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.choose-grid label { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-weight: 500; cursor: pointer; margin: 0; }
.choose-grid label:hover { border-color: var(--orange); }
.choose-grid input { width: auto; }

/* ---- Alerts / flash ------------------------------------------------ */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid transparent; font-weight: 500; }
.alert--success { background: var(--good-bg); color: #14663a; border-color: #bfe6cf; }
.alert--error { background: var(--bad-bg); color: #8f2427; border-color: #f2c2c4; }
.alert--info { background: var(--info-bg); color: #1f4e7a; border-color: #c4ddf5; }

/* ---- Badges -------------------------------------------------------- */
.badge { display: inline-block; padding: .28em .7em; border-radius: 999px; font-size: .74rem; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; background: #eef2f9; color: var(--muted); }
.badge--open, .badge--new, .badge--sent, .badge--draft { background: var(--info-bg); color: var(--info); }
.badge--scheduled, .badge--in-progress, .badge--contacted, .badge--partial { background: var(--warn-bg); color: var(--warn); }
.badge--completed, .badge--closed, .badge--accepted, .badge--paid, .badge--converted { background: var(--good-bg); color: var(--good); }
.badge--cancelled, .badge--declined, .badge--void, .badge--overdue, .badge--on-hold { background: var(--bad-bg); color: var(--bad); }
.badge--urgent, .badge--high { background: var(--bad-bg); color: var(--bad); }

/* ---- Tables -------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th { background: #f7f9fd; font-size: .74rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #f9fbff; }
table.data td.num, table.data th.num { text-align: right; }

/* ---- Layout: dashboard shell -------------------------------------- */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #cdd9ee; padding: 20px 14px; }
.sidebar .brand { color: #fff; font-size: 1.15rem; margin-bottom: 20px; }
.sidebar .brand .logo-badge { width: 34px; height: 34px; font-size: 1rem; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { color: #cdd9ee; padding: .6em .8em; border-radius: 8px; font-weight: 600; font-size: .93rem; display: flex; align-items: center; gap: 10px; }
.sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.sidebar nav a.active { background: var(--orange); color: #fff; }
.sidebar .nav-group { font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; color: #7d93b8; margin: 16px 8px 6px; }
.content { padding: 26px 30px; min-width: 0; }
.content-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.content-head h1 { margin: 0; font-size: 1.7rem; }

/* Stat cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat .n { font-size: 2rem; font-weight: 800; color: var(--navy); line-height: 1; }
.stat .l { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.stat--accent { background: var(--navy); color: #fff; } .stat--accent .n{color:#fff} .stat--accent .l{color:#bcd0ee}

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 22px; }
.panel-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 1.1rem; }
.panel-body { padding: 18px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chips a { padding: .4em .9em; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--ink); }
.chips a.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.topbar { background:#fff; border-bottom:1px solid var(--line); padding: 10px 30px; display:flex; align-items:center; justify-content:space-between; gap: 12px; }
.topbar .user { display:flex; align-items:center; gap:10px; font-size:.9rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color:#fff; display:grid; place-items:center; font-weight:800; }

/* ---- Auth card ----------------------------------------------------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; background: linear-gradient(135deg, var(--navy), #1c4a8a); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 34px; }
.auth-card .brand { justify-content: center; margin-bottom: 20px; }

/* ---- Document (quote/invoice) ------------------------------------- */
.doc { background:#fff; border:1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); max-width: 840px; margin: 0 auto; }
.doc-head { display:flex; justify-content: space-between; gap: 20px; padding: 28px; border-bottom: 3px solid var(--orange); flex-wrap: wrap; }
.doc-head .co { font-size: 1.5rem; font-weight: 800; color: var(--navy); }
.doc-body { padding: 28px; }
.doc-meta { display:flex; gap: 30px; flex-wrap: wrap; margin-bottom: 20px; }
.doc-meta .lbl { font-size:.72rem; text-transform:uppercase; letter-spacing:.5px; color: var(--muted); font-weight:700; }
.totals { margin-left: auto; width: 320px; max-width: 100%; }
.totals .row { display:flex; justify-content: space-between; padding: 6px 0; }
.totals .row.grand { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 10px; font-size: 1.3rem; font-weight: 800; color: var(--navy); }
.totals .row.discount { color: var(--good); }

.sign-box { border: 2px dashed #cfd6e4; border-radius: var(--radius-sm); background: #fcfdff; }
.sign-pad { width: 100%; height: 190px; border-radius: var(--radius-sm); background: #fff; touch-action: none; cursor: crosshair; display:block; }
.sign-actions { display:flex; justify-content: space-between; align-items:center; padding: 8px 12px; }
.consent { background: #f7f9fd; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; font-size: .88rem; color: #3a4a63; }
.signed-stamp { border: 2px solid var(--good); color: var(--good); border-radius: var(--radius-sm); padding: 14px; background: var(--good-bg); }
.signed-stamp img { max-height: 90px; background:#fff; border:1px solid var(--line); border-radius:6px; padding:6px; margin-top:8px; }

/* ---- Line-item editor --------------------------------------------- */
.items-editor td { padding: 6px; }
.items-editor input { padding: .5em; }
.items-editor .line-total { font-weight: 700; text-align: right; padding-right: 10px; }

/* ---- Footer -------------------------------------------------------- */
.site-footer { background: var(--navy-dark); color: #b9c8e2; padding: 44px 0 24px; margin-top: 40px; }
.site-footer a { color: #dbe6f6; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 30px; padding-top: 16px; font-size: .84rem; text-align: center; }

.list-reset { list-style: none; padding: 0; margin: 0; }
.divide > * { padding: 12px 0; border-bottom: 1px solid var(--line); }
.divide > *:last-child { border-bottom: 0; }
.flex { display:flex; } .between { justify-content: space-between; } .items-center{align-items:center;} .gap{gap:12px;} .wrapf{flex-wrap:wrap;}

/* ---- Responsive ---------------------------------------------------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 340px; margin: 0 auto; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -260px; top: 0; bottom: 0; width: 250px; transition: left .2s ease; z-index: 100; overflow-y:auto; }
  .sidebar.open { left: 0; }
  .content { padding: 18px; }
}
@media (max-width: 720px) {
  .main-nav { display: none; position: absolute; top: 70px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 10px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .form-row, .deal ul { grid-template-columns: 1fr; }
  .grid--3, .grid--4, .grid--2 { grid-template-columns: 1fr; }
  h1 { font-size: 1.7rem; } .hero h1 { font-size: 2.1rem; }
}

/* ---- Print (quotes / invoices) ------------------------------------ */
@media print {
  .site-header, .site-footer, .sidebar, .topbar, .no-print, .btn { display: none !important; }
  body { background: #fff; }
  .shell { display: block; }
  .content { padding: 0; }
  .doc { box-shadow: none; border: 0; max-width: none; }
}

/* ---- Accessibility (WCAG) ------------------------------------------ */
/* Visible keyboard focus on every interactive element. */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible,
.btn:focus-visible {
  outline: 3px solid #12356B;
  outline-offset: 2px;
  border-radius: 4px;
}
/* On dark/navy surfaces, use a light focus ring for visibility. */
.hero a:focus-visible, .sidebar a:focus-visible, .site-footer a:focus-visible,
.deal a:focus-visible, .btn--navy:focus-visible, .btn--orange:focus-visible {
  outline-color: #FFC220;
}

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

/* Skip-to-content link: hidden until focused. */
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: #12356B; color: #fff; padding: 10px 16px; border-radius: 8px;
  font-weight: 700; text-decoration: none; transition: top .15s ease;
}
.skip-link:focus { top: 8px; text-decoration: none; }

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
