/*
Theme Name: M Design Studio
Theme URI: https://example.com/
Author: M Design Studio
Description: Custom WordPress theme for M Design Studio, a cabinetry and bespoke joinery studio in Orlando, Florida.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: mdesign-studio
*/

:root {
  --mds-yellow: #FBF508;
  --mds-dark-oak: #613520;
  --mds-medium-oak: #BA9D7A;
  --mds-light-oak: #EADAC5;
  --mds-paper: #FFFFFF;
  --mds-ink: #16110E;
  --mds-black: #0A0A0A;
  --mds-line: rgba(97, 53, 32, .28);
  --mds-radius: 18px;
  --mds-gutter: clamp(20px, 4vw, 64px);
  --mds-max: 1440px;
  --mds-serif-script: "Playwrite US Trad", cursive;
  --mds-mono: "Roboto Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--mds-dark-oak);
  background: var(--mds-paper);
  font-family: var(--mds-mono);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.03em;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .site-header { top: 32px; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
button, input, textarea, select { font: inherit; }
::selection { background: var(--mds-yellow); color: var(--mds-dark-oak); }

.mds-shell { width: min(calc(100% - (var(--mds-gutter) * 2)), var(--mds-max)); margin-inline: auto; }
.mds-section { padding: clamp(72px, 10vw, 150px) 0; }
.mds-section--tight { padding: clamp(48px, 7vw, 100px) 0; }
.mds-kicker {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.mds-display {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(46px, 8.5vw, 136px);
  line-height: .91;
  letter-spacing: -0.075em;
  font-weight: 500;
}
.mds-display em,
.mds-script {
  font-family: var(--mds-serif-script);
  font-style: normal;
  font-weight: 400;
  letter-spacing: -0.04em;
}
.mds-h2 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(34px, 5.2vw, 78px);
  line-height: .98;
  letter-spacing: -0.06em;
  font-weight: 500;
}
.mds-h3 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 500;
}
.mds-copy { max-width: 720px; font-size: clamp(16px, 1.5vw, 20px); }
.mds-copy p:last-child { margin-bottom: 0; }
.mds-button {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.mds-button:hover { background: var(--mds-dark-oak); color: var(--mds-yellow); transform: translateY(-2px); }
.mds-button--yellow { background: var(--mds-yellow); color: var(--mds-dark-oak); border-color: var(--mds-yellow); }
.mds-button--yellow:hover { background: var(--mds-paper); color: var(--mds-dark-oak); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--mds-line);
}
.site-header__inner {
  min-height: 82px;
  display: grid;
  grid-template-columns: 190px 1fr auto;
  align-items: center;
  gap: 28px;
}
.site-logo { display: inline-flex; align-items: center; }
.site-logo img { width: 172px; height: 54px; object-fit: contain; object-position: left center; }
.site-nav { justify-self: center; }
.site-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; list-style: none; padding: 0; margin: 0; }
.site-nav a { font-size: 12px; font-weight: 700; text-transform: uppercase; text-decoration: none; }
.site-nav a:hover, .site-nav .current-menu-item > a { text-decoration: underline; }
.site-header__cta { font-size: 12px; font-weight: 700; text-transform: uppercase; text-decoration: none; }
.menu-toggle { display: none; border: 0; background: transparent; color: var(--mds-dark-oak); padding: 10px 0; text-transform: uppercase; font-size: 12px; font-weight: 700; }

.mds-hero { min-height: calc(100vh - 82px); display: flex; flex-direction: column; }
.mds-hero__media {
  position: relative;
  min-height: clamp(420px, 68vh, 780px);
  background: var(--mds-black);
  overflow: hidden;
}
.mds-hero__media img { width: 100%; height: 100%; min-height: inherit; object-fit: cover; }
.mds-hero__tag {
  position: absolute;
  left: var(--mds-gutter);
  bottom: var(--mds-gutter);
  color: var(--mds-yellow);
  font-size: 12px;
  line-height: 1.4;
  text-transform: uppercase;
  font-weight: 700;
}
.mds-hero__intro { background: var(--mds-dark-oak); color: var(--mds-yellow); padding: clamp(32px, 4.5vw, 72px) 0; }
.mds-hero__intro-grid { display: grid; grid-template-columns: 1.45fr .55fr; gap: 50px; align-items: end; }
.mds-hero__note { margin: 0; max-width: 420px; justify-self: end; font-size: 14px; }

.mds-split { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(50px, 9vw, 150px); align-items: start; }
.mds-statement { background: var(--mds-light-oak); }
.mds-statement__script { margin: 0 0 26px; font-family: var(--mds-serif-script); font-size: clamp(42px, 6vw, 94px); line-height: 1; letter-spacing: -0.05em; }

