/* Keeks Design portfolio: sticky intro card beside Work, Pricing and Contact tabs. */
:root {
  --bg: #ebebeb;
  --fg-muted: #626262;
  --border: rgb(20 20 20 / 9%);
  --surface-2: #f1f1f0;
  --dark-muted: #b4b4b4;
  --live: #1f9d55;
}

.pf-layout {
  display: grid;
  gap: var(--s-16);
  max-width: 1600px;
  margin: 0 auto;
  padding: var(--s-16);
}

/* Intro card */
.pf-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-24);
  padding: var(--s-32) var(--s-24) var(--s-24);
  border-radius: var(--r-panel);
  background: var(--surface);
}

.pf-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-12);
}

.pf-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-12);
  font-family: var(--font-display);
  font-size: var(--t-18);
  font-weight: 600;
  letter-spacing: var(--tracking-sm);
}

.pf-mark {
  width: 32px;
  height: 32px;
}

.pf-mark rect {
  fill: var(--fg);
}

.pf-mark path {
  fill: none;
  stroke: #fff;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pf-clock {
  color: var(--fg-muted);
  font-size: var(--t-14);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pf-tabs {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-4);
  border-radius: var(--r-pill);
  background: var(--surface-2);
}

.pf-tabs a {
  flex: 1;
  padding: var(--s-8) var(--s-12);
  border-radius: var(--r-pill);
  color: var(--fg-muted);
  font-size: var(--t-14);
  font-weight: 600;
  text-align: center;
  transition:
    background-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease);
}

.pf-tabs a:hover {
  color: var(--fg);
}

/* Active tab without script; the script adds aria-current for screen readers. */
body:not(:has(#pricing:target, #contact:target)) .pf-tabs a[href="#works"],
body:has(#pricing:target) .pf-tabs a[href="#pricing"],
body:has(#contact:target) .pf-tabs a[href="#contact"] {
  background: var(--fg);
  color: #fff;
}

.pf-intro {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
}

.pf-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: var(--s-8);
  padding: var(--s-4) var(--s-12);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  font-size: var(--t-14);
  font-weight: 600;
}

.pf-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 3px rgb(31 157 85 / 18%);
}

.pf-card h1 {
  font-size: clamp(2rem, 1.4rem + 1.6vw, 2.5rem);
  line-height: 1.08;
}

.pf-sub {
  max-width: 38ch;
  color: var(--fg-muted);
}

.pf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-8);
  margin-top: var(--s-8);
}

.pf-person {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-12);
  padding-top: var(--s-24);
  border-top: 1px solid var(--border);
  line-height: 1.3;
}

.pf-photo {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--fg);
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--t-18);
  font-weight: 600;
}

.pf-name {
  font-weight: 700;
}

.pf-phone {
  margin-left: auto;
  font-size: var(--t-14);
  font-weight: 600;
  white-space: nowrap;
}

.pf-phone:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Tabs: Work shows until another section is targeted. Without :has every section shows. */
.pf-main {
  container-type: inline-size;
  min-width: 0;
  padding: var(--s-8) 0 0;
}

.pf-section,
.pf-section h2 {
  scroll-margin-top: var(--s-16);
}

.pf-section + .pf-section {
  margin-top: var(--s-64);
}

@supports selector(:has(*)) {
  .pf-section {
    display: none;
  }

  .pf-section:target,
  .pf-main:not(:has(.pf-section:target)) #works {
    display: block;
  }

  .pf-section + .pf-section {
    margin-top: 0;
  }
}

.pf-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-16);
  margin-bottom: var(--s-32);
}

.pf-head h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem);
}

.pf-head h2:focus {
  outline: none;
}

.pf-note {
  margin-top: var(--s-8);
  color: var(--fg-muted);
}

.pf-films {
  padding: var(--s-8) var(--s-16);
  border: 1px solid color-mix(in srgb, var(--fg) 18%, transparent);
  border-radius: var(--r-pill);
  font-size: var(--t-14);
  font-weight: 600;
}

.pf-films:hover {
  border-color: var(--fg);
}

