/* Tvoy Novyy Dom: case study and product-screen viewer. */
.tnd-hero{padding-bottom:50px}
.tnd-hero h1{max-width:1100px}
.tnd-subtitle{font-size:clamp(26px,3vw,42px);line-height:1.25;color:#d9c7a7;max-width:940px;margin:0 0 26px;letter-spacing:-.7px}
.tnd-hero .lead{max-width:850px;font-size:16px;line-height:1.8}
.tnd-hero .case-meta{margin-top:48px}
.tnd-hero .case-meta>div{min-width:0}
.tnd-hero .case-meta p{max-width:340px}

/* Screens retain their complete 16:10 composition at every breakpoint. */
.tnd-main-screen{margin:0 auto}
.screen-open{display:block;position:relative;isolation:isolate;background:#f5f7fa;border:1px solid #39444c;cursor:zoom-in;overflow:hidden}
.screen-open>img{display:block;width:100%;height:auto;max-width:100%;aspect-ratio:8/5;object-fit:contain;object-position:center;image-rendering:auto;transform:none}
.screen-open:focus-visible{outline-offset:6px}
.screen-enlarge{position:absolute;right:14px;bottom:14px;padding:8px 13px;border:1px solid #bfa67980;background:#0b1014ed;color:#e6d3b4;font-size:10px;line-height:1.5;letter-spacing:.3px;box-shadow:0 4px 14px #0002;transition:background .2s,border-color .2s}
.screen-open:hover .screen-enlarge{background:#202d35;border-color:#d6ba8b}
.tnd-main-screen>figcaption{margin-top:14px;font-size:10px;color:#9ea9ae;letter-spacing:.5px}
.tnd-feature .crm-image{height:auto;min-width:0;padding:28px;display:flex;align-items:center;justify-content:center;background:#1a262e;overflow:visible}
.tnd-feature .crm-image img{width:100%;height:auto;max-width:1440px;aspect-ratio:8/5;object-fit:contain;object-position:center;transform:none;box-shadow:0 12px 36px #0005}
.tnd-feature .crm-copy{min-width:0;align-self:center}
.tnd-feature .crm-copy .text-link{line-height:1.6}
.tnd-feature:hover .crm-copy .text-link{color:#dfbc84}

.tnd-overview{display:grid;grid-template-columns:1fr 1.05fr;gap:90px;align-items:start}
.tnd-overview>div{min-width:0}
.tnd-overview>div:last-child{padding-top:34px}
.tnd-overview>div:last-child p{font-size:14px;line-height:1.9}
.tnd-overview>div:last-child p+p{margin-top:24px}
.tnd-overview h2,.tnd-outcome h2{font-size:clamp(35px,3.8vw,55px)}
.tnd-roles{padding-bottom:12px}
.tnd-roles-grid{display:grid;grid-template-columns:1fr 1fr;gap:44px}
.tnd-roles-grid article{min-width:0;border-top:1px solid #63573f;padding:25px 0 14px}
.tnd-roles-grid h3{font-family:Georgia,'Times New Roman',serif;font-size:29px;line-height:1.25;margin:13px 0 17px;color:#e8e2d5}
.tnd-roles-grid p{font-size:14px;line-height:1.85;max-width:510px}

.tnd-workflow{padding-bottom:90px}
.tnd-workflow h2{max-width:900px}
.tnd-flow{list-style:none;margin:45px 0 0;padding:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:27px;counter-reset:tnd-step}
.tnd-flow li{position:relative;min-width:0;padding-top:24px;border-top:1px solid #66593f;counter-increment:tnd-step}
.tnd-flow li:before{content:counter(tnd-step,decimal-leading-zero);display:block;font:16px/1.2 Georgia,'Times New Roman',serif;color:#cbb58e;margin-bottom:20px}
.tnd-flow li:not(:last-child):after{content:'→';position:absolute;top:17px;right:0;color:#8f7955;font-size:18px}
.tnd-flow h3{font-size:17px;color:#e4dfd5;margin-bottom:11px;line-height:1.4}
.tnd-flow p{font-size:12px;line-height:1.8}

.tnd-capabilities{border-top:1px solid #2b3338;border-bottom:1px solid #2b3338;padding-top:85px;padding-bottom:75px}
.tnd-modules{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:44px;row-gap:32px}
.tnd-modules article{border-top:1px solid #323d44;padding-top:21px;min-width:0}
.tnd-modules h3{font-size:18px;line-height:1.4;color:#e7e1d5;margin:12px 0 13px}
.tnd-modules p{font-size:13px;line-height:1.85}
.tnd-screens{scroll-margin-top:30px}
.tnd-screen-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:44px 30px}
.tnd-screen{margin:0;min-width:0}
.tnd-screen:last-child{grid-column:1/-1;max-width:1000px;width:100%;justify-self:center;margin-top:8px}
.tnd-screen figcaption{padding-top:20px;display:grid;grid-template-columns:31px 1fr;column-gap:12px;align-items:baseline}
.tnd-screen figcaption>.small-label{grid-row:1/3}
.tnd-screen h3{font-family:Georgia,'Times New Roman',serif;font-size:26px;color:#e9e2d4;line-height:1.3}
.tnd-screen figcaption p{grid-column:2;font-size:12px;line-height:1.8;margin-top:9px;max-width:620px}
.tnd-outcome{display:grid;grid-template-columns:1.15fr .85fr;gap:85px;border-top:1px solid #2b3338;padding-top:80px;padding-bottom:80px;align-items:start}
.tnd-outcome>div,.tnd-outcome>aside{min-width:0}
.tnd-outcome>div>p:not(.eyebrow){font-size:14px;line-height:1.9;margin-top:27px;max-width:650px}
.tnd-outcome aside{margin-top:15px;padding:30px;border-left:2px solid #8e7853;background:#111a20}
.tnd-outcome aside h3{font-size:16px;line-height:1.4;margin-bottom:15px;color:#d8c4a2}
.tnd-outcome aside p{font-size:12px;line-height:1.9}
.tnd-next{display:grid;grid-template-columns:1.1fr 1fr;align-items:center;gap:60px;padding-top:65px;padding-bottom:75px;border-top:1px solid #2b3338}
.tnd-next h2{font-size:clamp(36px,3.8vw,54px)}
.tnd-next>div:last-child{display:flex;flex-direction:column;align-items:flex-start;gap:20px;justify-self:end}
.tnd-next .eyebrow{margin-bottom:18px}

/* Native dialog preserves keyboard/Escape behavior; JS manages its contents. */
.screen-dialog{width:calc(100vw - 48px);max-width:1520px;max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);padding:0;margin:auto;border:1px solid #68716e;border-radius:0;background:#10171d;color:#f4efe5;box-shadow:0 28px 100px #000b;overflow:hidden}
.screen-dialog:not([open]){display:none}
.screen-dialog[open]{display:flex;flex-direction:column}
.screen-dialog::backdrop{background:#03070ce8;backdrop-filter:blur(6px)}
.screen-dialog-bar{display:flex;align-items:center;justify-content:space-between;gap:28px;flex-shrink:0;padding:14px 24px;border-bottom:1px solid #39434a;background:#10171d;position:relative;z-index:1}
.screen-dialog-bar h2{font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:1.4;letter-spacing:0;color:#e8dfd0;min-width:0}
.screen-dialog-bar button{flex-shrink:0;min-width:86px;min-height:44px;padding:8px 14px;border:1px solid #8e7c5e;background:#192329;color:#e8d2ae;font-size:12px;line-height:1.5}
.screen-dialog-bar button:hover{background:#cbb184;color:#10151a}
.screen-dialog-image{flex:1 1 auto;min-height:0;overflow:auto;background:#e9edf1;overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom;scrollbar-color:#78858e #e5e9ee}
.screen-dialog-image img{display:block;width:100%;min-width:900px;max-width:none;height:auto;object-fit:contain;image-rendering:auto}
.screen-dialog>p{padding:14px 24px 0;font-size:10px;line-height:1.6;flex-shrink:0;color:#a7b0b4}
.screen-dialog>a{align-self:flex-start;flex-shrink:0;margin:6px 24px 18px;border-bottom:1px solid #827354;padding:5px 0;font-size:11px;line-height:1.5;color:#dfc89e}
.screen-dialog>a:hover{color:#f2e2c5}
body:has(.screen-dialog[open]){overflow:hidden}

@media(min-width:1500px){.screen-dialog-image img{width:1440px;min-width:0;margin:auto}}
@media(max-width:1100px){
  .tnd-overview{gap:50px}
  .tnd-overview h2,.tnd-outcome h2{font-size:44px}
  .tnd-flow{gap:19px}
  .tnd-flow h3{font-size:15px}
  .tnd-flow p{font-size:11px}
  .tnd-modules{column-gap:27px}
  .tnd-outcome{gap:42px}
  .tnd-next{gap:40px}
  .tnd-feature .crm-image{padding:20px}
}
@media(max-width:760px){
  .tnd-hero{padding-bottom:35px}
  .tnd-hero h1{font-size:clamp(39px,8vw,58px);overflow-wrap:break-word}
  .tnd-subtitle{font-size:29px;letter-spacing:-.5px;line-height:1.25;margin-bottom:22px}
  .tnd-hero .lead{font-size:14px;line-height:1.85}
  .tnd-hero .actions{align-items:flex-start;gap:15px}
  .tnd-hero .case-meta{margin-top:32px}
  .tnd-hero .case-meta span{display:block}
  .tnd-hero .case-meta p{display:block;max-width:none;font-size:12px;margin-top:6px}
  .tnd-main-screen>figcaption{font-size:9px;margin-top:11px}
  .screen-enlarge{font-size:9px;padding:6px 9px;right:8px;bottom:8px}
  .tnd-feature .crm-image{height:auto;padding:22px 22px 0}
  .tnd-feature .crm-copy{padding:26px}
  .tnd-overview{grid-template-columns:1fr;gap:25px}
  .tnd-overview>div:last-child{padding-top:0}
  .tnd-overview>div:last-child p{font-size:13px}
  .tnd-overview h2,.tnd-outcome h2{font-size:39px}
  .tnd-roles-grid{grid-template-columns:1fr;gap:20px}
  .tnd-roles-grid article{padding:22px 0 12px}
  .tnd-roles-grid h3{font-size:27px}
  .tnd-roles-grid p{font-size:13px}
  .tnd-workflow{padding-bottom:65px}
  .tnd-flow{grid-template-columns:1fr;margin-top:35px;gap:0}
  .tnd-flow li{border-top:0;border-left:1px solid #66593f;margin-left:16px;padding:0 0 29px 31px;min-height:100px}
  .tnd-flow li:before{position:absolute;left:-17px;top:0;width:33px;height:33px;border:1px solid #66593f;background:#0b1014;display:grid;place-items:center;font-size:12px;margin:0}
  .tnd-flow li:not(:last-child):after{display:none}
  .tnd-flow li:last-child{padding-bottom:0;border-left-color:transparent;min-height:0}
  .tnd-flow h3{font-size:17px;line-height:1.4;padding-top:4px;margin-bottom:8px}
  .tnd-flow p{font-size:12px;max-width:560px}
  .tnd-capabilities{padding-top:60px;padding-bottom:60px}
  .tnd-modules{grid-template-columns:repeat(2,minmax(0,1fr));gap:26px}
  .tnd-modules h3{font-size:17px}
  .tnd-modules p{font-size:12px}
  .tnd-screen-grid{grid-template-columns:1fr;gap:35px}
  .tnd-screen:last-child{grid-column:auto;margin-top:0;max-width:none}
  .tnd-screen figcaption{padding-top:17px;grid-template-columns:22px 1fr;gap:0 9px}
  .tnd-screen h3{font-size:25px}
  .tnd-screen figcaption p{font-size:12px}
  .tnd-outcome{grid-template-columns:1fr;gap:28px;padding-top:60px;padding-bottom:60px}
  .tnd-outcome>div>p:not(.eyebrow){font-size:13px;margin-top:24px}
  .tnd-outcome aside{margin-top:0;padding:24px}
  .tnd-next{grid-template-columns:1fr;gap:30px;padding-top:55px;padding-bottom:60px}
  .tnd-next h2{font-size:39px}
  .tnd-next>div:last-child{justify-self:start;gap:15px}
  .screen-dialog{width:calc(100vw - 16px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px)}
  .screen-dialog-bar{gap:13px;padding:10px 12px}
  .screen-dialog-bar h2{font-size:13px;line-height:1.45}
  .screen-dialog-bar button{min-width:74px;min-height:44px;font-size:11px;padding:8px 10px}
  .screen-dialog-image{min-height:200px}
  .screen-dialog-image img{width:1100px;min-width:1100px}
  .screen-dialog>p{padding:12px 14px 0;font-size:9px}
  .screen-dialog>a{margin:5px 14px 12px;font-size:10px;min-height:36px;display:flex;align-items:center}
}
@media(max-width:480px){
  .tnd-modules{grid-template-columns:1fr;gap:25px}
  .tnd-modules h3{font-size:18px}
  .tnd-modules p{font-size:13px}
  .tnd-subtitle{font-size:27px}
  .tnd-overview h2,.tnd-outcome h2,.tnd-next h2{font-size:35px;letter-spacing:-1.2px}
  .tnd-hero .actions .button{font-size:10px;gap:16px}
  .tnd-feature .crm-image{padding:15px 15px 0}
  .tnd-feature .crm-copy{padding:24px}
  .tnd-feature .crm-copy h3{font-size:27px}
  .tnd-feature .crm-copy .eyebrow{letter-spacing:1.5px}
  .tnd-screen h3{font-size:23px}
}
@media(prefers-reduced-motion:reduce){.screen-enlarge{transition:none}}
