/* Carlson Tech Systems website.
   Subtly rounded corners, thin borders, and soft accent gradients on indicators (CTS-D-027).
   No script is needed. Every page fits a 390px screen without sideways scrolling. */

:root {
  --ink: #18262c;
  --ink-soft: #4b5b62;
  --line: #d3dbde;
  --paper: #ffffff;
  --ground: #f4f6f7;
  --tint: #e9eff0;
  --deep: #162429;
  --brand: #21363e;
  --action: #0b5c53;
  --action-deep: #084740;
  /* Gold. --accent is the flat tone for lines and rings. --accent-soft is the polished sheen for
     small indicators: the accent button, badges, and tags. Never on a large surface (CTS-D-027). */
  --accent: #d8ac3a;
  --accent-ink: #2b1d00;
  --accent-light: #f6e3a1;
  /* Buttons get a calmer gold: the light middle of the sheen only, with no dark edges. */
  --accent-button: linear-gradient(135deg, #e4c056 0%, #efd577 50%, #e6c45c 100%);
  --accent-deep: #a57a1f;
  --accent-soft: linear-gradient(135deg, #c0912e 0%, #e1bb51 24%, #f5e39b 46%, #e3b94a 62%, #c0912e 100%);
  --accent-hover: #f3dc8a;
  /* Colors that sit on the dark surfaces, --deep and --brand. Change them with those two. */
  --on-dark: #ffffff;
  --on-dark-nav: #dbe5e8;
  --on-dark-soft: #d5e0e3;
  --on-dark-mute: #c5d2d6;
  --on-dark-link: #ffd978;
  --line-on-dark: #7f949b;
  --brand-line: #2c4650;
  --radius: 5px;
  --radius-small: 3px;
  --pill: 9px;
  --pill-small: 6px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

a { color: var(--action); text-underline-offset: 0.15em; }
a:hover { color: var(--action-deep); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6rem; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 46rem; }
.center { text-align: center; }
.fine { color: var(--ink-soft); font-size: 0.95rem; }

.skip { position: absolute; left: -999rem; top: 0; background: var(--paper); padding: 0.5rem 0.75rem; z-index: 5; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- header ---------- */

.site-head { background: var(--deep); color: var(--on-dark); }
.head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; padding-top: 0.7rem; padding-bottom: 0.7rem; }
.logo { display: block; line-height: 0; }
.logo img { height: 50px; width: auto; }
.site-head nav { flex: 1 1 auto; min-width: 0; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.15rem 0.35rem; }
.nav a {
  display: block;
  padding: 0.4rem 0.7rem;
  color: var(--on-dark-nav);
  text-decoration: none;
  border-radius: var(--pill);
  font-weight: 600;
  font-size: 0.975rem;
}
.nav a:hover { color: var(--on-dark); background: var(--brand); }
.nav a[aria-current="page"] { color: var(--deep); background: var(--paper); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.65rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
}
.btn-accent { background: var(--accent-button); border-color: var(--accent-deep); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { border-color: var(--line-on-dark); color: var(--on-dark); }
.btn-ghost:hover { background: var(--brand); color: var(--on-dark); }
.btn-line { border-color: var(--line-on-dark); color: var(--on-dark); padding: 0.45rem 0.9rem; font-size: 0.95rem; border-radius: var(--pill); }
.btn-line:hover { background: var(--brand); color: var(--on-dark); }

/* The primary action sits far right. */
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* ---------- hero and page heads ---------- */

.hero { position: relative; background: var(--brand); color: var(--on-dark); border-top: 1px solid var(--brand-line); }
.hero-in { position: relative; z-index: 1; padding-top: clamp(2.5rem, 7vw, 5rem); padding-bottom: clamp(2.5rem, 7vw, 5rem); }
/* The home hero keeps its text in a left column. On a wide screen the space to its right is the
   focus area of the background picture, and later of the background video.
   The media is 2.4 to 1, scaled to the hero's width and centered top to bottom.
   Its subject sits in the right 30 percent, from 69 to 98 percent across. The rest is the flat
   brand color, so the media has no visible edge and needs no fade (CTS-D-027). */
.hero-copy { max-width: 44rem; }
.hero-media { display: none; }
@media (min-width: 64rem) {
  .hero-copy { max-width: min(44rem, 62%); }
  .hero h1 { text-wrap: balance; }
  .hero-media { display: block; position: absolute; inset: 0; z-index: 0; width: 100%; max-width: 100rem; margin: 0 auto; overflow: hidden; }
  .hero-media img, .hero-media video { position: absolute; top: 50%; left: 0; display: block; width: 100%; max-width: none; height: auto; transform: translateY(-50%); }
}
.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.15rem 0.75rem;
  border: 1px solid var(--accent);
  border-radius: var(--pill-small);
  /* Gold lettering: the sheen shows through the text. The flat color is the fallback. */
  color: var(--accent-light);
  background: var(--accent-soft);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 0.9rem;
  font-weight: 700;
}
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--on-dark-soft); max-width: 44rem; margin: 0; }
/* The home hero: short selling points under the lead, and one line under the buttons. */
.hero .hero-points { max-width: 44rem; margin: 1.25rem 0 0; }
.hero-note { margin: 1rem 0 0; color: var(--on-dark-soft); font-size: 0.975rem; }
.hero-note a { color: var(--on-dark-link); }

.page-head { background: var(--brand); color: var(--on-dark); padding: clamp(1.75rem, 5vw, 3rem) 0; border-top: 1px solid var(--brand-line); }
.page-head h1 { margin-bottom: 0.4rem; }
.crumb { margin: 0 0 0.5rem; font-size: 0.95rem; }
.crumb a, .legal-nav a { color: var(--on-dark-link); }
.legal-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0.5rem 0 0; }

