/* ============================================================
   Carol Bird — Editor & Creative Coach
   Concept: "The marked-up manuscript."
   Typewriter type on warm paper; the editor's marks (strike-
   throughs, insertions, margin notes) carry the two brand
   accents. Flat, square, print-first. No rounded corners.
   ============================================================ */

:root {
  --paper: #F5EFE0;         /* page canvas */
  --paper-bright: #FBF7EA;  /* form fields, cutting cards */
  --ink: #26221B;           /* body text, rules */
  --inkwell: #221B14;       /* dark testimonial band */
  --parchment: #EDE5CE;     /* text on the dark band */
  --gold: #D8A200;          /* decorative marks & highlights only */
  --gold-ink: #A67E00;      /* gold at text size on paper (AA-large safe) */
  --rust: #BD6004;          /* strikethroughs, big editorial marks */
  --rust-deep: #9E5003;     /* CTA fill, links, small rust text */

  --font-type: "Courier Prime", "Courier New", Courier, monospace;
  --font-stamp: "Special Elite", "Courier Prime", monospace;

  --measure: 62ch;
  --page-max: 1050px;
  --section-gap: clamp(6rem, 12vw, 9.5rem);
  --cutting-shadow: rgba(29, 29, 27, 0.2) -4px 4px 6px 0px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-padding-top: 5.5rem;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-type);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Paper grain — a whisper of tooth over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* The typing margin — a manuscript's ruled left edge */
body::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  left: max(1.25rem, calc((100vw - var(--page-max)) / 2 - 2.5rem));
  width: 1px;
  background: var(--rust);
  opacity: 0.3;
  z-index: 3;
  pointer-events: none;
}

::selection { background: var(--gold); color: var(--ink); }

h1, h2, h3 { text-wrap: balance; }

a { color: var(--rust-deep); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
}

/* ============ Masthead ============ */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.masthead-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  text-decoration: none;
  color: var(--ink);
  font-size: 1rem;
}

.masthead nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
}

.masthead nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.masthead nav a:hover {
  color: var(--rust-deep);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

/* ============ Shared section chrome ============ */

main > section {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--section-gap) 1.25rem 0;
}

.section-mark {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--rust-deep);
  margin-bottom: 2.25rem;
}

.section-mark::after {
  content: "";
  display: block;
  width: 5rem;
  height: 2px;
  background: var(--ink);
  margin-top: 0.85rem;
}

/* ============ Hero ============ */

.hero {
  padding-top: clamp(4.5rem, 9vw, 7.5rem);
}

.kicker {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  margin-bottom: 2.5rem;
}

.hero-title {
  font-size: clamp(2.35rem, 7.4vw, 5.5rem);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2.25rem;
}

/* The live edit: struck word, correction typed above */
.edit {
  position: relative;
  display: inline-block;
}

.edit del {
  text-decoration: none;
  position: relative;
}

/* hand-drawn strike, slightly askew */
.edit del::after {
  content: "";
  position: absolute;
  left: -3%;
  right: -3%;
  top: 54%;
  height: 0.075em;
  background: var(--rust);
  transform: rotate(-2.5deg);
}

.edit ins {
  text-decoration: none;
  position: absolute;
  left: -0.15em;
  bottom: 92%;
  font-size: 0.42em;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  color: var(--gold-ink);
  white-space: nowrap;
  transform: rotate(-3deg);
  transform-origin: left bottom;
}

/* the blinking carriage cursor */
.cursor {
  display: inline-block;
  width: 0.55em;
  height: 0.95em;
  margin-left: 0.12em;
  background: var(--ink);
  vertical-align: baseline;
  transform: translateY(0.12em);
}

@media (prefers-reduced-motion: no-preference) {
  .cursor { animation: blink 1.1s step-end infinite; }
}

@keyframes blink { 50% { opacity: 0; } }

.lede {
  max-width: var(--measure);
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  margin-bottom: 1.5rem;
}

.creds {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust-deep);
  margin-bottom: 3rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  background: var(--rust-deep);
  color: var(--paper-bright);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  border: none;
  padding: 1.05rem 1.9rem;
  cursor: pointer;
}

.btn:hover { background: var(--ink); }

.quiet-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--gold);
  text-underline-offset: 0.35em;
  font-size: 0.95rem;
}

.quiet-link:hover { color: var(--rust-deep); }

