/* Torren's Tech Repair
   Plain, high-contrast, large type. One accent colour, square-ish corners. */

:root {
  --paper: #f6f4ef;
  --surface: #ffffff;
  --ink: #14171a;
  --ink-soft: #3f464d;
  --rule: #d4cfc4;
  --accent: #b8400f;
  --accent-dark: #8f300a;
  --error: #a61b1b;
  --ok: #17653a;

  --radius: 3px;
  --maxw: 70rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;

  color-scheme: light;
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

@media (min-width: 60em) {
  body { font-size: 1.1875rem; }
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  margin: 0 0 0.5em;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.25rem, 1.55rem + 3.2vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem); }
h3 { font-size: 1.25rem; letter-spacing: 0; line-height: 1.3; }

h1, h2 { text-wrap: balance; }

p { margin: 0 0 1em; max-width: 65ch; text-wrap: pretty; }

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--accent-dark); }

/* Keep a phone number on one line instead of splitting after the area code */
a[href^="tel:"]:not(.btn) { white-space: nowrap; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
.skip-link:focus { top: 1rem; color: #fff; }

.lead {
  font-size: 1.1875rem;
  color: var(--ink-soft);
}
@media (min-width: 60em) {
  .lead { font-size: 1.3125rem; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

.btn-secondary { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: #fff; }

.btn-light { background: #fff; border-color: #fff; color: var(--ink); }
.btn-light:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }

.btn[disabled] { opacity: 0.65; cursor: wait; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 1.75rem;
}
@media (max-width: 30em) {
  .actions .btn { width: 100%; }
}

/* ---------- Header ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand phone"
    "nav   nav";
  align-items: center;
  column-gap: 1rem;
}

.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-block: 0.9rem;
  color: var(--ink);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand svg { width: 1.75rem; height: 1.75rem; flex: none; }
.brand-sub { font-weight: 400; }

.header-phone {
  grid-area: phone;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.4rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.header-phone:hover { background: var(--ink); color: #fff; }
.header-phone .num { display: none; }

.nav { grid-area: nav; border-top: 1px solid var(--rule); margin-inline: calc(var(--gutter) * -1); }
.nav ul { display: flex; margin: 0; padding: 0; list-style: none; }
.nav li { flex: 1; }
.nav a {
  display: block;
  padding: 0.85rem 0.5rem 0.7rem;
  border-bottom: 3px solid transparent;
  color: var(--ink);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { border-bottom-color: var(--accent); }

@media (min-width: 30em) {
  .header-phone .num { display: inline; }
}

@media (min-width: 64em) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav phone";
    column-gap: 2.5rem;
  }
  .nav { border-top: 0; margin-inline: 0; justify-self: end; }
  .nav ul { gap: 0.25rem; }
  .nav li { flex: none; }
  .nav a { padding: 1.35rem 1rem 1.2rem; }
}

/* ---------- Hero ---------- */

.hero { padding-block: clamp(2.5rem, 6vw, 5rem); }

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 60em) {
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 4.5rem; }
}

.hero h1 { max-width: 14em; margin-bottom: 0.45em; }
.hero .lead { max-width: 34em; }

/* Example repair ticket */

.ticket {
  margin: 0;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  font-size: 1rem;
}
.ticket-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ticket dl { margin: 0; padding: 0.25rem 1rem; }
.ticket-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px dashed var(--rule);
}
.ticket-row:last-child { border-bottom: 0; }
.ticket dt {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 0.2em;
}
.ticket dd { margin: 0; font-weight: 700; line-height: 1.35; }
.ticket figcaption {
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(3rem, 6vw, 5.5rem);
  border-top: 1px solid var(--rule);
}

.section-head { margin-bottom: 2.25rem; }
.section-head p { color: var(--ink-soft); margin-bottom: 0; }

.split { display: grid; gap: 2rem; }
@media (min-width: 60em) {
  .split { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 4rem; }
}
.split-head p { color: var(--ink-soft); }

.more {
  display: inline-block;
  margin-top: 0.25rem;
  font-weight: 700;
}

/* Three-column lists (Home: what I repair) */

.groups { display: grid; gap: 2.5rem; }
@media (min-width: 48em) {
  .groups { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
}
.group { border-top: 3px solid var(--ink); padding-top: 1rem; }
.group h3 { margin-bottom: 0.9rem; }

.ruled { list-style: none; margin: 0; padding: 0; }
.ruled li { padding: 0.65rem 0; border-top: 1px solid var(--rule); }
.ruled li:last-child { border-bottom: 1px solid var(--rule); }

/* Numbered steps */

.steps { list-style: none; margin: 0; padding: 0; }
.steps li {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 0.5rem 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
}
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps .num {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1.45;
}
.steps h3 { margin-bottom: 0.25rem; }
.steps p { margin: 0; color: var(--ink-soft); }

/* Statement rows (Home: why) */

.statements { margin: 0; }
.statement { padding: 1.25rem 0; border-top: 1px solid var(--rule); }
.statement:last-child { border-bottom: 1px solid var(--rule); }
.statement h3 { margin-bottom: 0.25rem; }
.statement p { margin: 0; color: var(--ink-soft); }

.intro-para { font-size: 1.1875rem; margin-bottom: 1.75rem; }
@media (min-width: 60em) {
  .intro-para { font-size: 1.3125rem; }
}

/* Dark call-to-action band */

.band {
  background: var(--ink);
  color: #fff;
  padding-block: clamp(3rem, 6vw, 4.5rem);
  border-bottom: 1px solid #343a40;
}
.band-inner { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 52em) {
  .band-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; }
}
.band h2 { margin-bottom: 0.3em; }
.band p { margin: 0; color: #d9d6cf; }
.band :focus-visible { outline-color: #fff; }

/* ---------- Page heading (inner pages) ---------- */

.page-head {
  padding-block: clamp(2.25rem, 5vw, 4rem) clamp(1.75rem, 4vw, 3rem);
}
.page-head h1 { margin-bottom: 0.35em; }
.page-head .lead { margin-bottom: 0; max-width: 40em; }

/* ---------- Services page ---------- */

.service-list { margin: 0; }
.service-list > div {
  display: grid;
  gap: 0.15rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}
.service-list > div:last-child { border-bottom: 1px solid var(--rule); }
.service-list dt { font-weight: 700; }
.service-list dd { margin: 0; color: var(--ink-soft); }
@media (min-width: 40em) {
  .service-list > div { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem; }
}

.note {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  max-width: 40em;
}
.note p { margin: 0; }

/* FAQ */

.faq { border-bottom: 1px solid var(--rule); }
.faq details { border-top: 1px solid var(--rule); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 3.5rem;
  padding: 1rem 0;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  width: 1.75rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--accent);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 1.25rem; color: var(--ink-soft); }

/* ---------- Contact page ---------- */

.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 60em) {
  .contact-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 4.5rem; align-items: start; }
}

.contact-aside {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.5rem;
}
@media (min-width: 60em) {
  .contact-aside { position: sticky; top: 1.5rem; }
}
.contact-aside h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.contact-aside dl { margin: 0; }
.contact-aside dt {
  margin-top: 1.1rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.contact-aside dd { margin: 0.15rem 0 0; font-weight: 700; overflow-wrap: anywhere; }
.contact-aside .big { font-size: 1.5rem; line-height: 1.2; }
.contact-aside a { color: var(--ink); }
.contact-aside a:hover { color: var(--accent); }

.form-intro { margin-bottom: 1.75rem; color: var(--ink-soft); }

.field { margin-bottom: 1.6rem; }

.field label,
.field .field-label {
  display: block;
  margin: 0 0 0.35rem;
  font-weight: 700;
}
.tag {
  margin-left: 0.5rem;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--ink-soft);
}

.hint { margin: 0 0 0.45rem; font-size: 1rem; color: var(--ink-soft); }

/* The captcha box is 302px wide; shrink it a little on the narrowest phones */
@media (max-width: 21.5em) {
  .h-captcha { transform: scale(0.9); transform-origin: 0 0; height: 70px; }
}

.field input,
.field textarea {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
}
.field textarea { min-height: 10rem; resize: vertical; }
.field input:focus,
.field textarea:focus { outline: 3px solid var(--accent); outline-offset: 2px; }

.field [aria-invalid="true"] { border-color: var(--error); background: #fff6f6; }

.error {
  margin: 0.45rem 0 0;
  padding-left: 0.75rem;
  border-left: 4px solid var(--error);
  color: var(--error);
  font-weight: 700;
}

/* Spam trap: kept off-screen, not display:none, so bots still fill it */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { margin-top: 2rem; }
.form-actions .btn { width: 100%; }
@media (min-width: 40em) {
  .form-actions .btn { width: auto; min-width: 16rem; }
}
.privacy { margin: 1rem 0 0; font-size: 1rem; color: var(--ink-soft); }

.status {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--error);
  border-radius: var(--radius);
  background: #fff6f6;
  color: var(--ink);
}
.status[hidden] { display: none; }
.status p { margin: 0 0 0.5em; }
.status p:last-child { margin-bottom: 0; }
.status strong { color: var(--error); }

.success {
  padding: 1.75rem;
  border: 2px solid var(--ok);
  border-radius: var(--radius);
  background: #fff;
}
.success[hidden] { display: none; }
.success h2 { color: var(--ok); font-size: 1.75rem; }
.success p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */

.site-footer {
  background: #0c0e10;
  color: #d9d6cf;
  font-size: 1rem;
}
.footer-main {
  display: grid;
  gap: 2rem;
  padding-block: 3rem 2.25rem;
}
@media (min-width: 48em) {
  .footer-main { grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; }
}
.site-footer h2 {
  margin: 0 0 0.6rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a9a59c;
}
.site-footer p { margin: 0 0 0.35rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #fff; text-decoration-thickness: 0.15em; }
.site-footer :focus-visible { outline-color: #fff; }
.footer-brand { color: #fff; font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem !important; }
.footer-legal {
  padding-block: 1.25rem;
  border-top: 1px solid #343a40;
  color: #a9a59c;
  font-size: 0.9375rem;
}
.footer-legal p { margin: 0; max-width: none; }

/* ---------- 404 ---------- */

.notfound { padding-block: clamp(3rem, 8vw, 6rem); }

/* ---------- Motion / print ---------- */

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

@media print {
  .site-header .nav, .band, .skip-link { display: none; }
  body { background: #fff; font-size: 12pt; }
}
