/*
 * Pinto Capital LLP, the holding site.
 *
 * Colours and type are the Intelligence Flow's, so the two read as one firm:
 * a deep blue-black ground rather than #000 (Pinto found pure black "very AI"),
 * warm off-white ink, and Arial throughout (their choice for the Flow).
 * Square corners everywhere; the only round things are the play buttons.
 */

:root {
  --ground: #0a0d10;
  --lift: #0f1418;
  --card: #141a1f;
  --ink: #ece9e3;
  --soft: #b7b3ac;
  --stone: #8a939b;
  --faint: #5c656d;
  --rule: rgba(236, 233, 227, 0.10);
  --rule-strong: rgba(236, 233, 227, 0.22);
  --wrap: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(72px, 9vw, 128px);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: Arial, "Helvetica Neue", Helvetica, "Liberation Sans", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

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

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--ground), 0 0 0 4px var(--ink);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--ground);
  font-weight: 700;
  z-index: 10;
}
.skip:focus { left: 8px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Section titles: the Flow's .stitle, full strength so they can be found. */
.stitle {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.stitle--muted { color: var(--stone); }

.lead {
  margin: 20px 0 0;
  max-width: 940px;
  font-size: clamp(22px, 2.3vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 22px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn--solid { background: var(--ink); color: var(--ground); }
.btn--solid:hover { background: #fffdf8; }
.btn--line { border-color: rgba(236, 233, 227, 0.4); color: var(--ink); }
.btn--line:hover { border-color: var(--ink); }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(10, 13, 16, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand { display: block; line-height: 0; }
.brand img { height: 15px; width: auto; }

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 28px;
  font-size: 14px;
}
.nav a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.nav a:not(.btn):hover { color: var(--soft); }
.nav .btn { min-height: 44px; padding: 0 18px; margin-left: 4px; white-space: nowrap; }

/* Hero */

.hero { padding-top: clamp(88px, 11vw, 160px); padding-bottom: clamp(24px, 3vw, 48px); }
.hero h1 {
  margin: 0;
  max-width: 1080px;
  font-weight: 400;
  font-size: clamp(38px, 5.2vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.hero h1 span { color: var(--stone); }
.hero-actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }


/* About */

.about { padding-top: var(--section); }
.why-title { margin-top: 64px; }

/* Why Pinto Capital. Each title sits with its own content, so one markup serves
   two layouts. Desktop: titles in a column on the left, one statement at a time
   on the right, the active rule filling over 7s before moving on (site.js adds
   .is-enhanced and .is-auto). Phones: an accordion, each statement opening
   directly under its title. Without JavaScript all four simply stack. */
.why { margin-top: 20px; }
.why-tab {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 18px;
  width: 100%;
  padding: 20px 0;
  border: 0;
  border-top: 1px solid var(--rule);
  background: none;
  color: var(--stone);
  font: inherit;
  font-size: clamp(18px, 1.7vw, 22px);
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease;
}
.why-item:last-child .why-tab { border-bottom: 1px solid var(--rule); }
.why-tab:hover { color: var(--soft); }
.why-tab[aria-expanded="true"] { color: var(--ink); }
.why-no { min-width: 24px; font-size: 13px; color: var(--faint); letter-spacing: 0; }
.why-tab[aria-expanded="true"] .why-no { color: var(--stone); }
.why-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
}
.why-tab[aria-expanded="true"] .why-bar { transform: scaleX(1); }
.why.is-auto .why-tab[aria-expanded="true"] .why-bar { animation: why-fill 7s linear forwards; }
.why.is-paused .why-bar { animation-play-state: paused !important; }
@keyframes why-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.why-icon { display: none; }
.why-statement {
  margin: 0;
  max-width: 640px;
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.why-detail { margin: 20px 0 0; max-width: 560px; font-size: 16px; color: var(--soft); }
.why:not(.is-enhanced) .why-tab { cursor: default; color: var(--ink); }
.why:not(.is-enhanced) .why-panel-body { padding: 4px 0 28px; }

/* Desktop and tablet: list left, statement right. Every panel shares one grid
   cell, so the area is always the height of the tallest and nothing jumps. */
@media (min-width: 901px) {
  .why.is-enhanced {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: repeat(4, auto) 1fr;
    column-gap: 72px;
    align-items: start;
  }
  .why.is-enhanced .why-item { display: contents; }
  .why.is-enhanced .why-tab { grid-column: 1; }
  .why.is-enhanced .why-panel {
    grid-column: 2;
    grid-row: 1 / -1;
    padding-top: 18px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s;
  }
  .why.is-enhanced .why-panel.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.4s ease 0.05s, transform 0.4s ease 0.05s, visibility 0s;
  }
}

/* Phones: an accordion with a plus that turns to a minus. */
@media (max-width: 900px) {
  .why-tab { padding: 16px 0; font-size: 18px; align-items: center; }
  .why.is-enhanced .why-icon {
    display: block;
    position: relative;
    width: 14px;
    height: 14px;
    margin-left: auto;
    flex: 0 0 auto;
  }
  .why-icon::before, .why-icon::after {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 14px;
    height: 2px;
    background: currentColor;
    transition: transform 0.25s ease;
  }
  .why-icon::after { transform: rotate(90deg); }
  .why-tab[aria-expanded="true"] .why-icon::after { transform: rotate(0deg); }
  .why.is-enhanced .why-panel {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows 0.3s ease, visibility 0s linear 0.3s;
  }
  .why.is-enhanced .why-panel.is-active {
    grid-template-rows: 1fr;
    visibility: visible;
    transition: grid-template-rows 0.3s ease, visibility 0s;
  }
  .why-panel-inner { overflow: hidden; min-height: 0; }
  .why.is-enhanced .why-panel-body { padding: 2px 0 22px 42px; }
}

/* Services */

.services { padding-top: var(--section); padding-bottom: var(--section); }
.service-list { margin: 40px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.service-list li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1.5fr);
  align-items: baseline;
  gap: 6px 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}
.service-no { font-size: 13px; color: var(--faint); }
.service-list h3 {
  margin: 0;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.service-list p { margin: 0; font-size: 15px; color: var(--soft); max-width: 620px; }

/* Media */

.media { background: var(--lift); border-top: 1px solid var(--rule); }
.media .wrap { padding-top: var(--section); padding-bottom: var(--section); }
.features { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 24px; }
.feature { flex: 1 1 360px; margin: 0; min-width: 0; }
.feature-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--card);
  border: 1px solid rgba(236, 233, 227, 0.09);
  overflow: hidden;
}
.feature-frame img, .feature-frame video { width: 100%; height: 100%; object-fit: cover; }
.play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--ground);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
a.feature-frame:hover .play { transform: scale(1.06); }
.frame-tag {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 9px;
  background: rgba(10, 13, 16, 0.82);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
}

/* The on-site video viewer. */
.theatre {
  /* As wide as fits, but never taller than the window with room for the close
     button above and the caption below. */
  width: min(1200px, 92vw, calc((100vh - 150px) * 16 / 9));
  width: min(1200px, 92vw, calc((100dvh - 150px) * 16 / 9));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}
.theatre::backdrop { background: rgba(5, 7, 9, 0.94); }
.theatre-inner { position: relative; padding-top: 56px; }
.theatre video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.theatre-caption { margin: 14px 0 0; font-size: 15px; font-weight: 700; }
.theatre-caption span { font-weight: 400; color: var(--stone); }
.theatre-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(236, 233, 227, 0.4);
  background: transparent;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.theatre-close:hover { border-color: var(--ink); }
.feature figcaption { margin-top: 14px; font-size: 16px; font-weight: 700; }
.feature figcaption span { font-weight: 400; color: var(--stone); }
.feature figcaption a { text-decoration: none; }
.feature figcaption a:hover { text-decoration: underline; text-underline-offset: 3px; }

.press-title { margin-top: 56px; }
.press-list { margin: 14px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.press-list a {
  display: grid;
  grid-template-columns: 28px 200px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.press-icon { width: 28px; height: 28px; border-radius: 3px; object-fit: contain; }
.press-list a:hover .press-headline { text-decoration: underline; text-underline-offset: 3px; }
.press-source { font-weight: 700; }
.press-source span { font-weight: 400; color: var(--stone); }
.press-headline { min-width: 0; }
.press-note { display: block; margin-top: 2px; font-size: 13px; color: var(--stone); }
.press-arrow { color: var(--stone); }

/* Team and contact: one closing section. Two sentences, then the email. */

.team { border-top: 1px solid var(--rule); }
.team .wrap { padding-top: var(--section); padding-bottom: var(--section); }
.team-lead { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.3; }
.team-note { margin: 18px 0 0; max-width: 760px; color: var(--soft); }
.contact-email {
  margin-top: clamp(32px, 4vw, 48px);
  display: inline-block;
  font-size: clamp(24px, 2.4vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  overflow-wrap: anywhere;
}
.contact-email:hover { color: var(--soft); border-color: var(--soft); }

/* Footer */

.site-footer { border-top: 1px solid var(--rule); }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 24px;
  padding-bottom: 40px;
  font-size: 13px;
  color: var(--stone);
}
.site-footer a { color: var(--soft); text-underline-offset: 3px; }
.legal { margin: 0; }
.legal span + span::before { content: " · "; }

/* Tablets and phones: each service sits as number, then title over description. */
@media (max-width: 900px) {
  .service-list li { grid-template-columns: 40px minmax(0, 1fr); }
  .service-list p { grid-column: 2; }
}

/* Phones. One-row header (the page is a single scroll, so the section links
   go and Contact stays), tighter rhythm, and every list aligned to one edge. */
@media (max-width: 640px) {
  :root { --section: 64px; }
  html { scroll-padding-top: 64px; }

  .site-header .wrap { flex-wrap: nowrap; column-gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .brand img { height: 13px; }
  .nav a:not(.btn) { display: none; }
  .nav .btn { min-height: 40px; padding: 0 14px; margin-left: 0; font-size: 14px; }

  .hero { padding-top: 56px; padding-bottom: 40px; }
  .hero h1 { font-size: clamp(32px, 9.4vw, 40px); line-height: 1.08; letter-spacing: -0.03em; }
  .hero-actions { margin-top: 28px; }
  .hero-actions .btn { flex: 1 1 0; justify-content: center; padding: 0 12px; }


  .lead { font-size: 22px; line-height: 1.32; }
  .why-title { margin-top: 48px; }
  .why-statement { font-size: 22px; }
  .why-detail { font-size: 15px; margin-top: 10px; }

  .service-list { margin-top: 28px; }
  .service-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px 0; padding: 20px 0; }
  .service-no { padding-top: 5px; }
  .service-list h3 { font-size: 22px; }
  .service-list p { grid-column: 2; }

  .features { gap: 32px; }
  .feature figcaption { font-size: 15px; }
  .press-title { margin-top: 44px; }
  .press-list a { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 4px 14px; padding: 16px 0; }
  .press-icon { grid-column: 1; grid-row: 1 / span 2; align-self: start; margin-top: 2px; }
  .press-source { grid-column: 2; font-size: 14px; }
  .press-headline { grid-column: 2; }
  .press-arrow { grid-column: 3; grid-row: 1 / span 2; align-self: center; }

  .team-lead { font-size: 22px; }

  .legal span { display: block; }
  .legal span + span::before { content: none; }

  .contact-email { font-size: 22px; }

  .site-footer .wrap { font-size: 12px; padding-bottom: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .why.is-enhanced .why-panel { transform: none; transition: none; }
  *, *::before, *::after { transition: none !important; }
}
