/* ==========================================================================
   sogolious.com — static rebuild
   Layout and type values are taken from the original Adobe Portfolio theme so
   the rendering matches the previous site.

   Reference metrics (measured at a 1440px viewport):
     .site-container   1400px max, centred, 20px gutters
     .sidebar-content  24.5%  (343px)
     main              75.5%  (1057px)
     .content          87% of its parent (modules 920px, header/caption 800px)
     .project-cover    50% wide, 1:1, no gutters
     page title        50px/50px, weight 400, uppercase, centred, #222
     breakpoints       932px, 540px
   ========================================================================== */

/* Jost — a metric-compatible open substitute for the original Futura PT,
   which is licensed through Adobe Fonts and cannot be self-hosted.
   To restore the exact face, add your own Adobe Fonts kit and change
   --font to: futura-pt, Jost, sans-serif   (see README). */
@font-face {
  font-family: 'Jost';
  src: url('../fonts/jost-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Jost';
  src: url('../fonts/jost-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --font: 'Jost', 'Futura', 'Century Gothic', 'Avenir Next', sans-serif;
  --ink: #222;
  --grey: #999;
  --bg: #fff;
  --container: 1400px;
  --gutter: 20px;
  --sidebar: 24.5%;
  --main: 75.5%;
}

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

html {
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  font-size: 16px;
  /* `normal` matches the original theme, which sets line-height per element.
     A global ratio here would inflate every nav line box. */
  line-height: normal;
}

/* height:auto is required — the width/height attributes on every <img> would
   otherwise force the intrinsic pixel height once width is capped. */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 20px; top: 20px; z-index: 500;
  background: var(--ink); color: #fff; padding: 10px 16px;
}
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* 1400px cap, centred. Above 1440 the surplus becomes the side gutter, which
   is how the original produced its 20px inset — no extra padding here. */
.site-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0;
}
.site-container::after { content: ''; display: table; clear: both; }

/* ---------- sidebar ---------------------------------------------------- */

.sidebar-content { float: left; width: var(--sidebar); }

.logo-wrap { width: 100%; padding-bottom: 66px; }

.logo-image { width: 100%; text-align: center; }
.logo-image img { width: 100%; height: auto; }

/* the 30px sits under the logo block, as in the original theme */
.sidebar-content .logo.logo-image { padding-bottom: 30px; }

.logo-secondary {
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  color: var(--ink);
  white-space: pre-line;
}

