/* TRELVANO LTD — Content Strategy Consulting
   Editorial atelier direction · flat surfaces · domain primary #DC47E1 */

:root {
  --ink: #1A0F1C;
  --ink-soft: #3A2A3C;
  --muted: #6B5A6E;
  --line: #E4D6E8;
  --paper: #F7F2F8;
  --surface: #FFFFFF;
  --primary: #DC47E1;
  --primary-dark: #7B257E;
  --primary-tint: #F7E5F8;
  --scrim: rgba(26, 15, 28, 0.58);
  --header-h: 74px;
  --max: 1120px;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --btn-bg: var(--primary);
  --btn-fg: #FFFFFF;
  --btn-hover: var(--primary-dark);
  --btn-muted-fg: var(--ink);
  --btn-border: color-mix(in srgb, var(--ink) 28%, transparent);
  --elevation-border: color-mix(in srgb, var(--ink) 12%, transparent);

  /* Protected company info */
  --prt-company: "TRELVANO LTD";
  --prt-crn: "17519354";
  --prt-address: "22 Brook Terrace, Darlington, DL3 6PJ, United Kingdom";
  --prt-email: "contact@trelvanoltd.com";
}

.prt-tv9c1::before { content: var(--prt-company); }
.prt-tv9n2::before { content: var(--prt-crn); }
.prt-tv9a3::before { content: var(--prt-address); }
.prt-tv9e4::before { content: var(--prt-email); }

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

body.nav-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary); }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.55em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.shell { width: min(var(--max), 100% - 2.5rem); margin-inline: auto; }
.shell-narrow { width: min(720px, 100% - 2.5rem); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--ink); color: #fff; padding: 0.75rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; }

#top {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.ic {
  width: 1.15em; height: 1.15em;
  display: inline-block; vertical-align: -0.15em; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* Buttons */
