/* Juda Studio — mobile first. Base rules = 360px single column.
   Multi-column layout lives only inside min-width media queries. */

:root {
  --paper: #F1EEE8;
  --white: #FFFFFF;
  --ecru: #E6DFD2;
  --ink: #111110;
  --graphite: #2B2A28;
  --grey: #67635C;
  --line: rgba(17, 17, 16, 0.14);
  --kraft: #A9824F;
  --foot: #A7A5A0;

  --cond: "HelveticaNeue-CondensedBold", "Helvetica Neue Condensed Bold", "Arial Narrow", "Roboto Condensed", "Liberation Sans Narrow", "sans-serif-condensed", ui-sans-serif, sans-serif;
  --sans: "Helvetica Neue", Helvetica, ui-sans-serif, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --gut: 16px;
  --gap: 24px;
  --sec: 72px;
  --blk: 32px;
  --hh: 56px;
  --bar: calc(60px + env(safe-area-inset-bottom, 0px));

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html.menu-open { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font: 400 16px/1.6 var(--sans);
  padding-bottom: var(--bar);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

[id] { scroll-margin-top: var(--hh); }

:focus-visible {
  outline: 2px solid rgba(17, 17, 16, 0.7);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: var(--gut);
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 12px 16px;
  text-decoration: none;
  font: 500 12px/20px var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.skip:focus { top: 8px; }

.wrap {
  width: 100%;
  max-width: 1680px;
  margin-inline: auto;
  padding-inline: var(--gut);
}

/* ---------- Type ---------- */

.label {
  font: 500 12px/1.4 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  margin: 0 0 16px;
}

.hero-title,
.h-xl,
.h2,
.foot-mark,
.wordmark,
.menu-nav a {
  font-family: var(--cond);
  font-weight: 700;
  font-stretch: condensed;
  text-transform: uppercase;
  color: var(--ink);
  overflow-wrap: anywhere;
  max-width: 100%;
}

.hero-title {
  margin: 0 0 24px;
  font-size: clamp(72px, 22vw, 104px);
  line-height: 0.8;
  letter-spacing: -0.02em;
}
.hero-title span { display: block; }

.h-xl {
  margin: 0 0 24px;
  font-size: clamp(64px, 9vw, 150px);
  line-height: 0.82;
  letter-spacing: -0.025em;
}

.h2 {
  margin: 0 0 var(--blk);
  font-size: clamp(40px, 5vw, 76px);
  line-height: 0.88;
  letter-spacing: -0.015em;
}

/* ---------- Links & buttons ---------- */

.tlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.tlink > span {
  background: linear-gradient(currentColor, currentColor) no-repeat right bottom / 100% 1px;
  padding-bottom: 2px;
  transition: background-size 240ms ease;
  overflow-wrap: anywhere;
}
@media (hover: hover) {
  .tlink:hover > span { background-size: 0 1px; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--white);
  font: 500 13px/1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, transform 120ms ease;
}
@media (hover: hover) {
  .btn:hover { background: #333; border-color: #333; }
}
.btn:active { transform: scale(0.97); }

.btn-line {
  background: transparent;
  color: var(--ink);
}
@media (hover: hover) {
  .btn-line:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
}

/* ---------- Header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--hh);
  background: var(--paper); /* opaque: never lets content show through */
  border-bottom: 1px solid var(--line);
}

.head-in {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.nav,
.head-mail { display: none; }

.nav .tlink,
.head-mail {
  font: 500 12px/1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.head-mail { text-transform: none; letter-spacing: 0.04em; }

.burger {
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: none;
}
.burger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: currentColor;
  transition: transform 240ms ease;
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* Full-screen menu */
.menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--paper);
  padding: calc(var(--hh) + 32px) var(--gut) calc(var(--bar) + 32px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms ease, visibility 0s linear 240ms;
}
.menu.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 240ms ease, visibility 0s;
}
.menu-nav { display: flex; flex-direction: column; }
.menu-nav a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(40px, 5vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.015em;
  text-decoration: none;
}
.menu-mail {
  font: 500 13px/1 var(--sans);
  letter-spacing: 0.04em;
  color: var(--ink);
  align-self: flex-start;
}

/* ---------- Media frames ---------- */

.frame {
  position: relative;
  overflow: hidden;
  background: var(--ecru);
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@media (hover: hover) {
  .frame:hover img { transform: scale(1.03); }
}
.r-1x1 { aspect-ratio: 1 / 1; }
.r-3x2 { aspect-ratio: 3 / 2; }
.r-contact { aspect-ratio: 3 / 2; }

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--grain);
  background-size: 160px 160px;
  mix-blend-mode: multiply;
  opacity: 0.12;
}

.credit {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--grey);
}
.credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Pattern line (signature) ---------- */

.pline {
  display: flex;
  align-items: flex-start;
  height: 12px;
  width: 100%;
  min-width: 0;
}
.pl-dash {
  flex: 1 1 0;
  min-width: 0;
  height: 1px;
  margin-top: 5px;
  background: repeating-linear-gradient(90deg, var(--kraft) 0 6px, transparent 6px 11px);
}
.pl-arrow {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 0.5px;
  fill: none;
  stroke: var(--kraft);
  stroke-width: 1;
}
.pl-notch {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 5px;
  fill: var(--kraft);
}
.pline--short { max-width: 320px; }

/* ---------- Sections ---------- */

.sec { padding-block: var(--sec); }

/* 1. Hero */
.hero { position: relative; }
.hero-text { padding-top: 32px; padding-bottom: 40px; }
.hero-copy { min-width: 0; }
.hero-intro {
  max-width: 34em;
  margin-bottom: 24px;
  color: var(--graphite);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
}
.hero-actions .tlink {
  font: 500 13px/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.hero-media {
  position: relative;
  overflow: hidden;
  margin: 0;
  aspect-ratio: 4 / 5;
  background: var(--ecru);
}
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 50%;
}
.hero-fade { display: none; }

/* 2. About */
.manifesto {
  margin: 0 0 var(--blk);
  font: 400 clamp(28px, 3.4vw, 52px)/1.12 var(--sans);
  letter-spacing: -0.03em;
  text-indent: 12%;
  color: var(--ink);
}

/* 3. Services */
.services { background: var(--white); }
.svc > * { min-width: 0; }
.svc-head { margin-bottom: var(--blk); }
.svc-intro { max-width: 28em; }

.step,
.svc-fig.fig-2,
.svc-fig.fig-3 {
  position: relative;
  padding: 0 0 32px 32px;
}
.step::before,
.svc-fig.fig-2::before,
.svc-fig.fig-3::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(180deg, var(--kraft) 0 6px, transparent 6px 11px);
}
.step--last::before { bottom: 4px; }

