/* ==========================================================================
   uxsagun.com — static site styles
   Light only. The page is pure white so that screenshots, persona sheets and
   other artwork with white backgrounds sit on it without a visible seam.
   ========================================================================== */

:root {
  --paper:      #FFFFFF;
  --panel:      #F7F7F5;
  --ink:        #15181C;
  --ink-soft:   #52585F;
  --ink-faint:  #8A9099;
  --rule:       #E6E5E1;
  --hairline:   #EDECE8;
  --note:       #FFD84D;
  --link:       #1F4FD8;
  --link-visit: #5B3FBF;

  --measure: 34rem;          /* ~68 characters of Newsreader */
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --shell: 72rem;

  --step--1: clamp(0.84rem, 0.8rem + 0.2vw, 0.94rem);
  --step-0:  clamp(1.05rem, 1rem + 0.25vw, 1.18rem);
  --step-1:  clamp(1.3rem, 1.2rem + 0.5vw, 1.55rem);
  --step-2:  clamp(1.6rem, 1.4rem + 1vw, 2.15rem);
  --step-3:  clamp(2rem, 1.6rem + 2vw, 3rem);
  --step-4:  clamp(2.6rem, 1.8rem + 4.2vw, 5.5rem);

  /* Tells the browser this site is light, so form controls and scrollbars
     aren't darkened by the visitor's OS setting. */
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: var(--step-0);
  line-height: 1.65;
  font-optical-sizing: auto;
}

h1, h2, h3, h4, h5, h6, .display, .nav a, .btn, .eyebrow, .meta, th {
  font-family: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
  text-wrap: balance;
}

h1 { font-size: var(--step-3); margin: 0 0 .6em; }
h2 { font-size: var(--step-2); margin: 2.4em 0 .5em; }
h3 { font-size: var(--step-1); margin: 2em 0 .4em; }
h4, h5 { font-size: var(--step-0); margin: 1.8em 0 .3em; letter-spacing: 0; }

