/* Shivar Consulting — home page
   Palette: paper, navy ink, one raspberry thread.
   Solid threads are organic search, dashed threads are paid. */

:root {
  --paper:  #FAFBFD;
  --ink:    #1B2447;
  --ink-2:  #545E80;
  --rule:   #DCE0EB;
  --wash:   #EEF0F7;
  --thread: #1B2447;
  --accent: #D4145A;
  --on-accent: #FFFFFF;

  --font: "Familjen Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  --measure: 36em;
  --dash: 6 5;

  --tangle-h: clamp(22rem, 34vw, 27rem);   /* 8 rows, never under 44px each */
  --cat-w: clamp(6.5rem, 22vw, 16.25rem);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:  #121935;
    --ink:    #E8EBF5;
    --ink-2:  #A3ABC7;
    --rule:   #2A3356;
    --wash:   #1A2249;
    --thread: #E8EBF5;
    --accent: #FF4D8D;
    --on-accent: #121935;
  }
}

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

/* ---------- Masthead ---------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.wordmark-mark {
  width: 38px;
  height: 13px;
  flex: none;
  overflow: visible;
}
.wordmark-mark path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.4;
  stroke-linecap: round;
}
.wordmark-mark path.dashed {
  stroke-dasharray: 6 4.5;
  stroke-linecap: butt;
}
.wordmark-mark circle { fill: var(--accent); }

.masthead-email {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 1.15rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.masthead-email:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

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

.hero { padding-top: clamp(2.75rem, 8vw, 6.5rem); }

.hero h1 {
  font-size: clamp(2.75rem, 1.4rem + 6.4vw, 6.25rem);
  font-weight: 620;
  line-height: 0.96;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.hero h1 span { display: block; }

.lede {
  max-width: var(--measure);
  margin-top: clamp(1.25rem, 3vw, 2rem);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.5;
  text-wrap: pretty;
}

/* ---------- Actions ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.button:hover {
  background: var(--accent);
  color: var(--on-accent);
}

.text-link {
  font-weight: 500;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}
.text-link:hover {
  color: var(--accent);
  text-decoration-thickness: 2px;
}

/* ---------- The tangle ---------- */

.tangle-section { margin-top: clamp(3.5rem, 8vw, 6rem); }

.tangle-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  margin-bottom: 0.75rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.keys {
  display: inline-flex;
  gap: 1rem;
}
.key {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.key-line {
  display: inline-block;
  width: 26px;
  border-top: 2px solid var(--ink-2);
}
.key-paid { border-top-style: dashed; }

.tangle {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) var(--cat-w);
  grid-template-rows: minmax(0, 1fr);
  height: var(--tangle-h);
}