.pf-films[aria-pressed="true"] {
  border-color: var(--fg);
  background: var(--fg);
  color: #fff;
}

/* Works */
.pf-trade + .pf-trade {
  margin-top: var(--s-48);
}

.pf-trade h3 {
  margin-bottom: var(--s-16);
  font-size: var(--t-20);
}

.pf-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr);
  gap: var(--s-16);
}

.pf-tile {
  display: flex;
  flex-direction: column;
}

.pf-tile-lg {
  grid-row: span 2;
}

.pf-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 960 / 586;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border);
  transition: box-shadow var(--dur-fast) var(--ease);
}

/* 2.3 : 1 keeps the large tile close to its film's own shape beside two stacked tiles. */
.pf-tile-lg .pf-media {
  flex: 1;
  min-height: 240px;
  aspect-ratio: auto;
}

.pf-tile-lg .pf-media > * {
  object-position: left top;
}

.pf-media > img,
.pf-media > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.pf-tile:hover .pf-media {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 45%, transparent);
}

.pf-tile:focus-visible {
  outline: none;
}

.pf-tile:focus-visible .pf-media {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.pf-cap {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-12) var(--s-2) 0;
  font-size: var(--t-14);
  line-height: 1.35;
}

.pf-cap-name {
  font-weight: 700;
}

.pf-tile-lg .pf-cap-name {
  font-size: var(--t-16);
}

.pf-tile:hover .pf-cap-name {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.pf-cap-note {
  color: var(--fg-muted);
}

@container (max-width: 799px) {
  .pf-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--s-24) var(--s-12);
  }

  .pf-tile-lg {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .pf-tile-lg .pf-media {
    flex: none;
    min-height: 0;
    aspect-ratio: 960 / 594;
  }
}

@container (max-width: 319px) {
  .pf-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Pricing */
.pf-plans {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-16);
}

.pf-plan {
  --plan-muted: var(--fg-muted);
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  padding: var(--s-32);
  border-radius: var(--r-panel);
  background: var(--surface);
}

.pf-plan h3 {
  font-size: var(--t-24);
}

.pf-plan-desc {
  color: var(--plan-muted);
}

.pf-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-4) var(--s-8);
  margin-top: var(--s-8);
}

.pf-price strong {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem);
  font-weight: 600;
  letter-spacing: var(--tracking);
  line-height: 1.1;
}

.pf-price span {
  color: var(--plan-muted);
}

.pf-ticks {
  display: grid;
  gap: var(--s-12);
  margin: var(--s-8) 0 var(--s-16);
  padding: var(--s-24) 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.pf-ticks li {
  position: relative;
  padding-left: var(--s-32);
}

.pf-ticks li::before {
  position: absolute;
  top: 0.38em;
  left: var(--s-4);
  width: 12px;
  height: 6px;
  border-bottom: 2px solid currentcolor;
  border-left: 2px solid currentcolor;
  transform: rotate(-45deg);
  content: "";
}

.pf-plan .btn {
  margin-top: auto;
}

.pf-plan-dark {
  --plan-muted: var(--dark-muted);
  background: var(--fg);
  color: #fff;
}

.pf-plan-dark .pf-ticks {
  border-top-color: rgb(255 255 255 / 14%);
}

.pf-plan-dark .btn,
.pf-book .btn {
  background: #fff;
  color: var(--fg);
}

.pf-plan-dark .btn:focus-visible,
.pf-book .btn:focus-visible {
  outline-color: #fff;
}

.pf-extras {
  margin-top: var(--s-16);
  padding: var(--s-32);
  border-radius: var(--r-panel);
  background: var(--surface);
}

.pf-extras h3 {
  font-size: var(--t-24);
}

.pf-extras ul {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-24) var(--s-32);
  margin: var(--s-24) 0;
  padding: 0;
  list-style: none;
  color: var(--fg-muted);
}

.pf-extras li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.pf-extras strong {
  display: block;
  margin-bottom: var(--s-4);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: var(--t-18);
  font-weight: 600;
}

@container (max-width: 759px) {
  .pf-plans {
    grid-template-columns: minmax(0, 1fr);
  }
}

