/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #ffffff;
  color: #575757;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
}

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

#canvas {
  max-width: 1440px;
  margin: 0 auto;
  padding: 60px 81px 80px;
}

/* HEADER */
#header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 40px;
  gap: 20px;
}

#logo img {
  height: 60px;
  width: auto;
}

#topNav ul {
  list-style: none;
  display: flex;
  gap: 40px;
}

#topNav ul li a {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #999;
}

#topNav ul li a:hover {
  color: #111;
}

#topNav ul li.active-link a {
  color: #111;
  font-weight: 600;
}

/* FOOTER */
#footer {
  text-align: center;
  padding-top: 60px;
}

#socialLinks {
  display: flex;
  justify-content: center;
  gap: 40px;
}

#socialLinks a {
  color: #999;
}

#socialLinks a:hover {
  color: #111;
}

/* PROJECT HEADER — same pattern as AI Playground (title right-aligned, text inset) */
/*
  Work case header — match original title/description rhythm:
  title column ~4/12 (right-aligned), ~34px gap to description, trailing spacer.
  Advertising keeps its own wider layout via .project-header-wide.
*/
.project-header {
  display: grid;
  grid-template-columns: 4fr 6fr 2fr;
  column-gap: 34px;
  row-gap: 16px;
  max-width: none;
  margin: 0 0 48px;
  align-items: start;
}

.project-header h1 {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 1.9px;
  text-transform: uppercase;
  color: #222;
  text-align: right;
  line-height: 1.5;
}

.project-description {
  max-width: none;
}

.project-description p {
  font-size: 16px;
  font-weight: 300;
  color: #575757;
  line-height: 1.8;
}

.project-description p strong {
  font-weight: 600;
  color: #222;
}

.project-description a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Advertising — leave as already tuned */
.project-header.project-header-wide {
  grid-template-columns: 2fr 1fr 1fr;
  column-gap: 17px;
  row-gap: 16px;
}

/* Alias → same as default Work header */
.project-header.project-header-ermi {
  grid-template-columns: 4fr 6fr 2fr;
  column-gap: 34px;
}

/* Square clip sized to match a 16:9 sibling in the same row */
.video-embed.fit-row {
  width: 56.25%; /* height matches full-width 16:9 neighbor */
  padding-bottom: 56.25%; /* square: same % of column width */
  max-width: 100%;
  margin-bottom: 0;
}

.video-caption-grid {
  align-items: start;
  gap: 20px; /* same as homepage .clips-grid; caption sits inside the cell */
  margin-bottom: 20px;
}

.video-caption-grid figure {
  margin: 0;
}

.video-caption-grid .video-embed {
  margin-bottom: 0;
}

.video-caption-grid figcaption {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: #999;
}

/* Single media + caption (Work standard — same as Ermi/Advertising) */
.project-page figure.media-caption {
  margin: 0 0 20px;
}

.project-page figure.media-caption .video-embed,
.project-page figure.media-caption > img,
.project-page figure.media-caption .img-grid-4:last-of-type {
  margin-bottom: 0;
}

.project-page figure.media-caption > img {
  width: 100%;
  display: block;
}

/* Work media captions — standard under images/videos */
.project-page figcaption {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: #999;
  text-align: left;
}


/* VIDEO & IMAGE PLACEHOLDERS */
.video-placeholder {
  background: #f0f0f0;
  border: 2px dashed #ccc;
  aspect-ratio: 16/9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
  margin-bottom: 20px;
}

.video-placeholder::before {
  content: "▶";
  font-size: 2rem;
  display: block;
  margin-bottom: 10px;
  color: #ccc;
}

.image-placeholder {
  background: #f0f0f0;
  border: 2px dashed #ccc;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 0.8rem;
}

/* SECTION LABELS */
.caption {
  font-size: 16px;
  font-weight: 300;
  color: #999;
  margin-top: 8px;
}

.section-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 1.25px;
  text-transform: uppercase;
  text-align: center;
  margin: 48px 0 12px;
  color: #d1d1d1;
}

.section-description {
  text-align: center;
  max-width: none;
  margin: 0 0 28px;
  font-size: 16px;
  font-weight: 300;
  color: #575757;
  line-height: 1.8;
}

