/*!
Theme Name: Intropik 2026
Theme URI: https://www.intropik.com
Author: Nicholas Chrysanthou
Author URI: https://www.intropik.com
Description: Single-page portfolio for Intropik. Hand-drawn wordmark, Selected clients with hover previews, Start a project form.
Version: 1.5.2
Requires at least: 5.2
Requires PHP: 7.0
Text Domain: intropik26
*/
/* ---------- Tokens ---------- */
:root {
  --bg: #efefef;
  --ink: #000;
  --muted: #767676;
  --accent: #0000ff;
  --chip: #4a4a4a;
  --fs: 12px;
  --pad: 20px;
  --header-h: 56px;
  --ease: cubic-bezier(.65, 0, .35, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--fs)/1.38 "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
}

a:hover {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

p {
  margin: 0;
}

img, iframe {
  display: block;
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: var(--pad);
  top: -100px;
  z-index: 20;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  border-radius: 20px;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
  padding: 12px var(--pad);
  background: var(--bg);
}

.logo {
  text-decoration: none;
}

.logo:hover {
  text-decoration: underline;
}

.cta {
  font: inherit;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 20px;
  min-height: 32px;
  padding: 0 16px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.cta:hover {
  opacity: 0.8;
}

/* ---------- Stage: wordmark + previews, fixed behind the content ---------- */
.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg); /* gives the blended row text a real backdrop */
}

.wordmark-wrap,
.preview {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.wordmark-wrap {
  width: min(64vw, 1000px);
  transition: opacity 0.3s;
}

.wordmark-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  /* Soft shadow below the lines, so the lettering seems to float above the page */
  filter: drop-shadow(0 16px 9px rgba(0, 0, 70, 0.2));
}

/* Only the pinned lettering is used; hide the copy older front-page.php files put in the hero */
.hero .wordmark-wrap {
  display: none !important;
}

.wordmark {
  stroke: var(--accent);
}

/* Invisible hover area covering the whole word (the stage itself ignores the pointer). */
.wm-hit {
  fill: none;
  stroke: none;
  pointer-events: all;
}

