/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button, input { font: inherit; border: none; background: none; }

/* Original text.css: p,dl,hr,h1,h2,h3,h4,h5,h6,ol,ul,pre,table,address,fieldset{margin-bottom:20px} */
p, dl, hr, h1, h2, h3, h4, h5, h6, ol, ul, pre, table, address, fieldset { margin-bottom: 20px; }

/* === CUSTOM PROPERTIES === */
:root {
  --blue: #9abcde;
  --green: #b0d384;
  --yellow: #f8d870;
  --red: #df6f85;
  --seafoam: #8fd4de;
  --dark-red: #cb2448;
  --gray: #666;
  --light-gray: #dbe0e6;
  --header-bar: #8d9aa9;
  --site-width: 960px;
  --inner-width: 950px;  /* 960.gs grid_24: 960px - 2*5px margins */
  --bar-width: 113px;
  --bar-overlap: -15px;
}

/* === TYPOGRAPHY === */
/* Original used 960.gs text.css: body{font:13px/1.5 'Helvetica Neue',...}
   All em-based sizes depend on this base. */
body {
  font-family: "junction-1","junction-2", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--gray);
  background: #fff;
  overflow-x: hidden;
}

.font-display {
  font-family: "league-gothic-1","league-gothic-2", sans-serif;
  font-weight: 400;
}

.font-chunk {
  font-family: "chunk-1","chunk-2", serif;
  font-weight: 400;
}

.font-script {
  font-family: "ff-masala-script-web-pro-1","ff-masala-script-web-pro-2", cursive;
  font-weight: 400;
}

.font-handwriting {
  font-family: "felt-tip-senior-1","felt-tip-senior-2", cursive;
}

/* === COLOR UTILITY CLASSES === */
.blue { color: var(--blue); }
.green { color: var(--green); }
.yellow { color: var(--yellow); }
.red { color: var(--red); }
.seafoam { color: var(--seafoam); }
.dark-red { color: var(--dark-red); }

/* === CONTAINER === */
.container {
  width: var(--site-width);
  margin: 0 auto;
  position: relative;
}

/* === COLOR BARS === */
/* Original: bars float:right inside 950px container. bar_5 rightmost, bar_1 leftmost.
   row-reverse replicates float:right ordering. */
#color-bars {
  position: absolute;
  top: 0;
  left: 50%;
  margin-left: calc(var(--inner-width) / -2);
  width: var(--inner-width);
  z-index: -1;
  display: flex;
  flex-direction: row-reverse;
  pointer-events: none;
}

#color-bars .bar {
  width: var(--bar-width);
  margin-left: var(--bar-overlap);
  opacity: 0;
  transition: opacity 0.5s ease;
}

#color-bars .bar.hovered {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

#color-bars .bar.current {
  opacity: 0.2;
}

#color-bars .bar.current.hovered {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

#bar-5 { background-color: var(--seafoam); }
#bar-4 { background-color: var(--red); }
#bar-3 { background-color: var(--yellow); }
#bar-2 { background-color: var(--green); }
#bar-1 { background-color: var(--blue); }

/* === NAVIGATION === */
/* Original: grid_24 = 950px (5px margin each side), height:105px, text-align:right */
#navigation {
  display: flex;
  align-items: flex-start;
  height: 105px;
  text-align: right;
  position: relative;
  margin: 0 5px;
}

/* Original: grid_4 prefix_1 alpha = content-box 150px + 40px padding = 190px total.
   border-box needs width:190px to match (190 - 40px padding = 150px content). */
#logo {
  font-size: 6em;
  line-height: 2.1em;
  width: 190px;
  flex-shrink: 0;
  padding-left: 40px;
  margin-left: 0;
  margin-right: 5px;
}

/* Original: grid_19 omega = 750px, margin-left:5px, margin-right:0 */
#nav-area {
  width: 750px;
  flex-shrink: 0;
  margin-left: 5px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}

/* Original: grid_19 (750px) with images float:right inside */
#nav-buttons {
  display: flex;
  flex-direction: row-reverse;
  width: 100%;
  position: relative;
}

#nav-buttons a {
  margin-left: var(--bar-overlap);
  position: relative;
  z-index: 10;
  display: block;
}

#nav-buttons img {
  display: block;
  max-width: none;
}

/* Original: ul margin-right:17px. Adjusted for flex vs float offset (labels were 17px rightward). */
#nav-labels {
  display: flex;
  flex-direction: row-reverse;
  width: 100%;
  margin-right: 22px;
}

