/* ==========================================================================
   Digital Spyse — portfolio site
   ==========================================================================
   A standalone site, so it carries its own stylesheet rather than inheriting
   four thousand lines written for the marketing site. The brand is the same:
   the same Kanit display face, the same orange and amber, the same near-black.
   What differs is the job. The marketing site sells services; this one shows
   work, so imagery leads and the type stays out of its way.
   ========================================================================== */

:root {
  /* Brand, unchanged from the main site */
  --ink:          #141414;
  --ink-2:        #1c1c1e;
  --ink-3:        #252528;
  --orange:       #FF5722;
  --orange-deep:  #E64A19;
  --orange-ink:   #D03801;   /* passes contrast on light grounds */
  --amber:        #FFB300;   /* passes contrast on dark grounds */
  --paper:        #ffffff;
  --paper-2:      #faf9f7;
  --line:         rgba(20,20,20,.10);
  --line-dark:    rgba(255,255,255,.10);
  --body:         #52504e;
  --muted:        #6b6764;   /* darkened from #807d7a, which read 4.09:1 on white */

  /* One type scale, as clamps, so a declaration covers phone to desktop */
  --fs-display: clamp(2.6rem, 7vw,   5.5rem);
  --fs-h1:      clamp(2.25rem, 5vw,  3.75rem);
  --fs-h2:      clamp(1.75rem, 3.4vw, 2.75rem);
  --fs-h3:      clamp(1.15rem, 1.7vw, 1.4rem);
  --fs-lead:    clamp(1.0625rem, 1.4vw, 1.1875rem);
  --fs-body:    1rem;
  --fs-small:   .8125rem;
  --fs-eyebrow: .75rem;

  --shell:      1240px;
  --gutter:     clamp(20px, 5vw, 56px);
  --section:    clamp(64px, 9vw, 128px);
  --radius:     16px;
  --ease:       cubic-bezier(.4,0,.2,1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: Inter, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--fs-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: Kanit, Inter, sans-serif;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
  letter-spacing: -.01em;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.3; }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
a  { color: var(--orange-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.pf-skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 0 0 8px 0;
}
.pf-skip:focus { left: 0; }

.pf-shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding-inline: var(--gutter); }

.pf-eyebrow {
  font-size: var(--fs-eyebrow); font-weight: 800; letter-spacing: .19em;
  text-transform: uppercase; color: var(--orange-ink); margin: 0 0 14px;
}
.pf-on-dark .pf-eyebrow,
.pf-cta .pf-eyebrow,
.pf-hero .pf-eyebrow,
.pf-case-hero .pf-eyebrow,
.pf-footer .pf-eyebrow { color: var(--amber); }

/* -- Buttons ------------------------------------------------------------- */
.pf-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: #fff; font-weight: 700; font-size: .9375rem;
  padding: 15px 28px; border-radius: 50px; border: none; cursor: pointer;
  font-family: inherit; text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  box-shadow: 0 6px 22px rgba(255,87,34,.3);
}
.pf-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255,87,34,.42); text-decoration: none; color: #fff; }
.pf-btn-sm { padding: 11px 20px; font-size: .875rem; }
.pf-btn-ghost {
  background: transparent; color: #fff; box-shadow: none;
  border: 1px solid rgba(255,255,255,.3);
}
.pf-btn-ghost:hover { background: rgba(255,255,255,.08); box-shadow: none; }
.pf-btn-dark { background: var(--ink); box-shadow: none; }
.pf-btn-dark:hover { background: var(--ink-2); box-shadow: 0 10px 28px rgba(20,20,20,.25); }

/* -- Header -------------------------------------------------------------- */
.pf-header {
  position: sticky; top: 0; z-index: 100;
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.pf-header.is-stuck { background: rgba(20,20,20,.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line-dark); }
.pf-header .pf-shell { display: flex; align-items: center; gap: 28px; padding-block: 18px; }
.pf-brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; }
.pf-brand img { height: 30px; width: auto; }
.pf-brand-text { font-family: Kanit, sans-serif; font-weight: 800; color: #fff; letter-spacing: .06em; font-size: 1rem; }
.pf-brand-sub {
  font-size: .6875rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase;
  color: var(--amber); padding-left: 12px; border-left: 1px solid rgba(255,255,255,.22);
}
.pf-nav { display: flex; gap: 26px; margin-left: auto; }
.pf-nav a { color: rgba(255,255,255,.76); font-size: .9375rem; font-weight: 600; text-decoration: none; }
.pf-nav a:hover, .pf-nav a[aria-current] { color: #fff; }
.pf-nav a[aria-current] { position: relative; }
.pf-nav a[aria-current]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px;
  background: var(--orange); border-radius: 2px;
}
.pf-nav-out::after { content: " \2197"; font-size: .8em; }
.pf-header .pf-btn { flex-shrink: 0; }

.pf-burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; margin-left: auto; }
.pf-burger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.pf-burger span + span { margin-top: 6px; }
.pf-burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.pf-burger.is-open span:nth-child(2) { opacity: 0; }
.pf-burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.pf-mobile-nav { display: none; }