.section-description a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* IMAGE GRIDS — match homepage .clips-grid gap (20px) */
.img-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.img-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.img-grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.img-full {
  width: 100%;
  display: block;
  margin-bottom: 20px;
}

.img-grid-2 figure,
.img-grid-3 figure,
.img-grid-4 figure {
  margin: 0;
  min-width: 0;
}

.img-grid-2 .video-embed,
.img-grid-3 .video-embed,
.img-grid-4 .video-embed {
  margin-bottom: 0;
}

.img-grid-2 img,
.img-grid-3 img,
.img-grid-4 img {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* Illustration / photo grids — keep native aspect (no 16:9 crop) */
.img-natural {
  align-items: start;
}

.img-natural img {
  aspect-ratio: auto;
  object-fit: unset;
  height: auto;
}

.img-natural.align-start {
  align-items: start;
}

.img-full > img,
.project-page figure.media-caption > img {
  width: 100%;
  height: auto;
  display: block;
}

/* VIMEO EMBEDS */
.video-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  margin-bottom: 20px;
}

.video-embed.portrait {
  padding-bottom: 177.78%; /* 9:16 */
}

.video-embed.ratio-4x3 {
  padding-bottom: 75%; /* 4:3 */
}

.video-embed.ratio-4x5 {
  padding-bottom: 125%; /* 4:5 — Dribbble */
}

.video-embed.ratio-ultrawide {
  padding-bottom: 27.5%; /* ~3.64:1 — Live Events Motorola strip */
}

.video-embed.ratio-wide {
  padding-bottom: 29.79%; /* Live Events Doutores */
}

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

.video-embed video {
  display: block;
  object-fit: contain;
  background: #000;
}

/* Work cases: looping showcase videos — no hover controls (same as homepage clips) */
.video-embed.no-controls {
  pointer-events: none;
  user-select: none;
}

.project-page .video-embed iframe,
.video-embed.no-controls iframe,
.video-embed.no-controls video {
  pointer-events: none;
}

/* Interactive player (controls, no autoplay) */
.project-page .video-embed.with-controls iframe,
.video-embed.with-controls iframe,
.project-page .video-embed.with-controls video,
.video-embed.with-controls video {
  pointer-events: auto;
}

/* TEXT BLOCKS */
.text-block,
.project-text {
  font-size: 16px;
  font-weight: 300;
  color: #575757;
  line-height: 1.8;
  margin: 20px auto;
  max-width: 960px;
}

/* WORK GRID (index) */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.work-item {
  position: relative;
  overflow: hidden;
}

.work-item img {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.work-item-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.78);
  color: #333;
  padding: 16px;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.work-item:hover .work-item-overlay {
  opacity: 1;
}

/* WORK GRID — project-thumb variant (work/index.html) */
#projectThumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.project-thumb {
  position: relative;
  overflow: hidden;
}

.project-thumb a {
  display: block;
  position: relative;
}

.project-thumb img {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.project-thumb-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.78);
  color: #333;
  padding: 16px;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.project-thumb:hover .project-thumb-overlay {
  opacity: 1;
}

.project-thumb-overlay .project-title {
  max-width: 90%;
}

/* ABOUT PAGE — mirrors original Squarespace proportions (~1200px content) */
#page:has(.about-layout) {
  max-width: 1200px;
  margin: 0 auto;
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  margin-bottom: 56px;
  align-items: start;
}

.about-text h1 {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 1.9px;
  text-transform: uppercase;
  color: #222;
  margin-bottom: 22px;
  line-height: 1.5;
}

.about-text h3 {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 1.25px;
  text-transform: uppercase;
  color: #d1d1d1;
  margin: 22px 0 10px;
  line-height: 1.2;
}

.about-text p {
  font-size: 16px;
  font-weight: 300;
  color: #575757;
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-email {
  text-align: right;
  margin-top: 4px;
}

.about-email a {
  font-size: 16px;
  font-weight: 300;
  color: #111;
  text-decoration: none;
  border-bottom: none;
}

.about-email a:hover {
  color: #575757;
}

.about-photo {
  display: flex;
  justify-content: flex-end;
}

.about-photo img {
  width: 65%;
  max-width: 380px;
  display: block;
  aspect-ratio: 377 / 456;
  object-fit: cover;
  object-position: top;
  border-radius: 8px;
}

.about-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
}

