/* ===== CRAFTSMAN LTD — Global Styles ===== */

:root {
  --black: #0b0b0a;
  --black-2: #111110;
  --off-white: #f3f1ea;
  --grey: #8c897f;
  --grey-dim: #5c5a53;
  --hairline: rgba(243, 241, 234, 0.14);
  --hairline-strong: rgba(243, 241, 234, 0.28);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--off-white);
  font-family: 'IBM Plex Mono', monospace;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.serif { font-family: 'Fraunces', serif; }

.label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ===== NAV ===== */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 40px;
  mix-blend-mode: difference;
}
.wordmark {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--off-white);
}
nav { display: flex; gap: 36px; }
nav a {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--off-white);
  position: relative;
  padding-bottom: 3px;
}
nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0%;
  height: 1px;
  background: var(--off-white);
  transition: width .35s ease;
}
nav a:hover::after,
nav a.current::after { width: 100%; }

/* ===== HERO (index.html) ===== */
.hero {
  position: relative;
  height: 100svh;
  width: 100%;
  overflow: hidden;
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 40%;
  filter: grayscale(1) contrast(1.02);
  transform: scale(1.02);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 62%, rgba(0,0,0,0.55) 100%);
}
.hero-content {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 44px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.hero-tag {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--off-white);
  opacity: 0.85;
  line-height: 1.7;
}
.hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hero-scroll .line {
  width: 1px;
  height: 38px;
  background: var(--off-white);
  opacity: 0.5;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: .15; transform: scaleY(.6); transform-origin: top; }
  50% { opacity: .7; transform: scaleY(1); transform-origin: top; }
}
.hero-title {
  position: absolute;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  max-width: 820px;
}
.hero-title h1 {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(40px, 6.4vw, 92px);
  line-height: 1.04;
  color: var(--off-white);
  letter-spacing: -0.01em;
}
.hero-title h1 span {
  display: block;
  font-style: normal;
  font-weight: 400;
}

/* ===== PAGE HEADER (non-home pages) ===== */
.page-header {
  padding: 180px 40px 100px;
  border-bottom: 1px solid var(--hairline);
}
.page-header .eyebrow { margin-bottom: 24px; }
.page-header h1 {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(38px, 6vw, 80px);
  line-height: 1.08;
  color: var(--off-white);
  letter-spacing: -0.01em;
  max-width: 900px;
}

/* ===== SECTION SHARED ===== */
section {
  padding: 140px 40px;
  position: relative;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}
.eyebrow .dash { width: 34px; height: 1px; background: var(--hairline-strong); }

/* remove double border when a section immediately follows the page header */
.page-header + section { border-top: none; padding-top: 80px; }

/* ===== STATEMENT ===== */
.statement { border-top: 1px solid var(--hairline); }
.statement p {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(24px, 3.4vw, 46px);
  line-height: 1.35;
  max-width: 1100px;
  color: var(--off-white);
}
.statement p em {
  font-style: italic;
  color: var(--grey);
}
.statement-meta {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 820px;
}
.statement-meta div { border-top: 1px solid var(--hairline); padding-top: 16px; }
.statement-meta .num {
  font-family: 'Fraunces', serif;
  font-size: 34px;
  font-weight: 400;
  color: var(--off-white);
  display: block;
  margin-bottom: 6px;
}

/* ===== WORK TEASER (home) ===== */
.work-teaser { border-top: 1px solid var(--hairline); }
.work-teaser .serif {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(24px, 3.4vw, 46px);
  line-height: 1.35;
  max-width: 900px;
  color: var(--off-white);
  margin-bottom: 40px;
}

/* ===== WORK GRID ===== */
.work { border-top: 1px solid var(--hairline); }
.work-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  margin-top: 60px;
}
.piece {
  position: relative;
  overflow: hidden;
  background: var(--black-2);
  cursor: pointer;
}
.piece img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.1s cubic-bezier(.16,1,.3,1), filter .6s ease;
  filter: grayscale(1) contrast(1.02);
}
.piece:hover img { transform: scale(1.045); }
.piece-tag {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease;
}
.piece:hover .piece-tag { opacity: 1; transform: translateY(0); }
.piece::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.65) 100%);
  opacity: 0;
  transition: opacity .4s ease;
  z-index: 1;
}
.piece:hover::before { opacity: 1; }
.piece-tag .name { font-family: 'Fraunces', serif; font-style: italic; font-size: 16px; color: var(--off-white); }
.piece-tag .spec { font-size: 10px; letter-spacing: 0.14em; color: var(--grey); margin-top: 2px; }

.p1 { grid-column: 1 / span 4; aspect-ratio: 4/3.1; }
.p2 { grid-column: 5 / span 2; aspect-ratio: 1/1.55; }
.p3 { grid-column: 1 / span 2; aspect-ratio: 1/1.2; }
.p4 { grid-column: 3 / span 4; aspect-ratio: 4/2.5; }
.p5 { grid-column: 1 / span 6; aspect-ratio: 16/5; }

