/* ============================================================
   thombeal.com — rebuilt as a clean static site
   Colours and type lifted from the original Figma Sites build:
   bg #f4f2ff · ink #27213d · accent #693efe · Inter (variable)
   ============================================================ */

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/Inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4f2ff;
  --ink: #27213d;
  --accent: #693efe;
  --max-w: 1232px;
  --pad: clamp(16px, 3vw, 24px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.08px;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; width: 100%; }

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

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

/* Italic 'o' treatment used across the original site */
em {
  font-style: italic;
  font-synthesis: style;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px var(--pad);
  background: var(--bg);
}

.site-header .logo { justify-self: start; }
.site-header .site-nav { justify-self: center; }
.site-header .btn-call { justify-self: end; }

/* Logo: swaps to the purple mark on hover */
.site-header .logo img { width: 56px; height: auto; display: block; }
.site-header .logo .logo-hover { display: none; }
.site-header .logo:hover .logo-default { display: none; }
.site-header .logo:hover .logo-hover { display: block; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.5px;
}

.site-nav a:hover { color: var(--accent); }

.btn-call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--accent);
  border-radius: 51px;
  padding: 7px 17px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.32px;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-call::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.btn-call:hover { background: var(--accent); color: #fff; }
.btn-call:hover::before { background: #fff; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(32px, 7vw, 96px) 0 clamp(24px, 4vw, 48px);
  position: relative;
}

.hero h1, .page-title h1 {
  font-weight: 900;
  font-size: clamp(40px, 7.5vw, 96px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

/* Home hero: purple second line */
.hero .accent-line { display: block; }

.hero .accent-line, .accent { color: var(--accent); }

.hero .squiggle {
  width: clamp(60px, 8vw, 110px);
  margin-top: 16px;
}

/* ---------- Portfolio grid (home) ---------- */
.portfolio {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(12px, 2vw, 24px);
  padding-bottom: clamp(40px, 6vw, 80px);
}

.tile {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  display: block;
}

.tile img, .tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.tile:hover img, .tile:hover video { transform: scale(1.04); }

.tile .tile-label {
  position: absolute;
  left: 16px;
  bottom: 12px;
  font-weight: 900;
  font-size: 20px;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tile:hover .tile-label { opacity: 1; }

.tile-wide { grid-column: span 6; aspect-ratio: 16 / 9; }
.tile-half { grid-column: span 3; aspect-ratio: 1 / 1; }
.tile-third { grid-column: span 2; aspect-ratio: 1 / 1; }

@media (max-width: 799px) {
  .tile-half, .tile-third { grid-column: span 6; aspect-ratio: 4 / 3; }
  .tile-wide { aspect-ratio: 16 / 9; }
}

/* ---------- Project pages ---------- */
.page-title { padding: clamp(32px, 6vw, 80px) 0 clamp(16px, 3vw, 32px); }

/* Client name above title — same scale as section headings, brand purple */
.page-title p.client-name {
  color: var(--accent);
  font-weight: 900;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}


/* Doodle marks inline with display titles */
.title-doodle {
  display: inline-block;
  height: 0.8em;
  width: auto;
  vertical-align: -0.08em;
}

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  margin: clamp(16px, 3vw, 32px) 0;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Case write-up: Studio/Role left, Challenge/Solution/Result right */
.case-layout {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 2fr;
  gap: clamp(32px, 8vw, 160px);
  padding: clamp(32px, 5vw, 64px) 0;
}

.case-layout h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.case-layout p {
  margin: 0;
  white-space: pre-line;
  font-size: 17px;
  line-height: 1.55;
  color: rgba(39, 33, 61, 0.62);
  max-width: 640px;
}

.case-meta > div { margin-bottom: 28px; }
.case-text > div { margin-bottom: clamp(32px, 4vw, 56px); }
.case-meta > div:last-child, .case-text > div:last-child { margin-bottom: 0; }

@media (max-width: 799px) {
  .case-layout { grid-template-columns: 1fr; gap: 32px; }
}

.section-heading {
  font-weight: 900;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1;
  margin: 0 0 clamp(16px, 3vw, 32px);
}

.frames {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 2vw, 24px);
  padding-bottom: clamp(24px, 4vw, 48px);
}

.frames img { border-radius: 12px; width: 100%; }

@media (max-width: 599px) {
  .frames { grid-template-columns: 1fr; }
}

/* Sections with intro text + media (CRS Cube, Logos) */
.media-section { padding: clamp(24px, 4vw, 56px) 0; }
.media-section .intro { max-width: 720px; margin-bottom: clamp(16px, 3vw, 32px); }
.media-section .intro p { margin: 8px 0 0; }

/* Consistent body copy: 17px, muted ink, across all write-up text */
.media-section .intro p,
.page-title p:not(.client-name),
.about-bio p {
  font-size: 17px;
  line-height: 1.55;
  color: rgba(39, 33, 61, 0.62);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 2vw, 24px);
}

.media-grid.single { grid-template-columns: 1fr; }

.media-grid video, .media-grid img { border-radius: 12px; width: 100%; }

@media (max-width: 599px) {
  .media-grid { grid-template-columns: 1fr; }
}

.client-label { font-weight: 600; margin: 0 0 8px; }
.client-label span { color: var(--accent); font-weight: 900; }

/* ---------- Credits — plain columns, no rules (as original) ---------- */
.credits { padding: clamp(24px, 4vw, 56px) 0; }

.credits table {
  border-collapse: collapse;
  font-size: 18px;
  line-height: 1.5;
}

.credits th {
  text-align: left;
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
  padding: 0 48px 8px 0;
}

.credits td {
  padding: 2px 48px 2px 0;
  vertical-align: top;
  color: rgba(39, 33, 61, 0.55);
  font-weight: 500;
}

.credits td:first-child {
  color: var(--ink);
  font-weight: 600;
  min-width: 180px;
}

/* ---------- Prev / next ---------- */
.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: clamp(24px, 4vw, 48px) 0;
}

/* Pill buttons — same size as the Book a Call button, invert on hover */
.project-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--accent);
  border-radius: 51px;
  padding: 7px 17px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.32px;
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease;
}