/* -- Hero ---------------------------------------------------------------- */
.pf-hero {
  background: var(--ink); color: #fff; position: relative; overflow: hidden;
  margin-top: -82px; padding-top: 82px;
}
.pf-hero::after {
  content: ""; position: absolute; inset: auto -10% -40% 40%; height: 70%;
  background: radial-gradient(closest-side, rgba(255,87,34,.22), transparent 70%);
  pointer-events: none;
}
.pf-hero .pf-shell { position: relative; z-index: 1; padding-block: clamp(80px, 13vw, 170px) var(--section); }
.pf-hero h1 { color: #fff; font-size: var(--fs-display); max-width: 15ch; }
.pf-hero h1 em { font-style: normal; color: var(--orange); }
.pf-hero-lead { font-size: var(--fs-lead); color: rgba(255,255,255,.72); max-width: 54ch; margin: 26px 0 36px; }
.pf-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.pf-stats { display: flex; gap: clamp(26px, 5vw, 64px); flex-wrap: wrap; margin-top: clamp(48px, 7vw, 86px); padding-top: 34px; border-top: 1px solid var(--line-dark); }
.pf-stat strong { display: block; font-family: Kanit, sans-serif; font-size: clamp(1.9rem, 3.6vw, 2.75rem); color: #fff; font-weight: 800; line-height: 1; }
.pf-stat span { display: block; font-size: var(--fs-small); color: rgba(255,255,255,.6); margin-top: 8px; }

/* -- Section furniture --------------------------------------------------- */
.pf-section { padding-block: var(--section); }
.pf-section-dark { background: var(--ink); color: rgba(255,255,255,.72); }
.pf-section-dark h2, .pf-section-dark h3 { color: #fff; }
.pf-section-tint { background: var(--paper-2); }
.pf-head { max-width: 62ch; margin-bottom: clamp(36px, 5vw, 58px); }
.pf-head p { font-size: var(--fs-lead); margin-top: 16px; }
.pf-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; flex-wrap: wrap; }

/* -- Work cards ---------------------------------------------------------- */
.pf-work { display: grid; gap: clamp(22px, 3vw, 34px); }
.pf-work-feature { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.pf-work-all { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }

.pf-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.pf-card:hover { transform: translateY(-6px); box-shadow: 0 22px 54px rgba(20,20,20,.14); border-color: rgba(255,87,34,.3); }
.pf-card-media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--paper-2); display: block; }
.pf-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s var(--ease); }
.pf-card:hover .pf-card-media img { transform: scale(1.04); }
.pf-card-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--orange), var(--amber)); color: #fff; font-family: Kanit, sans-serif; font-size: 3.5rem; font-weight: 800; }
.pf-card-body { padding: clamp(20px, 2.4vw, 28px); display: flex; flex-direction: column; flex: 1; }
.pf-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.pf-tag { font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-ink); background: rgba(255,87,34,.1); padding: 5px 11px; border-radius: 5px; }
.pf-tag-alt { color: var(--muted); background: rgba(20,20,20,.06); }
.pf-card h3 a { color: var(--ink); text-decoration: none; }
.pf-card h3 a:hover { color: var(--orange-ink); }
.pf-card-cat { font-size: var(--fs-small); color: var(--muted); margin: 6px 0 12px; }
.pf-card-sum { font-size: .9375rem; margin-bottom: 20px; flex: 1; }
.pf-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 16px; border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--muted); }
.pf-card-go { color: var(--orange-ink); font-weight: 700; white-space: nowrap; }