/* Original: li{margin-left:30px} from text.css + width:68px = 98px per slot, matching button spacing */
#nav-labels a {
  display: block;
  width: 68px;
  margin-left: 30px;
  text-align: center;
  font-family: "league-gothic-1","league-gothic-2", sans-serif;
  font-size: 1.5em;
  letter-spacing: 0.08em;
  color: white;
  text-transform: uppercase;
  font-weight: 400;
}

/* === HEADER === */
#header {
  height: 350px;
  position: relative;
  z-index: -1;
  background-repeat: no-repeat;
  overflow: visible;
}

.header-tracks  { background-image: url(../images/head_bg_tracks.png); }
.header-wagons  { background: url(../images/head_bg_wagons.png) no-repeat 5px 55px; }
.header-building { background: url(../images/head_bg_building.png) no-repeat 0 40px; }
.header-stagecoach { background: url(../images/head_bg_stagecoach.png) no-repeat 0 40px; }
.header-wood { background: url(../images/head_bg_wood.png) no-repeat 0 40px; }
.header-scene { background: url(../images/head_bg_scene.png) no-repeat 27px 38px; }

#top-bar, #header-bar {
  width: 100%;
  background: var(--header-bar);
  height: 40px;
}

#header-bar {
  position: absolute;
  bottom: 0;
  opacity: 0.4;
}

#top-bar {
  opacity: 0.7;
}

#header-image {
  position: absolute;
  top: 15px;
  left: 0;
}

#header-image img {
  max-width: none;
  height: auto;
}

/* Positioned per-page via inline styles. Original: 4em = 52px at 13px base */
#header-text {
  position: relative;
  padding-top: 30px;
  color: var(--gray);
  font-size: 4em;
  line-height: 0.9em;
  z-index: 1;
}

/* === CONTENT === */
#content {
  min-height: 800px;
  background-repeat: no-repeat;
  padding-bottom: 40px;
}

.content-train { background: url(../images/body_bg_train.png) no-repeat 0 50px; }
.content-church { background: url(../images/body_bg_church.png) no-repeat 0 75px; }
.content-wagon { background: url(../images/body_bg_wagon.png) no-repeat 0 105px; }
.content-wagonback { background: url(../images/body_bg_wagonback.png) no-repeat 0 105px; }
.content-station { background: url(../images/body_bg_station.png) no-repeat 0 0; }

.content-body {
  color: var(--gray);
  margin-bottom: 30px;
}

.content-body p {
  font-family: "junction-1","junction-2", sans-serif;
  font-size: 1.2em;
  text-shadow: #ddd 1px 1px;
  line-height: 1.6;
}

.content-body h1 {
  border-bottom: solid 5px #d2eef2;
  font-family: "league-gothic-1","league-gothic-2", sans-serif;
  font-size: 4em;
  line-height: 1em;
  margin-bottom: 20px;
  font-weight: 400;
}

.content-body h2 {
  font-weight: 400;
  line-height: 1em;
  font-size: 3em;
  font-family: "league-gothic-1","league-gothic-2", sans-serif;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.content-body ul {
  font-family: "junction-1","junction-2", sans-serif;
  font-size: 1.4em;
}

.content-body hr {
  background: url("../images/content_object_hr.png") center no-repeat;
  height: 25px;
  border: none;
  margin: 20px 0;
}

/* Content intro - original: grid_20 (790px) + prefix_2 (80px) + suffix_2 (80px) = 950px */
.content-intro {
  text-shadow: #ddd 2px 1px;
  text-align: center;
  font-size: 2.8em;
  color: var(--gray);
  line-height: 0.9em;
  background: url(../images/content_object_intro_frame.png) no-repeat;
  padding: 115px 80px 40px 80px;
  font-family: "ff-masala-script-web-pro-1","ff-masala-script-web-pro-2", cursive;
  margin: 5px 0 30px;
  width: var(--inner-width);
}

.content-intro a {
  color: #333;
  text-decoration: underline;
  cursor: pointer;
}

.content-intro a:hover {
  text-shadow: #aaa 2px 2px;
}

.content-poster {
  font-family: "league-gothic-1","league-gothic-2", sans-serif;
  font-size: 5em;
  line-height: 1em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 30px;
  font-weight: 400;
}

#main-title {
  border-bottom: solid 5px #d2eef2;
  text-shadow: #ddd 3px 2px;
  text-align: right;
  color: #888;
  font-family: "league-gothic-1","league-gothic-2", sans-serif;
  font-size: 5em;
  line-height: 1em;
  padding-top: 30px;
  margin-bottom: 30px;
  font-weight: 400;
}