p, ul, ol, blockquote, figure, table { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.2em; }
li { margin-bottom: .35em; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:visited { color: var(--link-visit); }
a:hover { text-decoration-thickness: 2px; }

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

img { max-width: 100%; height: auto; display: block; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

/* ---------- layout ---------- */

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

.prose { max-width: var(--measure); }
.prose img, .wide { max-width: 100%; }

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header .shell {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4rem;
}
.wordmark {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800; font-size: 1.05rem;
  letter-spacing: -0.03em;
  color: var(--ink); text-decoration: none;
}
.wordmark:visited { color: var(--ink); }
.nav { display: flex; gap: clamp(.9rem, 3vw, 1.8rem); align-items: center; }
.nav a {
  font-size: .9rem; font-weight: 600; letter-spacing: 0;
  color: var(--ink-soft); text-decoration: none;
  padding: .3rem 0; border-bottom: 2px solid transparent;
}
.nav a:visited { color: var(--ink-soft); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--note); }

/* ---------- hero ---------- */

.hero { padding: clamp(3.5rem, 12vw, 8rem) 0 clamp(2.5rem, 7vw, 5rem); }
.hero .greeting {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 600; font-size: var(--step-1);
  color: var(--ink-soft); margin: 0 0 .4em;
}
.hero h1 {
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: .95;
  margin: 0 0 .35em;
}
/* The one bold move on the site: a marker swipe, drawn like a real highlighter. */
.swipe {
  background-image: linear-gradient(var(--note), var(--note));
  background-repeat: no-repeat;
  background-size: 100% 0.42em;
  background-position: 0 78%;
  padding-inline: .08em;
  color: var(--ink);
}
.hero .lede {
  max-width: 30rem;
  font-size: var(--step-1);
  line-height: 1.4;
  color: var(--ink-soft);
  margin: 0 0 2rem;
}

.btn {
  display: inline-block;
  background: var(--ink); color: var(--paper);
  padding: .7rem 1.3rem;
  font-size: .95rem; font-weight: 600; letter-spacing: 0;
  text-decoration: none; border: 1px solid var(--ink);
  border-radius: 2px;
}
.btn:visited { color: var(--paper); }
.btn:hover { background: transparent; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:visited { color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- work list ---------- */

.section { padding: clamp(3rem, 8vw, 6rem) 0; border-top: 1px solid var(--rule); }
.section-title { margin: 0 0 2.5rem; font-size: var(--step-2); }

.work { display: grid; gap: clamp(3rem, 8vw, 6rem); }
.work-item {
  display: grid;
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
}
@media (min-width: 52rem) {
  .work-item { grid-template-columns: 1.1fr 1fr; }
  .work-item:nth-child(even) .work-media { order: -1; }
}
/* No tinted panel here. Project artwork carries its own background, and a tint
   behind a white-backed PNG just draws a visible box around it. */
.work-media { background: none; padding: 0; }
.work-media img { margin-inline: auto; }
.work-body h3 { margin-top: 0; font-size: var(--step-2); }
.work-body p { color: var(--ink-soft); max-width: 32rem; }
.tag {
  display: inline-block;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: .75rem; font-weight: 700; letter-spacing: .02em;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  padding: .2rem .55rem; border-radius: 100px;
  margin-bottom: .8rem;
}
.tag--locked { border-color: var(--note); background: #FFF6D6; color: var(--ink); }

/* ---------- toolkit ---------- */

.toolkit {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 1px; background: var(--rule); border: 1px solid var(--rule);
}
.toolkit li {
  background: var(--paper); margin: 0;
  padding: 1.5rem 1rem; text-align: center;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: .8rem; font-weight: 600; letter-spacing: .01em;
  color: var(--ink-soft);
}
/* These are white PNGs from the old dark theme, so they're flipped to ink
   to be visible on a white page. */
.toolkit img {
  height: 32px; width: auto; margin: 0 auto .8rem;
  filter: invert(1) brightness(.3);
}

/* ---------- clients ---------- */

.clients {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 2.5rem; align-items: center;
}
.clients li { margin: 0; }
.clients img { max-height: 46px; width: auto; margin-inline: auto; }

/* ---------- contact ---------- */

.contact-grid { display: grid; gap: clamp(2rem, 6vw, 4rem); }
@media (min-width: 52rem) { .contact-grid { grid-template-columns: 1fr 1.15fr; } }

.contact-links { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.contact-links li { margin-bottom: .5rem; }

form.contact { display: grid; gap: 1rem; }
form.contact label {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: .82rem; font-weight: 600; letter-spacing: 0;
  display: block; margin-bottom: .35rem; color: var(--ink-soft);
}
form.contact input, form.contact textarea {
  width: 100%; font: inherit; font-size: 1rem;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); border-radius: 2px;
  padding: .65rem .75rem;
}
form.contact input:focus, form.contact textarea:focus { border-color: var(--ink); }
form.contact textarea { min-height: 9rem; resize: vertical; }
.form-note { font-size: var(--step--1); color: var(--ink-faint); margin: .25rem 0 0; }
.honeypot { position: absolute; left: -9999px; }

/* ---------- article / case study ---------- */

.article-head { padding: clamp(2.5rem, 7vw, 5rem) 0 1.5rem; }
.article-head h1 { max-width: 22ch; }
.meta {
  font-size: .82rem; font-weight: 600; letter-spacing: 0;
  color: var(--ink-faint);
  display: flex; flex-wrap: wrap; gap: .4rem 1.2rem;
  margin: 0 0 1rem;
}
.hero-image { margin: 0 0 clamp(2rem, 6vw, 3.5rem); }
.hero-image img { width: 100%; }

.article-layout { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
@media (min-width: 62rem) {
  .article-layout { grid-template-columns: 13rem minmax(0, 1fr); align-items: start; }
}
.rail { position: sticky; top: 5.5rem; font-size: .85rem; }
@media (max-width: 61.99rem) {
  .rail { position: static; border: 1px solid var(--rule); padding: 1rem 1.25rem; border-radius: 3px; }
}
.rail ol {
  list-style: none; padding: 0; margin: 0;
  counter-reset: rail;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 600;
}
.rail li { counter-increment: rail; margin-bottom: .55rem; }
.rail li::before {
  content: counter(rail, decimal-leading-zero);
  color: var(--ink-faint); margin-right: .6rem; font-variant-numeric: tabular-nums;
}
.rail a { color: var(--ink-soft); text-decoration: none; }
.rail a:visited { color: var(--ink-soft); }
.rail a:hover { color: var(--ink); text-decoration: underline; }

.article-body { max-width: var(--measure); }
.article-body > figure, .article-body > .figure-wide { max-width: none; }
.article-body h2 { scroll-margin-top: 5.5rem; }
.article-body h3 { scroll-margin-top: 5.5rem; }

figure { margin: 2rem 0; }
figcaption {
  font-size: var(--step--1); color: var(--ink-faint);
  margin-top: .6rem; line-height: 1.45;
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 500; letter-spacing: 0;
}
/* A hairline and no fill. Screenshots and sheets that are already white get a
   defined edge without being boxed in, and artwork on colour is left alone. */
figure img { border: 1px solid var(--hairline); border-radius: 2px; background: none; }

blockquote {
  margin: 1.8rem 0; padding-left: 1.2rem;
  border-left: 3px solid var(--note);
  color: var(--ink-soft); font-style: italic;
}

.callout {
  background: var(--panel);
  border-left: 3px solid var(--note);
  padding: 1.1rem 1.3rem;
  margin: 1.8rem 0;
  font-size: var(--step--1);
  line-height: 1.6;
}
.callout > :last-child { margin-bottom: 0; }
.callout h4 { margin-top: 0; }

.factbar {
  list-style: none; padding: 0; margin: 0 0 2.5rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1.5rem 2rem;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding-block: 1.5rem;
}
.factbar li { margin: 0; }
.factbar dt, .factbar .k {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: .75rem; font-weight: 600; letter-spacing: .01em;
  color: var(--ink-faint); margin-bottom: .2rem;
}
.factbar .v { font-size: 1.05rem; font-weight: 600; font-family: "Bricolage Grotesque", sans-serif; letter-spacing: -0.01em; }

table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.table-scroll { overflow-x: auto; margin: 1.8rem 0; }
th, td { text-align: left; vertical-align: top; padding: .7rem .8rem; border-bottom: 1px solid var(--rule); }
th { font-size: .78rem; letter-spacing: .01em; color: var(--ink-soft); background: var(--panel); }
td ul { margin: 0; padding-left: 1.1em; }

.pagination {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  border-top: 1px solid var(--rule); margin-top: 3.5rem; padding-top: 1.5rem;
  font-family: "Bricolage Grotesque", sans-serif; font-size: .9rem; font-weight: 600;
}

/* ---------- blog index ---------- */

.posts { display: grid; gap: clamp(2rem, 5vw, 3rem); }
.post-card { display: grid; gap: 1.25rem; padding-bottom: clamp(2rem, 5vw, 3rem); border-bottom: 1px solid var(--rule); }
@media (min-width: 46rem) { .post-card { grid-template-columns: 16rem minmax(0, 1fr); align-items: start; } }
.post-card:last-child { border-bottom: 0; }
.post-card img { border: 1px solid var(--hairline); border-radius: 2px; }
.post-card h2 { margin: .2rem 0 .5rem; font-size: var(--step-1); }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:visited { color: var(--ink); }
.post-card h2 a:hover { text-decoration: underline; text-decoration-color: var(--note); text-decoration-thickness: 3px; }
.post-card p { color: var(--ink-soft); margin-bottom: .8rem; }

/* ---------- related ---------- */

.related { display: grid; gap: 1.5rem; }
@media (min-width: 40rem) { .related { grid-template-columns: 1fr 1fr; } }
.related a {
  display: block; text-decoration: none; color: var(--ink);
  border: 1px solid var(--rule); border-radius: 3px; overflow: hidden;
}
.related a:visited { color: var(--ink); }
.related a:hover { border-color: var(--ink); }
/* contain, not cover: these are artwork rather than photography, so cropping
   them to fill the box lops the tops off screenshots. */
.related img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: contain;
  background: var(--paper); padding: .5rem;
  border-bottom: 1px solid var(--hairline);
}
.related span {
  display: block; padding: .9rem 1rem;
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 600; font-size: .95rem;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.footer-grid { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; align-items: start; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.site-footer li { margin: 0; }

/* ---------- 404 / protected ---------- */

.centered { text-align: center; padding: clamp(4rem, 14vw, 9rem) 0; }
.centered .lede { max-width: 34rem; margin-inline: auto; color: var(--ink-soft); }

/* ---------- print ---------- */
@media print {
  .site-header, .rail, form.contact, .related { display: none; }
  body { background: #fff; color: #000; }
}