/* -- Filters ------------------------------------------------------------- */
.pf-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: clamp(30px, 4vw, 44px); }
.pf-chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 50px; border: 1px solid var(--line); background: var(--paper); color: var(--body); font-size: .875rem; font-weight: 700; text-decoration: none; transition: all .22s var(--ease); }
.pf-chip span { font-size: .6875rem; font-weight: 800; background: rgba(20,20,20,.07); color: var(--muted); padding: 2px 8px; border-radius: 20px; }
.pf-chip:hover { border-color: var(--orange); color: var(--orange-ink); text-decoration: none; }
.pf-chip[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pf-chip[aria-current] span { background: rgba(255,255,255,.18); color: #fff; }

/* -- Capability strip ---------------------------------------------------- */
.pf-caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; }
.pf-cap { background: var(--ink); padding: clamp(24px, 3vw, 34px); }
.pf-cap i { font-size: 1.4rem; color: var(--amber); display: block; margin-bottom: 14px; }
.pf-cap h3 { font-size: 1.0625rem; margin-bottom: 8px; }
.pf-cap p { font-size: .875rem; color: rgba(255,255,255,.62); margin: 0; }

/* -- Case study ---------------------------------------------------------- */
.pf-case-hero { background: var(--ink); color: #fff; margin-top: -82px; padding-top: 82px; }
.pf-case-hero .pf-shell { padding-block: clamp(70px, 10vw, 120px) clamp(40px, 6vw, 70px); }
.pf-case-hero h1 { color: #fff; max-width: 18ch; }
.pf-case-hero .pf-case-cat { font-size: var(--fs-lead); color: rgba(255,255,255,.66); margin-top: 18px; }
.pf-crumbs { font-size: var(--fs-small); color: rgba(255,255,255,.55); margin-bottom: 22px; }
.pf-crumbs a { color: rgba(255,255,255,.78); }

.pf-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 1px; background: var(--line-dark); border-top: 1px solid var(--line-dark); }
.pf-fact { background: var(--ink); padding: 22px 0 0; }
.pf-facts-wrap { background: var(--ink); }
.pf-fact dt { font-size: .6875rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-bottom: 7px; }
.pf-fact dd { margin: 0; font-size: .9375rem; color: #fff; font-weight: 600; }
.pf-fact a { color: var(--amber); }

.pf-shot { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 22px 60px rgba(20,20,20,.14); }
.pf-note { display: flex; gap: 12px; background: rgba(255,179,0,.1); border: 1px solid rgba(255,179,0,.3); border-radius: 12px; padding: 16px 20px; font-size: .9375rem; color: #6a5a30; margin-bottom: 36px; }
.pf-note i { color: #a07b12; margin-top: 4px; }

.pf-prose { max-width: 70ch; }
.pf-prose h2 { margin-bottom: 18px; }
.pf-prose + .pf-prose { margin-top: clamp(40px, 5vw, 64px); }
.pf-prose p { font-size: 1.0625rem; line-height: 1.85; }
.pf-lead-para { font-size: var(--fs-lead) !important; color: #3d3b39; }

.pf-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 20px; }
.pf-feature { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 26px 24px; }
.pf-feature i { font-size: 1.4rem; color: var(--orange); display: block; margin-bottom: 14px; }
.pf-feature h3 { font-size: 1.0625rem; margin-bottom: 9px; }
.pf-feature p { font-size: .875rem; margin: 0; }

.pf-devices { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 34px); align-items: end; }
.pf-devices figure { margin: 0; }
.pf-devices img { border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(20,20,20,.12); }
.pf-devices figcaption { font-size: .6875rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 12px; text-align: center; }

.pf-defs { margin: 0; }
.pf-defs dt { font-weight: 800; color: var(--ink); font-size: .875rem; margin-top: 18px; }
.pf-defs dt:first-child { margin-top: 0; }
.pf-defs dd { margin: 6px 0 0; font-size: .9375rem; }

.pf-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 60px); }

.pf-result { background: var(--ink); border-radius: var(--radius); padding: clamp(32px, 4vw, 48px); }
.pf-result p { color: #fff; font-size: clamp(1.1rem, 1.8vw, 1.375rem); font-weight: 600; line-height: 1.6; margin: 12px 0 0; }

.pf-pager { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 32px; border-top: 1px solid var(--line); }
.pf-pager a { display: flex; align-items: center; gap: 12px; color: var(--body); text-decoration: none; max-width: 42%; }
.pf-pager a:hover strong { color: var(--orange-ink); }
.pf-pager span { display: flex; flex-direction: column; font-size: var(--fs-small); line-height: 1.4; }
.pf-pager strong { color: var(--ink); font-size: .9375rem; }
.pf-pager i { color: var(--orange); }
.pf-pager .is-next { text-align: right; flex-direction: row-reverse; }

/* -- Forms --------------------------------------------------------------- */
.pf-form-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(34px, 5vw, 64px); align-items: start; }
.pf-list { list-style: none; padding: 0; margin: 0 0 28px; }
.pf-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.pf-list li:last-child { border-bottom: none; }
.pf-list i { color: var(--orange); margin-top: 4px; width: 20px; text-align: center; flex-shrink: 0; }
.pf-list strong { color: var(--ink); }

.pf-form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); box-shadow: 0 16px 44px rgba(20,20,20,.07); }
.pf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pf-field { display: flex; flex-direction: column; margin-bottom: 20px; }
.pf-field label { font-size: .875rem; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.pf-opt { font-weight: 500; color: var(--muted); font-size: .75rem; }
.pf-field input, .pf-field select, .pf-field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid rgba(20,20,20,.16); border-radius: 10px;
  font-size: .9375rem; font-family: inherit; color: var(--ink); background: var(--paper);
  transition: border-color .2s, box-shadow .2s;
}
.pf-field input:focus, .pf-field select:focus, .pf-field textarea:focus {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,87,34,.14);
}
.pf-field textarea { resize: vertical; line-height: 1.7; }
.pf-fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 22px 22px 2px; margin: 0 0 24px; }
.pf-fieldset legend { font-size: .6875rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 0 8px; }
.pf-submit { width: 100%; justify-content: center; }
.pf-small { font-size: var(--fs-small); color: var(--muted); text-align: center; margin: 14px 0 0; }