.project-nav a:hover {
  background: var(--accent);
  color: #fff;
}

.project-nav .nav-arrow { width: 18px; flex-shrink: 0; transition: transform 0.25s ease; }
.project-nav a.nav-next:hover .nav-arrow { transform: translateX(5px); }
.project-nav a.nav-prev:hover .nav-arrow { transform: translateX(-5px); }
.project-nav .spacer { flex: 1; }

/* ---------- About ---------- */
/* About: landscape photo on desktop, portrait on mobile */
.about-photo { padding: clamp(16px, 3vw, 32px) 0 0; }

.about-photo img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  object-position: 50% 25%;
  border-radius: 12px;
}

@media (max-width: 799px) {
  .about-photo img { aspect-ratio: 3 / 4; object-position: 50% 30%; }
}

.about-bio {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) 0 0;
}

.about-bio p { margin: 0 0 1em; }
.about-bio a { color: var(--accent); font-weight: 600; }

.clients { padding: clamp(24px, 4vw, 56px) 0 clamp(40px, 6vw, 80px); }
.clients img { width: 100%; }

/* ---------- Footer — content-width dark card, rounded top, flush bottom ---------- */
.site-footer {
  width: 100%;
  box-sizing: border-box;
  max-width: var(--max-w);
  margin: clamp(32px, 5vw, 64px) auto 0;
  padding: 0 var(--pad);
}

.footer-inner {
  background: var(--ink);
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 200px;
  padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 56px);
}

.footer-name {
  margin: 0;
  font-weight: 900;
  font-size: 32px;
  letter-spacing: -1.6px;
  line-height: 1.1;
  color: #fff;
}

.footer-copy {
  margin: 0;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-linkedin {
  display: inline-flex;
  padding: 8px;
  color: #fff;
  transition: color 0.2s ease;
}

.footer-linkedin:hover { color: #a78bff; }

/* Accent glyphs in display titles (❋ on home, ☺ on about) */
.hero .pencil,
.page-title .pencil {
  display: inline-block;
  font-style: normal;
  color: var(--accent);
}