/* ---------- bands ---------- */

.band { padding: clamp(2rem, 6vw, 3.5rem) 0; }
.band-tint { background: var(--tint); }
.band-deep { background: var(--deep); color: var(--on-dark); }
.band-deep p { color: var(--on-dark-soft); }
.split-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; margin-bottom: 0.75rem; }
.split-head h2 { margin: 0; }
.more { font-weight: 700; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1.25rem; margin-top: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.25rem; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.card-pad { padding: 1.15rem 1.25rem 1.25rem; }
/* A card with a picture on top. The picture is a whole scene on white, so it is shown whole, never cropped. */
.card-photo img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: contain; background: var(--paper); border-bottom: 1px solid var(--line); }
.card h2 { font-size: 1.2rem; }
.card p:last-child { margin-bottom: 0; }
.service { padding: 1.25rem; scroll-margin-top: 1rem; }
.service:target { border-color: var(--accent); }
.service .more { display: inline-block; margin-top: 0.25rem; }
.card-feature { border-top: 4px solid var(--accent); }
/* The lead service: full width, with its image on the right at desktop width. */
.card-lead { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 0; border-top: 4px solid var(--accent); scroll-margin-top: 1rem; }
.card-lead:target { border-color: var(--accent); }
.card-lead-text { padding: 1.25rem 1.4rem 1.4rem; align-self: center; }
.card-lead h2, .card-lead h3 { font-size: 1.45rem; }
.card-lead-text p:last-child { margin-bottom: 0; }
.points { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.4rem 1rem; font-weight: 700; }
@media (min-width: 30rem) {
  .points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.points li { padding-left: 0.6rem; border-left: 3px solid var(--accent); }
.card-fill.highlights { margin: 0.25rem 0 1.75rem; }
.card-fill.highlights > .card { flex-basis: 13rem; }
/* The lead card picture sits in a thin framed box. It goes under the text on a phone and beside it on a wide screen. */
.lead-art { align-self: center; padding: 0 1.4rem 1.4rem; }
.lead-art img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
@media (min-width: 52rem) {
  .card-lead { grid-template-columns: minmax(0, 1fr) auto; }
  .lead-art { width: 19.4rem; padding: 1.25rem 1.4rem 1.25rem 0; }
}
.feature-row { margin: 1.25rem 0; }
/* Service cards wrap in rows. Cards in a short last row grow to fill it, so no cell is left empty. */
.card-fill { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.card-fill > .card { flex: 1 1 18rem; }

.chips { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips a {
  display: block;
  padding: 0.4rem 0.9rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
}
.chips a:hover { border-color: var(--action); color: var(--action-deep); }

.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin: 1.75rem 0 1rem;
  padding: 1.15rem 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}
.callout p { margin: 0; flex: 1 1 16rem; }

/* ---------- contact form and service guide ---------- */

.form { margin: 1.75rem 0 1rem; padding: 1.15rem 1.25rem 1.25rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.form h2 { font-size: 1.2rem; }
.field { margin: 0 0 1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.25rem; }
.field input, .field textarea {
  display: block;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
.field textarea { resize: vertical; }
/* The primary action sits far right. */
.form-actions { display: flex; justify-content: flex-end; }
button.btn { font: inherit; font-weight: 700; cursor: pointer; }
button.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.guide { margin: 0 0 1.25rem; padding: 1.15rem 1.25rem; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); }
.guide h2, .guide h3 { font-size: 1.2rem; }
.guide .facts { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) {
  .guide .facts { grid-template-columns: auto 1fr; }
}

/* ---------- work ---------- */

.tag-placeholder {
  display: inline-block;
  padding: 0.05rem 0.6rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent-deep);
  border-radius: var(--pill-small);
  color: var(--accent-ink);
  font-size: 0.8rem;
  font-weight: 700;
}
.placeholder-note { color: var(--ink-soft); }
.work-thumb { aspect-ratio: 2 / 1; background: var(--tint); border-bottom: 1px solid var(--line); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.9rem; margin: 0 0 1rem; font-size: 0.975rem; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; color: var(--ink-soft); }
.case { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.case-body h2 { margin-top: 1.5rem; }
.case-body h2:first-child { margin-top: 0; }
.case-side { align-self: start; }
.case-body ul { padding-left: 1.3rem; margin: 0 0 1rem; }
.case-body li { margin: 0 0 0.35rem; }
.case-body h2 { scroll-margin-top: 1rem; }
/* The primary action sits far right. */
.side-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.faq h3 { margin-top: 1.4rem; }
@media (min-width: 52rem) {
  .case { grid-template-columns: minmax(0, 1fr) 19rem; }
}

/* ---------- documents: rates, privacy, terms ---------- */

.doc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 4vw, 2.5rem);
  max-width: 56rem;
  margin: 0 auto;
  overflow-wrap: break-word;
}
.doc h2 { margin-top: 2rem; font-size: 1.35rem; color: var(--brand); scroll-margin-top: 1rem; }
.doc h3 { margin-top: 1.4rem; }
.doc ul, .doc ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.doc li { margin: 0 0 0.35rem; }
.doc code { font-family: ui-monospace, Consolas, monospace; font-size: 0.9em; background: var(--tint); padding: 0.05rem 0.3rem; border-radius: 2px; }
.effective-date { color: var(--ink-soft); font-size: 0.95rem; }
.allcaps { font-size: 0.875rem; letter-spacing: 0.01em; }
.doc-ref { margin: 2rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.9rem; }

.doc table { border-collapse: collapse; width: 100%; }
.meta th, .meta td { padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; border: 1px solid var(--line); }
.meta th { width: 34%; background: var(--tint); color: var(--brand); }
.toc { margin: 1.25rem 0; padding: 0.9rem 1.1rem; background: var(--ground); border: 1px solid var(--line); border-radius: var(--radius-small); }
.toc b { display: block; margin-bottom: 0.25rem; color: var(--brand); }
.toc ul { list-style: none; margin: 0; padding: 0; columns: 2 15rem; column-gap: 1.5rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
/* A wide table scrolls inside its own box, so the page itself never scrolls sideways. */
.tw { overflow-x: auto; margin: 0.75rem 0 1rem; border: 1px solid var(--line); border-radius: var(--radius-small); }
.grid { min-width: 34rem; font-size: 0.97rem; }
.grid th { background: var(--action); color: var(--on-dark); text-align: left; padding: 0.55rem 0.75rem; }
.grid td { padding: 0.55rem 0.75rem; vertical-align: top; border-top: 1px solid var(--line); }
.grid tbody tr:nth-child(odd) { background: var(--ground); }
.grid td:first-child { font-weight: 700; color: var(--brand); }
.grid tr.em td, .grid tr.em td:first-child { background: var(--brand); color: var(--on-dark); }
.price { white-space: nowrap; font-weight: 700; }
.tos { margin-top: 2.5rem; padding-top: 0.25rem; border-top: 4px solid var(--brand); }
.tos ol { list-style: none; padding-left: 0; }
.tos li { margin: 0 0 0.65rem; }
.tos li b { color: var(--brand); }
.note { margin-top: 2rem; padding: 0.75rem 1rem; background: var(--ground); border: 1px solid var(--line); border-radius: var(--radius-small); color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- footer ---------- */

.site-foot { background: var(--deep); color: var(--on-dark-mute); padding: 2rem 0 1.25rem; font-size: 0.975rem; }
.site-foot a { color: var(--on-dark); }
.site-foot p { margin: 0 0 0.25rem; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem 3rem; }
.foot-name { color: var(--on-dark); font-weight: 700; }
.foot-nav { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: 0.2rem 2rem; }
.foot-fine { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--brand-line); font-size: 0.875rem; }

@media (max-width: 30rem) {
  .head-row { gap: 0.4rem 0.75rem; }
  .logo img { height: 40px; }
  .nav a { padding: 0.35rem 0.55rem; font-size: 0.925rem; }
  .foot-nav { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
