/* ==========================================================================
   Goodream Studio — Portfolio
   Breakpoints (same as the Framer site):
     Desktop  ≥ 1200px
     Tablet   810px – 1199px
     Phone    ≤ 809px
   ========================================================================== */

/* Switzer by Indian Type Foundry — free license via fontshare.com */
@font-face {
  font-family: "Switzer";
  src: url("../fonts/switzer-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("../fonts/switzer-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("../fonts/switzer-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("../fonts/switzer-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
/* metric-matched fallback while the web font loads (same as the original) */
@font-face {
  font-family: "Switzer Placeholder";
  src: local("Arial");
  ascent-override: 96.67%;
  descent-override: 24.66%;
  line-gap-override: 8.88%;
  size-adjust: 101.38%;
}

:root {
  --bg: #121212;
  --text: #ffffff;
  --muted: #ababab;
  --line: #2f2f2f;
  --card: #000000;
  --green: #00ff40;

  /* type scale (desktop & tablet) */
  --fs-name: 24px;
  --fs-lead: 20px;
  --fs-h2: 18px;
  --fs-card: 18px;
  --fs-body: 16px;
  --fs-small: 14px;
}

@media (max-width: 809.98px) {
  :root {
    --fs-name: 22px;
    --fs-lead: 18px;
    --fs-h2: 17px;
    --fs-card: 17px;
    --fs-body: 15px;
    --fs-small: 13px;
  }
}

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

html, body { margin: 0; padding: 0; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Switzer", "Switzer Placeholder", sans-serif;
  font-size: var(--fs-body);
  line-height: 1.4;
  letter-spacing: -0.03em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; font-weight: inherit; }

/* ---------- text styles ---------- */
.t-name   { font-size: var(--fs-name); font-weight: 500; line-height: 1.1; letter-spacing: -0.05em; color: var(--text); }
.t-lead   { font-size: var(--fs-lead); font-weight: 400; line-height: 1.3; color: var(--text); }
.t-h2     { font-size: var(--fs-h2);   font-weight: 500; line-height: 1.3; color: var(--text); }
.t-h3     { font-size: var(--fs-body); font-weight: 400; line-height: 1.4; color: var(--text); }
.t-body   { font-size: var(--fs-body); font-weight: 400; line-height: 1.4; color: var(--muted); }
.t-small  { font-size: var(--fs-small); font-weight: 400; line-height: 1.4; color: var(--muted); }
.t-nav    { font-size: 14px; font-weight: 500; line-height: 1.1; color: var(--text); }
.t-card   { font-size: var(--fs-card); font-weight: 500; line-height: 1.3; color: var(--text); }
.t-white  { color: var(--text); }
.t-muted  { color: var(--muted); }
.paras > p + p { margin-top: 20px; }
.balance { max-width: 480px; text-wrap: balance; }

.link {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: currentColor;
  transition: color .2s ease;
}
.link:hover { color: var(--muted); }
.link-plain { color: var(--text); transition: color .2s ease; }
.link-plain:hover { color: var(--muted); }

/* ---------- small atoms ---------- */
.dot { flex: none; width: 4px; height: 4px; border-radius: 50%; background: var(--line); }
.dot--muted { background: var(--muted); }
.line { width: 100%; height: 1px; background: var(--line); flex: none; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--bg);
  white-space: nowrap;
  cursor: pointer;
  isolation: isolate;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--text);
  transition: opacity .2s ease;
}
.btn:hover::before { opacity: .75; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 8px;
  border-radius: 50%;
  background: var(--line);
  color: var(--muted);
  cursor: pointer;
  transition: color .2s ease;
}
.icon-btn svg { width: 14px; height: 14px; display: block; }
.icon-btn:hover { color: var(--text); }

.pill-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 25px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.1;
  isolation: isolate;
}
.pill-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--line);
  opacity: .8;
  transition: opacity .2s ease;
}
.pill-btn:hover::before { opacity: 1; }
.pill-btn svg { width: 14px; height: 14px; display: block; }

/* ---------- page layout ---------- */
.page {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100vh;
  height: 100dvh;
}

.col {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  scrollbar-width: none;
  overscroll-behavior: contain;
}
.col::-webkit-scrollbar { display: none; }
.col--left  { flex: 1 0 0; width: 1px; }
.col--right { flex: 2 0 0; width: 1px; }

.progress {
  position: sticky;
  top: 0;
  z-index: 3;
  width: 100%;
  height: 3px;
  pointer-events: none;
}
.progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--text);
  transition: width .45s cubic-bezier(.33, 1, .68, 1);
}

.left-content {
  display: flex;
  flex-direction: column;
  gap: 60px;
  padding: 20px 40px 20px 20px;
}

.right-content {
  display: flex;
  flex-direction: column;
  gap: 60px;
  padding: 17px 20px 20px 0;
}

