/* QTac website. One stylesheet, no framework. Colours match the app and brand/. */

:root {
  --blue: #2f6fb2;
  --deep: #1f3b57;
  --pale: #cfe4f7;
  --ink: #16222e;
  --muted: #5a6b7a;
  --line: #d9e2ea;
  --paper: #ffffff;
  --wash: #f4f7fa;
  --green: #c5e0b4;
  --radius: 10px;
  --wide: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Calibri, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3 { line-height: 1.25; color: var(--deep); }
h1 { font-size: 2.1rem; margin: 0 0 1rem; }
h2 { font-size: 1.5rem; margin: 2.4rem 0 .8rem; }
h3 { font-size: 1.15rem; margin: 1.8rem 0 .5rem; }
p, ul, ol { margin: 0 0 1rem; }
a { color: var(--blue); }
a:hover { color: var(--deep); }
code {
  font-family: Consolas, "DejaVu Sans Mono", monospace;
  font-size: .9em;
  background: var(--wash);
  padding: .1em .35em;
  border-radius: 4px;
}
pre {
  background: var(--deep);
  color: #eaf2fb;
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  overflow-x: auto;
}
pre code { background: none; color: inherit; padding: 0; }

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

.top {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: .7rem 1.5rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, .96);
  z-index: 10;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--deep);
  text-decoration: none;
}
.brand img { width: 34px; height: 34px; }
.top nav { display: flex; gap: 1.1rem; margin-left: auto; flex-wrap: wrap; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover, .top nav a.here { color: var(--deep); border-bottom: 2px solid var(--blue); }
.menu-button { display: none; }

/* ---------------------------------------------------------------- layout */

main { max-width: var(--wide); margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
main.page { max-width: 820px; }
main.hero-page { max-width: var(--wide); }

figure { margin: 1.8rem 0; }
figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: block;
}
figcaption { color: var(--muted); font-size: .9rem; margin-top: .5rem; }

blockquote {
  margin: 1.5rem 0;
  padding: .3rem 0 .3rem 1.2rem;
  border-left: 4px solid var(--pale);
  color: var(--muted);
}

aside.note, aside.warn {
  background: var(--wash);
  border-left: 4px solid var(--blue);
  padding: 1rem 1.2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}
aside.warn { border-left-color: #c0792b; }
aside p:last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 1.2rem 0; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: left; }
th { background: var(--green); }

.dateline { color: var(--muted); margin-top: -.6rem; }

/* Boxes must not slide under the floating page menu. */
.price-box, figure, .columns, .cards, .table-wrap, pre, aside.note, aside.warn { clear: right; }

.on-this-page {
  float: right;
  width: 230px;
  margin: 0 0 1.5rem 2rem;
  padding: .9rem 1.1rem;
  background: var(--wash);
  border-radius: var(--radius);
  font-size: .92rem;
}
.on-this-page p { font-weight: bold; margin: 0 0 .4rem; color: var(--deep); }
.on-this-page a { display: block; padding: .15rem 0; text-decoration: none; }

/* ---------------------------------------------------------------- hero */

.hero {
  background: linear-gradient(135deg, var(--deep), #2a5e96);
  color: #fff;
  border-radius: 14px;
  padding: 3rem 2.5rem;
  margin-bottom: 2.5rem;
}
.hero h1 { color: #fff; font-size: 2.6rem; max-width: 26ch; }
.hero p { font-size: 1.15rem; max-width: 60ch; color: var(--pale); }
.hero .buttons { margin-top: 1.6rem; }

.button {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  padding: .75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  border: 2px solid var(--blue);
}
.button:hover { background: #255a92; color: #fff; }
.button.ghost { background: transparent; border-color: rgba(255, 255, 255, .6); }
.button.ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.buttons { display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; }
.buttons .small { color: var(--pale); font-size: .95rem; }

.columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; margin: 2rem 0; }
.columns > div {
  background: var(--wash);
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.columns h3 { margin-top: 0; }
.columns p:last-child { margin-bottom: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.3rem; }
.card {
  display: block;
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  background: var(--paper);
}
.card:hover { border-color: var(--blue); box-shadow: 0 2px 14px rgba(47, 111, 178, .12); }
.card h3 { margin: 0 0 .4rem; }
.card p { color: var(--muted); font-size: .95rem; margin-bottom: .4rem; }
.card .when { color: var(--muted); font-size: .85rem; }

.price-box {
  border: 2px solid var(--blue);
  border-radius: 14px;
  padding: 1.8rem 2rem;
  margin: 2rem 0;
  background: var(--wash);
}
.price-box .amount { font-size: 2.4rem; font-weight: bold; color: var(--deep); line-height: 1.1; }
.price-box .per { color: var(--muted); }

/* ---------------------------------------------------------------- forms */

form.contact { display: grid; gap: 1rem; max-width: 560px; margin: 1.5rem 0; }
form.contact label { font-weight: bold; color: var(--deep); font-size: .95rem; }
form.contact input, form.contact textarea, form.contact select {
  width: 100%;
  font: inherit;
  padding: .6rem .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
form.contact textarea { min-height: 150px; resize: vertical; }
form.contact button {
  font: inherit;
  font-weight: bold;
  background: var(--blue);
  color: #fff;
  border: 0;
  padding: .75rem 1.6rem;
  border-radius: 8px;
  cursor: pointer;
  justify-self: start;
}
form.contact button:disabled { background: var(--muted); cursor: default; }
.form-reply { margin-top: .5rem; font-weight: bold; }

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

.bottom {
  border-top: 1px solid var(--line);
  padding: 2rem 1.5rem 3rem;
  text-align: center;
  color: var(--muted);
  font-size: .95rem;
  background: var(--wash);
}
.bottom p { margin: .3rem 0; }
.bottom .small { font-size: .88rem; }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .hero { padding: 2rem 1.3rem; }
  .hero h1 { font-size: 1.9rem; }
  .columns { grid-template-columns: 1fr; }
  .on-this-page { float: none; width: auto; margin: 0 0 1.5rem; }
  .menu-button {
    display: block;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .3rem .8rem;
    color: var(--deep);
    cursor: pointer;
  }
  .top nav { display: none; width: 100%; margin-left: 0; }
  #menu:checked ~ nav { display: flex; flex-direction: column; gap: .4rem; }
}