.lt {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.preview {
  width: min(40vw, 72vh);
  aspect-ratio: 16/10;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0s 0.25s;
  background: #e0e0e0;
  overflow: hidden;
}

.preview img,
.preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

/* Media on top, short description underneath */
.preview {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.preview-media {
  position: relative;
  flex: 1;
  min-height: 0;
}

.preview-caption {
  flex: none;
  margin: 8px 0 0;
  max-width: 52ch;
  text-align: left;
  opacity: 0.6;
}

.has-active .preview.is-on {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s;
}

.has-active .wordmark-wrap {
  opacity: 0;
}

/* ---------- Home ---------- */
.site-home {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  padding: 0 var(--pad) var(--pad);
  pointer-events: none; /* let the wordmark receive hover through the empty middle */
}

.site-home > * {
  pointer-events: auto;
}

.about {
  width: 30%;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about-text p + p {
  margin-top: 14px;
}

.availability {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.clients {
  width: 46%;
  min-width: 320px;
}

.clients-label {
  margin: 0 0 8px;
  font: inherit;
  opacity: 0.5;
}

.client-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 44px;
  column-gap: 12px;
  align-items: center;
  min-height: 20px;
  text-decoration: none;
}

.row > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row--nolink {
  cursor: default;
}

.c-title {
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Row text inverts against the preview behind it (white + difference = near-black on the grey page).
   Applied to the text pieces (.t) so the blue scope dot keeps its colour. */
.row .t {
  color: #fff;
  mix-blend-mode: difference;
  transition: opacity 0.25s ease;
}

/* No stacking context on the index, so the text can blend with the preview layer */
.site-home--index {
  z-index: auto;
}

.c-year {
  font-variant-numeric: tabular-nums;
}

/* Fade the text (not the row) so the blend mode keeps working */
.has-active .row .t {
  opacity: 0.7;
}

.has-active .row.is-on .t {
  opacity: 1;
}

/* Active row: plain blue text (no blending) */
.has-active .row.is-on .t {
  color: var(--accent);
  mix-blend-mode: normal;
}

/* One blue frame that slides to the hovered row. It is taller than the row,
   so the edges of the titles above and below show inside it. */
.client-list {
  position: relative;
}

.row {
  position: relative;
} /* rows paint above the frame, which comes first in the list */
.hover-frame {
  position: absolute;
  left: -8px;
  right: -8px;
  top: 0;
  height: 0;
  border: 1px solid var(--accent);
  pointer-events: none;
  opacity: 0;
  transition: top 0.45s cubic-bezier(0.22, 1, 0.36, 1), height 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.has-active .hover-frame {
  opacity: 1;
}

/* ---------- Desktop index: lettering scrolls away, About pinned bottom-left ---------- */
@media (min-width: 761px) {
  /* Lettering is fixed in the upper middle (centred in the top 60%), independent of the list */
  .stage .wordmark-wrap--pinned {
    top: calc(var(--header-h) + (60vh - var(--header-h)) / 2);
    width: min(56vw, (60vh - var(--header-h) - 40px) * 2.25, 1000px);
  }
  .site-home--index {
    display: flex;
    flex-direction: column;
    align-items: stretch; /* keeps the lettering centred across the full width */
    padding: 0 var(--pad);
    pointer-events: none; /* the mouse reaches the fixed lettering behind */
  }
  .site-home--index > .hero {
    pointer-events: none;
  }
  .site-home--index > .about,
  .site-home--index > .clients {
    pointer-events: auto;
  }
  /* Empty first 60% of the screen so the list starts 40% from the bottom */
  .hero {
    height: calc(60vh - var(--header-h));
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .site-home--index .about {
    position: fixed;
    left: var(--pad);
    bottom: var(--pad);
    z-index: 3;
    background: var(--bg);
    box-shadow: 0 0 0 12px var(--bg);
  }
  /* The list ends level with the bottom of the pinned About text */
  .site-home--index .clients {
    margin-left: auto;
    margin-top: auto;
    padding-bottom: var(--pad);
  }
  /* Hover media sits in the left half, between the header and the About text, always fully visible */
  .site-home--index .clients {
    width: 50%;
  }
  .preview {
    left: var(--pad);
    top: calc(var(--header-h) + 8px);
    bottom: calc(var(--about-h, 140px) + var(--pad) + 24px);
    width: calc(50% - var(--pad) * 2);
    aspect-ratio: auto;
    transform: none;
  }
  .preview {
    background: none;
  }
  .preview-media {
    container-type: size;
  } /* the video sizes itself to this box */
  /* Always show the whole image, scaled to fit the space (never cropped) */
  .preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left bottom;
  }
  /* Vimeo: fit the 16:9 player inside the space, bottom-left, like the images */
  .preview iframe {
    position: absolute;
    left: 0;
    bottom: 0;
    width: min(100cqw, 177.78cqh);
    height: min(100cqh, 56.25cqw);
    background: #000;
  }
}
/* ---------- Start a project ---------- */
.form-open .site-home,
.form-open .stage {
  display: none;
}

.project-form {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 0 var(--pad) 80px;
}

.project-form[hidden] {
  display: none;
}

.project-form-inner {
  max-width: 560px;
  margin-left: calc(30% + 40px);
  display: flex;
  flex-direction: column;
  gap: 26px;
  animation: fade 0.25s ease;
}

.wpcf7 form {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.wpcf7 form > p {
  display: contents;
}

.wpcf7 br {
  display: none;
}

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

.wpcf7 label,
.wpcf7 legend {
  color: var(--muted);
}

.wpcf7 label {
  display: flex;
  flex-direction: column;
}

.wpcf7 fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.wpcf7 legend {
  padding: 0;
  margin-bottom: 8px;
}

.wpcf7 input[type=text],
.wpcf7 input[type=email],
.wpcf7 input[type=url],
.wpcf7 input[type=tel],
.wpcf7 textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 6px 0;
  outline: none;
}

.wpcf7 input:focus,
.wpcf7 textarea:focus {
  border-bottom-color: var(--accent);
}

.wpcf7 textarea {
  resize: vertical;
  min-height: 4.5em;
}

/* Month / year dropdowns (launch date) */
.launch-date .wpcf7-form-control-wrap {
  display: inline-block;
}

.launch-date .pair {
  display: flex;
  gap: 12px;
}

.wpcf7 select {
  font: inherit;
  color: var(--ink);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23000'/%3E%3C/svg%3E") no-repeat right 2px center;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 6px 18px 6px 0;
  min-width: 120px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.wpcf7 select:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

/* Checkbox / radio options as pills */
.wpcf7-checkbox,
.wpcf7-radio {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wpcf7-list-item {
  margin: 0;
}

.wpcf7-list-item label {
  position: relative;
  display: block;
  color: inherit;
  cursor: pointer;
}

.wpcf7-list-item input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.wpcf7-list-item-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 20px;
  background: var(--chip);
  color: #fff;
  transition: background 0.2s;
}

.wpcf7-list-item input:checked + .wpcf7-list-item-label {
  background: var(--accent);
}

.wpcf7-list-item input:focus-visible + .wpcf7-list-item-label {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.wpcf7-submit {
  align-self: flex-start;
  font: inherit;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 20px;
  min-height: 36px;
  padding: 0 18px;
  cursor: pointer;
}

.wpcf7-submit:hover {
  opacity: 0.8;
}

.wpcf7-spinner {
  display: none;
}

.wpcf7 form.submitting .wpcf7-submit {
  opacity: 0.5;
}

.wpcf7-not-valid-tip {
  color: #b00020;
  margin-top: 4px;
}

.wpcf7-response-output {
  margin: 0;
  color: var(--ink);
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output {
  color: #b00020;
}

/* ---------- Coming soon ---------- */
.soon-title {
  font: inherit;
  margin: 0;
}

.soon-sub {
  color: var(--muted);
}

.soon-contact {
  text-align: right;
}

/* ---------- Plain pages ---------- */
.site-page {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 24px var(--pad) 80px;
}

.page-body {
  max-width: 560px;
  margin-left: calc(30% + 40px);
}

.page-title {
  font: inherit;
  margin: 0 0 20px;
}

.page-body p + p {
  margin-top: 1em;
}

/* ---------- Motion ---------- */
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .row, .preview, .wordmark-wrap {
    transition: none;
  }
  .project-form-inner {
    animation: none;
  }
}
/* ---------- Phone ---------- */
@media (max-width: 760px) {
  :root {
    --fs: 13px;
    --pad: 16px;
    --header-h: 52px;
  }
  .site-header {
    padding-block: 10px;
  }
  .stage {
    top: var(--header-h);
  }
  .wordmark-wrap {
    width: calc(100% - 2 * var(--pad));
  }
  /* Phone: keep each image's own proportions; videos are 16:9 */
  .preview {
    width: min(56vw, 240px);
    aspect-ratio: auto;
    background: none;
  }
  .preview-media {
    flex: none;
  }
  .preview img {
    height: auto;
    object-fit: contain;
  }
  .preview--video .preview-media {
    aspect-ratio: 16/9;
    background: #e0e0e0;
  }
  .site-home {
    display: block;
    padding-bottom: 50vh; /* lets the last client reach the middle of the screen */
    pointer-events: auto;
  }
  /* Phone: the first screen is empty space over the pinned lettering */
  .hero {
    height: calc(100vh - var(--header-h));
    height: calc(100svh - var(--header-h));
  }
  .about,
  .clients {
    width: 100%;
    min-width: 0;
  }
  /* Coming soon fits one screen: no scrolling */
  .is-coming-soon .site-home {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 14px;
    padding-bottom: var(--pad);
  }
  .is-coming-soon .about {
    margin-bottom: 0;
  }
  .is-coming-soon .soon-contact {
    text-align: left;
  }
  .about {
    margin-bottom: 56px;
  }
  .row {
    grid-template-columns: minmax(0, 1fr) 44px;
    min-height: 44px;
  }
  .c-field {
    display: none;
  }
  .project-form-inner,
  .page-body {
    margin-left: 0;
  }
  .f-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  /* 16px stops iOS zooming into fields */
  .wpcf7 input[type=text],
  .wpcf7 input[type=email],
  .wpcf7 input[type=url],
  .wpcf7 input[type=tel],
  .wpcf7 select,
  .wpcf7 textarea {
    font-size: 16px;
  }
  .wpcf7-list-item-label {
    min-height: 36px;
  }
  .wpcf7-submit {
    min-height: 44px;
  }
  .cta {
    min-height: 36px;
  }
}