.about-experience h3, .about-skills h3 {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 1.25px;
  text-transform: uppercase;
  color: #d1d1d1;
  margin: 28px 0 10px;
  line-height: 1.2;
}

.about-experience h3:first-child,
.about-skills h3:first-child {
  margin-top: 0;
}

.about-experience p, .about-skills p {
  font-size: 16px;
  font-weight: 300;
  color: #575757;
  line-height: 1.8;
  margin-bottom: 16px;
}

.contact-link { color: #575757; border-bottom: 1px solid #ccc; }
.contact-link:hover { color: #111; border-color: #111; }

/* HOME PAGE */
.layout-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.home-intro h2 {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 26px;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: 1.5px;
  color: #222;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.home-intro h2 strong {
  font-weight: 700;
}

.home-intro p {
  font-size: 16px;
  font-weight: 300;
  color: #575757;
  line-height: 1.8;
  margin-bottom: 28px;
  font-style: italic;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border: 0;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  background: #000;
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: #888;
  color: #fff;
}

.video-wrapper iframe { border: 0; }

/* WORK HEADER */
.work-header {
  margin-bottom: 30px;
}

.work-header h3 {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 21px;
  font-weight: 400;
  text-align: center;
  letter-spacing: 1.25px;
  text-transform: uppercase;
  color: #d1d1d1;
}

/* PROJECT BOTTOM NAV */
.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  gap: 24px;
}

.project-nav a {
  font-size: 16px;
  font-weight: 300;
  color: #333;
  letter-spacing: 0;
}

.project-nav a:hover {
  color: #999;
}

.project-nav-back {
  text-align: left;
}

.project-nav-cycle {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
  text-align: right;
  color: #333;
  font-size: 16px;
  font-weight: 300;
}

.project-nav-cycle .sep {
  color: #333;
  user-select: none;
  padding: 0 0.35em;
}

/* FIGCAPTION */
figcaption {
  font-size: 16px;
  font-weight: 300;
  color: #999;
  margin-top: 6px;
}

/* Advertising gallery — same 20px gap as homepage clips; caption adds vertical space */
.ad-row {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
  align-items: start;
}

.ad-row.cols-2 { grid-template-columns: 1fr 1fr; }
.ad-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.ad-row.cols-1-1-2 { grid-template-columns: 1fr 1fr 2fr; }
.ad-row.cols-2-1 { grid-template-columns: 2fr 1fr; }

.ad-row figure {
  margin: 0;
  min-width: 0;
}

.ad-row img,
.ad-full img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: auto;
  object-fit: unset;
}

