@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,700;1,9..144,400&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Playfair+Display:ital,wght@0,400;0,500;1,400&display=swap');

/* ─── RESET ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

/* ─── TOKENS ─────────────────────────────────────── */
:root {
  --bg:        #ffffff;
  --ink:       #1A1A18;
  --muted:     #999990;
  --rule:      #CCC9BE;
  --serif:     'Playfair Display', Georgia, serif;
  --sans:      'IBM Plex Sans', sans-serif;
  --max:       1280px;
  --pad:       80px;   /* outer margin */
  --gap:       32px;   /* gutter */
  --hover-accent: rgb(232, 82, 10); /* 👈 Your exact orange color */
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── LAYOUT ─────────────────────────────────────── */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ─── NAV ─────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo area: bengawalk.com [/ Page Name] */
.nav-logo-wrap {
  display: flex;
  align-items: baseline;
  gap: 0;
  padding-top: 25px;
}

.nav-logo {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -1.2px;
  color: var(--ink);
}

/* " / Page Name" appended on case study pages */
.nav-sub {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--muted);
  margin-left: 10px;
  display: none; /* shown via JS */
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 72px;
}

.nav-links a {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--muted);
  transition: color 0.15s;
  padding-bottom: 2px;
}

.nav-links a.active {
  color: var(--ink);
}

/* ─── MASTER HOVER BOX EFFECT ────────────────────── */
/* 1. Standard Elements (Padded box, pulled left to keep text aligned) */
.nav-logo, 
.nav-links a,
.work-title,
.about-row-val a,
.cs-meta-val a,
.cs-body-text a,
.cta-btn,
.foot-link {
  padding: 4px 8px; 
  display: inline-block; 
  width: fit-content; 
  margin-left: -8px; 
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* 2. Shop Elements (Zero horizontal padding to stay perfectly flush with image lines) */
.shop-item-name {
  padding: 4px 0px; 
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  margin-left: 0; 
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* 3. The Universal Orange Background Trigger */
.nav-logo:hover, 
.nav-links a:hover,
.work-title:hover,
.shop-item-name:hover,
.about-row-val a:hover,
.cs-meta-val a:hover,
.cs-body-text a:hover,
.cta-btn:hover,
.foot-link:hover {
  background-color: var(--hover-accent) !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

/* ─── HOME ─────────────────────────────────────── */
.hero {
  padding: 40px var(--pad) 0px; 
  max-width: var(--max);
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.08em;
  color: var(--ink);
  max-width: 700px;
}

.hero-foot {
  margin-top: 18px;
  display: flex;
  gap: 18px;
}

.hero-foot a {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s;
}

.hero-foot a:hover { color: var(--ink); }

/* ─── WORK LIST ─────────────────────────────────────── */
.work-list {
  max-width: var(--max);
  margin: 0 auto;
}

.work-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0 48px;
  padding: 9px var(--pad);
  align-items: baseline;
}

.work-date {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.work-title {
  font-size: 15px;
  font-weight: 500; 
  color: var(--ink);
  line-height: 1.45;
  cursor: pointer; 
  /* 👇 FIX: These resets prevent the SEO <h3> tag from warping the layout grid height */
  margin-top: 0;
  margin-bottom: 0;
  margin-right: 0;
}

.work-title .ext {
  color: var(--muted);
  font-size: 11px;
  margin-left: 4px;
}

/* ─── CASE STUDY ─────────────────────────────────────── */
.breadcrumb {
  display: none; 
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--pad);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }

/* Two-column layout: left = meta+body, right = photos */
.cs-layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px var(--pad) 40px;
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 0 var(--gap);
  align-items: start;
}

.cs-left {}

/* Meta table: label column + value column */
.cs-meta-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0 var(--gap);
  padding: 10px 0;
  align-items: baseline;
}

.cs-meta-label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.cs-meta-val {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.5;
}

/* About paragraph row */
.cs-about-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0 var(--gap);
  padding: 10px 0;
  align-items: start;
}

.cs-about-label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  padding-top: 3px;
}

.cs-body-text {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.8;
  color: #3a3a38;
}

/* Right column: image grid */
.cs-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cs-photo-main {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #D9D6D0;
  overflow: hidden;
  position: relative;
}

.cs-photo-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cs-photo-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px; 
}

.cs-photo-thumb {
  aspect-ratio: 1 / 1;
  background: #D9D6D0;
  overflow: hidden;
  position: relative;
}

.cs-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* placeholder label */
.cs-img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aaa9a4;
}

/* ─── SHOP ─────────────────────────────────────── */
.shop-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px var(--pad) 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px var(--gap);
}

.shop-item {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Square image — perfectly 1:1, clickable */
.shop-item-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  margin-bottom: 12px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  display: block;
  text-decoration: none;
}

.shop-item-img:hover { opacity: 0.88; }

.shop-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 4px;
}

.shop-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.shop-price {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.shop-status {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #000000;
  text-align: right;
}

/* ─── ABOUT / RESOURCES ─────────────────────────────────────── */
.about-table {
  padding: 0;
}

.about-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0 var(--gap);
  padding: 14px 0;
  align-items: start;
}

