/* goodbye.sh — Conway Twitty ("Hello Darlin'") Palette + Self-Hosted Concert One + Flat SSR */

@font-face {
  font-family: "Concert One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/concert-one.woff2") format("woff2");
}

:root {
  /* Extracted from Conway Twitty — "Hello Darlin'" (1970) sleeve */
  --cw-dark: #262628;
  --cw-vinyl: #414142;
  --cw-ivory: #EDE7E3;
  --cw-paper: #FAF8F5;
  --cw-white: #FFFFFF;
  --cw-yellow: #E7DF70;
  --cw-coral: #DB5935;
  --cw-amber: #D4883C;
  --cw-muted: #69645F;
  --cw-border: #DDD6CE;
  --cw-dotted: #C5BDB4;
  --font-display: "Concert One", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--cw-white);
  color: var(--cw-dark);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

code, pre, .mono {
  font-family: var(--font-mono);
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ============================================================
   DESKTOP FULL-VIEWPORT-TALL LEFT RAIL + MAIN CANVAS SHELL
   ============================================================ */
.app-shell {
  display: flex;
  min-height: 100dvh;
  width: 100%;
  background: var(--cw-white);
}

.goodbye-rail {
  position: sticky;
  top: 0;
  height: 100dvh;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  background: var(--cw-dark);
  color: var(--cw-ivory);
  border-right: 3px solid var(--cw-dark);
  z-index: 30;
}

.rail-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--cw-ivory);
  transition: color 0.16s ease;
}

.rail-brand:hover {
  color: var(--cw-yellow);
}

/* Scales proportionally to full viewport height ("as wide as it needs") */
.rail-wordmark {
  display: block;
  height: calc(100dvh - 28px);
  width: auto;
  overflow: visible;
}

.rail-mobile-bar {
  display: none;
}

.stage-column {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* Slim utility nav inside main column */
.top-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 28px;
  background: var(--cw-paper);
  border-bottom: 1px solid var(--cw-border);
  font-size: 12.5px;
  color: var(--cw-muted);
}

.top-strip nav {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.top-strip a:hover {
  color: var(--cw-coral);
}

.crumb {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cw-muted);
}

.crumb strong {
  color: var(--cw-dark);
  font-weight: 600;
}

/* ============================================================
   SPLIT ARTISTIC HERO + BAYER PIXEL DITHER + SCROLL MOTION
   ============================================================ */
.split-hero {
  --scroll-p: 0;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 390px;
  background: var(--cw-white);
  overflow: hidden;
}

.art-half {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 36px 116px;
  min-height: 390px;
  overflow: hidden;
}

/* Soft center seam fading out into the pixel dither (zero harsh black line at bottom) */
.art-left::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 72px;
  width: 2px;
  background: linear-gradient(to bottom, rgba(38, 38, 40, 0.38) 0%, rgba(38, 38, 40, 0.22) 72%, rgba(38, 38, 40, 0) 100%);
  z-index: 4;
  pointer-events: none;
}

.art-canvas {
  position: absolute;
  inset: -14% -6%;
  width: 112%;
  height: 128%;
  display: block;
  z-index: 1;
  will-change: transform;
}

/* Opposing smooth parallax motion on scroll across BOTH art halves */
.art-left .art-canvas {
  transform: translate3d(
    calc(var(--scroll-p) * -18px),
    calc(var(--scroll-p) * 44px),
    0
  ) scale(calc(1 + var(--scroll-p) * 0.06));
}

.art-right .art-canvas {
  transform: translate3d(
    calc(var(--scroll-p) * 18px),
    calc(var(--scroll-p) * 52px),
    0
  ) scale(calc(1 + var(--scroll-p) * 0.06));
}

.art-brand-plaque {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border-radius: 14px;
  background: rgba(250, 248, 245, 0.95);
  border: 2.5px solid var(--cw-dark);
  box-shadow: 0 6px 0 var(--cw-dark);
  text-align: center;
  max-width: 90%;
  will-change: transform;
  transform: translate3d(0, calc(var(--scroll-p) * -22px), 0);
}

.art-brand-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.04;
  color: var(--cw-dark);
  word-break: break-word;
}

.swatch-strip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: middle;
}

.swatch-svg {
  display: block;
}

/* Center Conway circular arrow badge straddling Left / Right art panels */
.hero-arrow-badge {
  position: absolute;
  left: 50%;
  top: 41%;
  transform: translate3d(-50%, calc(-50% - var(--scroll-p) * 16px), 0);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--cw-dark);
  border: 4px solid var(--cw-ivory);
  box-shadow: 0 4px 16px rgba(38, 38, 40, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 8;
  pointer-events: none;
  will-change: transform;
}

.hero-arrow-svg {
  width: 40px;
  height: 40px;
  display: block;
}

/* Ordered Bayer 4x4 pixelated dither melting both halves seamlessly into white (NO black line!) */
.hero-dither {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 108px;
  display: block;
  z-index: 6;
  pointer-events: none;
  overflow: visible;
}