/* Original: grid_8 (310px) left + grid_16 (630px) right */
.home-grid {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 20px;
}

.martini-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: start;
}

.martini-grid .content-body:first-child { text-align: right; }
.martini-grid .content-object { opacity: 0.8; padding-top: 20px; }

/* === PROFILES === */
.profile {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  margin-bottom: 30px;
  margin-top: 10px;
  align-items: start;
}

.profile-pic img { max-width: 100%; height: auto; }

.profile.reverse {
  grid-template-columns: 1fr 200px;
  text-align: right;
}

.profile.reverse .profile-snip { text-align: left; }

.profile-name {
  font-family: "league-gothic-1","league-gothic-2", sans-serif;
  font-size: 3em;
  line-height: 0.9em;
  color: var(--gray);
  font-weight: 400;
}

.profile-title {
  font-family: "league-gothic-1","league-gothic-2", sans-serif;
  font-size: 1.8em;
  letter-spacing: 0.05em;
  border-bottom: 5px solid var(--light-gray);
  color: var(--gray);
  font-weight: 400;
  margin-bottom: 8px;
}

.profile-snip {
  font-family: "junction-1","junction-2", sans-serif;
  font-size: 1.2em;
  color: var(--gray);
  text-shadow: #ddd 1px 1px;
  line-height: 1.5;
}

/* === PORTFOLIO === */
.portfolio-section { margin-bottom: 30px; }

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 20px;
}

.portfolio-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.portfolio-item {
  background: url('../images/portfolio_shadow.png') no-repeat bottom;
  padding-bottom: 4px;
  text-align: center;
  width: 220px;
}

.portfolio-item img {
  background: #ddd;
  padding: 5px;
  max-width: 100%;
  height: auto;
  cursor: pointer;
  transition: opacity 0.2s;
}

.portfolio-item img:hover { opacity: 0.85; }

.client-list {
  font-family: "junction-1","junction-2", sans-serif;
  font-size: 1em;
  color: var(--gray);
  line-height: 1.8;
}

.client-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* === FOOTER / CONTACT === */
/* Original text.css gives h1 margin-bottom:20px; contact-bar margin-top:-32px creates 12px overlap */
#footer h1 {
  font-family: "league-gothic-1","league-gothic-2", sans-serif;
  font-size: 6em;
  line-height: 1em;
  text-shadow: #ddd 2px 0;
  color: var(--blue);
  font-weight: 400;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* Original: 950px wide (grid_24), 0 padding, children have margin: 30px 0 */
#contact-bar {
  background: var(--light-gray);
  margin-top: -32px;
  width: var(--inner-width);
  display: grid;
  grid-template-columns: 550px 1fr;
  position: relative;
}

/* Pigeon: original img at left:750px (right:0 in 950px container), top:-147px */
#pigeon {
  position: absolute;
  right: 0;
  top: -147px;
  width: 200px;
}

#pigeon img {
  max-width: none;
}

#footer-image { margin-top: -20px; }
#footer-image img { max-width: 100%; height: auto; }

/* Original: #contact_form, #contact_info { margin: 30px 0; } */
#contact-form {
  padding-left: 40px;
  margin: 30px 0;
}

.contact-info {
  padding: 0 40px;
  margin: 30px 0;
}

.form-input {
  border-bottom: 1px dashed #999;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-input label {
  font-family: "league-gothic-1","league-gothic-2", sans-serif;
  font-size: 2em;
  color: var(--gray);
  text-transform: uppercase;
  white-space: nowrap;
  font-weight: 400;
}

.form-input input[type="text"],
.form-input input[type="email"],
.form-input textarea {
  border: 0;
  font-family: "felt-tip-senior-1","felt-tip-senior-2", cursive;
  color: #333;
  font-size: 1.8em;
  background: var(--light-gray);
  flex: 1;
  padding: 4px 8px;
  width: 350px;
}

.form-submit { text-align: right; margin-top: 10px; }

.form-submit button {
  font-family: "league-gothic-1","league-gothic-2", sans-serif;
  font-size: 2em;
  color: var(--gray);
  background: #cbd2da;
  border: 1px solid #aaa;
  padding: 4px 20px;
  cursor: pointer;
  font-weight: 400;
}