/* ===== GALLERY STATUS ===== */
.gallery-status {
  grid-column: 1/-1;
  padding: 80px 0;
  text-align: center;
}

/* ===== PROCESS ===== */
.process { border-top: 1px solid var(--hairline); }
.process-list { margin-top: 60px; }
.process-row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 24px;
  padding: 30px 0;
  border-top: 1px solid var(--hairline);
  align-items: baseline;
}
.process-row:last-child { border-bottom: 1px solid var(--hairline); }
.process-row .idx { font-size: 11px; color: var(--grey-dim); }
.process-row h3 { font-family: 'Fraunces', serif; font-weight: 400; font-style: italic; font-size: 24px; color: var(--off-white); }
.process-row p { font-size: 12.5px; line-height: 1.8; color: var(--grey); letter-spacing: 0.01em; }

/* ===== CTA ===== */
.cta {
  border-top: 1px solid var(--hairline);
  text-align: center;
  padding: 180px 40px;
}
.cta p.serif {
  font-size: clamp(30px, 5vw, 64px);
  font-weight: 300;
  font-style: italic;
  max-width: 900px;
  margin: 0 auto 40px;
  line-height: 1.2;
}
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--off-white);
  padding-bottom: 6px;
}
.cta-link .arrow { transition: transform .3s ease; }
.cta-link:hover .arrow { transform: translateX(6px); }

/* ===== CONTACT PAGE ===== */
.contact-section { border-top: 1px solid var(--hairline); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-top: 80px;
}
.contact-block { border-top: 1px solid var(--hairline); padding-top: 24px; }
.contact-block .block-title {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--grey-dim);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.contact-block a,
.contact-block p {
  display: block;
  font-size: 14px;
  color: var(--off-white);
  line-height: 2;
}
.contact-block a:hover { color: var(--grey); }

/* ===== QUOTE FORM ===== */
.form-section { border-top: 1px solid var(--hairline); }
.quote-form { margin-top: 60px; max-width: 900px; }
.form-row {
  display: grid;
  gap: 0 40px;
  margin-bottom: 40px;
}
.form-row.cols-3 { grid-template-columns: 140px 1fr 1fr; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-1 { grid-template-columns: 1fr; }
.form-field { display: flex; flex-direction: column; gap: 10px; }
.form-field label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey-dim);
}
.form-field input,
.form-field select,
.form-field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hairline-strong);
  color: var(--off-white);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  padding: 10px 0;
  outline: none;
  width: 100%;
  transition: border-color .3s ease;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-bottom-color: var(--off-white); }
.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238c897f'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 20px;
  cursor: pointer;
}
.form-field select option { background: var(--black); color: var(--off-white); }
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.6); cursor: pointer; }
.form-field input[type="file"] { color: var(--grey); cursor: pointer; padding: 12px 0; }
.file-hint {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--grey-dim);
  margin-top: -4px;
}
.form-submit {
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.form-submit button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--off-white);
  background: none;
  border: none;
  border-bottom: 1px solid var(--off-white);
  padding-bottom: 6px;
  cursor: pointer;
}
.form-submit button .arrow { transition: transform .3s ease; }
.form-submit button:hover:not(:disabled) .arrow { transform: translateX(6px); }
.form-submit button:disabled { opacity: 0.4; cursor: default; }
.form-status { font-size: 11px; letter-spacing: 0.08em; color: var(--grey); }

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--hairline);
  padding: 60px 40px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
footer .fwordmark {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-style: italic;
  color: var(--off-white);
  margin-bottom: 14px;
}
footer .col-title {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--grey-dim);
  margin-bottom: 14px;
}
footer .col a,
footer .col p {
  display: block;
  font-size: 13px;
  color: var(--off-white);
  line-height: 2;
}
footer .col a:hover { color: var(--grey); }
.foot-bottom {
  grid-column: 1/-1;
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--grey-dim);
}

/* ===== REVEAL ON SCROLL ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 820px) {
  header { padding: 20px 22px; }
  nav { display: none; }
  section { padding: 90px 22px; }
  .hero-title { left: 22px; right: 22px; }
  .hero-content { left: 22px; right: 22px; }
  .statement-meta { grid-template-columns: 1fr; gap: 24px; }
  .work-grid { grid-template-columns: 1fr; }
  .p1, .p2, .p3, .p4, .p5 { grid-column: 1/-1; aspect-ratio: 4/3.2; }
  .process-row { grid-template-columns: 1fr; gap: 8px; }
  footer { grid-template-columns: 1fr 1fr; }
  .foot-bottom { flex-direction: column; gap: 8px; }
  .page-header { padding: 120px 22px 60px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .form-row.cols-2,
  .form-row.cols-3 { grid-template-columns: 1fr; }
}