/* Desktop Resources list spacing */
#resources-list .about-row {
  padding: 9px 0;
  align-items: baseline;
}

.about-row-label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  padding-top: 2px;
}

.about-row-val {
  font-size: 15px;
  font-weight: 500;
  color: #000000;
  line-height: 1.7;
}

.about-row-val p {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.75;
  color: #000000;
  max-width: 520px;
}

/* Overrides the inline grey color for Hall of Fame names injected by JS */
.about-row-val span {
  color: #000000 !important;
}

/* Right column photos */
.about-photos {
  position: sticky;
  top: 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-content: start;
}

.about-photo {
  aspect-ratio: 1 / 1;
  background: #D9D6D0;
  position: relative;
  overflow: hidden;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Two-column about layout */
.about-layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px var(--pad) 40px;
  display: grid;
  grid-template-columns: 520px 1fr;
  gap: 0 64px;
  align-items: start;
}

/* Adds one extra line of space below the header specifically on the Resources page */
#sec-resources .about-layout {
  padding-top: 36px; 
}

/* Legacy selectors kept for compatibility */
.about-intro { display: none; }
.about-columns { display: none; }
.about-contact { display: none; }
.about-col-label { display: none; }
.about-person { display: none; }
.about-contact-label { display: none; }
.about-contact-val { display: none; }

/* ─── CTA BAR ─────────────────────────────────────── */
.cta-bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--pad);
}

/* ─── FOOTER ─────────────────────────────────────── */
footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--pad); 
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cta-btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--hover-accent); 
  cursor: pointer;
}

.foot-right { display: flex; gap: 24px; }
.foot-link {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── PAGE SECTIONS ─────────────────────────────────────── */
.page-section { display: none; }
.page-section.active { display: block; }
.shop-header { display: none; }

/* ─── EASTER EGG ─────────────────────────────────────── */
.majestic-trigger {
  display: inline-block;
  transition: color 0.2s ease;
}

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --pad: 48px; }
  .cs-layout { grid-template-columns: 1fr; }
  .cs-right { margin-top: 32px; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .about-layout { grid-template-columns: 1fr; }
  .about-photos { display: none; }
}

@media (max-width: 768px) {
  :root { --pad: 20px; }
  .hero h1 { font-size: 30px; }
  .work-item { grid-template-columns: 120px 1fr; gap: 0 24px; }
  .cs-meta-row { grid-template-columns: 110px 1fr; }
  .cs-about-row { grid-template-columns: 110px 1fr; }
  .cs-photo-row { grid-template-columns: 1fr 1fr; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .about-row { grid-template-columns: 110px 1fr; }
  nav .nav-inner { padding: 16px var(--pad); }
  
  .foot-right { gap: 12px !important; }

  #resources-list .about-row {
    display: flex;
    flex-direction: row; 
    align-items: baseline;
    gap: 16px !important; 
    margin-bottom: 20px;
    padding: 0;
  }
  
  #resources-list .about-row-label {
    font-size: 15px !important; 
  }
}

@media (max-width: 480px) {
  .nav-links { gap: 18px; }
  .cs-photo-row { grid-template-columns: 1fr; }
  .shop-grid { grid-template-columns: 1fr; }
  .about-row { grid-template-columns: 1fr; gap: 4px; }
  .about-row-label { color: var(--muted); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
  
  #resources-list .about-row-label {
    font-size: 15px !important; 
    letter-spacing: normal;
  }
}

.nav-inner {
  align-items: baseline !important;
}

#nav-sub {
  color: #757575 !important;           
  font-family: 'Fraunces', serif !important; 
  font-weight: 700 !important;         
  font-size: 30px !important;          
  line-height: 1 !important;
  margin-left: 13px !important;           
  letter-spacing: normal !important;   
  display: inline-block;
  vertical-align: baseline;            
  text-transform: none;                
}

@media (max-width: 768px) {
  :root { --pad: 20px; }

  .nav-logo-wrap {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important; 
    padding-top: 15px !important;
  }
  
  #nav-sub {
    display: block !important;
    font-size: 25px !important;        
    margin-left: 0 !important;         
    margin-top: 5px !important;
  }

  .nav-links a {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--muted) !important; 
    transition: color 0.15s ease;
  }

  .nav-links a.active {
    color: #000000 !important; 
  }
  
  .nav-links a:hover {
    background-color: var(--hover-accent) !important;
    color: #ffffff !important;
  }

  .cs-layout {
    grid-template-columns: 1fr !important; 
    padding: 24px var(--pad) 40px !important;
  }

  .cs-left {
    width: 100% !important;
  }

  .cs-right {
    width: 100% !important;
    margin-top: 40px !important; 
  }

  .work-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px !important;
    margin-bottom: 25px;
  }
  .work-title { font-size: 1.0em !important; }
  .work-date { font-size: 1.0em !important; }

  .nav-links {
    flex-direction: column !important;
    align-items: flex-end !important; 
    gap: 12px !important;            
    margin-top: 25px !important;     
  }
  
  .nav-inner {
    align-items: flex-start !important;
  }
}

/* Shrinks specific shop images while keeping the box size the same */
.shop-item-img.padded-image img {
  padding: 18%;
  object-fit: contain;
}