.form-submit button:hover { background: #bcc3cb; }

label.error { color: red; display: none; }
label.error.visible { display: inline; }

.contact-info .contact-item {
  display: flex;
  gap: 10px;
  line-height: 2em;
  margin-bottom: 15px;
  align-items: baseline;
}

.contact-label {
  font-family: "league-gothic-1","league-gothic-2", sans-serif;
  font-size: 2em;
  color: var(--gray);
  text-transform: uppercase;
  font-weight: 400;
  white-space: nowrap;
  width: 50px;
}

.contact-content {
  font-family: "league-gothic-1","league-gothic-2", sans-serif;
  font-size: 2em;
  letter-spacing: 0.05em;
  color: var(--gray);
  text-transform: uppercase;
  font-weight: 400;
}

/* === MODALS === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-content {
  transform: scale(0.8);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.modal-overlay.active .modal-content { transform: scale(1); }

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.5);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  z-index: 10;
}

.modal-inline {
  color: var(--gray);
  background-color: #fff;
  background-size: contain;
  background-repeat: no-repeat;
}

.modal-inline p {
  font-size: 1.2em;
  font-family: "junction-1","junction-2", sans-serif;
  text-shadow: #ddd 1px 1px;
  line-height: 1.5;
}

.modal-inline h2 {
  font-weight: 400;
  font-size: 2.6em;
  font-family: "league-gothic-1","league-gothic-2", sans-serif;
  text-transform: uppercase;
  line-height: 1;
}

/* Original: 450x450 with 75px padding, background at natural size */
#modal-neighborhood {
  width: 600px;
  height: 600px;
  background-image: url('../images/content_object_modal_frame.png');
  background-size: 100% 100%;
  padding: 75px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#modal-services {
  width: 600px;
  height: 800px;
  background-image: url('../images/content_object_liquor_menu.png');
  background-size: contain;
  padding-top: 285px;
  padding-left: 40px;
  padding-right: 40px;
}

#modal-services ul {
  font-family: "league-gothic-1","league-gothic-2", sans-serif;
  font-size: 2.4em;
  line-height: 1.2em;
  text-transform: uppercase;
}

#modal-wanted {
  width: 800px;
  padding-top: 607px;
  background-image: url('../images/content_object_wanted_poster.png');
  background-size: contain;
}

#modal-wanted ul {
  font-family: "league-gothic-1","league-gothic-2", sans-serif;
  text-transform: uppercase;
  font-size: 4em;
  line-height: 1.2em;
  text-align: center;
  opacity: 0.8;
}

#modal-wanted ul li::before { content: '* '; }
#modal-wanted ul li::after { content: ' *'; }

.modal-lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.modal-lightbox-title {
  color: white;
  font-family: "league-gothic-1","league-gothic-2", sans-serif;
  font-size: 1.5em;
  text-align: center;
  margin-top: 10px;
  text-transform: uppercase;
}

/* === VALUES === */
.values-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
}

#values-list { padding-top: 55px; text-align: center; }

#form-message h2 {
  font-family: "league-gothic-1","league-gothic-2", sans-serif;
  text-transform: uppercase;
  font-weight: 400;
  font-size: 2em;
  color: var(--gray);
}

#form-message p {
  font-family: "league-gothic-1","league-gothic-2", sans-serif;
  font-size: 1.5em;
  color: var(--gray);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  #color-bars { display: none; }
  .container { width: auto; padding: 0 15px; }

  #navigation {
    flex-direction: column;
    height: auto;
    padding: 15px 0;
    gap: 10px;
  }

  #logo { font-size: 4em; padding-left: 0; }
  #nav-buttons img { width: 50px; height: 50px; }

  #header {
    height: auto;
    min-height: 250px;
    padding-bottom: 50px;
  }

  #header-text { font-size: 2.5em; }
  #header-image img { max-width: 100% !important; }

  .home-grid, .values-layout, .portfolio-grid, .martini-grid { grid-template-columns: 1fr; }
  .profile, .profile.reverse { grid-template-columns: 1fr; text-align: left; }
  .profile.reverse .profile-pic { order: -1; }
  .portfolio-items { grid-template-columns: repeat(2, 1fr); }
  .portfolio-item { width: auto; }
  .client-columns { grid-template-columns: 1fr; }
  #contact-bar { grid-template-columns: 1fr; }
  #pigeon { display: none; }
  .content-intro { font-size: 1.8em; margin: 5px 10px 30px; padding: 40px 20px; }
  .content-poster { font-size: 3em; }
  #main-title { font-size: 3em; }
  #footer h1 { font-size: 3.5em; }
}

.preload { display: none; }