.dither-layer-a {
  will-change: transform;
  transform: translateY(calc(var(--scroll-p) * -12px));
}

.dither-layer-b {
  will-change: transform;
  transform: translateY(calc(var(--scroll-p) * -32px));
}

/* Pure CSS Scroll-Driven fallback when JS is disabled */
@supports (animation-timeline: scroll()) {
  .split-hero:not(.has-scroll-motion) .art-left .art-canvas {
    animation: heroDriftLeft linear both;
    animation-timeline: scroll(root block);
    animation-range: 0px 420px;
  }
  .split-hero:not(.has-scroll-motion) .art-right .art-canvas {
    animation: heroDriftRight linear both;
    animation-timeline: scroll(root block);
    animation-range: 0px 420px;
  }
  .split-hero:not(.has-scroll-motion) .dither-layer-b {
    animation: ditherRise linear both;
    animation-timeline: scroll(root block);
    animation-range: 0px 420px;
  }
}

@keyframes heroDriftLeft {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-18px, 44px, 0) scale(1.06); }
}

@keyframes heroDriftRight {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(18px, 52px, 0) scale(1.06); }
}

@keyframes ditherRise {
  from { transform: translateY(0); }
  to { transform: translateY(-30px); }
}

@media (prefers-reduced-motion: reduce) {
  .art-canvas,
  .art-brand-plaque,
  .hero-arrow-badge,
  .dither-layer-a,
  .dither-layer-b {
    transform: none !important;
    animation: none !important;
  }
}

/* Right-hand "Port to..." panel on single-domain pages (e.g. goodbye.sh/linkedin) */
.port-options-half {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 36px 94px 56px;
  background: var(--cw-paper);
  background-image: radial-gradient(var(--cw-border) 1px, transparent 1px);
  background-size: 18px 18px;
}

.port-options-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.15;
  color: var(--cw-dark);
}

.port-options-sub {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--cw-muted);
}

.port-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.port-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  background: var(--cw-white);
  border: 2px solid var(--cw-dark);
  border-radius: 8px;
  box-shadow: 0 3px 0 var(--cw-dark);
  transition: transform 0.12s ease, background 0.12s ease;
}

.port-item:hover {
  transform: translate(-1px, -1px);
  background: var(--cw-yellow);
}

.port-item-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.port-item-name {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--cw-dark);
  line-height: 1.1;
}

.port-item-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ============================================================
   TWO-COLUMN EDITORIAL SHEET BELOW THE WAVE (MATCHES MOCKUP)
   ============================================================ */
.editorial-sheet {
  flex: 1 1 auto;
  background: var(--cw-white);
  padding: 14px 36px 56px;
}

.seo-banner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--cw-border);
}

.seo-banner h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 30px);
  color: var(--cw-dark);
  line-height: 1.2;
}

.split-editorial {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 0;
}

/* Dotted vertical center rule matching Drew's mockup */
.split-editorial::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 3px dotted var(--cw-dotted);
  transform: translateX(-50%);
  pointer-events: none;
}

.ed-col {
  padding: 12px 34px 24px;
}

.ed-col-left {
  padding-left: 4px;
  padding-right: 40px;
}

.ed-col-right {
  padding-left: 40px;
  padding-right: 4px;
}

.ed-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cw-coral);
  margin-bottom: 6px;
}

.ed-heading {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  color: var(--cw-dark);
}

.ed-copy {
  margin: 0;
  color: var(--cw-vinyl);
  font-size: 14.5px;
  line-height: 1.62;
}

/* Paired provider comparison rows with centered horizontal -> arrow */
.pair-rows {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
}

.pair-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--cw-border);
}

.pair-cell-left {
  padding-right: 18px;
}

.pair-cell-right {
  padding-left: 18px;
}

.pair-cell-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cw-muted);
  margin-bottom: 3px;
}

.pair-cell-text {
  font-size: 14.5px;
  color: var(--cw-dark);
}

.pair-row-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 28px;
  margin: 0 auto;
  background: var(--cw-white);
  color: var(--cw-coral);
  font-size: 20px;
  font-weight: 700;
  position: relative;
  z-index: 2;
}

/* ============================================================
   CONWAY TWITTY MCP HANDOFF CALLOUT + DIRECTORY + CONTROLS
   ============================================================ */
.conway-mcp-bar {
  margin-top: 32px;
  padding: 22px 24px;
  border-radius: 10px;
  background: var(--cw-dark);
  color: var(--cw-ivory);
  border: 2px solid var(--cw-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.conway-mcp-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cw-yellow);
}

.conway-mcp-url {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--cw-white);
  word-break: break-all;
}

.conway-mcp-note {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--cw-ivory);
  opacity: 0.85;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.dir-main {
  flex: 1 1 auto;
  padding: 32px 28px 56px;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dir-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.dir-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 40px);
  color: var(--cw-dark);
  line-height: 1.1;
}