.channels {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: repeat(8, 1fr);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.channel {
  position: relative;
  display: flex;
}

.channel input {
  position: absolute;
  inset: 50% auto auto 0;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.channel label {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding-right: 1rem;
  color: var(--ink-2);
  font-size: 0.8125rem;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s;
}

/* The knot where each thread begins */
.channel label::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -4px;
  width: 9px;
  height: 9px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: var(--paper);
  transform: translateY(-50%);
  transition: background-color 0.2s, border-color 0.2s;
}

.channel label:hover { color: var(--ink); }

.channel input:checked + label {
  color: var(--accent);
  font-weight: 600;
}
.channel input:checked + label::after {
  background: var(--accent);
  border-color: var(--accent);
}

.channel input:focus-visible + label {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.threads {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: visible;
}

.thread {
  fill: none;
  stroke: var(--thread);
  stroke-opacity: 0.4;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: stroke 0.25s, stroke-opacity 0.25s, stroke-width 0.25s;
}
.thread.paid {
  stroke-dasharray: var(--dash);
  stroke-linecap: butt;
}

/* Follow one thread: fade the rest, light up the chosen one */
.tangle:has(input:checked) .thread { stroke-opacity: 0.16; }

.tangle:has(#c-google:checked)   .t-google,
.tangle:has(#c-aio:checked)      .t-aio,
.tangle:has(#c-maps:checked)     .t-maps,
.tangle:has(#c-chatgpt:checked)  .t-chatgpt,
.tangle:has(#c-ads:checked)      .t-ads,
.tangle:has(#c-shopping:checked) .t-shopping,
.tangle:has(#c-lsa:checked)      .t-lsa,
.tangle:has(#c-bing:checked)     .t-bing {
  stroke: var(--accent);
  stroke-opacity: 1;
  stroke-width: 3;
}

.cat {
  position: relative;
  align-self: center;
}

.cat img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 35%;
  border-radius: 14px;
  background: var(--wash);
}

.cat figcaption {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  color: var(--ink-2);
  font-size: 0.8125rem;
  line-height: 1.3;
}

/* Notes under the tangle */
.notes {
  max-width: var(--measure);
  min-height: 5.5em;
  margin-top: 1.5rem;
}

.note + .note { margin-top: 0.75rem; }

.note-name {
  display: block;
  color: var(--accent);
  font-weight: 600;
}

@supports selector(:has(*)) {
  .note { display: none; }
  .note + .note { margin-top: 0; }

  .tangle-section:has(#c-google:checked)   #n-google,
  .tangle-section:has(#c-aio:checked)      #n-aio,
  .tangle-section:has(#c-maps:checked)     #n-maps,
  .tangle-section:has(#c-chatgpt:checked)  #n-chatgpt,
  .tangle-section:has(#c-ads:checked)      #n-ads,
  .tangle-section:has(#c-shopping:checked) #n-shopping,
  .tangle-section:has(#c-lsa:checked)      #n-lsa,
  .tangle-section:has(#c-bing:checked)     #n-bing {
    display: block;
  }
}

/* One orchestrated moment: the threads spool out to the cat */
@media (prefers-reduced-motion: no-preference) {
  .threads { animation: spool 1.7s cubic-bezier(0.25, 0.7, 0.2, 1) 0.15s both; }
  .cat img  { animation: arrive 0.6s ease-out 1.05s both; }

  @keyframes spool {
    from { clip-path: inset(-20px 100% -20px -20px); }
    to   { clip-path: inset(-20px -20px -20px -20px); }
  }
  @keyframes arrive {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: none; }
  }
}

/* ---------- Shared section rhythm ---------- */

.plans,
.how,
.helped,
.contact {
  margin-top: clamp(4.5rem, 10vw, 8rem);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--rule);
}

.plans h2,
.how h2,
.helped h2,
.contact h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  font-weight: 620;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.fine {
  max-width: 34em;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

/* ---------- Plans: three cards, one shared checklist ---------- */

.plans { scroll-margin-top: 1rem; }

.plan-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 1.75rem;
  border: 1.5px solid var(--rule);
  border-radius: 18px;
  background: var(--paper);
}

/* The featured plan is inked in: both threads, best value */
.plan-full {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  --muted: color-mix(in srgb, var(--paper) 62%, var(--ink));
}

.badge {
  position: absolute;
  top: 1.35rem;
  right: 1.5rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.8125rem;
  font-weight: 650;
}

.plan-glyph {
  display: block;
  width: 64px;
  height: 16px;
  margin-bottom: 1rem;
  overflow: visible;
}
.plan-glyph path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.25;
  stroke-linecap: round;
}
.plan-glyph path.dashed {
  stroke-dasharray: 5 4;
  stroke-linecap: butt;
}
.plan-glyph circle { fill: var(--accent); }

.plan h3 {
  font-size: 1.625rem;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.plan-outcome {
  margin-top: 0.35rem;
  color: var(--ink-2);
}
.plan-full .plan-outcome { color: var(--muted); }

.price {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  margin-top: 1.25rem;
}
.price-amount {
  font-size: clamp(2.5rem, 2rem + 1.6vw, 3.25rem);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.per {
  color: var(--ink-2);
  font-weight: 500;
}
.plan-full .per { color: var(--muted); }

.price-alt {
  margin-top: 0.4rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
}
.plan-full .price-alt { color: var(--muted); }

.features {
  margin: 1.5rem 0 1.75rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}
.plan-full .features { border-top-color: color-mix(in srgb, var(--paper) 22%, var(--ink)); }

.features li {
  position: relative;
  padding-left: 1.75rem;
  line-height: 1.4;
}
.features li + li { margin-top: 0.7rem; }

/* Included: a filled knot. Not included: a cut thread, greyed out */
.features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}
.features li.no {
  color: var(--ink-2);
  opacity: 0.55;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.features li.no::before {
  top: 0.68em;
  width: 12px;
  height: 0;
  border-radius: 0;
  border-top: 1.5px solid currentColor;
  background: none;
}

.plan .button {
  margin-top: auto;
  width: 100%;
}
.button-line {
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
}
.plan-full .button {
  background: var(--accent);
  color: var(--on-accent);
}
.plan-full .button:hover {
  background: var(--paper);
  color: var(--ink);
}

.plans-note {
  max-width: 40em;
  margin-top: 1.25rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  text-wrap: pretty;
}

/* On phones, show only what each plan includes, to keep cards short */
@media (max-width: 51.99em) {
  .features li.no { display: none; }
}

/* ---------- How it works ---------- */

.steps {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.75rem;
  padding: 0;
  list-style: none;
}

.steps li {
  position: relative;
  padding-left: 2rem;
}

/* One straight thread through the steps, ending in a filled knot */
.steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.38em;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--paper);
  z-index: 1;
}
.steps li:last-child::before { background: var(--accent); }
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 0.9em;
  bottom: -1.6rem;
  width: 2px;
  background: var(--accent);
}

.steps h3 {
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.3;
}
.steps p {
  margin-top: 0.15rem;
  color: var(--ink-2);
}

.guarantee {
  max-width: 36em;
  margin-top: 2rem;
  padding: 1.1rem 1.5rem 1.2rem;
  border-radius: 14px;
  background: var(--wash);
  box-shadow: inset 3px 0 0 var(--accent);
}
.guarantee h3 {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 650;
}
.guarantee p {
  margin-top: 0.2rem;
  font-weight: 500;
  text-wrap: pretty;
}

/* ---------- I've helped ---------- */

.helped ul {
  display: grid;
  gap: 1.25rem 2.5rem;
  margin-top: 1.75rem;
  padding: 0;
  list-style: none;
}

.helped li {
  padding-top: 0.875rem;
  border-top: 1px solid var(--rule);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.4;
  text-wrap: pretty;
}

/* ---------- Free video ---------- */

.contact {
  display: grid;
  gap: 2rem;
  scroll-margin-top: 1rem;
}

.contact-head > p {
  max-width: 30em;
  margin-top: 1rem;
  text-wrap: pretty;
}
.contact-head .contact-alt {
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.contact-form {
  display: grid;
  gap: 1rem 1.25rem;
  align-content: start;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 18px;
  background: var(--wash);
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}
.field textarea {
  min-height: 6.5rem;
  resize: vertical;
  line-height: 1.45;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-2); opacity: 0.75; }
.field input:hover,
.field textarea:hover { border-color: var(--ink-2); }
.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.form-actions { padding-top: 0.25rem; }

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

.site-footer {
  display: grid;
  gap: 1.75rem;
  margin-top: clamp(4.5rem, 10vw, 8rem);
  padding-top: 2rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.site-footer h2 {
  margin-bottom: 0.35rem;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  padding: 0;
  list-style: none;
}
.link-row a {
  display: inline-block;
  padding-block: 0.35rem;
  text-underline-offset: 0.2em;
}
.link-row a:hover { color: var(--accent); }

.legal p { margin-top: 0.5rem; }

/* ---------- Wider screens ---------- */

@media (min-width: 40em) {
  :root { --gutter: 32px; }

  .channel label { font-size: 0.9375rem; padding-right: 1.5rem; }
  .cat img { border-radius: 18px; }
  .cat figcaption { font-size: 0.875rem; }

  .helped ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .contact-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-wide,
  .form-actions { grid-column: 1 / -1; }

  .site-footer {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .legal { text-align: right; }
  .legal .link-row { justify-content: flex-end; }
}

@media (min-width: 52em) {
  .plan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }
  .plan-full {
    margin-block: -0.75rem;
    padding-block: 2.25rem 2.5rem;
  }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
  .steps li { padding: 1.75rem 0 0; }
  .steps li::before { top: 0; }
  .steps li:not(:last-child)::after {
    left: 12px;
    right: -2rem;
    top: 5px;
    bottom: auto;
    width: auto;
    height: 2px;
  }
}

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

  .channel label { font-size: 1rem; padding-right: 2rem; }

  .contact {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
  }
}