.site-nav { width: 87.5%; margin: 0 auto; }
.site-nav .group { padding-bottom: 40px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li { margin: 0; }

.site-nav .gallery-title { padding-bottom: 20px; text-align: center; line-height: 14px; }
.site-nav .gallery-title a {
  color: var(--ink); font-size: 14px; font-weight: 700; line-height: 14px;
  text-transform: uppercase;
}
.site-nav .gallery-title a:hover,
.site-nav .gallery-title a.active { color: var(--grey); }

.site-nav .project-title { padding-bottom: 10px; text-align: center; line-height: 20px; }
.site-nav .project-title a {
  color: var(--grey); font-size: 16px; font-weight: 400; line-height: 20px;
}
.site-nav .project-title a:hover,
.site-nav .project-title a.active { color: var(--ink); }

.site-nav .page-title { padding-bottom: 20px; text-align: center; line-height: 16px; }
.site-nav .page-title a {
  color: var(--grey); font-size: 16px; font-weight: 400; line-height: 16px;
}
.site-nav .page-title a:hover,
.site-nav .page-title a.active { color: var(--ink); }

/* ---------- main column ------------------------------------------------ */

main { float: left; width: var(--main); }

/* Width nesting, as measured on the original at 1440px:
     main 1057 -> .page 920 (87%) -> .page-header / captions 800 (87% again).
   The modules column itself fills .page at 100%. */
.page.standard-modules { width: 87%; margin: 0 auto; }

.page-header { width: 87%; margin: 0 auto; padding: 70px 0; }
.page-header .title {
  font-size: 50px;
  font-weight: 400;
  line-height: 50px;
  color: var(--ink);
  text-align: center;
  text-transform: uppercase;
  margin: 0;
  padding-bottom: 20px;
}

/* Blurb under the page title. pre-line is load-bearing: the copy stores its
   paragraph breaks as newlines rather than as markup. */
.page-header .description {
  font-size: 18px;
  font-weight: 400;
  line-height: 26px;
  color: var(--ink);
  text-align: center;
  white-space: pre-line;
  margin: 0;
}

.js-project-modules { width: 100%; margin: 0 auto; }

.project-module { margin: 0; }
.project-module-image { padding-bottom: 40px; }

.project-module-image .zoom {
  display: block; width: 100%; padding: 0; border: 0; margin: 0;
  background: none; font: inherit; color: inherit; cursor: zoom-in;
}

.module-caption-container { width: 87%; margin: 0 auto; }
.module-caption { font-size: 16px; font-weight: 400; line-height: normal; color: #000; }

/* Adobe's editor baked inline colours/sizes/line-heights into the rich text,
   and those are preserved verbatim in the markup. These are the theme
   defaults the editor styles sat on top of — measured from the live site:
   caption blocks 14/18 #999, body-text blocks 18px #999.
   Body-text blocks use 20px padding-bottom to separate paragraphs, since the
   editor emits no empty blocks between them. Caption blocks instead lead with
   15px padding-top — the breathing room between an image and its caption. */
.module-caption div, .module-caption p {
  font-size: 14px; line-height: 18px; color: var(--grey);
  margin: 0; padding-top: 15px; padding-bottom: 0;
}
.project-module-text .rich-text div, .project-module-text .rich-text p {
  font-size: 18px; line-height: 26px; color: var(--grey);
  text-align: center; margin: 0; padding-bottom: 20px;
}
.rich-text a { text-decoration: underline; }

.project-module-text { width: 87%; margin: 0 auto; padding-bottom: 40px; }

.project-module-video { padding-bottom: 40px; }
.embed { position: relative; width: 100%; background: #191919; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* side-by-side (tree) modules */
.tree-wrapper { display: flex; gap: 0; align-items: flex-start; }
.tree-child-wrapper { flex: 1; min-width: 0; padding: 0 10px; }
.tree-child-wrapper:first-child { padding-left: 0; }
.tree-child-wrapper:last-child { padding-right: 0; }
.tree-child-wrapper .module-caption-container,
.tree-child-wrapper .project-module-text { width: 100%; }

/* media-collection galleries keep the original justified rows */
.grid--main { display: flex; flex-wrap: wrap; margin: 0 -5px; }
.grid__item-container { padding: 0 5px 10px; }
.grid__item-container img { width: 100%; height: auto; }

/* ---------- work grid --------------------------------------------------- */

.project-covers { display: flex; flex-wrap: wrap; width: 100%; }

.project-cover { position: relative; width: 50%; }
.project-cover .cover-image { position: relative; width: 100%; overflow: hidden; }
.project-cover .cover-image::before { content: ''; display: block; padding-bottom: 100%; }
.project-cover .cover { position: absolute; inset: 0; }
.project-cover .cover img { width: 100%; height: 100%; object-fit: cover; }

/* title/date fade in over the cover on hover, as in the original */
.project-cover .details-wrap {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s ease;
  background: rgba(255, 255, 255, .9);
}
.project-cover:hover .details-wrap,
.project-cover:focus-within .details-wrap { opacity: 1; }
.project-cover .title {
  font-size: 50px; font-weight: 400; line-height: 50px;
  color: var(--ink); text-align: center; text-transform: uppercase;
  width: 90%; margin: 0;
}
.project-cover .date {
  font-size: 20px; font-weight: 400; line-height: 20px;
  color: var(--grey); text-align: center; padding-bottom: 20px; margin: 0;
}

/* ---------- back to top / footer --------------------------------------- */

.back-to-top { clear: both; display: block; padding: 60px 0; text-align: center; }
.back-to-top a { color: var(--grey); font-size: 18px; line-height: 18px; }
.back-to-top .arrow { display: inline-block; margin-right: 10px; }

.site-foot {
  clear: both; text-align: center;
  padding: 0 0 60px; color: var(--grey); font-size: 13px;
}
.site-foot a { color: var(--grey); text-decoration: underline; }

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

.cform { width: 87%; margin: 0 auto; max-width: 520px; padding-bottom: 40px; }
.cform label { display: block; font-size: 14px; color: var(--ink); margin-bottom: 18px; }
.cform input, .cform textarea {
  display: block; width: 100%; margin-top: 6px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid #ddd; border-radius: 0; padding: 10px;
}
.cform input:focus, .cform textarea:focus { border-color: var(--ink); outline: none; }
.cform textarea { resize: vertical; }
.cform button {
  font: inherit; font-size: 14px; text-transform: uppercase; letter-spacing: .04em;
  background: var(--ink); color: #fff; border: 0; padding: 12px 34px; cursor: pointer;
}
.cform button:hover { background: var(--grey); }
.contact-email { width: 87%; margin: 0 auto 30px; font-size: 18px; }
.contact-email a { text-decoration: underline; }
.form-note { font-size: 13px; color: var(--grey); margin-top: 14px; }

/* ---------- responsive header (<= 932px) -------------------------------- */

.site-header { display: none; }

.burger {
  background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 10px;
}
.burger span { display: block; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s ease; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 932px) {
  .site-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; min-height: 70px;
    position: sticky; top: 0; z-index: 50;
    background: #fff; border-bottom: 1px solid rgba(0, 0, 0, .08);
  }
  .site-header .logo-image { width: auto; }
  .site-header .logo-image img { max-height: 60px; width: auto; }

  .sidebar-content { float: none; width: auto; }
  .sidebar-content .logo-wrap { display: none; }

  main { float: none; width: 100%; }

  /* nav becomes a full-screen overlay */
  .site-nav {
    position: fixed; inset: 0; z-index: 60;
    background: #fff; width: 100%;
    padding: 50px 5% 0; overflow: auto;
    display: none; text-align: center;
  }
  .site-nav.open { display: block; }
  .site-nav .group { padding: 0; }
  .site-nav .page-title, .site-nav .project-title, .site-nav .gallery-title {
    display: block; text-align: center; padding: 0 0 30px;
  }
  .site-nav .page-title a, .site-nav .project-title a, .site-nav .gallery-title a {
    font-size: 22px; line-height: 32px;
  }

  .page-header { padding: 40px 0; }
  .page-header .title { font-size: 31px; line-height: 31px; }
  .project-cover .title { font-size: 31px; line-height: 31px; }
  .back-to-top { padding: 28px 0; }
  .back-to-top a { font-size: 14px; line-height: 14px; }
}

@media (max-width: 540px) {
  .project-cover { width: 100%; }
  .page-header .title { font-size: 25px; line-height: 25px; }
  .project-cover .title { font-size: 25px; line-height: 25px; }
  .js-project-modules, .content { width: 100%; }
  .module-caption-container, .project-module-text, .cform, .contact-email { width: 100%; }
  .tree-wrapper { display: block; }
  .tree-child-wrapper { padding: 0; }
  .back-to-top { padding: 25px 0; }
  .back-to-top a { font-size: 14px; line-height: 20px; }
}

/* ---------- lightbox ---------------------------------------------------- */

.lb {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(255, 255, 255, .98);
  display: grid; place-items: center; padding: 40px;
}
.lb[hidden] { display: none; }
.lb-stage { margin: 0; max-width: 100%; max-height: 100%; }
.lb-stage img { max-width: 100%; max-height: 82vh; width: auto; margin: 0 auto; object-fit: contain; }
.lb-stage figcaption { text-align: center; font-size: 14px; color: var(--grey); margin-top: 12px; }
.lb button {
  position: absolute; background: none; border: 0; color: var(--ink);
  cursor: pointer; line-height: 1; padding: 8px; opacity: .6;
}
.lb button:hover { opacity: 1; }
.lb-close { top: 16px; right: 20px; font-size: 38px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 52px; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
@media (max-width: 700px) {
  .lb { padding: 20px; }
  .lb-prev, .lb-next { top: auto; bottom: 12px; transform: none; font-size: 38px; }
  .lb-prev { left: 24px; } .lb-next { right: 24px; }
}

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

@media print {
  .site-header, .site-nav, .sidebar-content, .back-to-top, .lb, .skip { display: none !important; }
  main { width: 100%; float: none; }
}