.tv-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  font: 650 0.95rem/1.2 var(--font-body);
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  box-shadow: none !important;
  background-image: none !important;
  text-shadow: none !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.tv-action:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset: 3px;
}
.tv-action--solid {
  background-color: var(--btn-bg);
  color: var(--btn-fg);
  border-color: var(--btn-bg);
}
.tv-action--solid:hover {
  background-color: var(--btn-hover);
  border-color: var(--btn-hover);
  color: var(--btn-fg);
}
.tv-action--ghost {
  background-color: transparent;
  color: #fff;
  border-color: color-mix(in srgb, #fff 45%, transparent);
}
.tv-action--ghost:hover {
  background-color: color-mix(in srgb, #fff 12%, transparent);
  border-color: #fff;
  color: #fff;
}
.tv-action--outline {
  background-color: transparent;
  color: var(--btn-muted-fg);
  border: 2px solid var(--btn-border);
}
.tv-action--outline:hover {
  background-color: var(--btn-bg);
  border-color: var(--btn-bg);
  color: var(--btn-fg);
}
.tv-action--sm { padding: 0.55rem 1rem; font-size: 0.875rem; }

/* Header */
.masthead {
  position: sticky; top: 0; z-index: 80;
  height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.masthead-row {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand-lockup { display: flex; align-items: center; text-decoration: none; }
.brand-lockup img { width: 210px; height: 50px; }

.menu-btn {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 4px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.menu-btn span {
  display: block; width: 18px; height: 2px;
  background: var(--ink); transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.trail-nav ul {
  display: flex; align-items: center; gap: 0.35rem 1.35rem;
}
.trail-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
}
.trail-nav a:hover { color: var(--primary-dark); }

/* Hero — full-bleed */
.opener {
  position: relative;
  min-height: min(92vh, 820px);
  display: grid;
  align-items: end;
  color: #fff;
  overflow: hidden;
  background-color: var(--ink);
}
.opener-media {
  position: absolute; inset: 0;
}
.opener-media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.opener-scrim {
  position: absolute; inset: 0;
  background-color: var(--scrim);
}
.opener-copy {
  position: relative; z-index: 2;
  padding: clamp(5rem, 12vh, 7.5rem) 0 clamp(3rem, 7vh, 4.5rem);
  max-width: 38rem;
}
.opener-brand {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-style: italic;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
  color: #fff;
}
.opener-kicker {
  display: inline-block;
  margin-bottom: 1.1rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #F2A8F5;
}
.opener h1 {
  color: #fff;
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-style: italic;
  font-weight: 400;
  max-width: 18ch;
  margin-bottom: 0.85rem;
}
.opener-lead {
  color: color-mix(in srgb, #fff 88%, transparent);
  font-size: 1.08rem;
  max-width: 34ch;
  margin-bottom: 1.6rem;
}
.opener-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Section chrome */
.band { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.band--tint { background: var(--surface); border-block: 1px solid var(--line); }
.band--ink { background: var(--ink); color: #fff; }
.band--ink h2, .band--ink h3 { color: #fff; }
.band--ink p { color: color-mix(in srgb, #fff 82%, transparent); }

.mark-line {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-dark);
}
.mark-line::before {
  content: "";
  width: 1.75rem; height: 2px;
  background: var(--primary);
}
.band--ink .mark-line { color: #F2A8F5; }
.band--ink .mark-line::before { background: var(--primary); }

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 48ch;
}

/* Direction split */
.direction-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.direction-photo {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--primary-tint);
  aspect-ratio: 4 / 3;
}
.direction-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Elements — zigzag numbered list */
.element-stack {
  display: grid;
  gap: 0;
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.element-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1.25rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.element-row:nth-child(even) {
  background: var(--surface);
  margin-inline: -1.25rem;
  padding-inline: 1.25rem;
  border-inline: 1px solid var(--line);
}
.element-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-style: italic;
  color: var(--primary);
  line-height: 1;
}
.element-row h3 { margin-bottom: 0.35rem; }
.element-row p { color: var(--muted); font-size: 0.98rem; }

/* Formats — diagonal chip rail */
.format-intro { max-width: 40rem; margin-bottom: 2rem; }
.format-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}
.format-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1.15rem 1rem;
  min-height: 8.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.format-chip:nth-child(even) { margin-top: 1.5rem; }
.format-chip:hover {
  border-color: var(--primary);
  background: var(--primary-tint);
}
.format-chip .ic { width: 1.5rem; height: 1.5rem; color: var(--primary-dark); }
.format-chip span {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--ink);
}

/* Chapter band */
.chapter {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem 2rem;
  align-items: end;
}
.chapter-idx {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-style: italic;
  line-height: 0.85;
  color: var(--primary);
}
.chapter h2 { margin: 0 0 0.4rem; }
.chapter p { margin: 0; max-width: 36ch; }

/* Method */
.method-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  margin-top: 2.5rem;
}
.method-photo {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #fff 18%, transparent);
  aspect-ratio: 3 / 4;
  max-height: 520px;
}
.method-photo img { width: 100%; height: 100%; object-fit: cover; }
.method-steps { display: grid; gap: 1.25rem; }
.method-step {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid color-mix(in srgb, #fff 14%, transparent);
}
.method-step:last-child { border-bottom: 0; padding-bottom: 0; }
.method-step i {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 400;
  line-height: 1;
}
.method-step h3 { color: #fff; margin-bottom: 0.35rem; }
.method-step p { margin: 0; font-size: 0.98rem; }

/* Useful split */
.useful-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.useful-photo {
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 3 / 2;
}
.useful-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Orgs — staggered columns */
.org-board {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.85rem;
  margin-top: 2rem;
}
.org-tile {
  grid-column: span 2;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1.25rem 1.15rem;
  min-height: 9rem;
}
.org-tile:nth-child(1) { grid-column: 1 / 3; }
.org-tile:nth-child(2) { grid-column: 3 / 5; margin-top: 1.75rem; }
.org-tile:nth-child(3) { grid-column: 5 / 7; }
.org-tile:nth-child(4) { grid-column: 2 / 4; margin-top: -0.5rem; }
.org-tile:nth-child(5) { grid-column: 4 / 6; margin-top: 1rem; }
.org-tile .org-idx {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--primary);
  margin-bottom: 0.55rem;
}
.org-tile p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); font-weight: 500; }

/* Focus CTA */
.focus-panel {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  min-height: 22rem;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid var(--ink);
}
.focus-panel img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.42;
}
.focus-inner {
  position: relative; z-index: 1;
  padding: clamp(3rem, 8vw, 5rem) 1.5rem;
  max-width: 38rem;
}
.focus-inner h2 { color: #fff; }
.focus-inner p {
  color: color-mix(in srgb, #fff 88%, transparent);
  margin-bottom: 1.5rem;
}

/* Contact strip */
.reach {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.reach a.mail {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-style: italic;
  text-decoration: none;
  color: var(--ink);
}
.reach a.mail:hover { color: var(--primary-dark); }

/* Footer */
.site-foot {
  background: var(--ink);
  color: color-mix(in srgb, #fff 72%, transparent);
  padding: 2.25rem 0 1.5rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.foot-grid h3 {
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.foot-grid a {
  color: color-mix(in srgb, #fff 72%, transparent);
  text-decoration: none;
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
}
.foot-grid a:hover { color: #fff; }
.foot-legal p { margin: 0 0 0.35rem; font-size: 0.9rem; line-height: 1.5; }
.foot-copy {
  border-top: 1px solid color-mix(in srgb, #fff 14%, transparent);
  padding-top: 1.15rem;
  font-size: 0.85rem;
}
.foot-copy p { margin: 0 0 0.3rem; }

.sub-foot {
  background: #120A14;
  border-top: 1px solid color-mix(in srgb, #fff 10%, transparent);
  padding: 1.35rem 0;
}
.sub-foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.sub-foot-links {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem;
}
.sub-foot-links a {
  color: color-mix(in srgb, #fff 70%, transparent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.sub-foot-links a:hover { color: #fff; }
.sub-note {
  color: color-mix(in srgb, #fff 55%, transparent);
  font-size: 0.85rem;
  max-width: 36ch;
  margin: 0;
}

/* Legal pages — policy-clip-stack-hero */
.policy-hero--clip {
  position: relative;
  width: 100%;
  min-height: clamp(18rem, 58vh, 28rem);
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  background-color: var(--primary-dark);
  background-image: var(--policy-hero-img);
  background-size: cover;
  background-position: center top;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 0 100%);
}
.policy-hero--clip::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: color-mix(in srgb, var(--primary-dark) 72%, transparent);
  pointer-events: none;
}
.policy-hero--clip .policy-hero__stack {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  padding: clamp(2rem, 5vw, 3.5rem) 1.25rem clamp(3rem, 7vw, 4.5rem);
}
.policy-hero--clip .policy-hero__heading {
  margin: 0 0 1.25rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.policy-hero--clip .policy-hero__heading-main {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.12em;
  font-style: italic;
  text-transform: none;
}
.policy-hero--clip .policy-hero__heading-sub {
  display: block;
  margin-top: 0.65rem;
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-transform: none;
  opacity: 0.95;
}
.policy-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
  opacity: 0.9;
}
.policy-back:hover { opacity: 1; color: #fff; }
.policy-date {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  opacity: 0.85;
}

.policy-main { padding: clamp(1.75rem, 4vw, 2.75rem) 0 3rem; }
.policy-content {
  max-width: 48rem;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
}
.policy-content h2 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.01em;
}
.company-box {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1.15rem 1.25rem;
  margin: 1rem 0 1.5rem;
}
.company-box ul { list-style: none; }
.company-box li { margin-bottom: 0.35rem; }
.policy-content ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.75rem 0 1rem;
}
.policy-content li { margin-bottom: 0.4rem; }
.policy-content a:not([class*="tv-action"]):not(.policy-hero__cta) {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: underline;
}

.table-wrap { overflow-x: visible; max-width: 100%; margin: 1rem 0 1.5rem; }
.policy-content table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 15px;
  border: 1px solid var(--line);
  table-layout: fixed;
}
.policy-content table th,
.policy-content table td {
  border: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  color: var(--ink);
  overflow-wrap: anywhere;
  min-width: 0;
}
.policy-content table th {
  background: var(--primary-tint);
  font-weight: 700;
}

/* Reveal motion */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (max-width: 1023px) {
  .policy-content table {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    table-layout: auto;
  }
  .policy-content table thead { display: none; }
  .policy-content table tr {
    display: block;
    border: 1px solid var(--line);
    margin-bottom: 0.75rem;
    background: var(--surface);
  }
  .policy-content table td {
    display: block;
    border: 0;
    border-bottom: 1px solid var(--line);
  }
  .policy-content table td:last-child { border-bottom: 0; }
}

@media (max-width: 900px) {
  .direction-grid,
  .method-grid,
  .useful-grid { grid-template-columns: 1fr; }
  .method-photo { max-height: 360px; aspect-ratio: 16 / 10; }
  .format-rail { grid-template-columns: repeat(2, 1fr); }
  .format-chip:nth-child(even) { margin-top: 0; }
  .org-board { grid-template-columns: 1fr 1fr; }
  .org-tile,
  .org-tile:nth-child(n) {
    grid-column: span 1;
    margin-top: 0 !important;
  }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .chapter { grid-template-columns: 1fr; gap: 0.5rem; }
}

@media (max-width: 720px) {
  .menu-btn { display: inline-flex; }
  .trail-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.25rem 1.25rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .trail-nav.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .trail-nav ul { flex-direction: column; align-items: flex-start; gap: 0.85rem; }
  .format-rail { grid-template-columns: 1fr; }
  .org-board { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .element-row { grid-template-columns: 3.5rem 1fr; }
  .policy-hero--clip {
    min-height: 14rem;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