@container (max-width: 559px) {
  .pf-plan,
  .pf-extras,
  .pf-book {
    padding: var(--s-24);
  }

  .pf-extras ul {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Contact */
.pf-book {
  display: grid;
  gap: var(--s-12);
  justify-items: start;
  padding: var(--s-40) var(--s-32);
  border-radius: var(--r-panel);
  background: var(--fg);
  color: #fff;
}

.pf-book h3 {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}

.pf-book p {
  max-width: 46ch;
  margin-bottom: var(--s-8);
  color: var(--dark-muted);
}

.pf-ways {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-16);
  margin-top: var(--s-16);
}

.pf-way {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-24);
  border-radius: var(--r-panel);
  background: var(--surface);
  box-shadow: 0 0 0 1px transparent;
  transition: box-shadow var(--dur-fast) var(--ease);
}

.pf-way:hover {
  box-shadow: 0 0 0 1px var(--fg);
}

.pf-way svg {
  width: 24px;
  height: 24px;
  margin-bottom: var(--s-12);
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pf-way strong {
  font-family: var(--font-display);
  font-size: var(--t-18);
  font-weight: 600;
}

.pf-way span {
  color: var(--fg-muted);
  overflow-wrap: anywhere;
}

@container (max-width: 639px) {
  .pf-ways {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Footer */
.pf-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-12) var(--s-24);
  margin-top: var(--s-80);
  padding: var(--s-24) 0 var(--s-8);
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: var(--t-14);
}

.pf-footer p {
  max-width: 62ch;
}

.pf-footer nav {
  display: flex;
  gap: var(--s-16);
}

.pf-footer a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.pf-footer a:hover {
  color: var(--fg);
}

/* Desktop: the card stays beside the content and spreads to full height. */
@media (min-width: 1024px) {
  .pf-layout {
    grid-template-columns: minmax(340px, 400px) minmax(0, 1fr);
    align-items: start;
    gap: var(--s-32);
  }

  .pf-card {
    position: sticky;
    top: var(--s-16);
    min-height: calc(100svh - var(--s-32));
    padding: var(--s-32);
  }

  .pf-intro,
  .pf-person {
    margin-top: auto;
  }

  .pf-main {
    padding-top: var(--s-24);
  }

  /* Layout padding plus main padding, so a tab change leaves the page at the top. */
  .pf-section,
  .pf-section h2 {
    scroll-margin-top: var(--s-40);
  }
}

/* Phones and tablets: the tabs sit at the end of the card, right above the sections. */
@media (max-width: 1023px) {
  .pf-tabs {
    order: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pf-tabs a,
  .pf-media,
  .pf-way {
    transition: none;
  }
}

/* Legal and not-found pages */
.pf-doc {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--s-16);
}

.pf-doc-card {
  padding: var(--s-32) var(--s-24);
  border-radius: var(--r-panel);
  background: var(--surface);
}

.pf-doc-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-12) var(--s-24);
  margin-bottom: var(--s-48);
}

.pf-back {
  color: var(--fg-muted);
  font-size: var(--t-14);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.pf-back:hover {
  color: var(--fg);
}

.pf-doc h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
}

.pf-updated {
  margin-top: var(--s-8);
  color: var(--fg-muted);
  font-size: var(--t-14);
}

.pf-doc h2 {
  margin: var(--s-40) 0 var(--s-12);
  font-size: var(--t-20);
  letter-spacing: var(--tracking-sm);
}

.pf-doc-card > p,
.pf-doc-card > ul {
  max-width: 64ch;
  margin-top: var(--s-12);
}

.pf-doc-card > ul {
  padding-left: var(--s-24);
}

.pf-doc-card li + li {
  margin-top: var(--s-8);
}

.pf-doc-card .btn {
  margin-top: var(--s-24);
}

.pf-doc .pf-footer {
  margin-top: var(--s-24);
  padding-inline: var(--s-8);
}

@media (min-width: 640px) {
  .pf-doc {
    padding: var(--s-32) var(--s-16);
  }

  .pf-doc-card {
    padding: var(--s-48);
  }
}