.ad-row figcaption,
.ad-full figcaption {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.ad-full {
  margin-bottom: 20px;
}

.ad-full .img-grid-2,
.ad-full .img-grid-3,
.ad-full .img-grid-4 {
  margin-bottom: 0;
}

.ad-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.ad-stack figure {
  margin: 0;
}

/* AI PLAYGROUND */
.playground-header {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  margin-bottom: 90px;
  align-items: start;
}

.playground-header > div,
.playground-section-header > div {
  max-width: 540px;
}

.playground-header h1 {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 1.9px;
  text-transform: uppercase;
  color: #222;
  text-align: right;
  line-height: 1.5;
}

.playground-header h3 {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 1.25px;
  text-transform: uppercase;
  color: #d1d1d1;
  margin-bottom: 10px;
}

.playground-header p {
  font-size: 16px;
  font-weight: 300;
  color: #575757;
  line-height: 1.8;
}

.playground-section {
  margin-bottom: 90px;
}

.playground-section-narrow {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

/* uniform vertical rhythm between blocks inside a section */
.playground-section > * + * { margin-top: 40px; }

.playground-section-header {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  align-items: start;
}

.playground-section-header h2 {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #222;
  text-align: right;
  line-height: 1.5;
}

.playground-section-header h3 {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 1.25px;
  text-transform: uppercase;
  color: #d1d1d1;
  margin: 20px 0 6px;
}

.playground-section-header p {
  font-size: 16px;
  font-weight: 300;
  color: #575757;
  line-height: 1.8;
  margin-bottom: 14px;
}

.playground-subtitle {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 1.25px;
  text-transform: uppercase;
  color: #d1d1d1;
  text-align: center;
  margin: 0;
}

/* AI PLAYGROUND — media */
.pg-media > * + * { margin-top: 40px; }

.pg-gallery {
  display: grid;
  gap: 12px;
}

.pg-gallery.cols-2 { grid-template-columns: repeat(2, 1fr); }
.pg-gallery.cols-3 { grid-template-columns: repeat(3, 1fr); }

.pg-gallery img,
.pg-full img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.pg-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.pg-video iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* AI PLAYGROUND — two-column split rows (media + text) */
.pg-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

.pg-split img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.pg-split .pg-video {
  margin-top: 0;
  width: 100%;
}

.pg-split-text {
  max-width: 480px;
}

.pg-split-text p {
  font-size: 16px;
  font-weight: 300;
  color: #575757;
  line-height: 1.8;
  margin-bottom: 14px;
}

.pg-split-text p:last-child {
  margin-bottom: 0;
}

/* =====================================================
   HOMEPAGE — HERO + CLIP GRID
   ===================================================== */
.home-hero {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 60px;
}

.home-intro { grid-column: span 2; max-width: 320px; }
.home-reel  { grid-column: span 4; }

.home-reel .video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 84.38%;
}

.home-reel .video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

.home-clips {
  margin-top: 60px;
}

.clips-label {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 1.25px;
  text-transform: uppercase;
  color: #d1d1d1;
  text-align: center;
  margin-bottom: 60px;
}

.clips-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

/* default: 3 per row */
.clip-item { grid-column: span 2; }

/* 2 per row */
.clip-item.clip-half { grid-column: span 3; }

/* 1 per row, full width */
.clip-item.clip-full { grid-column: span 6; }

.clip-item {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  font-size: 0;
  line-height: 0;
}

.clip-video {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.clip-video iframe {
  display: block;
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
  pointer-events: none;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; gap: 24px; }
  .home-intro { width: auto; }
  .home-reel  { min-width: 0; }
  .clips-grid { grid-template-columns: repeat(4, 1fr); }
  .clip-item { grid-column: span 2; }
  .clip-item.clip-half { grid-column: span 2; }
  .clip-item.clip-full { grid-column: span 4; }
  .img-grid-3 { grid-template-columns: 1fr 1fr; }
  .img-grid-4 { grid-template-columns: 1fr 1fr; }
  .ad-row.cols-3,
  .ad-row.cols-1-1-2,
  .ad-row.cols-2-1 { grid-template-columns: 1fr 1fr; }
  .project-header,
  .project-header.project-header-wide,
  .project-header.project-header-ermi { grid-template-columns: 1fr; gap: 16px; }

  .project-header h1 { text-align: left; font-size: 26px; }
  .about-layout,
  .about-details { grid-template-columns: 1fr; gap: 40px; }
  .about-photo { justify-content: flex-start; }
  .about-photo img { width: 70%; max-width: 320px; }
  .about-email { text-align: left; }
  .about-text h1,
  .playground-header h1 { font-size: 26px; }
  .home-intro h2 { font-size: 22px; }
  .playground-section-header h2 { font-size: 22px; }
  .playground-header,
  .playground-section-header { grid-template-columns: 1fr; gap: 16px; }
  .playground-header h1,
  .playground-section-header h2 { text-align: left; }
  .pg-split { grid-template-columns: 1fr; gap: 24px; }
  .pg-split-text { max-width: none; }
  .pg-gallery.cols-3 { grid-template-columns: 1fr 1fr; }
  #canvas { padding: 30px 32px 60px; }
}

@media (max-width: 600px) {
  .clips-grid { grid-template-columns: 1fr; }
  .clip-item, .clip-item.clip-half, .clip-item.clip-full { grid-column: span 1; }
  .img-grid-2, .img-grid-3, .img-grid-4 { grid-template-columns: 1fr; }
  .ad-row.cols-2,
  .ad-row.cols-3,
  .ad-row.cols-1-1-2,
  .ad-row.cols-2-1 { grid-template-columns: 1fr; }
  .pg-gallery.cols-2, .pg-gallery.cols-3 { grid-template-columns: 1fr; }
  #topNav ul { gap: 20px; }
  #canvas { padding: 20px 16px 40px; }
}