.mds-services { background: var(--mds-paper); }
.mds-services__head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 60px; }
.mds-service-list { border-top: 1px solid var(--mds-line); }
.mds-service-row {
  display: grid;
  grid-template-columns: 70px minmax(220px, .8fr) 1.2fr;
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--mds-line);
  align-items: start;
}
.mds-service-row__number { color: var(--mds-medium-oak); }
.mds-service-row p { margin: 4px 0 0; max-width: 680px; }

.mds-work { background: var(--mds-dark-oak); color: var(--mds-paper); }
.mds-work__head { display: flex; justify-content: space-between; gap: 40px; align-items: end; margin-bottom: 48px; }
.mds-work-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.mds-project-card { grid-column: span 6; text-decoration: none; }
.mds-project-card:nth-child(3n) { grid-column: span 12; }
.mds-project-card__media { background: var(--mds-black); aspect-ratio: 4 / 3; overflow: hidden; }
.mds-project-card:nth-child(3n) .mds-project-card__media { aspect-ratio: 16 / 7; }
.mds-project-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.mds-project-card:hover img { transform: scale(1.025); }
.mds-project-card__meta { display: flex; justify-content: space-between; gap: 20px; padding: 15px 0 4px; font-size: 12px; text-transform: uppercase; }

.mds-process { background: var(--mds-yellow); color: var(--mds-dark-oak); }
.mds-process-grid { margin-top: 64px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid currentColor; }
.mds-process-step { padding: 22px 24px 10px 0; border-right: 1px solid currentColor; min-height: 260px; }
.mds-process-step:last-child { border-right: 0; padding-right: 0; padding-left: 24px; }
.mds-process-step:not(:first-child) { padding-left: 24px; }
.mds-process-step__num { display: block; margin-bottom: 50px; font-size: 12px; font-weight: 700; }
.mds-process-step p { margin: 16px 0 0; font-size: 14px; }

.mds-cta { background: var(--mds-light-oak); color: var(--mds-dark-oak); }
.mds-cta__inner { display: grid; grid-template-columns: 1fr auto; gap: 50px; align-items: end; }
.mds-cta__script { display: block; margin-top: 16px; font-family: var(--mds-serif-script); font-size: clamp(34px, 5vw, 72px); line-height: 1; }

.site-footer { background: var(--mds-dark-oak); color: var(--mds-paper); padding: 62px 0 30px; }
.site-footer__grid { display: grid; grid-template-columns: 1.3fr .7fr .7fr; gap: 60px; }
.site-footer__brand { color: var(--mds-yellow); font-size: clamp(30px, 4vw, 58px); line-height: 1; margin: 0; font-weight: 500; }
.site-footer__label { color: var(--mds-medium-oak); font-size: 11px; font-weight: 700; text-transform: uppercase; margin: 0 0 12px; }
.site-footer p, .site-footer a { font-size: 14px; }
.site-footer a { color: inherit; }
.site-footer__bottom { margin-top: 70px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.25); display: flex; justify-content: space-between; gap: 20px; font-size: 11px; text-transform: uppercase; }

.mds-page-hero { background: var(--mds-light-oak); padding: clamp(80px, 12vw, 180px) 0 clamp(56px, 9vw, 120px); }
.mds-page-hero--dark { background: var(--mds-dark-oak); color: var(--mds-yellow); }
.mds-page-hero__eyebrow { margin-bottom: 34px; }
.mds-page-hero__title { margin: 0; max-width: 13ch; font-size: clamp(52px, 9vw, 132px); line-height: .9; letter-spacing: -0.075em; font-weight: 500; }
.mds-page-hero__title .script { font-family: var(--mds-serif-script); font-weight: 400; }
.mds-page-body { padding: clamp(65px, 9vw, 130px) 0; }
.mds-prose { max-width: 880px; font-size: clamp(17px, 1.6vw, 21px); }
.mds-prose h2 { margin-top: 2.5em; font-size: clamp(30px, 4vw, 54px); line-height: 1; letter-spacing: -0.05em; }
.mds-prose a { font-weight: 700; }

.mds-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 60px; }
.mds-value { border-top: 1px solid var(--mds-line); padding-top: 18px; }
.mds-value p { max-width: 34ch; }