/* ============ The service ============ */

.service h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  line-height: 1.25;
  max-width: 24ch;
  margin-bottom: 3.5rem;
}

.service h2 em {
  font-style: italic;
  color: var(--rust-deep);
}

.service-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  border-top: 2px solid var(--ink);
  padding-top: 2.75rem;
}

.service-col {
  position: relative;
  max-width: 52ch;
}

.service-col h3 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.service-col .num {
  color: var(--rust-deep);
  margin-right: 0.4em;
}

/* proofreader's margin notes — decorative */
.margin-note {
  position: absolute;
  top: -1.4rem;
  right: 0;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--rust-deep);
  transform: rotate(-4deg);
}

.fees-note {
  margin-top: 3.5rem;
  border: 2px solid var(--ink);
  padding: 1.75rem 2rem;
  max-width: var(--measure);
}

/* ============ Testimonials — the dark chapter ============ */

.testimonials {
  /* break out of the shared column: full-bleed band */
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-top: var(--section-gap);
  background: var(--inkwell);
  color: var(--parchment);
}

.testimonials-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(4.5rem, 9vw, 7rem) 1.25rem clamp(5rem, 10vw, 8rem);
}

.testimonials .section-mark { color: var(--gold); }
.testimonials .section-mark::after { background: var(--parchment); }

.testimonials-title {
  font-size: clamp(2.4rem, 8vw, 6rem);
  line-height: 1.05;
  font-weight: 700;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

.cuttings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

/* press cuttings: paper scraps on the editor's dark desk */
.cutting {
  background: var(--paper-bright);
  color: var(--ink);
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: var(--cutting-shadow);
}

.cutting:nth-child(1) { transform: rotate(-1.2deg); }
.cutting:nth-child(2) { transform: rotate(0.8deg); margin-top: 1.5rem; }
.cutting:nth-child(3) { transform: rotate(-0.6deg); }

.cutting blockquote p {
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.cutting figcaption {
  font-size: 0.9rem;
  font-weight: 700;
  border-top: 1px solid var(--ink);
  padding-top: 1rem;
}

.cutting .cite-detail {
  font-weight: 400;
  font-size: 0.85rem;
}

.cutting cite { font-style: italic; }

/* ============ Contact ============ */

.contact h2 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: 1.25rem;
}

.contact-lede {
  max-width: var(--measure);
  margin-bottom: 3rem;
}

#enquiry-form { max-width: 44rem; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.field { margin-bottom: 1.5rem; }

.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.req { color: var(--rust-deep); }

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper-bright);
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 0.75rem 0.9rem;
}

.field textarea { resize: vertical; }

/* typed-but-missing: the editor circles it in rust */
.field input.missing,
.field textarea.missing {
  border-color: var(--rust);
}

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.req-note {
  font-size: 0.85rem;
  color: var(--rust-deep);
}

.form-error {
  margin-top: 1.25rem;
  font-style: italic;
  color: var(--rust-deep);
}

.typed-reply {
  max-width: var(--measure);
  font-size: 1.15rem;
  font-style: italic;
  border-top: 2px solid var(--ink);
  padding-top: 1.75rem;
}

/* steady caret while the reply types itself */
.typed-reply.typing::after {
  content: "▮";
  color: var(--gold-ink);
}

/* ============ Colophon ============ */

.colophon {
  margin-top: var(--section-gap);
  border-top: 2px solid var(--ink);
}

.colophon-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 2.75rem 1.25rem 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.stamp {
  font-family: var(--font-stamp);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--gold-ink);
  border: 2px solid var(--gold);
  padding: 0.45rem 0.8rem;
  transform: rotate(-4deg);
}

.colophon .fine { color: var(--ink); opacity: 0.75; }

/* ============ Reveal on scroll ============ */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    translate: 0 1.25rem;
    transition: opacity 0.6s ease, translate 0.6s ease;
  }
  .reveal.is-visible {
    opacity: 1;
    translate: 0 0;
  }
}

/* ============ Responsive ============ */

@media (max-width: 900px) {
  .cuttings { grid-template-columns: 1fr; max-width: 34rem; }
  .cutting:nth-child(2) { margin-top: 0; }
}

@media (max-width: 720px) {
  .service-cols { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  body::after { display: none; }
  .margin-note { position: static; display: inline-block; margin-bottom: 0.5rem; }
}