/* sections in the left column: line + container */
.section {
  display: flex;
  flex-direction: column;
  gap: 60px;
  width: 100%;
  scroll-margin-top: 40px;
}
.section__body { display: flex; flex-direction: column; gap: 26px; width: 100%; }
.section__head { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.section__list { display: flex; flex-direction: column; gap: 24px; width: 100%; }

/* ---------- intro ---------- */
.intro { display: flex; flex-direction: column; gap: 32px; scroll-margin-top: 40px; }
.intro__title { display: flex; align-items: center; gap: 12px; }
.avatar {
  flex: none;
  width: 56px;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  padding: 0;
  border: 0;
  background: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.intro__name { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.intro__desc { max-width: 520px; text-wrap: balance; }
.available { display: flex; align-items: center; gap: 4px; }
.available__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); flex: none; }

/* ---------- clients ticker ---------- */
.ticker {
  height: 46px;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  -webkit-mask: linear-gradient(270deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
          mask: linear-gradient(270deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
}
.ticker__track {
  display: flex;
  align-items: center;
  gap: 24px;
  width: max-content;
  padding-right: 24px;
  will-change: transform;
}
.ticker { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.ticker.is-dragging { cursor: grabbing; }
.ticker img { -webkit-user-drag: none; pointer-events: none; }
.ticker__track ul { display: flex; flex: none; align-items: center; gap: 24px; list-style: none; margin: 0; padding: 0; }
.ticker__track li { flex: none; }
.ticker__track img { height: 40px; width: auto; object-fit: contain; }
.ticker__track img.logo-1 { width: 79px; height: 43px; }
.ticker__track img.logo-2 { width: 85px; object-fit: cover; }
.ticker__track img.logo-3 { width: 64px; }
.ticker__track img.logo-4,
.ticker__track img.logo-5 { width: 63px; }
.ticker__track img.logo-6 { width: 76px; object-fit: cover; }

/* ---------- stats ---------- */
.stats { display: flex; flex-direction: column; gap: 6px; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; width: 100%; }
.meta-row > .grow { flex: 1 0 0; min-width: 1px; }

/* ---------- services ---------- */
.service { display: flex; flex-direction: column; gap: 10px; }
.service__title { display: flex; align-items: center; gap: 8px; }
.service__title .t-h3 { flex: 1; }
.service__points { display: flex; flex-direction: column; gap: 2px; padding-left: 20px; }
.service__points li { display: flex; align-items: center; gap: 8px; }
.service__points { list-style: none; margin: 0; }

/* ---------- stack ---------- */
.stack { display: flex; flex-direction: column; gap: 20px; }
.tool { display: flex; align-items: center; gap: 12px; }
.tool__icon { flex: none; width: 34px; height: 34px; object-fit: contain; }
.tool__text { display: flex; flex-direction: column; gap: 1px; flex: 1; }

/* ---------- experience ---------- */
.job { display: flex; flex-direction: column; gap: 6px; }
.job .dot { height: 5px; }

/* ---------- footer ---------- */
.footer { position: relative; display: flex; flex-direction: column; gap: 60px; width: 100%; scroll-margin-top: 40px; }
.footer__top { position: absolute; right: 0; bottom: 8px; }
.footer__links { display: flex; flex-direction: column; gap: 12px; }
.footer__socials { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.footer__content { display: flex; flex-direction: column; gap: 24px; }
.footer__bottom { display: flex; flex-direction: column; gap: 12px; }
.footer__credits { display: flex; flex-direction: column; gap: 12px; }
.footer__credits > div { display: flex; align-items: center; gap: 4px; }

/* ---------- project cards ---------- */
/* Gallery: one column by default; on desktop main.js splits items into two
   columns (item 1 left, item 2 right, item 3 left, ...) like the original. */
.gallery { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.gallery.is-split { flex-direction: row; align-items: flex-start; }
.gallery__col { display: flex; flex-direction: column; gap: 8px; flex: 1 0 0; min-width: 0; }

.card {
  position: relative;
  display: block;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  isolation: isolate;
}
.card__media {
  position: relative;
  -webkit-mask: linear-gradient(0deg, rgba(0,0,0,.65) 0%, #000 20%);
          mask: linear-gradient(0deg, rgba(0,0,0,.65) 0%, #000 20%);
  transition: filter .4s ease, -webkit-mask .4s ease;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  padding: 16px 16px 12px;
  transition: opacity .4s ease;
}
.card__info > :first-child { flex: 1; }
.card__info > :last-child { flex: 1; text-align: right; color: var(--text); }

/* Desktop: grayscale until hover */
@media (min-width: 1200px) {
  .card .card__media { filter: grayscale(1); -webkit-mask: none; mask: none; }
  .card .card__info { opacity: 0; }
  .card:hover .card__media,
  .card:focus-visible .card__media {
    filter: grayscale(0);
    -webkit-mask: linear-gradient(0deg, rgba(0,0,0,.65) 0%, #000 20%);
            mask: linear-gradient(0deg, rgba(0,0,0,.65) 0%, #000 20%);
  }
  .card:hover .card__info,
  .card:focus-visible .card__info { opacity: 1; }
}

.buttons-row { display: flex; align-items: center; justify-content: space-between; width: 100%; }

/* ---------- project page ---------- */
.p-intro { display: flex; flex-direction: column; gap: 40px; scroll-margin-top: 40px; }
.p-intro__title { display: flex; flex-direction: column; gap: 12px; }
.p-intro__back { padding-bottom: 32px; display: flex; }
.p-intro__sub { max-width: 520px; text-wrap: balance; }
.p-info { display: flex; flex-direction: column; gap: 6px; }
.p-details { display: flex; flex-direction: column; gap: 32px; }
.p-details .paras { max-width: 480px; }
.p-details em { font-style: italic; }

.shot {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  padding: 0;
  border: 0;
  background: var(--card);
  display: block;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
.right-content.project .buttons-row { padding-top: 60px; }
.right-content.project { gap: 0; }

/* ---------- phone nav pill ---------- */
.nav-pill { display: none; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(0, 0, 0, .85);
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s var(--ease-out), visibility .45s;
  cursor: zoom-out;
  -webkit-backdrop-filter: blur(0px);
          backdrop-filter: blur(0px);
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  transform: scale(.92) translateY(12px);
  transition: transform .55s var(--ease-out);
}
.lightbox.is-open img { transform: none; }

/* ---------- motion ---------- */
:root {
  --ease-out: cubic-bezier(.22, 1, .36, 1);   /* soft "expo-like" ease */
}

/* fade-in when content scrolls into view */
/* opacity + small slide only (no blur: blurred text re-rasterises and "snaps",
   which looks like a glitch while scrolling). main.js removes these classes once
   the animation is done so the text renders normally afterwards. */
.reveal { opacity: 0; transform: translate3d(0, 12px, 0); }
.reveal.is-in { opacity: 1; transform: translate3d(0, 0, 0); transition: opacity .7s var(--ease-out), transform .8s var(--ease-out); }

/* soft press feedback on everything clickable */
.btn, .icon-btn, .pill-btn, .nav-pill a {
  transition-property: transform, color, opacity, background-color;
  transition-duration: .35s;
  transition-timing-function: var(--ease-out);
}
.btn:active, .icon-btn:active, .pill-btn:active, .nav-pill a:active { transform: scale(.94); }
.avatar img, .shot img { transition: transform .5s var(--ease-out); }
.avatar:active img, .shot:active img { transform: scale(.97); }
.btn::before, .pill-btn::before { transition: opacity .35s var(--ease-out); }

/* ---------- visibility helpers ---------- */
.only-phone { display: none !important; }

/* ==========================================================================
   Tablet 810 – 1199
   ========================================================================== */
@media (min-width: 810px) and (max-width: 1199.98px) {
  .col--right { flex: 1 0 0; }
}

/* ==========================================================================
   Phone ≤ 809
   ========================================================================== */
@media (max-width: 809.98px) {
  .page { flex-direction: column; height: auto; }
  .col { height: auto; overflow: visible; width: 100%; flex: none; }
  .col--right { display: none; }
  .progress { display: none; }

  .left-content { gap: 50px; padding: 80px 20px 20px; }
  .intro, .p-intro { scroll-margin-top: 80px; }
  .section--clients { gap: 50px; }
  .footer { gap: 50px; }

  .only-phone { display: flex !important; }
  .hide-phone { display: none !important; }

  .work { display: flex; flex-direction: column; gap: 60px; padding: 17px 0 20px; scroll-margin-top: 40px; }
  .work.project { gap: 0; }
  .work .buttons-row { padding-top: 0; }
  .work.project .buttons-row { padding-top: 60px; }
  .shot--preview { height: 217px; }
  .p-info-section { scroll-margin-top: 60px; }

  .nav-pill {
    display: flex;
    position: fixed;
    top: 12px;
    left: 50%;
    z-index: 10;
    transform: translateX(-50%);
    padding: 3px;
    border-radius: 25px;
    -webkit-backdrop-filter: blur(5px);
            backdrop-filter: blur(5px);
    isolation: isolate;
  }
  .nav-pill::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 30px;
    background: var(--line);
    opacity: .4;
  }
  .nav-pill a {
    padding: 8px 20px;
    border-radius: 30px;
    white-space: nowrap;
    opacity: .65;
    transition: background-color .3s ease, opacity .3s ease;
  }
  .nav-pill a { position: relative; z-index: 1; }
  .nav-pill a.is-active { opacity: 1; }
  /* dark "thumb" that slides between About/Work */
  .nav-pill__thumb {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 0;
    z-index: 0;
    border-radius: 30px;
    background: var(--bg);
    transition: transform .5s var(--ease-out), width .5s var(--ease-out);
  }
}