.pf-errors { background: rgba(220,38,38,.07); border: 1px solid rgba(220,38,38,.25); border-radius: 12px; padding: 16px 20px; margin-bottom: 26px; }
.pf-errors strong { display: block; color: #b91c1c; margin-bottom: 8px; }
.pf-errors ul { margin: 0; padding-left: 20px; }
.pf-errors li { color: #8a2626; font-size: .9375rem; }

.pf-done { max-width: 640px; margin: 0 auto; text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(36px, 5vw, 58px); box-shadow: 0 18px 50px rgba(20,20,20,.08); }
.pf-done > i { font-size: 3rem; color: #16a34a; display: block; margin-bottom: 20px; }
.pf-done-ref { color: var(--muted); font-size: .9375rem; }
.pf-done-ref strong { color: var(--orange-ink); letter-spacing: .04em; }
.pf-done-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* -- Closing CTA and footer ---------------------------------------------- */
.pf-cta { background: var(--ink); color: rgba(255,255,255,.72); padding-block: var(--section); text-align: center; }
.pf-cta h2 { color: #fff; max-width: 18ch; margin: 0 auto 18px; }
.pf-cta-lead { font-size: var(--fs-lead); max-width: 58ch; margin: 0 auto 32px; }
.pf-cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.pf-footer { background: var(--ink-2); color: rgba(255,255,255,.6); padding-top: clamp(48px, 6vw, 72px); font-size: .9375rem; }
.pf-footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding-bottom: 44px; }
.pf-footer-brand { font-family: Kanit, sans-serif; font-weight: 800; color: #fff; letter-spacing: .1em; margin-bottom: 14px; }
.pf-footer-head { font-size: .6875rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.45); margin-bottom: 14px; }
.pf-footer a { display: block; color: rgba(255,255,255,.66); margin-bottom: 9px; text-decoration: none; }
.pf-footer a:hover { color: var(--amber); }
.pf-footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 22px; border-top: 1px solid var(--line-dark); font-size: var(--fs-small); color: rgba(255,255,255,.45); }

/* -- Reveal on scroll ---------------------------------------------------- */
.pf-pre { opacity: 0; transform: translateY(22px); }
.pf-in  { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }

/* -- Responsive ---------------------------------------------------------- */
@media (max-width: 991px) {
  .pf-nav, .pf-header .pf-btn { display: none; }
  .pf-burger { display: block; }
  .pf-mobile-nav { display: block; background: var(--ink); border-top: 1px solid var(--line-dark); padding: 10px var(--gutter) 24px; }
  .pf-mobile-nav[hidden] { display: none; }
  .pf-mobile-nav a { display: block; color: #fff; font-size: 1.0625rem; font-weight: 600; padding: 15px 0; border-bottom: 1px solid var(--line-dark); text-decoration: none; }
  .pf-mobile-nav a:last-child { border-bottom: none; }
  .pf-form-grid, .pf-split { grid-template-columns: 1fr; }
  .pf-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .pf-row { grid-template-columns: 1fr; gap: 0; }
  .pf-devices { grid-template-columns: 1fr; }
  .pf-footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .pf-pager { flex-direction: column; align-items: stretch; gap: 16px; }
  .pf-pager a { max-width: none; }
  .pf-pager .is-next { flex-direction: row; text-align: left; }
  .pf-hero h1 { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .pf-pre { opacity: 1; transform: none; }
}