.step-in {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.step-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.step-no {
  flex: none;
  font: 700 28px/1 var(--cond);
  font-stretch: condensed;
  color: var(--kraft);
}
.step-name {
  min-width: 0;
  margin: 0;
  font: 500 14px/1.3 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.step-in p { margin-top: 8px; }

.step-notch {
  position: absolute;
  left: 7px;
  top: 26px;
  width: 8px;
  height: 8px;
  fill: var(--kraft);
}
.spine-cap {
  position: absolute;
  left: 1.5px;
  width: 10px;
  height: 8px;
  fill: none;
  stroke: var(--kraft);
  stroke-width: 1.2;
  background: var(--white);
}
.spine-cap--top { top: 0; }
.spine-cap--bottom { bottom: 0; }

.svc-fig { margin: 0; }
.svc-fig.fig-4 { padding: 0 0 32px 32px; }

/* 휴대폰: 사진+단계 묶음을 옆으로 넘기는 슬라이드 (다음 장이 살짝 보임). 761px부터는 원래 격자 */
.svc-track {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 0 calc(var(--gut) * -1);
  padding: 0 var(--gut);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--gut);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.svc-track::-webkit-scrollbar { display: none; }
.svc-slide {
  flex: 0 0 82%;
  min-width: 0;
  scroll-snap-align: start;
}
.svc-slide .svc-fig { padding: 0 0 24px; }
.svc-slide .svc-fig::before { content: none; }
.svc-slide .frame { aspect-ratio: 4 / 3; }
.svc-count {
  margin: 16px 0 24px;
  font: 500 12px/1.4 var(--sans);
  letter-spacing: 0.1em;
  color: var(--grey);
}

.svc-foot p { margin-bottom: 4px; }
.svc-foot .tlink {
  font: 500 13px/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

/* 4. Who */
.who-cell {
  border-top: 1px solid var(--line);
  padding: 16px 0 32px;
  min-width: 0;
}
.cell-label {
  margin: 0 0 8px;
  font: 500 12px/1.4 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

/* 5. Enquire */
.enq > * { min-width: 0; }
.enq-lead { max-width: 32em; }

.contacts {
  margin: var(--blk) 0;
  border-top: 1px solid var(--line);
}
.contact-row {
  border-bottom: 1px solid var(--line);
  padding: 12px 0 4px;
}
.contact-row dt {
  font: 500 12px/1.4 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}
.contact-row dd { margin: 0; color: var(--ink); }

.enq-fig { margin: 0; }

.enq-form {
  margin-top: var(--blk);
  background: var(--white);
  padding: 32px 20px;
}
.form-title {
  margin: 0 0 24px;
  font: 500 14px/1.3 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}
.field { margin-bottom: 24px; }
.field label {
  display: block;
  margin-bottom: 4px;
  font: 500 12px/1.4 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font-size: 16px;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  padding-right: 28px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23111110' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat right 4px center;
  cursor: pointer;
  text-overflow: ellipsis;
}
.field textarea { min-height: 120px; resize: vertical; }

.enq-form .btn { width: 100%; }

.form-status { margin-top: 24px; color: var(--ink); }
.form-status:not(:empty) {
  padding: 16px;
  background: var(--ecru);
}
.form-status a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.form-note {
  margin-top: 24px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--grey);
}

/* 6. Footer */
.foot {
  background: var(--ink);
  color: var(--white);
  padding: 56px 0 24px;
}
.foot :focus-visible { outline-color: rgba(255, 255, 255, 0.8); }
.foot-grid > * { min-width: 0; }
.foot-pline { margin-bottom: 32px; }
.foot-line {
  max-width: 22em;
  margin-bottom: 16px;
  font: 400 20px/1.3 var(--sans);
  letter-spacing: -0.01em;
  color: var(--white);
}
.foot-credit {
  font-size: 13px;
  line-height: 1.5;
  color: var(--foot);
  margin-bottom: 24px;
}
.foot-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.foot-links .tlink {
  font: 500 12px/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
}
.foot-contact .tlink { text-transform: none; letter-spacing: 0.04em; font-size: 13px; }
.foot-menu { margin-top: 8px; }
.foot-mark {
  margin: 56px 0 16px;
  font-size: min(16.2vw, 272px);
  line-height: 0.78;
  letter-spacing: -0.02em;
  color: var(--white);
}
.foot-copy { font-size: 12px; color: var(--foot); }

/* 7. Mobile contact bar */
.mbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  height: var(--bar);
  padding: 8px var(--gut) calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--white);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}
.mbar > * { min-width: 0; }
.mbar .tlink {
  font: 500 13px/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.mbar .btn { min-height: 44px; width: 100%; padding: 0 12px; }

/* ================= ≥ 761px : 12-column grid ================= */
@media (min-width: 761px) {
  :root {
    --gut: 24px;
    --sec: 140px;
    --blk: 56px;
    --hh: 72px;
    --bar: 0px;
  }

  body { padding-bottom: 0; }
  .mbar { display: none; }

  .about-grid,
  .svc,
  .who-grid,
  .enq,
  .foot-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
  }

  .hero-title {
    font-size: clamp(120px, 13vw, 220px);
    line-height: 0.78;
    /* room for glyph ascent/descent that spills past the tight line box */
    padding-block: 0.14em;
  }

  /* Hero: photo fills, text on the bright wall */
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .hero > .hero-text,
  .hero > .hero-media { grid-area: 1 / 1; }
  .hero-media {
    aspect-ratio: auto;
    min-height: 88vh;
    height: 100%;
  }
  .hero-media img { object-position: 50% 50%; }
  .hero-fade {
    display: block;
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(241, 238, 232, 0.9) 0%, rgba(241, 238, 232, 0.55) 45%, rgba(241, 238, 232, 0) 75%);
  }
  .hero-text {
    position: relative;
    z-index: 2;
    align-self: center;
    padding-top: 72px;
    padding-bottom: 72px;
  }
  .hero-copy { width: calc((100% - 11 * var(--gap)) / 12 * 8 + 7 * var(--gap)); }
  .hero-intro { max-width: 30em; }

  /* About */
  .about-label { grid-column: 1 / 3; }
  .manifesto { grid-column: 3 / 12; }
  .about-pline { grid-column: 3 / 12; }

  /* Services */
  .svc { row-gap: 0; }
  .svc-track,
  .svc-slide {
    display: contents;
    margin: 0;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
  }
  .svc-slide .r-1x1 { aspect-ratio: 1 / 1; }
  .svc-slide .r-3x2 { aspect-ratio: 3 / 2; }
  .svc-count { display: none; }
  .svc-head { grid-column: 1 / 6; grid-row: 1; align-self: start; margin-bottom: 0; padding-right: 16px; }
  .step { grid-column: 6 / 13; padding-left: 48px; }
  .step-1 { grid-row: 1; }
  .step-2 { grid-row: 2; }
  .step-3 { grid-row: 3; }
  .step-4 { grid-row: 4; }
  .step-5 { grid-row: 5; }
  .step-6 { grid-row: 6; }

  .svc-fig.fig-2,
  .svc-fig.fig-3,
  .svc-fig.fig-4 { padding: 0 0 32px; }
  .svc-fig.fig-2::before,
  .svc-fig.fig-3::before { content: none; }
  .fig-2 { grid-column: 1 / 5; grid-row: 2; align-self: start; }
  .fig-3 { grid-column: 2 / 5; grid-row: 3; align-self: start; margin-top: 40px; }
  .fig-4 { grid-column: 1 / 8; grid-row: 7; padding-top: 56px !important; }
  .svc-foot { grid-column: 9 / 13; grid-row: 7; align-self: end; padding-bottom: 32px; }

  /* Who */
  .who-head { grid-column: 1 / 13; }
  .who-cells {
    grid-column: 1 / 13;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--gap);
  }

  /* Enquire */
  .enq-left { grid-column: 1 / 6; }
  .enq-form { grid-column: 7 / 13; margin-top: 0; padding: 40px 32px; align-self: start; }
  .r-contact { aspect-ratio: 4 / 5; }

  /* Footer */
  .foot { padding-top: 72px; }
  .foot-pline { grid-column: 1 / 13; margin-bottom: 56px; }
  .foot-intro { grid-column: 1 / 6; }
  .foot-contact { grid-column: 7 / 10; }
  .foot-menu { grid-column: 10 / 13; margin-top: 0; }
  .foot-mark { grid-column: 1 / 13; margin-top: 72px; }
  .foot-copy { grid-column: 1 / 13; }
}