.box {
  border: 2px solid var(--cw-dark);
  border-radius: 10px;
  padding: 20px 22px;
  background: var(--cw-white);
}

.subbox {
  border: 1.5px solid var(--cw-border);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--cw-paper);
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.muted {
  color: var(--cw-muted);
}

.xs {
  font-size: 12px;
}

.mt4 { margin-top: 4px; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border: 1px solid var(--cw-border);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--cw-vinyl);
  background: var(--cw-paper);
}

.pill-ok {
  color: var(--cw-dark);
  background: var(--cw-yellow);
  border-color: var(--cw-dark);
  font-weight: 600;
}

.pill-warn {
  color: #7A3219;
  background: #FCEEE9;
  border-color: var(--cw-coral);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 8px;
  border: 2px solid var(--cw-dark);
  background: var(--cw-coral);
  color: var(--cw-white);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}

.btn:hover {
  background: var(--cw-amber);
  color: var(--cw-dark);
  transform: translateY(-1px);
}

.btn-yellow {
  background: var(--cw-yellow);
  color: var(--cw-dark);
  border-color: var(--cw-yellow);
}

.btn-yellow:hover {
  background: var(--cw-ivory);
  border-color: var(--cw-ivory);
}

.btn-o {
  background: var(--cw-white);
  color: var(--cw-dark);
  border: 2px solid var(--cw-dark);
}

.btn-o:hover {
  background: var(--cw-paper);
}

.search {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 2px solid var(--cw-dark);
  border-radius: 8px;
  font: inherit;
  color: var(--cw-dark);
  background: var(--cw-paper);
}

.search:focus {
  outline: 3px solid var(--cw-yellow);
  outline-offset: 1px;
  background: var(--cw-white);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--cw-border);
  vertical-align: middle;
}

th {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cw-muted);
  background: var(--cw-paper);
}

th button {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
}

th button:hover {
  color: var(--cw-coral);
}

tbody tr:hover {
  background: var(--cw-paper);
}

.link-u {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--cw-coral);
}

.link-u:hover {
  color: var(--cw-coral);
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--cw-border);
}

.list-row:last-child {
  border-bottom: none;
}

pre {
  margin: 0;
  padding: 12px 14px;
  border: 1.5px solid var(--cw-border);
  border-radius: 6px;
  background: var(--cw-paper);
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.5;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--cw-border);
  background: var(--cw-paper);
  padding: 16px 28px;
  font-size: 12px;
  color: var(--cw-muted);
}

/* Raw utility header for why.html & /mcp handoff pages */
header.flat-header {
  border-bottom: 2px solid var(--cw-dark);
  background: var(--cw-dark);
  color: var(--cw-ivory);
}

.bar {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--cw-ivory);
}

.raw-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ============================================================
   MOBILE RESPONSIVE: HORIZONTAL GOODBYE BAR + STACKED PANELS
   ============================================================ */
@media (max-width: 860px) {
  .app-shell {
    display: block;
  }

  .goodbye-rail {
    position: sticky;
    top: 0;
    height: auto;
    width: 100%;
    padding: 10px 18px;
    border-right: none;
    border-bottom: 3px solid var(--cw-dark);
    justify-content: space-between;
  }

  .rail-brand {
    display: none;
  }

  .rail-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
  }

  .rail-mobile-wordmark {
    font-family: var(--font-display);
    font-size: 32px;
    line-height: 1;
    letter-spacing: 0.04em;
    color: var(--cw-ivory);
  }

  .rail-mobile-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: var(--cw-yellow);
  }

  .top-strip {
    padding: 8px 18px;
  }

  .top-strip nav {
    display: none;
  }

  .dir-main {
    padding: 20px 16px 48px;
  }

  .editorial-sheet {
    padding: 12px 18px 44px;
  }
}

@media (max-width: 720px) {
  .split-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .art-half {
    min-height: 240px;
    padding: 36px 20px 56px;
  }

  .art-left::after {
    display: none;
  }

  .art-left {
    border-bottom: 2px solid rgba(38, 38, 40, 0.22);
  }

  .hero-dither {
    height: 76px;
  }

  .port-options-half {
    padding: 38px 18px 72px;
  }

  .hero-arrow-badge {
    top: 240px;
    width: 60px;
    height: 60px;
    transform: translate(-50%, -50%) rotate(90deg);
  }

  .hero-arrow-svg {
    width: 30px;
    height: 30px;
  }

  .split-editorial {
    grid-template-columns: 1fr;
  }

  .split-editorial::before {
    display: none;
  }

  .ed-col-left, .ed-col-right {
    padding: 10px 0 18px;
  }

  .pair-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .pair-cell-left, .pair-cell-right {
    padding: 0;
  }

  .pair-row-arrow {
    margin: 0;
    justify-content: flex-start;
    transform: rotate(90deg);
    width: 24px;
    height: 24px;
  }

  .grid2 {
    grid-template-columns: 1fr;
  }

  th:nth-child(4), td:nth-child(4) {
    display: none;
  }
}