.mds-projects-page { background: var(--mds-dark-oak); color: var(--mds-paper); }
.mds-projects-page .mds-page-hero { background: var(--mds-dark-oak); color: var(--mds-yellow); }
.mds-projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px 20px; }
.mds-project-tile { text-decoration: none; }
.mds-project-tile__media { background: var(--mds-black); aspect-ratio: 4/3; overflow: hidden; }
.mds-project-tile__media img { width: 100%; height: 100%; object-fit: cover; }
.mds-project-tile__info { display: flex; justify-content: space-between; gap: 20px; padding-top: 14px; }
.mds-project-tile__info h2 { margin: 0; font-size: 17px; text-transform: uppercase; }
.mds-project-tile__info span { font-size: 12px; color: var(--mds-medium-oak); text-transform: uppercase; }

.mds-single-project__hero { background: var(--mds-black); min-height: 72vh; }
.mds-single-project__hero img { width: 100%; height: 72vh; object-fit: cover; }
.mds-project-intro { background: var(--mds-light-oak); padding: 58px 0; }
.mds-project-intro__grid { display: grid; grid-template-columns: 1.4fr .6fr; gap: 40px; }
.mds-project-details { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-content: start; }
.mds-project-detail { border-top: 1px solid var(--mds-line); padding-top: 10px; }
.mds-project-detail span { display:block; font-size: 11px; text-transform: uppercase; color: var(--mds-medium-oak); }
.mds-project-detail strong { display:block; margin-top: 4px; font-size: 14px; }

.mds-contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(50px, 9vw, 130px); }
.mds-contact-list { display: grid; gap: 28px; }
.mds-contact-item { border-top: 1px solid var(--mds-line); padding-top: 14px; }
.mds-contact-item span { display: block; font-size: 11px; text-transform: uppercase; color: var(--mds-medium-oak); margin-bottom: 6px; }
.mds-contact-form { display: grid; gap: 18px; }
.mds-field { display: grid; gap: 8px; }
.mds-field label { font-size: 11px; text-transform: uppercase; font-weight: 700; }
.mds-field input, .mds-field textarea, .mds-field select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--mds-dark-oak);
  border-radius: 0;
  background: transparent;
  color: var(--mds-dark-oak);
  padding: 14px 0;
  outline: none;
}
.mds-field textarea { min-height: 150px; resize: vertical; }
.mds-form-note { font-size: 12px; }
.mds-alert { padding: 14px 16px; margin-bottom: 22px; border: 1px solid currentColor; font-size: 13px; }

.mds-placeholder { background: var(--mds-black); width: 100%; height: 100%; min-height: 240px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 980px) {
  .site-header__inner { grid-template-columns: 1fr auto; }
  .site-nav { display: none; grid-column: 1 / -1; justify-self: stretch; padding-bottom: 24px; }
  .site-nav.is-open { display: block; }
  .site-nav ul { display: grid; gap: 12px; }
  .menu-toggle { display: inline-flex; }
  .site-header__cta { display: none; }
  .mds-hero__intro-grid, .mds-split, .mds-contact-grid, .mds-project-intro__grid { grid-template-columns: 1fr; }
  .mds-hero__note { justify-self: start; }
  .mds-process-grid { grid-template-columns: repeat(2, 1fr); }
  .mds-process-step:nth-child(2) { border-right: 0; }
  .mds-process-step:nth-child(3) { border-top: 1px solid currentColor; padding-left: 0; }
  .mds-process-step:nth-child(4) { border-top: 1px solid currentColor; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  body.admin-bar .site-header { top: 46px; }
  .site-header__inner { min-height: 70px; }
  .site-logo img { width: 148px; }
  .mds-hero { min-height: auto; }
  .mds-hero__media { min-height: 58vh; }
  .mds-service-row { grid-template-columns: 40px 1fr; }
  .mds-service-row p { grid-column: 2; }
  .mds-work-grid, .mds-projects-grid { grid-template-columns: 1fr; }
  .mds-project-card, .mds-project-card:nth-child(3n) { grid-column: 1; }
  .mds-project-card:nth-child(3n) .mds-project-card__media { aspect-ratio: 4/3; }
  .mds-work__head, .mds-services__head, .mds-cta__inner { display: grid; grid-template-columns: 1fr; align-items: start; }
  .mds-process-grid { grid-template-columns: 1fr; }
  .mds-process-step, .mds-process-step:not(:first-child), .mds-process-step:last-child { border-right: 0; border-top: 1px solid currentColor; padding: 22px 0 30px; min-height: 0; }
  .mds-process-step:first-child { border-top: 0; }
  .mds-process-step__num { margin-bottom: 30px; }
  .mds-values, .site-footer__grid, .mds-project-details { grid-template-columns: 1fr; }
  .site-footer__grid > :first-child { grid-column: auto; }
  .site-footer__bottom { flex-direction: column; }
}