/* ================= ≥ 1081px : text menu + asymmetry ================= */
@media (min-width: 1081px) {
  .head-in {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
  }
  .wordmark { grid-column: 1 / 4; }
  .nav {
    grid-column: 4 / 10;
    justify-self: center;
    display: flex;
    gap: 32px;
  }
  .head-mail { grid-column: 10 / 13; justify-self: end; display: inline-flex; }
  .burger { display: none; }
  .menu { display: none; }

  .hero-copy { width: calc((100% - 11 * var(--gap)) / 12 * 7 + 6 * var(--gap)); }
  .hero-fade {
    background: linear-gradient(90deg, rgba(241, 238, 232, 0.85) 0%, rgba(241, 238, 232, 0) 55%);
  }

  .fig-3 { margin-top: 80px; }

  .who-head { grid-column: 1 / 5; }
  .who-cells { grid-column: 5 / 13; }
  .who-cell:nth-child(2) { margin-top: 40px; }
  .who-cell:nth-child(3) { margin-top: 80px; }

  .enq-fig { margin-top: 40px; }
  .enq-form { margin-top: 120px; padding: 56px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.1s !important;
    transition-delay: 0s !important;
  }
  .frame:hover img,
  .frame img { transform: none !important; }
  .btn:active { transform: none; }
}

/* 사진 판 고르기용 감싸개 (optimize_images.py): 배치에 끼지 않음 */
picture{display:contents}
